@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.
- package/CHANGELOG.md +20 -0
- package/README.md +318 -362
- package/dist/error.cjs +21 -1
- package/dist/error.mjs +7 -1
- package/dist/index.cjs +88 -1
- package/dist/index.mjs +35 -1
- package/dist/packem_shared/AlreadyExistsError-DpxtwQot.cjs +34 -0
- package/dist/packem_shared/AlreadyExistsError-GK7J9fVA.mjs +32 -0
- package/dist/packem_shared/DirectoryError-D8FHcAqu.cjs +34 -0
- package/dist/packem_shared/DirectoryError-DByTWE7t.mjs +32 -0
- package/dist/packem_shared/F_OK-CWSqQIdF.cjs +17 -0
- package/dist/packem_shared/F_OK-JER1LjUr.mjs +8 -0
- package/dist/packem_shared/JSONError-BCIIHvzq.mjs +28 -0
- package/dist/packem_shared/JSONError-gkXvBSar.cjs +30 -0
- package/dist/packem_shared/LF-CU3KsvZC.mjs +20 -0
- package/dist/packem_shared/LF-bB2qO80j.cjs +28 -0
- package/dist/packem_shared/NotEmptyError-BCS_5pPt.cjs +34 -0
- package/dist/packem_shared/NotEmptyError-DCXooh5l.mjs +32 -0
- package/dist/packem_shared/NotFoundError-B_1nPl3K.cjs +34 -0
- package/dist/packem_shared/NotFoundError-CUdcC61I.mjs +32 -0
- package/dist/packem_shared/PermissionError-CqGMI9qC.mjs +32 -0
- package/dist/packem_shared/PermissionError-QFMKgk2l.cjs +34 -0
- package/dist/packem_shared/WalkError-B7_AVs7d.cjs +27 -0
- package/dist/packem_shared/WalkError-H9EuRv7O.mjs +25 -0
- package/dist/packem_shared/assertValidFileContents-CRVvyM6b.cjs +11 -0
- package/dist/packem_shared/assertValidFileContents-Ox-ScfeK.mjs +9 -0
- package/dist/packem_shared/assertValidFileOrDirectoryPath-BMbgA-eI.cjs +11 -0
- package/dist/packem_shared/assertValidFileOrDirectoryPath-BWWgA1wj.mjs +9 -0
- package/dist/packem_shared/collect-BtDVJEOm.mjs +16 -0
- package/dist/packem_shared/collect-DxUriHCH.cjs +18 -0
- package/dist/packem_shared/collectSync-BaA0s001.cjs +18 -0
- package/dist/packem_shared/collectSync-CGjdb50I.mjs +16 -0
- package/dist/packem_shared/emptyDir-DcCfiNcf.cjs +22 -0
- package/dist/packem_shared/emptyDir-Dw5xSBox.mjs +20 -0
- package/dist/packem_shared/emptyDirSync-BoknkGUe.cjs +21 -0
- package/dist/packem_shared/emptyDirSync-DTGPXQ3v.mjs +19 -0
- package/dist/packem_shared/ensureDir-XiBlkOLR.mjs +33 -0
- package/dist/packem_shared/ensureDir-iUK2ga5M.cjs +35 -0
- package/dist/packem_shared/ensureDirSync-2IFUHFK2.mjs +33 -0
- package/dist/packem_shared/ensureDirSync-CXdMkg0Y.cjs +35 -0
- package/dist/packem_shared/ensureFile-Br8tFUJ7.cjs +29 -0
- package/dist/packem_shared/ensureFile-C2bWlBEa.mjs +27 -0
- package/dist/packem_shared/ensureFileSync-CZzSkNGC.cjs +29 -0
- package/dist/packem_shared/ensureFileSync-DkFfhOEs.mjs +27 -0
- package/dist/packem_shared/ensureLink-CFiabAD3.mjs +34 -0
- package/dist/packem_shared/ensureLink-Dqw5GBDq.cjs +36 -0
- package/dist/packem_shared/ensureLinkSync-BVw3h6sK.cjs +36 -0
- package/dist/packem_shared/ensureLinkSync-Dk-YeRg6.mjs +34 -0
- package/dist/packem_shared/ensureSymlink-CFSfreco.cjs +54 -0
- package/dist/packem_shared/ensureSymlink-CSqngPoI.mjs +52 -0
- package/dist/packem_shared/ensureSymlinkSync-BCd9bzsx.cjs +58 -0
- package/dist/packem_shared/ensureSymlinkSync-QRaNZX2E.mjs +56 -0
- package/dist/packem_shared/findUp-C8_QpAtD.mjs +63 -0
- package/dist/packem_shared/findUp-DA511Swp.cjs +65 -0
- package/dist/packem_shared/findUpSync-DVOd3V-q.mjs +63 -0
- package/dist/packem_shared/findUpSync-u1rGibzw.cjs +65 -0
- package/dist/packem_shared/get-file-info-type-BpRzQHvd.cjs +18 -0
- package/dist/packem_shared/get-file-info-type-CeiZ6n6g.mjs +16 -0
- package/dist/packem_shared/index-ajT9ecry.mjs +108 -0
- package/dist/packem_shared/index-ngvEMjBI.cjs +110 -0
- package/dist/packem_shared/is-stats-identical-BfdEfO6i.cjs +7 -0
- package/dist/packem_shared/is-stats-identical-ByTYZ2Aw.mjs +5 -0
- package/dist/packem_shared/isAccessible-Bonsm1Ez.mjs +20 -0
- package/dist/packem_shared/isAccessible-ZNVGsSb7.cjs +22 -0
- package/dist/packem_shared/isAccessibleSync-3gnUWUwX.mjs +20 -0
- package/dist/packem_shared/isAccessibleSync-VWjQa-US.cjs +22 -0
- package/dist/packem_shared/move-DgF7Ul9L.mjs +114 -0
- package/dist/packem_shared/move-Dh925GL9.cjs +121 -0
- package/dist/packem_shared/parseJson-DcUo4Rpt.cjs +251 -0
- package/dist/packem_shared/parseJson-n9THWOFI.mjs +249 -0
- package/dist/packem_shared/readFile-DUM-xNoB.mjs +46 -0
- package/dist/packem_shared/readFile-iFUhZHnh.cjs +48 -0
- package/dist/packem_shared/readFileSync-B3NTOR-W.cjs +33 -0
- package/dist/packem_shared/readFileSync-Cck96_o0.mjs +31 -0
- package/dist/packem_shared/readJson-DIHRleEE.mjs +25 -0
- package/dist/packem_shared/readJson-JrCHMN3m.cjs +27 -0
- package/dist/packem_shared/readJsonSync-BPfxTuQL.mjs +25 -0
- package/dist/packem_shared/readJsonSync-o_MAOlUv.cjs +27 -0
- package/dist/packem_shared/readYaml-sR4bqUel.cjs +15 -0
- package/dist/packem_shared/readYaml-vVKK8ZzY.mjs +13 -0
- package/dist/packem_shared/readYamlSync-C3oOzxiN.cjs +15 -0
- package/dist/packem_shared/readYamlSync-MOLH4gXB.mjs +13 -0
- package/dist/packem_shared/remove-B2nxUObP.mjs +18 -0
- package/dist/packem_shared/remove-BpDiVPns.cjs +20 -0
- package/dist/packem_shared/removeSync-BosXW624.cjs +20 -0
- package/dist/packem_shared/removeSync-C87yepDI.mjs +18 -0
- package/dist/packem_shared/resolve-symlink-target-BbpEHdU2.mjs +18 -0
- package/dist/packem_shared/resolve-symlink-target-DImIddt6.cjs +20 -0
- package/dist/packem_shared/stripJsonComments-B66nRaTZ.mjs +21 -0
- package/dist/packem_shared/stripJsonComments-eDrcJvBT.cjs +23 -0
- package/dist/packem_shared/to-uint-8-array-B4CjMOD3.mjs +21 -0
- package/dist/packem_shared/to-uint-8-array-BaTEyX3D.cjs +23 -0
- package/dist/packem_shared/walk-BW7b4GXI.cjs +106 -0
- package/dist/packem_shared/walk-CNcSYQVq.mjs +104 -0
- package/dist/packem_shared/walk-include-CMUSRa86.mjs +20 -0
- package/dist/packem_shared/walk-include-yUdRrF16.cjs +23 -0
- package/dist/packem_shared/walkSync-BzxdFWLU.mjs +103 -0
- package/dist/packem_shared/walkSync-DgPj93NL.cjs +105 -0
- package/dist/packem_shared/writeFile-B7dhfseN.mjs +58 -0
- package/dist/packem_shared/writeFile-DKu5-M8x.cjs +60 -0
- package/dist/packem_shared/writeFileSync-Db6pmY0q.cjs +60 -0
- package/dist/packem_shared/writeFileSync-mMGYqOc8.mjs +58 -0
- package/dist/packem_shared/writeJson-BSQE2uFN.mjs +31 -0
- package/dist/packem_shared/writeJson-DtnnjTix.cjs +33 -0
- package/dist/packem_shared/writeJsonSync-C_i6LsGT.mjs +31 -0
- package/dist/packem_shared/writeJsonSync-Dz5-B2PD.cjs +33 -0
- package/dist/packem_shared/writeYaml-B-KoZN0E.cjs +14 -0
- package/dist/packem_shared/writeYaml-DSTzKc0_.mjs +12 -0
- package/dist/packem_shared/writeYamlSync-D6borSP1.cjs +14 -0
- package/dist/packem_shared/writeYamlSync-agxYIea0.mjs +12 -0
- package/dist/utils.cjs +19 -1
- package/dist/utils.mjs +6 -1
- package/package.json +15 -16
- package/dist/packem_shared/AlreadyExistsError-CEu6_Tjb.mjs +0 -1
- package/dist/packem_shared/AlreadyExistsError-GC2XUgzJ.cjs +0 -1
- package/dist/packem_shared/DirectoryError-B8wqer68.cjs +0 -1
- package/dist/packem_shared/DirectoryError-ddlbUV8C.mjs +0 -1
- package/dist/packem_shared/F_OK-6WAweffB.cjs +0 -1
- package/dist/packem_shared/F_OK-B71i3mUa.mjs +0 -1
- package/dist/packem_shared/JSONError-CVkb3xZ3.mjs +0 -4
- package/dist/packem_shared/JSONError-CWuiGmNc.cjs +0 -4
- package/dist/packem_shared/LF-D4BqIfQm.cjs +0 -3
- package/dist/packem_shared/LF-Dbx0i6a7.mjs +0 -3
- package/dist/packem_shared/NotEmptyError-BWGfec5K.cjs +0 -1
- package/dist/packem_shared/NotEmptyError-DMh1o7UL.mjs +0 -1
- package/dist/packem_shared/NotFoundError-Diij7oqe.cjs +0 -1
- package/dist/packem_shared/NotFoundError-T95YsWYl.mjs +0 -1
- package/dist/packem_shared/PermissionError-B8oi38Bx.mjs +0 -1
- package/dist/packem_shared/PermissionError-Ck1Es7al.cjs +0 -1
- package/dist/packem_shared/WalkError-BsngoIKJ.mjs +0 -1
- package/dist/packem_shared/WalkError-gKgp0TWD.cjs +0 -1
- package/dist/packem_shared/assertValidFileContents-BLhwm7u2.mjs +0 -1
- package/dist/packem_shared/assertValidFileContents-CrbDz09d.cjs +0 -1
- package/dist/packem_shared/assertValidFileOrDirectoryPath-DgPIPmZT.mjs +0 -1
- package/dist/packem_shared/assertValidFileOrDirectoryPath-HOUs73Jk.cjs +0 -1
- package/dist/packem_shared/collect-4au76gDu.cjs +0 -1
- package/dist/packem_shared/collect-CRzGiRGg.mjs +0 -1
- package/dist/packem_shared/collectSync-BE8DAOke.mjs +0 -1
- package/dist/packem_shared/collectSync-CbKwt8rz.cjs +0 -1
- package/dist/packem_shared/emptyDir-D2m8OP8u.mjs +0 -1
- package/dist/packem_shared/emptyDir-DKxQHQQb.cjs +0 -1
- package/dist/packem_shared/emptyDirSync-CLM_zyIb.cjs +0 -1
- package/dist/packem_shared/emptyDirSync-CZNcW4wc.mjs +0 -1
- package/dist/packem_shared/ensureDir-BtvxsJiS.mjs +0 -1
- package/dist/packem_shared/ensureDir-DVHj-_yp.cjs +0 -1
- package/dist/packem_shared/ensureDirSync-CvjJ3bGq.cjs +0 -1
- package/dist/packem_shared/ensureDirSync-bGe0QB7d.mjs +0 -1
- package/dist/packem_shared/ensureFile-C46R6-4l.mjs +0 -1
- package/dist/packem_shared/ensureFile-CcJ5XIZm.cjs +0 -1
- package/dist/packem_shared/ensureFileSync-CwYTIP4G.mjs +0 -1
- package/dist/packem_shared/ensureFileSync-v-PhMLTr.cjs +0 -1
- package/dist/packem_shared/ensureLink-63XWiA3I.mjs +0 -1
- package/dist/packem_shared/ensureLink-C-v4AxzH.cjs +0 -1
- package/dist/packem_shared/ensureLinkSync-C4S-zdVb.cjs +0 -1
- package/dist/packem_shared/ensureLinkSync-D2LVObKd.mjs +0 -1
- package/dist/packem_shared/ensureSymlink-C5cy9585.cjs +0 -1
- package/dist/packem_shared/ensureSymlink-D36fS4KE.mjs +0 -1
- package/dist/packem_shared/ensureSymlinkSync-PvWVgeXc.mjs +0 -1
- package/dist/packem_shared/ensureSymlinkSync-YDRbg9hX.cjs +0 -1
- package/dist/packem_shared/findUp-CMGMYNty.mjs +0 -1
- package/dist/packem_shared/findUp-VKPTLmQQ.cjs +0 -1
- package/dist/packem_shared/findUpSync-BFwDGxkV.cjs +0 -1
- package/dist/packem_shared/findUpSync-QP_ZEsJN.mjs +0 -1
- package/dist/packem_shared/get-file-info-type-BXcpoWEM.cjs +0 -1
- package/dist/packem_shared/get-file-info-type-CaWGXRjY.mjs +0 -1
- package/dist/packem_shared/index-Cms6lU4T.cjs +0 -1
- package/dist/packem_shared/index-VcQXVcaq.mjs +0 -1
- package/dist/packem_shared/is-stats-identical-CPCumzsC.cjs +0 -1
- package/dist/packem_shared/is-stats-identical-CS5Y91zW.mjs +0 -1
- package/dist/packem_shared/isAccessible-Be3NKjOk.cjs +0 -1
- package/dist/packem_shared/isAccessible-cO53WedI.mjs +0 -1
- package/dist/packem_shared/isAccessibleSync-D5Vc2GTD.mjs +0 -1
- package/dist/packem_shared/isAccessibleSync-WOSgkAy2.cjs +0 -1
- package/dist/packem_shared/move-MZ9F6paN.mjs +0 -1
- package/dist/packem_shared/move-j3mzcWrG.cjs +0 -1
- package/dist/packem_shared/parseJson-BIYrZWHm.mjs +0 -6
- package/dist/packem_shared/parseJson-CXe73j5t.cjs +0 -6
- package/dist/packem_shared/readFile-CFus1Rym.mjs +0 -1
- package/dist/packem_shared/readFile-fzYtUKuW.cjs +0 -1
- package/dist/packem_shared/readFileSync-Dz4jLcWc.cjs +0 -1
- package/dist/packem_shared/readFileSync-Ulz6QzOz.mjs +0 -1
- package/dist/packem_shared/readJson-C6RN16Rf.mjs +0 -1
- package/dist/packem_shared/readJson-D7_CYUJX.cjs +0 -1
- package/dist/packem_shared/readJsonSync-QziPGqW_.cjs +0 -1
- package/dist/packem_shared/readJsonSync-ztZXpE8z.mjs +0 -1
- package/dist/packem_shared/readYaml-C-ui8qXw.cjs +0 -1
- package/dist/packem_shared/readYaml-aFHfT-4e.mjs +0 -1
- package/dist/packem_shared/readYamlSync-CeJ6RnoJ.mjs +0 -1
- package/dist/packem_shared/readYamlSync-DUYMSemC.cjs +0 -1
- package/dist/packem_shared/remove-B-9MI2l5.cjs +0 -1
- package/dist/packem_shared/remove-DzfvbZOm.mjs +0 -1
- package/dist/packem_shared/removeSync-CJPR6M7V.cjs +0 -1
- package/dist/packem_shared/removeSync-D165rXSn.mjs +0 -1
- package/dist/packem_shared/resolve-symlink-target-BofZSDIc.mjs +0 -1
- package/dist/packem_shared/resolve-symlink-target-HnbdXA1S.cjs +0 -1
- package/dist/packem_shared/stripJsonComments-CKgR4nW4.mjs +0 -1
- package/dist/packem_shared/stripJsonComments-Cw7UCxI3.cjs +0 -1
- package/dist/packem_shared/to-uint-8-array-2-3EvGd7.cjs +0 -1
- package/dist/packem_shared/to-uint-8-array-DwgaTasY.mjs +0 -1
- package/dist/packem_shared/walk-BJgnJy5d.cjs +0 -1
- package/dist/packem_shared/walk-DH-95i_B.mjs +0 -1
- package/dist/packem_shared/walk-include-B-MbUqMt.mjs +0 -1
- package/dist/packem_shared/walk-include-CFIYniQi.cjs +0 -1
- package/dist/packem_shared/walkSync-D4zvt_kM.mjs +0 -1
- package/dist/packem_shared/walkSync-DYawhxUA.cjs +0 -1
- package/dist/packem_shared/writeFile-DaHzc_FW.mjs +0 -1
- package/dist/packem_shared/writeFile-WCuWZNRy.cjs +0 -1
- package/dist/packem_shared/writeFileSync-D9HGh6J-.mjs +0 -1
- package/dist/packem_shared/writeFileSync-Ds49_ORi.cjs +0 -1
- package/dist/packem_shared/writeJson-BdjtBy1t.cjs +0 -4
- package/dist/packem_shared/writeJson-Bu7Dw4Uu.mjs +0 -4
- package/dist/packem_shared/writeJsonSync-7CjNn7oo.mjs +0 -4
- package/dist/packem_shared/writeJsonSync-CdC3ahaO.cjs +0 -4
- package/dist/packem_shared/writeYaml-COWffUNm.cjs +0 -1
- package/dist/packem_shared/writeYaml-bi1dx696.mjs +0 -1
- package/dist/packem_shared/writeYamlSync-BpIN1tTP.cjs +0 -1
- package/dist/packem_shared/writeYamlSync-D2VPlEws.mjs +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/fs",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.7",
|
|
4
4
|
"description": "Human friendly file system utilities for Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -132,8 +132,8 @@
|
|
|
132
132
|
"LICENSE.md"
|
|
133
133
|
],
|
|
134
134
|
"dependencies": {
|
|
135
|
-
"@visulima/path": "1.3.
|
|
136
|
-
"yaml": "^2.
|
|
135
|
+
"@visulima/path": "1.3.3",
|
|
136
|
+
"yaml": "^2.7.0"
|
|
137
137
|
},
|
|
138
138
|
"devDependencies": {
|
|
139
139
|
"@anolilab/eslint-config": "^15.0.3",
|
|
@@ -142,36 +142,35 @@
|
|
|
142
142
|
"@anolilab/semantic-release-preset": "^9.0.3",
|
|
143
143
|
"@arethetypeswrong/cli": "^0.17.2",
|
|
144
144
|
"@babel/core": "^7.26.0",
|
|
145
|
-
"@ckeditor/typedoc-plugins": "43.0.0",
|
|
146
145
|
"@rushstack/eslint-plugin-security": "^0.8.3",
|
|
147
146
|
"@types/node": "18.19.15",
|
|
148
|
-
"@visulima/error": "4.4.
|
|
149
|
-
"@visulima/packem": "1.
|
|
147
|
+
"@visulima/error": "4.4.13",
|
|
148
|
+
"@visulima/packem": "1.10.7",
|
|
150
149
|
"@vitest/coverage-v8": "^2.1.8",
|
|
151
150
|
"@vitest/ui": "^2.1.8",
|
|
152
151
|
"conventional-changelog-conventionalcommits": "8.0.0",
|
|
153
152
|
"cross-env": "^7.0.3",
|
|
154
153
|
"detect-indent": "^7.0.1",
|
|
155
|
-
"esbuild": "0.24.
|
|
154
|
+
"esbuild": "0.24.2",
|
|
156
155
|
"eslint": "8.57.0",
|
|
157
156
|
"eslint-plugin-deprecation": "^3.0.0",
|
|
158
157
|
"eslint-plugin-etc": "^2.0.3",
|
|
159
158
|
"eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
|
|
160
159
|
"eslint-plugin-mdx": "^3.1.5",
|
|
161
|
-
"eslint-plugin-vitest": "^0.4
|
|
160
|
+
"eslint-plugin-vitest": "^0.5.4",
|
|
162
161
|
"eslint-plugin-vitest-globals": "^1.5.0",
|
|
163
162
|
"fast-safe-stringify": "2.1.1",
|
|
164
163
|
"prettier": "^3.4.2",
|
|
165
|
-
"redos-detector": "^6.1.
|
|
164
|
+
"redos-detector": "^6.1.2",
|
|
166
165
|
"rimraf": "6.0.1",
|
|
167
|
-
"safe-regex2": "^4.0.
|
|
168
|
-
"semantic-release": "24.1
|
|
166
|
+
"safe-regex2": "^4.0.1",
|
|
167
|
+
"semantic-release": "24.2.1",
|
|
169
168
|
"tempy": "^3.1.0",
|
|
170
|
-
"type-fest": "^4.
|
|
171
|
-
"typedoc": "0.
|
|
172
|
-
"typedoc-plugin-markdown": "4.
|
|
173
|
-
"typedoc-plugin-rename-defaults": "0.7.
|
|
174
|
-
"typescript": "5.
|
|
169
|
+
"type-fest": "^4.32.0",
|
|
170
|
+
"typedoc": "0.27.6",
|
|
171
|
+
"typedoc-plugin-markdown": "4.4.1",
|
|
172
|
+
"typedoc-plugin-rename-defaults": "0.7.2",
|
|
173
|
+
"typescript": "5.7.3",
|
|
175
174
|
"vitest": "^2.1.8"
|
|
176
175
|
},
|
|
177
176
|
"engines": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var t=(e,r)=>o(e,"name",{value:r,configurable:!0});var a=Object.defineProperty,n=t((e,r)=>a(e,"name",{value:r,configurable:!0}),"t");class E extends Error{static{t(this,"n")}static{n(this,"AlreadyExistsError")}constructor(r){super(`EEXIST: ${r}`)}get code(){return"EEXIST"}set code(r){throw new Error("Cannot overwrite code EEXIST")}get name(){return"AlreadyExistsError"}set name(r){throw new Error("Cannot overwrite name of AlreadyExistsError")}}export{E as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var t=(e,r)=>o(e,"name",{value:r,configurable:!0});var s=Object.defineProperty,n=t((e,r)=>s(e,"name",{value:r,configurable:!0}),"t");class a extends Error{static{t(this,"n")}static{n(this,"AlreadyExistsError")}constructor(r){super(`EEXIST: ${r}`)}get code(){return"EEXIST"}set code(r){throw new Error("Cannot overwrite code EEXIST")}get name(){return"AlreadyExistsError"}set name(r){throw new Error("Cannot overwrite name of AlreadyExistsError")}}module.exports=a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var o=(e,r)=>t(e,"name",{value:r,configurable:!0});var n=Object.defineProperty,a=o((e,r)=>n(e,"name",{value:r,configurable:!0}),"o");class c extends Error{static{o(this,"n")}static{a(this,"DirectoryError")}constructor(r){super(`EISDIR: Illegal operation on a directory, ${r}`)}get code(){return"EISDIR"}set code(r){throw new Error("Cannot overwrite code EISDIR")}get name(){return"DirectoryError"}set name(r){throw new Error("Cannot overwrite name of DirectoryError")}}module.exports=c;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty;var o=(e,r)=>t(e,"name",{value:r,configurable:!0});var n=Object.defineProperty,a=o((e,r)=>n(e,"name",{value:r,configurable:!0}),"o");class i extends Error{static{o(this,"n")}static{a(this,"DirectoryError")}constructor(r){super(`EISDIR: Illegal operation on a directory, ${r}`)}get code(){return"EISDIR"}set code(r){throw new Error("Cannot overwrite code EISDIR")}get name(){return"DirectoryError"}set name(r){throw new Error("Cannot overwrite name of DirectoryError")}}export{i as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=0,O=4,S=2,t=1,K=Symbol("findUpStop"),N=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*(?:[^*]|\*[^/])*\*\//g;exports.FIND_UP_STOP=K;exports.F_OK=_;exports.INTERNAL_STRIP_JSON_REGEX=N;exports.R_OK=O;exports.W_OK=S;exports.X_OK=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const _=0,O=4,S=2,o=1,K=Symbol("findUpStop"),N=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*(?:[^*]|\*[^/])*\*\//g;export{K as FIND_UP_STOP,_ as F_OK,N as INTERNAL_STRIP_JSON_REGEX,O as R_OK,S as W_OK,o as X_OK};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var s=Object.defineProperty;var t=(r,e)=>s(r,"name",{value:e,configurable:!0});var i=Object.defineProperty,c=t((r,e)=>i(r,"name",{value:e,configurable:!0}),"i");class a extends Error{static{t(this,"r")}static{c(this,"JSONError")}fileName;codeFrame;name="JSONError";#e;constructor(e){super(),this.#e=e,Error.captureStackTrace(this,a)}get message(){return`${this.#e}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
|
|
2
|
-
|
|
3
|
-
${this.codeFrame}
|
|
4
|
-
`:""}`}set message(e){this.#e=e}}export{a as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var t=(r,e)=>a(r,"name",{value:e,configurable:!0});var i=Object.defineProperty,c=t((r,e)=>i(r,"name",{value:e,configurable:!0}),"i");class s extends Error{static{t(this,"r")}static{c(this,"JSONError")}fileName;codeFrame;name="JSONError";#e;constructor(e){super(),this.#e=e,Error.captureStackTrace(this,s)}get message(){return`${this.#e}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
|
|
2
|
-
|
|
3
|
-
${this.codeFrame}
|
|
4
|
-
`:""}`}set message(e){this.#e=e}}module.exports=s;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var c=(t,e)=>s(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("node:process");var d=Object.defineProperty,l=c((t,e)=>d(t,"name",{value:e,configurable:!0}),"r");const a=/\r?\n/g,n=`
|
|
2
|
-
`,r=`\r
|
|
3
|
-
`,g=u.platform==="win32"?r:n,m=l(t=>{const e=t.match(a);if(!e||e.length===0)return null;const o=e.filter(i=>i===r).length,f=e.length-o;return o>f?r:n},"detect"),L=l((t,e)=>t.replaceAll(a,e),"format");exports.CRLF=r;exports.EOL=g;exports.LF=n;exports.detect=m;exports.format=L;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var l=(e,t)=>i(e,"name",{value:t,configurable:!0});import{platform as g}from"node:process";var p=Object.defineProperty,o=l((e,t)=>p(e,"name",{value:t,configurable:!0}),"r");const c=/\r?\n/g,a=`
|
|
2
|
-
`,r=`\r
|
|
3
|
-
`,s=g==="win32"?r:a,d=o(e=>{const t=e.match(c);if(!t||t.length===0)return null;const n=t.filter(m=>m===r).length,f=t.length-n;return n>f?r:a},"detect"),v=o((e,t)=>e.replaceAll(c,t),"format");export{r as CRLF,s as EOL,a as LF,d as detect,v as format};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var e=(t,r)=>o(t,"name",{value:r,configurable:!0});var n=Object.defineProperty,E=e((t,r)=>n(t,"name",{value:r,configurable:!0}),"t");class a extends Error{static{e(this,"n")}static{E(this,"NotEmptyError")}constructor(r){super(`ENOTEMPTY: Directory not empty, ${r}`)}get code(){return"ENOTEMPTY"}set code(r){throw new Error("Cannot overwrite code ENOTEMPTY")}get name(){return"NotEmptyError"}set name(r){throw new Error("Cannot overwrite name of NotEmptyError")}}module.exports=a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var t=(e,r)=>o(e,"name",{value:r,configurable:!0});var n=Object.defineProperty,E=t((e,r)=>n(e,"name",{value:r,configurable:!0}),"t");class c extends Error{static{t(this,"n")}static{E(this,"NotEmptyError")}constructor(r){super(`ENOTEMPTY: Directory not empty, ${r}`)}get code(){return"ENOTEMPTY"}set code(r){throw new Error("Cannot overwrite code ENOTEMPTY")}get name(){return"NotEmptyError"}set name(r){throw new Error("Cannot overwrite name of NotEmptyError")}}export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var o=(e,r)=>t(e,"name",{value:r,configurable:!0});var n=Object.defineProperty,a=o((e,r)=>n(e,"name",{value:r,configurable:!0}),"o");class s extends Error{static{o(this,"n")}static{a(this,"NotFoundError")}constructor(r){super(`ENOENT: ${r}`)}get code(){return"ENOENT"}set code(r){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(r){throw new Error("Cannot overwrite name of NotFoundError")}}module.exports=s;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty;var o=(e,r)=>t(e,"name",{value:r,configurable:!0});var n=Object.defineProperty,a=o((e,r)=>n(e,"name",{value:r,configurable:!0}),"o");class s extends Error{static{o(this,"n")}static{a(this,"NotFoundError")}constructor(r){super(`ENOENT: ${r}`)}get code(){return"ENOENT"}set code(r){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(r){throw new Error("Cannot overwrite name of NotFoundError")}}export{s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty;var o=(e,r)=>t(e,"name",{value:r,configurable:!0});var n=Object.defineProperty,s=o((e,r)=>n(e,"name",{value:r,configurable:!0}),"o");class i extends Error{static{o(this,"n")}static{s(this,"PermissionError")}constructor(r){super(`EPERM: Operation not permitted, ${r}`)}get code(){return"EPERM"}set code(r){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(r){throw new Error("Cannot overwrite name of PermissionError")}}export{i as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var t=(e,r)=>o(e,"name",{value:r,configurable:!0});var n=Object.defineProperty,s=t((e,r)=>n(e,"name",{value:r,configurable:!0}),"o");class i extends Error{static{t(this,"n")}static{s(this,"PermissionError")}constructor(r){super(`EPERM: Operation not permitted, ${r}`)}get code(){return"EPERM"}set code(r){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(r){throw new Error("Cannot overwrite name of PermissionError")}}module.exports=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var t=(e,r)=>o(e,"name",{value:r,configurable:!0});var n=Object.defineProperty,s=t((e,r)=>n(e,"name",{value:r,configurable:!0}),"t");class c extends Error{static{t(this,"i")}static{s(this,"WalkError")}root;constructor(r,a){super(`${r instanceof Error?r.message:r} for path "${a}"`),this.cause=r,this.root=a}get name(){return"WalkError"}set name(r){throw new Error("Cannot overwrite name of WalkError")}}export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var t=(e,r)=>a(e,"name",{value:r,configurable:!0});var s=Object.defineProperty,n=t((e,r)=>s(e,"name",{value:r,configurable:!0}),"t");class i extends Error{static{t(this,"i")}static{n(this,"WalkError")}root;constructor(r,o){super(`${r instanceof Error?r.message:r} for path "${o}"`),this.cause=r,this.root=o}get name(){return"WalkError"}set name(r){throw new Error("Cannot overwrite name of WalkError")}}module.exports=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty;var a=(e,r)=>t(e,"name",{value:r,configurable:!0});var f=Object.defineProperty,i=a((e,r)=>f(e,"name",{value:r,configurable:!0}),"e");const o=i(e=>{if(typeof e!="string"&&!(e instanceof ArrayBuffer)&&!ArrayBuffer.isView(e))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},"assertValidFileContents");export{o as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var t=(e,r)=>a(e,"name",{value:r,configurable:!0});var i=Object.defineProperty,f=t((e,r)=>i(e,"name",{value:r,configurable:!0}),"e");const n=f(e=>{if(typeof e!="string"&&!(e instanceof ArrayBuffer)&&!ArrayBuffer.isView(e))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},"assertValidFileContents");module.exports=n;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a=Object.defineProperty;var t=(e,r)=>a(e,"name",{value:r,configurable:!0});var n=Object.defineProperty,o=t((e,r)=>n(e,"name",{value:r,configurable:!0}),"n");const s=o(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");export{s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var t=(e,r)=>n(e,"name",{value:r,configurable:!0});var a=Object.defineProperty,o=t((e,r)=>a(e,"name",{value:r,configurable:!0}),"n");const s=o(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");module.exports=s;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var n=(s,e)=>a(s,"name",{value:e,configurable:!0});const o=require("./walk-BJgnJy5d.cjs");var c=Object.defineProperty,i=n((s,e)=>c(s,"name",{value:e,configurable:!0}),"e");const u=i(async(s,e={})=>{Array.isArray(e.extensions)||(e.extensions=["js","mjs","cjs","ts"]);const r=[];for await(const t of o(s,e))r.push(t.path);return r},"collect");module.exports=u;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var a=(r,e)=>o(r,"name",{value:e,configurable:!0});import t from"./walk-DH-95i_B.mjs";var c=Object.defineProperty,i=a((r,e)=>c(r,"name",{value:e,configurable:!0}),"e");const p=i(async(r,e={})=>{Array.isArray(e.extensions)||(e.extensions=["js","mjs","cjs","ts"]);const s=[];for await(const n of t(r,e))s.push(n.path);return s},"collect");export{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty;var s=(r,e)=>t(r,"name",{value:e,configurable:!0});import a from"./walkSync-D4zvt_kM.mjs";var c=Object.defineProperty,f=s((r,e)=>c(r,"name",{value:e,configurable:!0}),"n");const p=f((r,e={})=>{Array.isArray(e.extensions)||(e.extensions=["js","mjs","cjs","ts"]);const o=[];for(const n of a(r,e))o.push(n.path);return o},"collectSync");export{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var n=(r,e)=>o(r,"name",{value:e,configurable:!0});const t=require("./walkSync-DYawhxUA.cjs");var a=Object.defineProperty,i=n((r,e)=>a(r,"name",{value:e,configurable:!0}),"n");const u=i((r,e={})=>{Array.isArray(e.extensions)||(e.extensions=["js","mjs","cjs","ts"]);const s=[];for(const c of t(r,e))s.push(c.path);return s},"collectSync");module.exports=u;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.defineProperty;var i=(r,o)=>e(r,"name",{value:o,configurable:!0});import{existsSync as a}from"node:fs";import{mkdir as m,readdir as f,rm as c}from"node:fs/promises";import{join as n}from"@visulima/path";import{toPath as s}from"@visulima/path/utils";import p from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";var u=Object.defineProperty,d=i((r,o)=>u(r,"name",{value:o,configurable:!0}),"i");const x=d(async(r,o)=>{if(p(r),!a(r)){await m(r,{recursive:!0});return}for await(const t of await f(r))await c(n(s(r),t),{...o,force:!0,recursive:!0})},"emptyDir");export{x as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var t=(e,r)=>a(e,"name",{value:r,configurable:!0});const o=require("node:fs"),i=require("node:fs/promises"),c=require("@visulima/path"),n=require("@visulima/path/utils"),u=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs");var f=Object.defineProperty,d=t((e,r)=>f(e,"name",{value:r,configurable:!0}),"i");const y=d(async(e,r)=>{if(u(e),!o.existsSync(e)){await i.mkdir(e,{recursive:!0});return}for await(const s of await i.readdir(e))await i.rm(c.join(n.toPath(e),s),{...r,force:!0,recursive:!0})},"emptyDir");module.exports=y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var i=(e,r)=>o(e,"name",{value:r,configurable:!0});const t=require("node:fs"),s=require("@visulima/path"),n=require("@visulima/path/utils"),u=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs");var a=Object.defineProperty,f=i((e,r)=>a(e,"name",{value:r,configurable:!0}),"o");const y=f((e,r)=>{if(u(e),!t.existsSync(e)){t.mkdirSync(e,{recursive:!0});return}for(const c of t.readdirSync(e))t.rmSync(s.join(n.toPath(e),c),{...r,force:!0,recursive:!0})},"emptyDir");module.exports=y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty;var o=(r,e)=>t(r,"name",{value:e,configurable:!0});import{existsSync as m,mkdirSync as c,readdirSync as f,rmSync as n}from"node:fs";import{join as a}from"@visulima/path";import{toPath as s}from"@visulima/path/utils";import p from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";var u=Object.defineProperty,y=o((r,e)=>u(r,"name",{value:e,configurable:!0}),"o");const j=y((r,e)=>{if(p(r),!m(r)){c(r,{recursive:!0});return}for(const i of f(r))n(a(s(r),i),{...e,force:!0,recursive:!0})},"emptyDir");export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s=Object.defineProperty;var i=(e,r)=>s(e,"name",{value:r,configurable:!0});import{lstat as o,mkdir as c}from"node:fs/promises";import n from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{g as a}from"./get-file-info-type-CaWGXRjY.mjs";var f=Object.defineProperty,p=i((e,r)=>f(e,"name",{value:r,configurable:!0}),"i");const u=p(async e=>{n(e);try{const r=await o(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${a(r)}'`);return}catch(r){if(r.code!=="ENOENT")throw r}try{await c(e,{recursive:!0})}catch(r){if(r.code!=="EEXIST")throw r;const t=await o(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${a(t)}'`)}},"ensureDir");export{u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var o=(r,e)=>a(r,"name",{value:e,configurable:!0});const t=require("node:fs/promises"),c=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),s=require("./get-file-info-type-BXcpoWEM.cjs");var n=Object.defineProperty,u=o((r,e)=>n(r,"name",{value:e,configurable:!0}),"i");const f=u(async r=>{c(r);try{const e=await t.lstat(r);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${s.getFileInfoType(e)}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await t.mkdir(r,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const i=await t.lstat(r);if(!i.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${s.getFileInfoType(i)}'`)}},"ensureDir");module.exports=f;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var o=(r,e)=>s(r,"name",{value:e,configurable:!0});const t=require("node:fs"),n=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),c=require("./get-file-info-type-BXcpoWEM.cjs");var a=Object.defineProperty,y=o((r,e)=>a(r,"name",{value:e,configurable:!0}),"o");const u=y(r=>{n(r);try{const e=t.lstatSync(r);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${c.getFileInfoType(e)}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{t.mkdirSync(r,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const i=t.lstatSync(r);if(!i.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${c.getFileInfoType(i)}'`)}},"ensureDirSync");module.exports=u;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s=Object.defineProperty;var o=(e,r)=>s(e,"name",{value:r,configurable:!0});import{lstatSync as i,mkdirSync as n}from"node:fs";import a from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{g as c}from"./get-file-info-type-CaWGXRjY.mjs";var f=Object.defineProperty,p=o((e,r)=>f(e,"name",{value:r,configurable:!0}),"o");const u=p(e=>{a(e);try{const r=i(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${c(r)}'`);return}catch(r){if(r.code!=="ENOENT")throw r}try{n(e,{recursive:!0})}catch(r){if(r.code!=="EEXIST")throw r;const t=i(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${c(t)}'`)}},"ensureDirSync");export{u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var t=(e,r)=>o(e,"name",{value:r,configurable:!0});import{lstat as i,writeFile as a}from"node:fs/promises";import{dirname as f}from"@visulima/path";import{toPath as m}from"@visulima/path/utils";import n from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{g as s}from"./get-file-info-type-CaWGXRjY.mjs";import p from"./ensureDir-BtvxsJiS.mjs";var c=Object.defineProperty,l=t((e,r)=>c(e,"name",{value:r,configurable:!0}),"e");const F=l(async e=>{n(e);try{const r=await i(e);if(!r.isFile())throw new Error(`Ensure path exists, expected 'file', got '${s(r)}'`)}catch(r){if(r.code==="ENOENT"){await p(f(m(e))),await a(e,new Uint8Array);return}throw r}},"ensureFile");export{F as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var t=(r,e)=>s(r,"name",{value:e,configurable:!0});const i=require("node:fs/promises"),a=require("@visulima/path"),n=require("@visulima/path/utils"),o=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),c=require("./get-file-info-type-BXcpoWEM.cjs"),u=require("./ensureDir-DVHj-_yp.cjs");var l=Object.defineProperty,f=t((r,e)=>l(r,"name",{value:e,configurable:!0}),"e");const p=f(async r=>{o(r);try{const e=await i.lstat(r);if(!e.isFile())throw new Error(`Ensure path exists, expected 'file', got '${c.getFileInfoType(e)}'`)}catch(e){if(e.code==="ENOENT"){await u(a.dirname(n.toPath(r))),await i.writeFile(r,new Uint8Array);return}throw e}},"ensureFile");module.exports=p;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty;var o=(e,r)=>t(e,"name",{value:r,configurable:!0});import{lstatSync as i,writeFileSync as n}from"node:fs";import{dirname as a}from"@visulima/path";import{toPath as m}from"@visulima/path/utils";import f from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{g as c}from"./get-file-info-type-CaWGXRjY.mjs";import p from"./ensureDirSync-bGe0QB7d.mjs";var s=Object.defineProperty,l=o((e,r)=>s(e,"name",{value:r,configurable:!0}),"e");const F=l(e=>{f(e);try{const r=i(e);if(!r.isFile())throw new Error(`Ensure path exists, expected 'file', got '${c(r)}'`)}catch(r){if(r.code==="ENOENT"){p(a(m(e))),n(e,new Uint8Array);return}throw r}},"ensureFileSync");export{F as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var t=(r,e)=>n(r,"name",{value:e,configurable:!0});const i=require("node:fs"),o=require("@visulima/path"),s=require("@visulima/path/utils"),c=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),a=require("./get-file-info-type-BXcpoWEM.cjs"),u=require("./ensureDirSync-CvjJ3bGq.cjs");var l=Object.defineProperty,y=t((r,e)=>l(r,"name",{value:e,configurable:!0}),"e");const f=y(r=>{c(r);try{const e=i.lstatSync(r);if(!e.isFile())throw new Error(`Ensure path exists, expected 'file', got '${a.getFileInfoType(e)}'`)}catch(e){if(e.code==="ENOENT"){u(o.dirname(s.toPath(r))),i.writeFileSync(r,new Uint8Array);return}throw e}},"ensureFileSync");module.exports=f;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var c=Object.defineProperty;var m=(e,a)=>c(e,"name",{value:a,configurable:!0});import{lstat as i,link as l}from"node:fs/promises";import{toNamespacedPath as s,dirname as p}from"@visulima/path";import{toPath as f}from"@visulima/path/utils";import n from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{l as h}from"./is-stats-identical-CS5Y91zW.mjs";import u from"./ensureDir-BtvxsJiS.mjs";var w=Object.defineProperty,y=m((e,a)=>w(e,"name",{value:a,configurable:!0}),"m");const j=y(async(e,a)=>{n(e),n(a),e=s(f(e)),a=s(f(a));let t;try{t=await i(a)}catch{}let o;try{o=await i(e)}catch(r){throw r.message=r.message.replace("lstat","ensureLink"),r}t&&h(o,t)||(await u(p(a)),await l(e,a))},"ensureLink");export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var u=Object.defineProperty;var n=(t,e)=>u(t,"name",{value:e,configurable:!0});const r=require("node:fs/promises"),i=require("@visulima/path"),o=require("@visulima/path/utils"),l=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),h=require("./is-stats-identical-CPCumzsC.cjs"),m=require("./ensureDir-DVHj-_yp.cjs");var p=Object.defineProperty,d=n((t,e)=>p(t,"name",{value:e,configurable:!0}),"m");const q=d(async(t,e)=>{l(t),l(e),t=i.toNamespacedPath(o.toPath(t)),e=i.toNamespacedPath(o.toPath(e));let a;try{a=await r.lstat(e)}catch{}let c;try{c=await r.lstat(t)}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}a&&h.l(c,a)||(await m(i.dirname(e)),await r.link(t,e))},"ensureLink");module.exports=q;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var u=Object.defineProperty;var i=(t,e)=>u(t,"name",{value:e,configurable:!0});const r=require("node:fs"),n=require("@visulima/path"),o=require("@visulima/path/utils"),l=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),h=require("./is-stats-identical-CPCumzsC.cjs"),y=require("./ensureDirSync-CvjJ3bGq.cjs");var d=Object.defineProperty,m=i((t,e)=>d(t,"name",{value:e,configurable:!0}),"o");const p=m((t,e)=>{l(t),l(e),t=n.toNamespacedPath(o.toPath(t)),e=n.toNamespacedPath(o.toPath(e));let a;try{a=r.lstatSync(e)}catch{}let c;try{c=r.lstatSync(t)}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}a&&h.l(c,a)||(y(n.dirname(e)),r.linkSync(t,e))},"ensureLinkSync");module.exports=p;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var l=Object.defineProperty;var m=(t,e)=>l(t,"name",{value:e,configurable:!0});import{lstatSync as n,linkSync as p}from"node:fs";import{toNamespacedPath as c,dirname as f}from"@visulima/path";import{toPath as i}from"@visulima/path/utils";import s from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{l as h}from"./is-stats-identical-CS5Y91zW.mjs";import y from"./ensureDirSync-bGe0QB7d.mjs";var u=Object.defineProperty,d=m((t,e)=>u(t,"name",{value:e,configurable:!0}),"o");const j=d((t,e)=>{s(t),s(e),t=c(i(t)),e=c(i(e));let a;try{a=n(e)}catch{}let r;try{r=n(t)}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}a&&h(r,a)||(y(f(e)),p(t,e))},"ensureLinkSync");export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var g=Object.defineProperty;var c=(a,e)=>g(a,"name",{value:e,configurable:!0});const t=require("node:fs/promises"),r=require("@visulima/path"),l=require("@visulima/path/utils"),y=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),u=require("./get-file-info-type-BXcpoWEM.cjs"),d=require("./is-stats-identical-CPCumzsC.cjs"),q=require("./resolve-symlink-target-HnbdXA1S.cjs"),S=require("./ensureDir-DVHj-_yp.cjs"),w=require("./AlreadyExistsError-GC2XUgzJ.cjs");var k=Object.defineProperty,v=c((a,e)=>k(a,"name",{value:e,configurable:!0}),"f");const T=process.platform==="win32"||/^(?:msys|cygwin)$/.test(process.env.OSTYPE),E=v(async(a,e,h)=>{y(a),y(e);const i=q.o(a,e);e=r.toNamespacedPath(l.toPath(e));try{if((await t.lstat(e)).isSymbolicLink()&&d.l(await t.stat(i),await t.stat(e))){const[s,n]=await Promise.all([t.stat(i),t.stat(e)]);if(d.l(s,n))return}}catch{}const m=await t.lstat(i),p=u.getFileInfoType(m);await S(r.dirname(e));const f=h??(T?"junction":p==="dir"?"dir":"file");try{await t.symlink(r.toNamespacedPath(l.toPath(i)),e,f)}catch(s){if(s.code!=="EEXIST")throw s;const n=await t.lstat(e);if(!n.isSymbolicLink())throw new w("A "+u.getFileInfoType(n)+" already exists at the path: "+e);const P=await t.readlink(e),o=r.toNamespacedPath(r.resolve(P));if(o!==i)throw new w("A symlink targeting to an undesired path already exists: "+e+" -> "+o)}},"ensureSymlink");module.exports=E;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var P=Object.defineProperty;var c=(i,a)=>P(i,"name",{value:a,configurable:!0});import{lstat as n,stat as e,symlink as S,readlink as v}from"node:fs/promises";import{toNamespacedPath as s,dirname as b,resolve as x}from"@visulima/path";import{toPath as f}from"@visulima/path/utils";import l from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{g as p}from"./get-file-info-type-CaWGXRjY.mjs";import{l as w}from"./is-stats-identical-CS5Y91zW.mjs";import{o as E}from"./resolve-symlink-target-BofZSDIc.mjs";import L from"./ensureDir-BtvxsJiS.mjs";import y from"./AlreadyExistsError-CEu6_Tjb.mjs";var T=Object.defineProperty,$=c((i,a)=>T(i,"name",{value:a,configurable:!0}),"f");const j=process.platform==="win32"||/^(?:msys|cygwin)$/.test(process.env.OSTYPE),B=$(async(i,a,d)=>{l(i),l(a);const o=E(i,a);a=s(f(a));try{if((await n(a)).isSymbolicLink()&&w(await e(o),await e(a))){const[t,r]=await Promise.all([e(o),e(a)]);if(w(t,r))return}}catch{}const h=await n(o),u=p(h);await L(b(a));const g=d??(j?"junction":u==="dir"?"dir":"file");try{await S(s(f(o)),a,g)}catch(t){if(t.code!=="EEXIST")throw t;const r=await n(a);if(!r.isSymbolicLink())throw new y("A "+p(r)+" already exists at the path: "+a);const k=await v(a),m=s(x(k));if(m!==o)throw new y("A symlink targeting to an undesired path already exists: "+a+" -> "+m)}},"ensureSymlink");export{B as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var k=Object.defineProperty;var c=(o,r)=>k(o,"name",{value:r,configurable:!0});import{lstatSync as s,statSync as n,symlinkSync as v,readlinkSync as P}from"node:fs";import{toNamespacedPath as a,dirname as b,resolve as x}from"@visulima/path";import{toPath as f}from"@visulima/path/utils";import y from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{g as p}from"./get-file-info-type-CaWGXRjY.mjs";import{l}from"./is-stats-identical-CS5Y91zW.mjs";import{o as E}from"./resolve-symlink-target-BofZSDIc.mjs";import L from"./ensureDirSync-bGe0QB7d.mjs";import d from"./AlreadyExistsError-CEu6_Tjb.mjs";var T=Object.defineProperty,j=c((o,r)=>T(o,"name",{value:r,configurable:!0}),"f");const A=process.platform==="win32"||/^(?:msys|cygwin)$/.test(process.env.OSTYPE),B=j((o,r,h)=>{y(o),y(r);const e=E(o,r);r=a(f(r));try{if(s(r).isSymbolicLink()&&l(n(e),n(r))){const i=n(e),t=n(r);if(l(i,t))return}}catch{}const S=s(e),u=p(S);L(b(r));const w=h??(A?"junction":u==="dir"?"dir":"file");try{v(a(f(e)),r,w)}catch(i){if(i.code!=="EEXIST")throw i;const t=s(r);if(!t.isSymbolicLink())throw new d("A "+p(t)+" already exists at the path: "+r);const g=P(r),m=a(x(g));if(m!==e)throw new d("A symlink targeting to an undesired path already exists: "+r+" -> "+m)}},"ensureSymlinkSync");export{B as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var q=Object.defineProperty;var o=(s,e)=>q(s,"name",{value:e,configurable:!0});const t=require("node:fs"),n=require("@visulima/path"),y=require("@visulima/path/utils"),l=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),u=require("./get-file-info-type-BXcpoWEM.cjs"),S=require("./is-stats-identical-CPCumzsC.cjs"),P=require("./resolve-symlink-target-HnbdXA1S.cjs"),w=require("./ensureDirSync-CvjJ3bGq.cjs"),d=require("./AlreadyExistsError-GC2XUgzJ.cjs");var k=Object.defineProperty,v=o((s,e)=>k(s,"name",{value:e,configurable:!0}),"f");const T=process.platform==="win32"||/^(?:msys|cygwin)$/.test(process.env.OSTYPE),E=v((s,e,h)=>{l(s),l(e);const r=P.o(s,e);e=n.toNamespacedPath(y.toPath(e));try{if(t.lstatSync(e).isSymbolicLink()&&S.l(t.statSync(r),t.statSync(e))){const i=t.statSync(r),c=t.statSync(e);if(S.l(i,c))return}}catch{}const f=t.lstatSync(r),p=u.getFileInfoType(f);w(n.dirname(e));const m=h??(T?"junction":p==="dir"?"dir":"file");try{t.symlinkSync(n.toNamespacedPath(y.toPath(r)),e,m)}catch(i){if(i.code!=="EEXIST")throw i;const c=t.lstatSync(e);if(!c.isSymbolicLink())throw new d("A "+u.getFileInfoType(c)+" already exists at the path: "+e);const g=t.readlinkSync(e),a=n.toNamespacedPath(n.resolve(g));if(a!==r)throw new d("A symlink targeting to an undesired path already exists: "+e+" -> "+a)}},"ensureSymlinkSync");module.exports=E;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var g=Object.defineProperty;var c=(t,r)=>g(t,"name",{value:r,configurable:!0});import{stat as h,lstat as v}from"node:fs/promises";import{fileURLToPath as A}from"node:url";import{resolve as i,parse as P,isAbsolute as S,dirname as b}from"@visulima/path";import{toPath as l}from"@visulima/path/utils";import{FIND_UP_STOP as k}from"./F_OK-B71i3mUa.mjs";var T=Object.defineProperty,y=c((t,r)=>T(t,"name",{value:r,configurable:!0}),"s");const R=y(async(t,r={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const m=r.cwd?l(r.cwd):process.cwd();let e=i(m);const{root:n}=P(e),p=l(r.stopAt??n),u=i(e,p),a=r.type??"file",w=y(async function(o){return typeof t=="function"?[await t(o)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]},"getMatchers");r.allowSymlinks===void 0&&(r.allowSymlinks=!0);const d=r.allowSymlinks?h:v;for(;e&&e!==u&&e!==n;){for await(let o of await w(e)){if(o===k)return;if(o===void 0)continue;Buffer.isBuffer(o)?o=o.toString():o instanceof URL&&(o=A(o));const s=S(o)?o:i(e,o);try{const f=await d(s);if(a==="file"&&f.isFile()||a==="directory"&&f.isDirectory())return s}catch{}}e=b(e)}},"findUp");export{R as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var h=Object.defineProperty;var f=(t,r)=>h(t,"name",{value:r,configurable:!0});const l=require("node:fs/promises"),v=require("node:url"),s=require("@visulima/path"),u=require("@visulima/path/utils"),A=require("./F_OK-6WAweffB.cjs");var P=Object.defineProperty,y=f((t,r)=>P(t,"name",{value:r,configurable:!0}),"s");const q=y(async(t,r={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const p=r.cwd?u.toPath(r.cwd):process.cwd();let o=s.resolve(p);const{root:n}=s.parse(o),w=u.toPath(r.stopAt??n),d=s.resolve(o,w),i=r.type??"file",m=y(async function(e){return typeof t=="function"?[await t(e)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]},"getMatchers");r.allowSymlinks===void 0&&(r.allowSymlinks=!0);const g=r.allowSymlinks?l.stat:l.lstat;for(;o&&o!==d&&o!==n;){for await(let e of await m(o)){if(e===A.FIND_UP_STOP)return;if(e===void 0)continue;Buffer.isBuffer(e)?e=e.toString():e instanceof URL&&(e=v.fileURLToPath(e));const a=s.isAbsolute(e)?e:s.resolve(o,e);try{const c=await g(a);if(i==="file"&&c.isFile()||i==="directory"&&c.isDirectory())return a}catch{}}o=s.dirname(o)}},"findUp");module.exports=q;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var v=Object.defineProperty;var a=(t,o)=>v(t,"name",{value:o,configurable:!0});const l=require("node:fs"),w=require("node:url"),n=require("@visulima/path"),u=require("@visulima/path/utils"),S=require("./F_OK-6WAweffB.cjs");var A=Object.defineProperty,y=a((t,o)=>A(t,"name",{value:o,configurable:!0}),"o");const P=y((t,o={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const p=o.cwd?u.toPath(o.cwd):process.cwd();let r=n.resolve(p);const{root:s}=n.parse(r),d=u.toPath(o.stopAt??s),g=n.resolve(r,d),i=o.type??"file",m=y(function(e){return typeof t=="function"?[t(e)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]},"getMatchers");o.allowSymlinks===void 0&&(o.allowSymlinks=!0);const h=o.allowSymlinks?l.statSync:l.lstatSync;for(;r&&r!==g&&r!==s;){for(let e of m(r)){if(e===S.FIND_UP_STOP)return;if(e===void 0)continue;Buffer.isBuffer(e)?e=e.toString():e instanceof URL&&(e=w.fileURLToPath(e));const c=n.isAbsolute(e)?e:n.resolve(r,e);try{const f=h(c);if(i==="file"&&f.isFile()||i==="directory"&&f.isDirectory())return c}catch{}}r=n.dirname(r)}},"findUpSync");module.exports=P;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var w=Object.defineProperty;var a=(t,r)=>w(t,"name",{value:r,configurable:!0});import{statSync as S,lstatSync as h}from"node:fs";import{fileURLToPath as v}from"node:url";import{resolve as n,parse as A,isAbsolute as P,dirname as b}from"@visulima/path";import{toPath as l}from"@visulima/path/utils";import{FIND_UP_STOP as k}from"./F_OK-B71i3mUa.mjs";var T=Object.defineProperty,y=a((t,r)=>T(t,"name",{value:r,configurable:!0}),"o");const R=y((t,r={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const m=r.cwd?l(r.cwd):process.cwd();let e=n(m);const{root:i}=A(e),p=l(r.stopAt??i),u=n(e,p),f=r.type??"file",d=y(function(o){return typeof t=="function"?[t(o)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]},"getMatchers");r.allowSymlinks===void 0&&(r.allowSymlinks=!0);const g=r.allowSymlinks?S:h;for(;e&&e!==u&&e!==i;){for(let o of d(e)){if(o===k)return;if(o===void 0)continue;Buffer.isBuffer(o)?o=o.toString():o instanceof URL&&(o=v(o));const s=P(o)?o:n(e,o);try{const c=g(s);if(f==="file"&&c.isFile()||f==="directory"&&c.isDirectory())return s}catch{}}e=b(e)}},"findUpSync");export{R as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var r=(e,i)=>n(e,"name",{value:i,configurable:!0});var t=Object.defineProperty,f=r((e,i)=>t(e,"name",{value:i,configurable:!0}),"i");const l=f(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");exports.getFileInfoType=l;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=Object.defineProperty;var r=(e,i)=>n(e,"name",{value:i,configurable:!0});var t=Object.defineProperty,f=r((e,i)=>t(e,"name",{value:i,configurable:!0}),"i");const o=f(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");export{o as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var g=Object.defineProperty;var o=(e,t)=>g(e,"name",{value:t,configurable:!0});const m=/^(?:( )+|\t+)/,a="space",T="tab";function h(e,t){const n=new Map;let s=0,i,c;for(const d of e.split(/\n/g)){if(!d)continue;let f,u,p,y,r;const I=d.match(m);if(I===null)s=0,i="";else{if(f=I[0].length,u=I[1]?a:T,t&&u===a&&f===1)continue;u!==i&&(s=0),i=u,p=1,y=0;const l=f-s;if(s=f,l===0)p=0,y=1;else{const E=l>0?l:-l;c=k(u,E)}r=n.get(c),r=r===void 0?[1,0]:[r[0]+p,r[1]+y],n.set(c,r)}}return n}o(h,"makeIndentsMap");function k(e,t){return(e===a?"s":"t")+String(t)}o(k,"encodeIndentsKey");function N(e){const n=e[0]==="s"?a:T,s=Number(e.slice(1));return{type:n,amount:s}}o(N,"decodeIndentsKey");function C(e){let t,n=0,s=0;for(const[i,[c,d]]of e)(c>n||c===n&&d>s)&&(n=c,s=d,t=i);return t}o(C,"getMostUsedKey");function S(e,t){return(e===a?" ":" ").repeat(t)}o(S,"makeIndentString");function w(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=h(e,!0);t.size===0&&(t=h(e,!1));const n=C(t);let s,i=0,c="";return n!==void 0&&({type:s,amount:i}=N(n),c=S(s,i)),{amount:i,type:s,indent:c}}o(w,"detectIndent");exports.detectIndent=w;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var g=Object.defineProperty;var c=(e,t)=>g(e,"name",{value:t,configurable:!0});const m=/^(?:( )+|\t+)/,f="space",T="tab";function I(e,t){const n=new Map;let s=0,i,o;for(const a of e.split(/\n/g)){if(!a)continue;let u,d,p,y,r;const h=a.match(m);if(h===null)s=0,i="";else{if(u=h[0].length,d=h[1]?f:T,t&&d===f&&u===1)continue;d!==i&&(s=0),i=d,p=1,y=0;const l=u-s;if(s=u,l===0)p=0,y=1;else{const E=l>0?l:-l;o=k(d,E)}r=n.get(o),r=r===void 0?[1,0]:[r[0]+p,r[1]+y],n.set(o,r)}}return n}c(I,"makeIndentsMap");function k(e,t){return(e===f?"s":"t")+String(t)}c(k,"encodeIndentsKey");function N(e){const n=e[0]==="s"?f:T,s=Number(e.slice(1));return{type:n,amount:s}}c(N,"decodeIndentsKey");function C(e){let t,n=0,s=0;for(const[i,[o,a]]of e)(o>n||o===n&&a>s)&&(n=o,s=a,t=i);return t}c(C,"getMostUsedKey");function S(e,t){return(e===f?" ":" ").repeat(t)}c(S,"makeIndentString");function D(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=I(e,!0);t.size===0&&(t=I(e,!1));const n=C(t);let s,i=0,o="";return n!==void 0&&({type:s,amount:i}=N(n),o=S(s,i)),{amount:i,type:s,indent:o}}c(D,"detectIndent");export{D as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var n=(i,e)=>t(i,"name",{value:e,configurable:!0});var a=Object.defineProperty,d=n((i,e)=>a(i,"name",{value:e,configurable:!0}),"d");const r=d((i,e)=>!!e.ino&&!!e.dev&&e.ino===i.ino&&e.dev===i.dev,"isStatsIdentical");exports.l=r;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var a=(n,e)=>i(n,"name",{value:e,configurable:!0});var t=Object.defineProperty,d=a((n,e)=>t(n,"name",{value:e,configurable:!0}),"d");const v=d((n,e)=>!!e.ino&&!!e.dev&&e.ino===n.ino&&e.dev===n.dev,"isStatsIdentical");export{v as l};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var c=Object.defineProperty;var t=(e,r)=>c(e,"name",{value:r,configurable:!0});const i=require("node:fs/promises"),a=require("@visulima/path/utils"),n=require("./F_OK-6WAweffB.cjs"),o=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs");var u=Object.defineProperty,l=t((e,r)=>u(e,"name",{value:r,configurable:!0}),"o");async function s(e,r=n.F_OK){o(e),e=a.toPath(e);try{return await i.access(e,r),!0}catch{return!1}}t(s,"m");l(s,"isAccessible");module.exports=s;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var e=(t,r)=>o(t,"name",{value:r,configurable:!0});import{access as a}from"node:fs/promises";import{toPath as c}from"@visulima/path/utils";import{F_OK as i}from"./F_OK-B71i3mUa.mjs";import m from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";var f=Object.defineProperty,n=e((t,r)=>f(t,"name",{value:r,configurable:!0}),"o");async function s(t,r=i){m(t),t=c(t);try{return await a(t,r),!0}catch{return!1}}e(s,"m");n(s,"isAccessible");export{s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var e=(r,t)=>o(r,"name",{value:t,configurable:!0});import{accessSync as c}from"node:fs";import{toPath as a}from"@visulima/path/utils";import{F_OK as m}from"./F_OK-B71i3mUa.mjs";import i from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";var n=Object.defineProperty,f=e((r,t)=>n(r,"name",{value:t,configurable:!0}),"o");function s(r,t=m){i(r),r=a(r);try{return c(r,t),!0}catch{return!1}}e(s,"m");f(s,"isAccessibleSync");export{s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var t=(e,r)=>s(e,"name",{value:r,configurable:!0});const i=require("node:fs"),n=require("@visulima/path/utils"),o=require("./F_OK-6WAweffB.cjs"),a=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs");var u=Object.defineProperty,l=t((e,r)=>u(e,"name",{value:r,configurable:!0}),"o");function c(e,r=o.F_OK){a(e),e=n.toPath(e);try{return i.accessSync(e,r),!0}catch{return!1}}t(c,"m");l(c,"isAccessibleSync");module.exports=c;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var u=Object.defineProperty;var a=(r,e)=>u(r,"name",{value:e,configurable:!0});import{cwd as d}from"node:process";import{toPath as m}from"@visulima/path/utils";import{mkdir as h,rename as S,copyFile as D,unlink as $}from"node:fs/promises";import{dirname as i,resolve as n}from"@visulima/path";import E from"./isAccessible-cO53WedI.mjs";import{mkdirSync as b,renameSync as g,copyFileSync as x,unlinkSync as P}from"node:fs";import j from"./isAccessibleSync-D5Vc2GTD.mjs";var k=Object.defineProperty,v=a((r,e)=>k(r,"name",{value:e,configurable:!0}),"o$2");class F extends Error{static{a(this,"a")}static{v(this,"SameDirectoryError")}constructor(e,o){super(`Source directory "${i(e)}" does not match destination directory "${i(o)}"`),this.name="SameDirectoryError"}}const l=v((r,e)=>{if(!r||!e)throw new Error("Source and destination paths must not be empty");if(i(r)!==i(e))throw new F(r,e)},"validateSameDirectory");var M=Object.defineProperty,O=a((r,e)=>M(r,"name",{value:e,configurable:!0}),"o$1");const f=O(async(r,e,{cwd:o,directoryMode:t,overwrite:w,validateDirectory:y})=>{if(o&&(r=n(o,r),e=n(o,e)),y&&l(r,e),!w&&await E(e))throw new Error(`The destination file exists: ${e}`);await h(i(e),{mode:t,recursive:!0});try{await S(r,e)}catch(c){if(c.code==="EXDEV")await D(r,e),await $(r);else throw c}},"internalMoveFile");var T=Object.defineProperty,V=a((r,e)=>T(r,"name",{value:e,configurable:!0}),"o");const p=V((r,e,{cwd:o,directoryMode:t,overwrite:w,validateDirectory:y})=>{if(o&&(r=n(o,r),e=n(o,e)),y&&l(r,e),!w&&j(e))throw new Error(`The destination file exists: ${e}`);b(i(e),{mode:t,recursive:!0});try{g(r,e)}catch(c){if(c.code==="EXDEV")x(r,e),P(r);else throw c}},"internalMoveFileSync");var X=Object.defineProperty,s=a((r,e)=>X(r,"name",{value:e,configurable:!0}),"i");const J=s(async(r,e,o={})=>{const t={overwrite:!0,validateDirectory:!1,...o,cwd:o.cwd?m(o.cwd):d()};await f(r,e,t)},"move"),K=s((r,e,o)=>{const t={overwrite:!0,validateDirectory:!1,...o};t.cwd=t.cwd?m(t.cwd):d(),p(r,e,t)},"moveSync"),L=s(async(r,e,o)=>{const t={overwrite:!0,...o,validateDirectory:!0};t.cwd=t.cwd?m(t.cwd):d(),await f(r,e,t)},"rename"),N=s((r,e,o)=>{const t={overwrite:!0,...o,validateDirectory:!0};t.cwd=t.cwd?m(t.cwd):d(),p(r,e,t)},"renameSync");export{J as move,K as moveSync,L as rename,N as renameSync};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var f=Object.defineProperty;var i=(r,e)=>f(r,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("node:process"),w=require("@visulima/path/utils"),n=require("node:fs/promises"),c=require("@visulima/path"),p=require("./isAccessible-Be3NKjOk.cjs"),s=require("node:fs"),b=require("./isAccessibleSync-WOSgkAy2.cjs");var D=Object.defineProperty,l=i((r,e)=>D(r,"name",{value:e,configurable:!0}),"o$2");class E extends Error{static{i(this,"a")}static{l(this,"SameDirectoryError")}constructor(e,o){super(`Source directory "${c.dirname(e)}" does not match destination directory "${c.dirname(o)}"`),this.name="SameDirectoryError"}}const u=l((r,e)=>{if(!r||!e)throw new Error("Source and destination paths must not be empty");if(c.dirname(r)!==c.dirname(e))throw new E(r,e)},"validateSameDirectory");var P=Object.defineProperty,$=i((r,e)=>P(r,"name",{value:e,configurable:!0}),"o$1");const h=$(async(r,e,{cwd:o,directoryMode:t,overwrite:m,validateDirectory:y})=>{if(o&&(r=c.resolve(o,r),e=c.resolve(o,e)),y&&u(r,e),!m&&await p(e))throw new Error(`The destination file exists: ${e}`);await n.mkdir(c.dirname(e),{mode:t,recursive:!0});try{await n.rename(r,e)}catch(a){if(a.code==="EXDEV")await n.copyFile(r,e),await n.unlink(r);else throw a}},"internalMoveFile");var g=Object.defineProperty,q=i((r,e)=>g(r,"name",{value:e,configurable:!0}),"o");const S=q((r,e,{cwd:o,directoryMode:t,overwrite:m,validateDirectory:y})=>{if(o&&(r=c.resolve(o,r),e=c.resolve(o,e)),y&&u(r,e),!m&&b(e))throw new Error(`The destination file exists: ${e}`);s.mkdirSync(c.dirname(e),{mode:t,recursive:!0});try{s.renameSync(r,e)}catch(a){if(a.code==="EXDEV")s.copyFileSync(r,e),s.unlinkSync(r);else throw a}},"internalMoveFileSync");var j=Object.defineProperty,v=i((r,e)=>j(r,"name",{value:e,configurable:!0}),"i");const M=v(async(r,e,o={})=>{const t={overwrite:!0,validateDirectory:!1,...o,cwd:o.cwd?w.toPath(o.cwd):d.cwd()};await h(r,e,t)},"move"),O=v((r,e,o)=>{const t={overwrite:!0,validateDirectory:!1,...o};t.cwd=t.cwd?w.toPath(t.cwd):d.cwd(),S(r,e,t)},"moveSync"),k=v(async(r,e,o)=>{const t={overwrite:!0,...o,validateDirectory:!0};t.cwd=t.cwd?w.toPath(t.cwd):d.cwd(),await h(r,e,t)},"rename"),x=v((r,e,o)=>{const t={overwrite:!0,...o,validateDirectory:!0};t.cwd=t.cwd?w.toPath(t.cwd):d.cwd(),S(r,e,t)},"renameSync");exports.move=M;exports.moveSync=O;exports.rename=k;exports.renameSync=x;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
var T=Object.defineProperty;var y=(e,r)=>T(e,"name",{value:r,configurable:!0});import W from"./JSONError-CVkb3xZ3.mjs";var F=Object.defineProperty,k=y((e,r)=>F(e,"name",{value:r,configurable:!0}),"v"),M=Object.defineProperty,J=k((e,r)=>M(e,"name",{value:r,configurable:!0}),"r$1");const B=J(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
2
|
-
`),"normalizeLF"),E=globalThis.process||Object.create(null),P={versions:{}},w=new Proxy(E,{get(e,r){if(r in e)return e[r];if(r in P)return P[r]}});var I=Object.defineProperty,q=k((e,r)=>I(e,"name",{value:r,configurable:!0}),"b");const G=q((e,r,o,t)=>{const n={column:0,line:-1,...e.start},l={...n,...e.end},a=n.line,s=n.column,f=l.line,g=l.column;let p=Math.max(a-(o+1),0),d=Math.min(r.length,f+t);a===-1&&(p=0),f===-1&&(d=r.length);const b=f-a,c={};if(b)for(let i=0;i<=b;i++){const u=i+a;if(!s)c[u]=!0;else if(i===0){const m=r[u-1]?.length;c[u]=[s,(m??0)-s+1]}else if(i===b)c[u]=[0,g];else{const m=r[u-i]?.length;c[u]=[0,m]}}else s===g?c[a]=s?[s,0]:!0:c[a]=[s,(g??0)-(s??0)];return{end:d,markerLines:c,start:p}},"getMarkerLines");var U=Object.defineProperty,x=k((e,r)=>U(e,"name",{value:r,configurable:!0}),"o");const _=w.platform==="win32"&&!w.env?.WT_SESSION?">":"❯",z=x((e,r,o)=>{const t={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,showLineNumbers:!0,tabWidth:4,...o,color:{gutter:x(i=>i,"gutter"),marker:x(i=>i,"marker"),message:x(i=>i,"message"),...o?.color}},n=r.start&&typeof r.start.column=="number";let l=B(e).split(`
|
|
3
|
-
`);typeof t?.tabWidth=="number"&&(l=l.map(i=>i.replaceAll(" "," ".repeat(t.tabWidth))));const{end:a,markerLines:s,start:f}=G(r,l,t.linesAbove,t.linesBelow),g=String(a).length,{gutter:p,marker:d,message:b}=t.color;let c=l.slice(f,a).map((i,u)=>{const m=f+1+u,v=s[m],L=(" "+m).slice(-g),N=!s[m+1],A=" "+L+(t.showGutter?" |":"");if(v){let j="";if(Array.isArray(v)){const $=i.replaceAll(/[^\t]/g," ").slice(0,Math.max(v[0]-1,0)),C=v[1]||1;j=[`
|
|
4
|
-
`,t.prefix+p(A.replaceAll(/\d/g," "))," ",$,d("^").repeat(C)].join(""),N&&t.message&&(j+=` ${b(t.message)}`)}return[t.prefix+d(_),p(A),i.length>0?" "+i:"",j].join("")}return t.prefix+" "+p(A)+(i.length>0?" "+i:"")}).join(`
|
|
5
|
-
`);return t.message&&!n&&(c=t.prefix+" ".repeat(g+1)+t.message+`
|
|
6
|
-
`+c),c},"codeFrame");var D=Object.defineProperty,H=y((e,r)=>D(e,"name",{value:r,configurable:!0}),"a"),K=Object.defineProperty,O=H((e,r)=>K(e,"name",{value:r,configurable:!0}),"l");const S=O((e,r)=>{let o=0,t=r.length-2;for(;o<t;){const n=o+(t-o>>1);if(e<r[n])t=n-1;else if(e>=r[n+1])o=n+1;else{o=n;break}}return o},"binarySearch"),Q=O(e=>e.split(/\n|\r(?!\n)/).reduce((r,o)=>(r.push(r.at(-1)+o.length+1),r),[0]),"getLineStartIndexes"),R=O((e,r,o)=>{const t=o?.skipChecks??!1;if(!t&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!t&&(typeof r!="number"||typeof e=="string"&&r>=e.length||Array.isArray(e)&&r+1>=e.at(-1)))return{column:0,line:0};if(typeof e=="string"){const l=Q(e),a=S(r,l);return{column:r-l[a]+1,line:a+1}}const n=S(r,e);return{column:r-e[n]+1,line:n+1}},"indexToLineColumn");var V=Object.defineProperty,h=y((e,r)=>V(e,"name",{value:r,configurable:!0}),"s");const X=h(e=>`\\u{${e.codePointAt(0).toString(16)}}`,"getCodePoint"),Y=h((e,r,o)=>z(e,{start:r},{tabWidth:!1,...o}),"generateCodeFrame"),Z=h((e,r)=>{const o=/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/.exec(r);if(!o)return;let{column:t,index:n,line:l}=o.groups;return l&&t?{column:Number(t),line:Number(l)}:(n=Number(n),n===e.length&&(n=e.length-1),R(e,n))},"getErrorLocation"),ee=h(e=>e.replace(/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,(r,o,t)=>`"${t}"(${X(t)})`),"addCodePointToUnexpectedToken");function re(e,r,o,t){typeof r=="string"&&(typeof o=="object"&&(t=o),o=r,r=void 0);let n;try{return JSON.parse(e,r)}catch(s){n=s.message}let l;e?(l=Z(e,n),n=ee(n)):n+=" while parsing empty string";const a=new W(n);throw a.fileName=o,l&&(a.codeFrame=Y(e,l,t)),a}y(re,"J");h(re,"parseJson");export{re as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";var W=Object.defineProperty;var y=(e,r)=>W(e,"name",{value:r,configurable:!0});const F=require("./JSONError-CWuiGmNc.cjs");var J=Object.defineProperty,k=y((e,r)=>J(e,"name",{value:r,configurable:!0}),"v"),M=Object.defineProperty,E=k((e,r)=>M(e,"name",{value:r,configurable:!0}),"r$1");const q=E(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
2
|
-
`),"normalizeLF"),B=globalThis.process||Object.create(null),P={versions:{}},w=new Proxy(B,{get(e,r){if(r in e)return e[r];if(r in P)return P[r]}});var I=Object.defineProperty,G=k((e,r)=>I(e,"name",{value:r,configurable:!0}),"b");const U=G((e,r,o,t)=>{const n={column:0,line:-1,...e.start},l={...n,...e.end},a=n.line,s=n.column,g=l.line,f=l.column;let p=Math.max(a-(o+1),0),d=Math.min(r.length,g+t);a===-1&&(p=0),g===-1&&(d=r.length);const b=g-a,c={};if(b)for(let i=0;i<=b;i++){const u=i+a;if(!s)c[u]=!0;else if(i===0){const m=r[u-1]?.length;c[u]=[s,(m??0)-s+1]}else if(i===b)c[u]=[0,f];else{const m=r[u-i]?.length;c[u]=[0,m]}}else s===f?c[a]=s?[s,0]:!0:c[a]=[s,(f??0)-(s??0)];return{end:d,markerLines:c,start:p}},"getMarkerLines");var _=Object.defineProperty,x=k((e,r)=>_(e,"name",{value:r,configurable:!0}),"o");const z=w.platform==="win32"&&!w.env?.WT_SESSION?">":"❯",D=x((e,r,o)=>{const t={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,showLineNumbers:!0,tabWidth:4,...o,color:{gutter:x(i=>i,"gutter"),marker:x(i=>i,"marker"),message:x(i=>i,"message"),...o?.color}},n=r.start&&typeof r.start.column=="number";let l=q(e).split(`
|
|
3
|
-
`);typeof t?.tabWidth=="number"&&(l=l.map(i=>i.replaceAll(" "," ".repeat(t.tabWidth))));const{end:a,markerLines:s,start:g}=U(r,l,t.linesAbove,t.linesBelow),f=String(a).length,{gutter:p,marker:d,message:b}=t.color;let c=l.slice(g,a).map((i,u)=>{const m=g+1+u,v=s[m],$=(" "+m).slice(-f),L=!s[m+1],A=" "+$+(t.showGutter?" |":"");if(v){let j="";if(Array.isArray(v)){const C=i.replaceAll(/[^\t]/g," ").slice(0,Math.max(v[0]-1,0)),T=v[1]||1;j=[`
|
|
4
|
-
`,t.prefix+p(A.replaceAll(/\d/g," "))," ",C,d("^").repeat(T)].join(""),L&&t.message&&(j+=` ${b(t.message)}`)}return[t.prefix+d(z),p(A),i.length>0?" "+i:"",j].join("")}return t.prefix+" "+p(A)+(i.length>0?" "+i:"")}).join(`
|
|
5
|
-
`);return t.message&&!n&&(c=t.prefix+" ".repeat(f+1)+t.message+`
|
|
6
|
-
`+c),c},"codeFrame");var H=Object.defineProperty,K=y((e,r)=>H(e,"name",{value:r,configurable:!0}),"a"),Q=Object.defineProperty,O=K((e,r)=>Q(e,"name",{value:r,configurable:!0}),"l");const S=O((e,r)=>{let o=0,t=r.length-2;for(;o<t;){const n=o+(t-o>>1);if(e<r[n])t=n-1;else if(e>=r[n+1])o=n+1;else{o=n;break}}return o},"binarySearch"),R=O(e=>e.split(/\n|\r(?!\n)/).reduce((r,o)=>(r.push(r.at(-1)+o.length+1),r),[0]),"getLineStartIndexes"),V=O((e,r,o)=>{const t=o?.skipChecks??!1;if(!t&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!t&&(typeof r!="number"||typeof e=="string"&&r>=e.length||Array.isArray(e)&&r+1>=e.at(-1)))return{column:0,line:0};if(typeof e=="string"){const l=R(e),a=S(r,l);return{column:r-l[a]+1,line:a+1}}const n=S(r,e);return{column:r-e[n]+1,line:n+1}},"indexToLineColumn");var X=Object.defineProperty,h=y((e,r)=>X(e,"name",{value:r,configurable:!0}),"s");const Y=h(e=>`\\u{${e.codePointAt(0).toString(16)}}`,"getCodePoint"),Z=h((e,r,o)=>D(e,{start:r},{tabWidth:!1,...o}),"generateCodeFrame"),ee=h((e,r)=>{const o=/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/.exec(r);if(!o)return;let{column:t,index:n,line:l}=o.groups;return l&&t?{column:Number(t),line:Number(l)}:(n=Number(n),n===e.length&&(n=e.length-1),V(e,n))},"getErrorLocation"),re=h(e=>e.replace(/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,(r,o,t)=>`"${t}"(${Y(t)})`),"addCodePointToUnexpectedToken");function N(e,r,o,t){typeof r=="string"&&(typeof o=="object"&&(t=o),o=r,r=void 0);let n;try{return JSON.parse(e,r)}catch(s){n=s.message}let l;e?(l=ee(e,n),n=re(n)):n+=" while parsing empty string";const a=new F(n);throw a.fileName=o,l&&(a.codeFrame=Z(e,l,t)),a}y(N,"J");h(N,"parseJson");module.exports=N;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var w=Object.defineProperty;var m=(o,r)=>w(o,"name",{value:r,configurable:!0});import{readFile as b}from"node:fs/promises";import{brotliDecompress as g,unzip as h}from"node:zlib";import{toPath as u}from"@visulima/path/utils";import{R_OK as P}from"./F_OK-B71i3mUa.mjs";import v from"./PermissionError-B8oi38Bx.mjs";import f from"./isAccessible-cO53WedI.mjs";import y from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";var $=Object.defineProperty,l=m((o,r)=>$(o,"name",{value:r,configurable:!0}),"n");const z={brotli:g,gzip:h,none:l((o,r)=>{r(null,o)},"none")},S=l(async(o,r)=>{if(y(o),o=u(o),!await f(o))throw new v(`unable to read the non-accessible file: ${o}`);if(!await f(o,P))throw new Error(`Unable to read the non-readable file: ${o}`);const{buffer:c,compression:p,encoding:e,flag:t}=r??{};return await b(o,t?{encoding:e,flag:t}:{encoding:e}).then(async n=>await new Promise((s,d)=>{z[p??"none"](n,(i,a)=>{i?d(i):s(c?a:a.toString())})})).catch(n=>{throw n})},"readFile");export{S as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var h=Object.defineProperty;var s=(e,r)=>h(e,"name",{value:r,configurable:!0});const g=require("node:fs/promises"),c=require("node:zlib"),p=require("@visulima/path/utils"),q=require("./F_OK-6WAweffB.cjs"),m=require("./PermissionError-Ck1Es7al.cjs"),l=require("./isAccessible-Be3NKjOk.cjs"),P=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs");var y=Object.defineProperty,u=s((e,r)=>y(e,"name",{value:r,configurable:!0}),"n");const F={brotli:c.brotliDecompress,gzip:c.unzip,none:u((e,r)=>{r(null,e)},"none")},O=u(async(e,r)=>{if(P(e),e=p.toPath(e),!await l(e))throw new m(`unable to read the non-accessible file: ${e}`);if(!await l(e,q.R_OK))throw new Error(`Unable to read the non-readable file: ${e}`);const{buffer:d,compression:b,encoding:i,flag:o}=r??{};return await g.readFile(e,o?{encoding:i,flag:o}:{encoding:i}).then(async n=>await new Promise((f,w)=>{F[b??"none"](n,(t,a)=>{t?w(t):f(d?a:a.toString())})})).catch(n=>{throw n})},"readFile");module.exports=O;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var b=Object.defineProperty;var t=(e,r)=>b(e,"name",{value:r,configurable:!0});const g=require("node:fs"),c=require("node:zlib"),q=require("@visulima/path/utils"),y=require("./F_OK-6WAweffB.cjs"),s=require("./PermissionError-Ck1Es7al.cjs"),a=require("./isAccessibleSync-WOSgkAy2.cjs"),p=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs");var S=Object.defineProperty,l=t((e,r)=>S(e,"name",{value:r,configurable:!0}),"n");const h={brotli:c.brotliDecompressSync,gzip:c.unzipSync,none:l(e=>e,"none")},m=l((e,r)=>{if(p(e),e=q.toPath(e),!a(e))throw new s(`unable to read the non-accessible file: ${e}`);if(!a(e,y.R_OK))throw new s(`invalid access to read file at: ${e}`);const{buffer:u,compression:d,encoding:n,flag:i}=r??{},f=g.readFileSync(e,i?{encoding:n,flag:i}:{encoding:n}),o=h[d??"none"](f);return u?o:o.toString()},"readFileSync");module.exports=m;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s=Object.defineProperty;var t=(o,r)=>s(o,"name",{value:r,configurable:!0});import{readFileSync as d}from"node:fs";import{brotliDecompressSync as g,unzipSync as b}from"node:zlib";import{toPath as u}from"@visulima/path/utils";import{R_OK as y}from"./F_OK-B71i3mUa.mjs";import a from"./PermissionError-B8oi38Bx.mjs";import f from"./isAccessibleSync-D5Vc2GTD.mjs";import S from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";var h=Object.defineProperty,m=t((o,r)=>h(o,"name",{value:r,configurable:!0}),"n");const v={brotli:g,gzip:b,none:m(o=>o,"none")},D=m((o,r)=>{if(S(o),o=u(o),!f(o))throw new a(`unable to read the non-accessible file: ${o}`);if(!f(o,y))throw new a(`invalid access to read file at: ${o}`);const{buffer:c,compression:l,encoding:n,flag:e}=r??{},p=d(o,e?{encoding:n,flag:e}:{encoding:n}),i=v[l??"none"](p);return c?i:i.toString()},"readFileSync");export{D as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var t=(e,o)=>i(e,"name",{value:o,configurable:!0});import{toPath as d}from"@visulima/path/utils";import m from"./parseJson-BIYrZWHm.mjs";import p from"./readFile-CFus1Rym.mjs";var s=Object.defineProperty,u=t((e,o)=>s(e,"name",{value:o,configurable:!0}),"i");async function l(e,o,n){typeof o=="object"&&(n=o,o=void 0);const c=await p(e,{buffer:!0,encoding:void 0});let r=new TextDecoder().decode(c);const{beforeParse:a,color:f}=n??{};return typeof a=="function"&&(r=a(r)),m(r,o,d(e),{color:f})}t(l,"c");u(l,"readJson");export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var u=Object.defineProperty;var t=(o,e)=>u(o,"name",{value:e,configurable:!0});const d=require("@visulima/path/utils"),f=require("./parseJson-CXe73j5t.cjs"),l=require("./readFile-fzYtUKuW.cjs");var b=Object.defineProperty,p=t((o,e)=>b(o,"name",{value:e,configurable:!0}),"i");async function i(o,e,n){typeof e=="object"&&(n=e,e=void 0);const s=await l(o,{buffer:!0,encoding:void 0});let r=new TextDecoder().decode(s);const{beforeParse:c,color:a}=n??{};return typeof c=="function"&&(r=c(r)),f(r,e,d.toPath(o),{color:a})}t(i,"c");p(i,"readJson");module.exports=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var u=Object.defineProperty;var t=(o,e)=>u(o,"name",{value:e,configurable:!0});const d=require("@visulima/path/utils"),f=require("./parseJson-CXe73j5t.cjs"),l=require("./readFileSync-Dz4jLcWc.cjs");var b=Object.defineProperty,p=t((o,e)=>b(o,"name",{value:e,configurable:!0}),"r");function i(o,e,c){typeof e=="object"&&(c=e,e=void 0);const s=l(o,{buffer:!0,encoding:void 0});let r=new TextDecoder().decode(s);const{beforeParse:n,color:a}=c??{};return typeof n=="function"&&(r=n(r)),f(r,e,d.toPath(o),{color:a})}t(i,"c");p(i,"readJsonSync");module.exports=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var t=(e,o)=>i(e,"name",{value:o,configurable:!0});import{toPath as d}from"@visulima/path/utils";import m from"./parseJson-BIYrZWHm.mjs";import p from"./readFileSync-Ulz6QzOz.mjs";var u=Object.defineProperty,l=t((e,o)=>u(e,"name",{value:o,configurable:!0}),"r");function s(e,o,c){typeof o=="object"&&(c=o,o=void 0);const f=p(e,{buffer:!0,encoding:void 0});let r=new TextDecoder().decode(f);const{beforeParse:n,color:a}=c??{};return typeof n=="function"&&(r=n(r)),m(r,o,d(e),{color:a})}t(s,"c");l(s,"readJsonSync");export{s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var n=(r,e)=>p(r,"name",{value:e,configurable:!0});const t=require("yaml"),d=require("./readFile-fzYtUKuW.cjs");var m=Object.defineProperty,g=n((r,e)=>m(r,"name",{value:e,configurable:!0}),"e");async function i(r,e,s){const{buffer:c,compression:f,encoding:u="utf8",flag:l,...a}=s??{},o=await d(r,{buffer:c,compression:f,encoding:u,flag:l});return typeof e=="function"?t.parse(o,e,a):t.parse(o,a)}n(i,"d");g(i,"readYaml");module.exports=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s=Object.defineProperty;var o=(r,e)=>s(r,"name",{value:e,configurable:!0});import{parse as n}from"yaml";import u from"./readFile-CFus1Rym.mjs";var l=Object.defineProperty,d=o((r,e)=>l(r,"name",{value:e,configurable:!0}),"e");async function g(r,e,t){const{buffer:i,compression:c,encoding:m="utf8",flag:p,...a}=t??{},f=await u(r,{buffer:i,compression:c,encoding:m,flag:p});return typeof e=="function"?n(f,e,a):n(f,a)}o(g,"d");d(g,"readYaml");export{g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var u=Object.defineProperty;var o=(r,e)=>u(r,"name",{value:e,configurable:!0});import{parse as t}from"yaml";import s from"./readFileSync-Ulz6QzOz.mjs";var l=Object.defineProperty,d=o((r,e)=>l(r,"name",{value:e,configurable:!0}),"i");function g(r,e,a){const{buffer:i,compression:c,encoding:m="utf8",flag:p,...f}=a??{},n=s(r,{buffer:i,compression:c,encoding:m,flag:p});return typeof e=="function"?t(n,e,f):t(n,f)}o(g,"d");d(g,"readYamlSync");export{g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var n=(r,e)=>p(r,"name",{value:e,configurable:!0});const t=require("yaml"),d=require("./readFileSync-Dz4jLcWc.cjs");var m=Object.defineProperty,g=n((r,e)=>m(r,"name",{value:e,configurable:!0}),"i");function a(r,e,i){const{buffer:s,compression:f,encoding:u="utf8",flag:l,...o}=i??{},c=d(r,{buffer:s,compression:f,encoding:u,flag:l});return typeof e=="function"?t.parse(c,e,o):t.parse(c,o)}n(a,"d");g(a,"readYamlSync");module.exports=a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var i=Object.defineProperty;var t=(e,r)=>i(e,"name",{value:r,configurable:!0});const a=require("node:fs/promises"),c=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs");var s=Object.defineProperty,o=t((e,r)=>s(e,"name",{value:r,configurable:!0}),"t");const y=o(async(e,r={})=>{c(e);try{await a.unlink(e)}catch{}try{await a.rm(e,{force:!0,maxRetries:r?.maxRetries,recursive:!0,retryDelay:r?.retryDelay})}catch{}},"remove");module.exports=y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty;var a=(r,e)=>t(r,"name",{value:e,configurable:!0});import{unlink as i,rm as c}from"node:fs/promises";import o from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";var m=Object.defineProperty,y=a((r,e)=>m(r,"name",{value:e,configurable:!0}),"t");const l=y(async(r,e={})=>{o(r);try{await i(r)}catch{}try{await c(r,{force:!0,maxRetries:e?.maxRetries,recursive:!0,retryDelay:e?.retryDelay})}catch{}},"remove");export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var t=(e,r)=>a(e,"name",{value:r,configurable:!0});const c=require("node:fs"),i=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs");var n=Object.defineProperty,s=t((e,r)=>n(e,"name",{value:r,configurable:!0}),"t");const y=s((e,r={})=>{i(e);try{c.unlinkSync(e)}catch{}try{c.rmSync(e,{force:!0,maxRetries:r?.maxRetries,recursive:!0,retryDelay:r?.retryDelay})}catch{}},"removeSync");module.exports=y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a=Object.defineProperty;var t=(r,e)=>a(r,"name",{value:e,configurable:!0});import{unlinkSync as c,rmSync as m}from"node:fs";import o from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";var y=Object.defineProperty,i=t((r,e)=>y(r,"name",{value:e,configurable:!0}),"t");const s=i((r,e={})=>{o(r);try{c(r)}catch{}try{m(r,{force:!0,maxRetries:e?.maxRetries,recursive:!0,retryDelay:e?.retryDelay})}catch{}},"removeSync");export{s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var o=(e,t)=>i(e,"name",{value:t,configurable:!0});import{resolve as r,dirname as a}from"@visulima/path";var n=Object.defineProperty,s=o((e,t)=>n(e,"name",{value:t,configurable:!0}),"i");const m=s((e,t)=>typeof e!="string"?e:e.startsWith("./")?r(e):typeof t=="string"?r(a(t),e):new URL(e,t),"resolveSymlinkTarget");export{m as o};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var r=(e,t)=>s(e,"name",{value:t,configurable:!0});const o=require("@visulima/path");var i=Object.defineProperty,a=r((e,t)=>i(e,"name",{value:t,configurable:!0}),"i");const n=a((e,t)=>typeof e!="string"?e:e.startsWith("./")?o.resolve(e):typeof t=="string"?o.resolve(o.dirname(t),e):new URL(e,t),"resolveSymlinkTarget");exports.o=n;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var s=(e,t)=>o(e,"name",{value:t,configurable:!0});import{INTERNAL_STRIP_JSON_REGEX as n}from"./F_OK-B71i3mUa.mjs";var r=Object.defineProperty,i=s((e,t)=>r(e,"name",{value:t,configurable:!0}),"s");const c=i((e,{whitespace:t=!0}={})=>e.replace(n,a=>a.startsWith('"')||a[1]==="*"&&!a.endsWith("*/")?a:t?a.replaceAll(/\S/g," "):""),"stripJsonComments");export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var a=(e,t)=>n(e,"name",{value:t,configurable:!0});const r=require("./F_OK-6WAweffB.cjs");var c=Object.defineProperty,i=a((e,t)=>c(e,"name",{value:t,configurable:!0}),"s");const o=i((e,{whitespace:t=!0}={})=>e.replace(r.INTERNAL_STRIP_JSON_REGEX,s=>s.startsWith('"')||s[1]==="*"&&!s.endsWith("*/")?s:t?s.replaceAll(/\S/g," "):""),"stripJsonComments");module.exports=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var r=(e,t)=>n(e,"name",{value:t,configurable:!0});var f=Object.defineProperty,i=r((e,t)=>f(e,"name",{value:t,configurable:!0}),"f");const a=new TextEncoder,y=i(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return a.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e)){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},"toUint8Array");exports.a=y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=Object.defineProperty;var r=(e,t)=>n(e,"name",{value:t,configurable:!0});var f=Object.defineProperty,i=r((e,t)=>f(e,"name",{value:t,configurable:!0}),"f");const a=new TextEncoder,y=i(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return a.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e)){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},"toUint8Array");export{y as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var w=Object.defineProperty;var m=(e,s)=>w(e,"name",{value:s,configurable:!0});const u=require("node:fs/promises"),c=require("@visulima/path"),D=require("@visulima/path/utils"),S=require("./WalkError-gKgp0TWD.cjs"),F=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),a=require("./walk-include-CFIYniQi.cjs");var v=Object.defineProperty,b=m((e,s)=>v(e,"name",{value:s,configurable:!0}),"f");const L=b(async e=>{const s=c.normalize(e),t=c.basename(s),n=await u.stat(s);return{isDirectory:n.isDirectory,isFile:n.isFile,isSymbolicLink:n.isSymbolicLink,name:t,path:s}},"_createWalkEntry");async function*d(e,{extensions:s,followSymlinks:t=!1,includeDirs:n=!0,includeFiles:k=!0,includeSymlinks:f=!0,match:p,maxDepth:y=Number.POSITIVE_INFINITY,skip:h}={}){if(F(e),y<0)return;const l=p?p.map(i=>typeof i=="string"?a.c(i):i):void 0,o=h?h.map(i=>typeof i=="string"?a.c(i):i):void 0;if(e=c.resolve(D.toPath(e)),n&&a.a(e,s,l,o)&&(yield await L(e)),!(y<1||!a.a(e,void 0,void 0,o)))try{for await(const i of await u.readdir(e,{withFileTypes:!0})){let r=c.join(e,i.name);if(i.isSymbolicLink())if(t)r=await u.realpath(r);else if(f&&a.a(r,s,l,o))yield{isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:r};else continue;i.isSymbolicLink()||i.isDirectory()?yield*d(r,{extensions:s,followSymlinks:t,includeDirs:n,includeFiles:k,includeSymlinks:f,match:l,maxDepth:y-1,skip:o}):i.isFile()&&k&&a.a(r,s,l,o)&&(yield{isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:r})}}catch(i){throw i instanceof S?i:new S(i,e)}}m(d,"d");b(d,"walk");module.exports=d;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var h=Object.defineProperty;var c=(e,o)=>h(e,"name",{value:o,configurable:!0});import{readdir as w,realpath as D,stat as F}from"node:fs/promises";import{resolve as v,join as L,normalize as x,basename as I}from"@visulima/path";import{toPath as g}from"@visulima/path/utils";import k from"./WalkError-BsngoIKJ.mjs";import N from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{c as u,a as l}from"./walk-include-B-MbUqMt.mjs";var O=Object.defineProperty,S=c((e,o)=>O(e,"name",{value:o,configurable:!0}),"f");const P=S(async e=>{const o=x(e),a=I(o),s=await F(o);return{isDirectory:s.isDirectory,isFile:s.isFile,isSymbolicLink:s.isSymbolicLink,name:a,path:o}},"_createWalkEntry");async function*b(e,{extensions:o,followSymlinks:a=!1,includeDirs:s=!0,includeFiles:y=!0,includeSymlinks:f=!0,match:p,maxDepth:m=Number.POSITIVE_INFINITY,skip:d}={}){if(N(e),m<0)return;const t=p?p.map(i=>typeof i=="string"?u(i):i):void 0,r=d?d.map(i=>typeof i=="string"?u(i):i):void 0;if(e=v(g(e)),s&&l(e,o,t,r)&&(yield await P(e)),!(m<1||!l(e,void 0,void 0,r)))try{for await(const i of await w(e,{withFileTypes:!0})){let n=L(e,i.name);if(i.isSymbolicLink())if(a)n=await D(n);else if(f&&l(n,o,t,r))yield{isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:n};else continue;i.isSymbolicLink()||i.isDirectory()?yield*b(n,{extensions:o,followSymlinks:a,includeDirs:s,includeFiles:y,includeSymlinks:f,match:t,maxDepth:m-1,skip:r}):i.isFile()&&y&&l(n,o,t,r)&&(yield{isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:n})}}catch(i){throw i instanceof k?i:new k(i,e)}}c(b,"d");S(b,"walk");export{b as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=Object.defineProperty;var c=(e,r)=>n(e,"name",{value:r,configurable:!0});var p=Object.defineProperty,t=c((e,r)=>p(e,"name",{value:r,configurable:!0}),"r");const u=t(e=>{const r=e.replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,"\\.").replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");return new RegExp(`^${r}$`)},"globToRegExp");var o=Object.defineProperty,s=c((e,r)=>o(e,"name",{value:r,configurable:!0}),"n");const v=s((e,r,g,l)=>Array.isArray(r)&&r.length>0&&!r.some(a=>e.endsWith(a))||g&&!g.some(a=>a.test(e))?!1:!l?.some(a=>a.test(e)),"walkInclude");export{v as a,u as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var c=(e,r)=>t(e,"name",{value:r,configurable:!0});var n=Object.defineProperty,p=c((e,r)=>n(e,"name",{value:r,configurable:!0}),"r");const s=p(e=>{const r=e.replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,"\\.").replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");return new RegExp(`^${r}$`)},"globToRegExp");var o=Object.defineProperty,i=c((e,r)=>o(e,"name",{value:r,configurable:!0}),"n");const u=i((e,r,g,l)=>Array.isArray(r)&&r.length>0&&!r.some(a=>e.endsWith(a))||g&&!g.some(a=>a.test(e))?!1:!l?.some(a=>a.test(e)),"walkInclude");exports.a=u;exports.c=s;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var D=Object.defineProperty;var c=(e,o)=>D(e,"name",{value:o,configurable:!0});import{readdirSync as F,realpathSync as v,statSync as L}from"node:fs";import{resolve as w,join as x,normalize as a,basename as I}from"@visulima/path";import{toPath as g}from"@visulima/path/utils";import k from"./WalkError-BsngoIKJ.mjs";import N from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{c as h,a as l}from"./walk-include-B-MbUqMt.mjs";var O=Object.defineProperty,u=c((e,o)=>O(e,"name",{value:o,configurable:!0}),"m");const P=u(e=>{const o=a(e),r=L(o);return{isDirectory:r.isDirectory,isFile:r.isFile,isSymbolicLink:r.isSymbolicLink,name:I(o),path:o}},"_createWalkEntry");function*b(e,{extensions:o,followSymlinks:r=!1,includeDirs:y=!0,includeFiles:f=!0,includeSymlinks:p=!0,match:d,maxDepth:m=Number.POSITIVE_INFINITY,skip:S}={}){if(N(e),m<0)return;const t=d?d.map(i=>typeof i=="string"?h(i):i):void 0,s=S?S.map(i=>typeof i=="string"?h(i):i):void 0;if(e=w(g(e)),y&&l(e,o,t,s)&&(yield P(e)),!(m<1||!l(e,void 0,void 0,s)))try{for(const i of F(e,{withFileTypes:!0})){let n=x(e,i.name);if(i.isSymbolicLink())if(r)n=v(n);else if(p&&l(n,o,t,s))yield{isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:a(n)};else continue;i.isSymbolicLink()||i.isDirectory()?yield*b(n,{extensions:o,followSymlinks:r,includeDirs:y,includeFiles:f,includeSymlinks:p,match:t,maxDepth:m-1,skip:s}):i.isFile()&&f&&l(n,o,t,s)&&(yield{isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:a(n)})}}catch(i){throw i instanceof k?i:new k(i,e)}}c(b,"h");u(b,"walkSync");export{b as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var D=Object.defineProperty;var y=(e,n)=>D(e,"name",{value:n,configurable:!0});const m=require("node:fs"),t=require("@visulima/path"),F=require("@visulima/path/utils"),p=require("./WalkError-gKgp0TWD.cjs"),v=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),o=require("./walk-include-CFIYniQi.cjs");var L=Object.defineProperty,b=y((e,n)=>L(e,"name",{value:n,configurable:!0}),"m");const w=b(e=>{const n=t.normalize(e),r=m.statSync(n);return{isDirectory:r.isDirectory,isFile:r.isFile,isSymbolicLink:r.isSymbolicLink,name:t.basename(n),path:n}},"_createWalkEntry");function*d(e,{extensions:n,followSymlinks:r=!1,includeDirs:u=!0,includeFiles:k=!0,includeSymlinks:S=!0,match:f,maxDepth:a=Number.POSITIVE_INFINITY,skip:h}={}){if(v(e),a<0)return;const c=f?f.map(i=>typeof i=="string"?o.c(i):i):void 0,l=h?h.map(i=>typeof i=="string"?o.c(i):i):void 0;if(e=t.resolve(F.toPath(e)),u&&o.a(e,n,c,l)&&(yield w(e)),!(a<1||!o.a(e,void 0,void 0,l)))try{for(const i of m.readdirSync(e,{withFileTypes:!0})){let s=t.join(e,i.name);if(i.isSymbolicLink())if(r)s=m.realpathSync(s);else if(S&&o.a(s,n,c,l))yield{isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:t.normalize(s)};else continue;i.isSymbolicLink()||i.isDirectory()?yield*d(s,{extensions:n,followSymlinks:r,includeDirs:u,includeFiles:k,includeSymlinks:S,match:c,maxDepth:a-1,skip:l}):i.isFile()&&k&&o.a(s,n,c,l)&&(yield{isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:t.normalize(s)})}}catch(i){throw i instanceof p?i:new p(i,e)}}y(d,"h");b(d,"walkSync");module.exports=d;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var f=Object.defineProperty;var c=(i,a)=>f(i,"name",{value:a,configurable:!0});import{mkdir as s,writeFile as l,stat as p,rename as w,chown as u,chmod as g,unlink as h}from"node:fs/promises";import{dirname as v}from"@visulima/path";import{toPath as $}from"@visulima/path/utils";import{F_OK as d}from"./F_OK-B71i3mUa.mjs";import e from"./isAccessible-cO53WedI.mjs";import y from"./assertValidFileContents-BLhwm7u2.mjs";import k from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{a as F}from"./to-uint-8-array-DwgaTasY.mjs";var b=Object.defineProperty,O=c((i,a)=>b(i,"name",{value:a,configurable:!0}),"d");const B=O(async(i,a,t)=>{t={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...t},k(i),y(a),i=$(i);try{const o=await e(i,d);if(!o&&t.recursive){const n=v(i);await e(n,d)||await s(n,{recursive:!0})}let m;await l(`${i}.tmp`,F(a),{encoding:t.encoding,flag:t.flag}),o&&!t.overwrite&&(m=await p(i),t.chown===void 0&&(t.chown={gid:m.gid,uid:m.uid}),await w(i,`${i}.bak`));const r=`${i}.tmp`;if(t.chown)try{await u(r,t.chown.uid,t.chown.gid)}catch{}await g(r,m&&!t.mode?m.mode:t.mode??438),await w(r,i)}catch(o){throw new Error(`Failed to write file at: ${i} - ${o.message}`,{cause:o})}finally{await e(`${i}.tmp`)&&await h(`${i}.tmp`)}},"writeFile");export{B as default};
|