@visulima/fs 5.1.0 → 6.0.1
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 +10 -0
- package/LICENSE.md +159 -19
- package/README.md +6 -6
- package/dist/eol.js +3 -3
- package/dist/glob-parent.js +1 -1
- package/dist/glob.d.ts +54 -2
- package/dist/glob.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/ini.d.ts +2 -2
- package/dist/ini.js +1 -1
- package/dist/is-glob.js +1 -1
- package/dist/json5.d.ts +2 -2
- package/dist/json5.js +1 -1
- package/dist/jsonc.d.ts +2 -2
- package/dist/jsonc.js +1 -1
- package/dist/match.js +1 -1
- package/dist/packem_shared/FIND_UP_STOP-pQqZdUPw.js +1 -0
- package/dist/packem_shared/_commonjsHelpers-CqkleIqs.js +1 -0
- package/dist/packem_shared/assertValidFileOrDirectoryPath-CAHgg-jK.js +1 -0
- package/dist/packem_shared/build-rm-options-_U1T9rOz.js +1 -0
- package/dist/packem_shared/collect-DXVMgRiZ.js +1 -0
- package/dist/packem_shared/collectSync-jjcJdHox.js +1 -0
- package/dist/packem_shared/copy-Cv8Vvdrc.js +1 -0
- package/dist/packem_shared/copySync-JIxmcGrd.js +1 -0
- package/dist/packem_shared/emptyDir-DQ1LfO2i.js +1 -0
- package/dist/packem_shared/emptyDirSync-BXDqirP1.js +1 -0
- package/dist/packem_shared/ensureDir-qy_X-WeG.js +1 -0
- package/dist/packem_shared/{ensureDirSync-B0w9WMwE.js → ensureDirSync-ONFJBCbg.js} +1 -1
- package/dist/packem_shared/{ensureFile-waD4hDO8.js → ensureFile-q1ozF6q5.js} +1 -1
- package/dist/packem_shared/ensureFileSync-B6eR38N_.js +1 -0
- package/dist/packem_shared/ensureLink-BpsTVGAm.js +1 -0
- package/dist/packem_shared/ensureLinkSync-B5moWvh3.js +1 -0
- package/dist/packem_shared/ensureSymlink-BF0BwVPy.js +1 -0
- package/dist/packem_shared/ensureSymlinkSync-D-JzDuD7.js +1 -0
- package/dist/packem_shared/findUp-BlQ1EUhu.js +1 -0
- package/dist/packem_shared/findUpSync-CF1OXVQw.js +1 -0
- package/dist/packem_shared/glob-Cyk1H9ZL.js +1 -0
- package/dist/packem_shared/globSync-Cm0u7eCn.js +1 -0
- package/dist/packem_shared/index-CBWLeiRp.js +1 -0
- package/dist/packem_shared/index-DDkv7LRn.js +1 -0
- package/dist/packem_shared/index-DGueExxA.js +1 -0
- package/dist/packem_shared/index-ovH_d7Hf.js +11 -0
- package/dist/packem_shared/indexToLineColumn-BHKDfaPx-DS9KxkE-.js +6 -0
- package/dist/packem_shared/ini-preserve-D3Z1KcgN.js +4 -0
- package/dist/packem_shared/is-stats-identical-DOh8_0KH.js +1 -0
- package/dist/packem_shared/isAccessible-CqNOFdZu.js +1 -0
- package/dist/packem_shared/isAccessibleSync-DYKTrrvc.js +1 -0
- package/dist/packem_shared/json-value.d-DZqAihX4.d.ts +29 -0
- package/dist/packem_shared/jsonc-merge-BGm21l00.js +2 -0
- package/dist/packem_shared/map-read-error-8dAe6Qhr.js +1 -0
- package/dist/packem_shared/move-DG3P4i6Y.js +1 -0
- package/dist/packem_shared/parseJson-gfl5PTTo.js +1 -0
- package/dist/packem_shared/readFile-DbKGLwIK.js +1 -0
- package/dist/packem_shared/readFileSync-CTTHkZ_p.js +1 -0
- package/dist/packem_shared/readIni-C9VUitQm.js +1 -0
- package/dist/packem_shared/readIniSync-DhMbhDPx.js +1 -0
- package/dist/packem_shared/readJson-CClJlGok.js +1 -0
- package/dist/packem_shared/readJson5-D33tgtEU.js +1 -0
- package/dist/packem_shared/readJson5Sync-DEd-ejtp.js +1 -0
- package/dist/packem_shared/readJsonSync-CbryXYxN.js +1 -0
- package/dist/packem_shared/readJsonc-Cp1KzmVx.js +1 -0
- package/dist/packem_shared/readJsoncSync-sE30rJ5W.js +1 -0
- package/dist/packem_shared/readToml-jD08lZRN.js +1 -0
- package/dist/packem_shared/readTomlSync-0J8gIalg.js +1 -0
- package/dist/packem_shared/readYaml-C63_W9Qg.js +1 -0
- package/dist/packem_shared/readYamlSync-CuyDW6xR.js +1 -0
- package/dist/packem_shared/remove-4ofpEuH1.js +1 -0
- package/dist/packem_shared/removeSync-g1D5kONg.js +1 -0
- package/dist/packem_shared/resolve-symlink-target-D4Pb9Fjw.js +1 -0
- package/dist/packem_shared/sanitize-B1LHjdjC.js +1 -0
- package/dist/packem_shared/stripJsonComments-Do7s7No5.js +1 -0
- package/dist/packem_shared/to-uint-8-array-DlTu4L-l.js +1 -0
- package/dist/packem_shared/types.d-B-T1rDxl.d.ts +958 -0
- package/dist/packem_shared/walk-Brue5N30.js +1 -0
- package/dist/packem_shared/walk-include-aizKyl9e.js +1 -0
- package/dist/packem_shared/walkSync-BWGgTwUy.js +1 -0
- package/dist/packem_shared/writeFile-BIBP7wbK.js +1 -0
- package/dist/packem_shared/writeFileSync-DJoHk3Ks.js +1 -0
- package/dist/packem_shared/writeIni--gog68qN.js +4 -0
- package/dist/packem_shared/writeIniSync-BL_z8aMQ.js +4 -0
- package/dist/packem_shared/writeJson-DmN1UqZc.js +4 -0
- package/dist/packem_shared/writeJson5-CPRmF2K7.js +4 -0
- package/dist/packem_shared/writeJson5Sync-BiUfm-cZ.js +4 -0
- package/dist/packem_shared/writeJsonSync-BiFyXQ5h.js +4 -0
- package/dist/packem_shared/writeJsonc-B4ahk9a2.js +4 -0
- package/dist/packem_shared/writeJsoncSync-lBv1IFDo.js +4 -0
- package/dist/packem_shared/writeToml-Frvwh0Kn.js +1 -0
- package/dist/packem_shared/writeTomlSync-BvKdlKvE.js +1 -0
- package/dist/packem_shared/writeYaml-C4IGXTOo.js +1 -0
- package/dist/packem_shared/writeYamlSync-BAbWtkvq.js +1 -0
- package/dist/size.js +1 -1
- package/dist/toml.d.ts +1 -1
- package/dist/toml.js +1 -1
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/dist/yaml.d.ts +2 -2
- package/dist/yaml.js +1 -1
- package/package.json +28 -28
- package/dist/packem_shared/FIND_UP_STOP-CAwY1qU7.js +0 -1
- package/dist/packem_shared/_commonjsHelpers-CWAkuNXM.js +0 -1
- package/dist/packem_shared/assertValidFileOrDirectoryPath-BTlt945W.js +0 -1
- package/dist/packem_shared/build-rm-options-avnusYx-.js +0 -1
- package/dist/packem_shared/collect-Dbo3K4iq.js +0 -1
- package/dist/packem_shared/collectSync-BLLtRqQ4.js +0 -1
- package/dist/packem_shared/copy-DiR5_5iA.js +0 -1
- package/dist/packem_shared/copySync-DffsYlhb.js +0 -1
- package/dist/packem_shared/emptyDir-BlBeczk0.js +0 -1
- package/dist/packem_shared/emptyDirSync-DfUZ9Ejz.js +0 -1
- package/dist/packem_shared/ensureDir-BEiomfxz.js +0 -1
- package/dist/packem_shared/ensureFileSync-CG07zjV7.js +0 -1
- package/dist/packem_shared/ensureLink-Dz-PDWa5.js +0 -1
- package/dist/packem_shared/ensureLinkSync-BZH7TaSQ.js +0 -1
- package/dist/packem_shared/ensureSymlink-Byi6ajoE.js +0 -1
- package/dist/packem_shared/ensureSymlinkSync-D7OCsAd8.js +0 -1
- package/dist/packem_shared/findUp-BHCEMf5y.js +0 -1
- package/dist/packem_shared/findUpSync-BKJsHMQN.js +0 -1
- package/dist/packem_shared/glob-BUjyjdE8.js +0 -1
- package/dist/packem_shared/glob-sync.d-0UK6O_wZ.d.ts +0 -54
- package/dist/packem_shared/globSync-Bk9TUV7x.js +0 -1
- package/dist/packem_shared/index-B2MhYg3r.js +0 -1
- package/dist/packem_shared/index-BHy3Kcr7.js +0 -11
- package/dist/packem_shared/index-CPZbuHkp.js +0 -1
- package/dist/packem_shared/index-LUKYN3u3.js +0 -1
- package/dist/packem_shared/indexToLineColumn-BfkIsWHQ-DQJmePiQ.js +0 -6
- package/dist/packem_shared/ini-preserve-D1DopDLd.js +0 -4
- package/dist/packem_shared/is-stats-identical-l1GRN4Qu.js +0 -1
- package/dist/packem_shared/isAccessible-B7guOm3k.js +0 -1
- package/dist/packem_shared/isAccessibleSync-XH4YleJW.js +0 -1
- package/dist/packem_shared/jsonc-merge-Bkw73TLW.js +0 -2
- package/dist/packem_shared/map-read-error-CR3rQUxx.js +0 -1
- package/dist/packem_shared/move-KhPRvsRd.js +0 -1
- package/dist/packem_shared/parseJson-lm3MUNdf.js +0 -1
- package/dist/packem_shared/readFile-VgxUDrNH.js +0 -1
- package/dist/packem_shared/readFileSync-CloFeQw8.js +0 -1
- package/dist/packem_shared/readIni-CEXHWn92.js +0 -1
- package/dist/packem_shared/readIniSync-DsxVHypc.js +0 -1
- package/dist/packem_shared/readJson-DV2KxaEJ.js +0 -1
- package/dist/packem_shared/readJson5-S68aVros.js +0 -1
- package/dist/packem_shared/readJson5Sync-Bi9Rv46R.js +0 -1
- package/dist/packem_shared/readJsonSync-DweZd5ZA.js +0 -1
- package/dist/packem_shared/readJsonc-Dqh-elUt.js +0 -1
- package/dist/packem_shared/readJsoncSync-Dy2PZG5g.js +0 -1
- package/dist/packem_shared/readToml-CN_xnICv.js +0 -1
- package/dist/packem_shared/readTomlSync-B9TVGzen.js +0 -1
- package/dist/packem_shared/readYaml-DcpUq11D.js +0 -1
- package/dist/packem_shared/readYamlSync-D5RVZwco.js +0 -1
- package/dist/packem_shared/remove-D_CUIlBL.js +0 -1
- package/dist/packem_shared/removeSync-F4nKiwrU.js +0 -1
- package/dist/packem_shared/resolve-symlink-target-CWrn0v4P.js +0 -1
- package/dist/packem_shared/sanitize-aEqeyx4d.js +0 -1
- package/dist/packem_shared/stripJsonComments-Bfcn2PKv.js +0 -1
- package/dist/packem_shared/to-uint-8-array-7sXMoZwU.js +0 -1
- package/dist/packem_shared/types.d-C-RhhzcS.d.ts +0 -1753
- package/dist/packem_shared/walk-B211aFS7.js +0 -1
- package/dist/packem_shared/walk-include-2NQzWTCI.js +0 -1
- package/dist/packem_shared/walkSync-VeMvHYLk.js +0 -1
- package/dist/packem_shared/writeFile-Dnba9aVe.js +0 -1
- package/dist/packem_shared/writeFileSync-pW8o2DG1.js +0 -1
- package/dist/packem_shared/writeIni-DgZ-0EUD.js +0 -4
- package/dist/packem_shared/writeIniSync-Buz4Cove.js +0 -4
- package/dist/packem_shared/writeJson-vexC7dw2.js +0 -4
- package/dist/packem_shared/writeJson5-DeW_smOs.js +0 -4
- package/dist/packem_shared/writeJson5Sync-Cz5pwaPh.js +0 -4
- package/dist/packem_shared/writeJsonSync-DJLfN5iT.js +0 -4
- package/dist/packem_shared/writeJsonc-BqJQS0Mk.js +0 -4
- package/dist/packem_shared/writeJsoncSync-CchlR2KW.js +0 -4
- package/dist/packem_shared/writeToml-Bn-wQdaM.js +0 -1
- package/dist/packem_shared/writeTomlSync-CTv4RXkJ.js +0 -1
- package/dist/packem_shared/writeYaml-BbiKaW3J.js +0 -1
- package/dist/packem_shared/writeYamlSync-dI80QfIA.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as q}from"node:module";import{resolve as E,join as M,normalize as x,basename as I}from"@visulima/path";import{toPath as V}from"@visulima/path/utils";import D from"./WalkError-B8qTd-v-.js";import z from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{g as F,s as d,l as y}from"./walk-include-2NQzWTCI.js";let N;const P=e=>(N??=q(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,R=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[s,o]=c.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return c.getBuiltinModule(e)}return P(e)},{readdir:$,realpath:B,stat:T}=R("node:fs/promises"),L=async e=>{const s=x(e),o=I(s),r=await T(s);return y(r,o,s)};async function*O(e,s={}){const{extensions:o,followSymlinks:r=!1,includeDirs:_=!0,includeFiles:h=!0,includeSymlinks:w=!0,match:g,maxDepth:u=Number.POSITIVE_INFINITY,skip:v}=s;if(z(e),u<0)return;const f=s.visited??new Set,l=g?g.map(i=>typeof i=="string"?F(i):i):void 0,a=v?v.map(i=>typeof i=="string"?F(i):i):void 0;if(e=E(V(e)),_&&d(e,o,l,a)&&(yield await L(e)),!(u<1||!d(e,void 0,void 0,a)))try{const i=await $(e,{withFileTypes:!0});for(const n of i){let t=M(e,n.name),b=n,{name:k}=n,S=n.isDirectory(),j=n.isFile();if(n.isSymbolicLink())if(r){const m=x(await B(t));if(f.has(m))continue;t=m;const p=await T(m);S=p.isDirectory(),j=p.isFile(),b=p,k=I(m)}else if(w&&d(t,o,l,a)){yield y(n,n.name,t);continue}else continue;S?(r&&f.add(t),yield*O(t,{extensions:o,followSymlinks:r,includeDirs:_,includeFiles:h,includeSymlinks:w,match:l,maxDepth:u-1,skip:a,visited:f})):j&&h&&d(t,o,l,a)&&(yield y(b,k,t))}}catch(i){throw i instanceof D?i:new D(i,e)}}export{O as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const l=e=>{const r=[],t=new Set;let s=0;for(const a of e){if(a==="{")r.push(s);else if(a==="}"){const o=r.pop();o!==void 0&&(t.add(o),t.add(s))}s+=1}let c=0,n=0,i="";for(const a of e)a==="{"?t.has(n)?(i+="(",c+=1):i+=String.raw`\{`:a==="}"?t.has(n)?(i+=")",c-=1):i+=String.raw`\}`:a===","&&c>0?i+="|":i+=a,n+=1;return i},g=e=>{const r=e.replace(/[$()+\\^]/g,String.raw`\$&`).replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`),t=l(r).replace(/\[!(.*?)\]/g,"[^$1]");try{return new RegExp(`^${t}$`)}catch(s){throw new Error(`Invalid glob pattern: ${e}`,{cause:s})}};class p{name;path;#e;constructor(r,t,s){this.#e=r,this.name=t,this.path=s}isDirectory(){return this.#e.isDirectory()}isFile(){return this.#e.isFile()}isSymbolicLink(){return this.#e.isSymbolicLink()}}const h=(e,r,t)=>new p(e,r,t),u=(e,r,t,s)=>{if(Array.isArray(r)&&r.length>0&&!r.some(n=>e.endsWith(n)))return!1;const c=e.includes("\\")?e.replaceAll("\\","/"):e;return t&&!t.some(n=>n.test(c))?!1:!s?.some(n=>n.test(c))};export{g,h as l,u as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as q}from"node:module";import{resolve as E,join as M,normalize as u,basename as x}from"@visulima/path";import{toPath as O}from"@visulima/path/utils";import F from"./WalkError-B8qTd-v-.js";import V from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{g as I,s as m,l as _}from"./walk-include-2NQzWTCI.js";let N;const $=e=>(N??=q(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,P=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[o,s]=c.versions.node.split(".").map(Number);if(o>22||o===22&&s>=3||o===20&&s>=16)return c.getBuiltinModule(e)}return $(e)},{readdirSync:R,realpathSync:B,statSync:T}=P("node:fs"),z=e=>{const o=u(e),s=T(o);return _(s,x(o),o)};function*L(e,o={}){const{extensions:s,followSymlinks:d=!1,includeDirs:h=!0,includeFiles:S=!0,includeSymlinks:g=!0,match:v,maxDepth:f=Number.POSITIVE_INFINITY,skip:k}=o;if(V(e),f<0)return;const p=o.visited??new Set,l=v?v.map(i=>typeof i=="string"?I(i):i):void 0,r=k?k.map(i=>typeof i=="string"?I(i):i):void 0;if(e=E(O(e)),h&&m(e,s,l,r)&&(yield z(e)),!(f<1||!m(e,void 0,void 0,r)))try{const i=R(e,{withFileTypes:!0});for(const n of i){let t=M(e,n.name),b=n,{name:j}=n,w=n.isDirectory(),D=n.isFile();if(n.isSymbolicLink())if(d){const a=u(B(t));if(p.has(a))continue;t=a;const y=T(a);w=y.isDirectory(),D=y.isFile(),b=y,j=x(a)}else if(g&&m(t,s,l,r)){yield _(n,n.name,u(t));continue}else continue;w?(d&&p.add(t),yield*L(t,{extensions:s,followSymlinks:d,includeDirs:h,includeFiles:S,includeSymlinks:g,match:l,maxDepth:f-1,skip:r,visited:p})):D&&S&&m(t,s,l,r)&&(yield _(b,j,u(t)))}}catch(i){throw i instanceof F?i:new F(i,e)}}export{L as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as w}from"node:module";import{dirname as x}from"@visulima/path";import{toPath as B}from"@visulima/path/utils";import{F_OK as F}from"./FIND_UP_STOP-CAwY1qU7.js";import R from"./AlreadyExistsError-DEb3UWja.js";import d from"./isAccessible-B7guOm3k.js";import T from"./assertValidFileContents-CbIN7sy7.js";import M from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{o as P,i as E}from"./to-uint-8-array-7sXMoZwU.js";let p;const g=e=>(p??=w(import.meta.url))(e),a=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_=e=>{if(typeof a<"u"&&a.versions&&a.versions.node){const[o,i]=a.versions.node.split(".").map(Number);if(o>22||o===22&&i>=3||o===20&&i>=16)return a.getBuiltinModule(e)}return g(e)},{mkdir:h,readFile:v,writeFile:y,stat:b,rename:u,chown:j,chmod:k,unlink:q}=_("node:fs/promises"),I=async(e,o,i)=>{i={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...i},M(e),T(o),e=B(e);const n=await d(e,F),c=i.flag??"w",m=c.includes("a"),l=c.includes("x");if(n&&(!i.overwrite||l))throw new R(`file already exists, open '${e}'`);const r=P(e);try{!n&&i.recursive&&await h(x(e),{recursive:!0});let t,s=typeof o=="string"?Buffer.from(o,i.encoding??"utf8"):E(o);if(m&&n&&(s=Buffer.concat([await v(e),s])),await y(r,s,{flag:"wx"}),n&&i.backup&&(t=await b(e),i.chown??={gid:t.gid,uid:t.uid},await u(e,`${e}.bak`)),i.chown)try{await j(r,i.chown.uid,i.chown.gid)}catch{}const f=t&&i.mode===void 0?t.mode:i.mode;f!==void 0&&await k(r,f),await u(r,e)}catch(t){throw new Error(`Failed to write file at: ${e} - ${t.message}`,{cause:t})}finally{await d(r)&&await q(r)}};export{I as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as p}from"node:module";import{dirname as q}from"@visulima/path";import{toPath as x}from"@visulima/path/utils";import{F_OK as B}from"./FIND_UP_STOP-CAwY1qU7.js";import F from"./AlreadyExistsError-DEb3UWja.js";import f from"./isAccessibleSync-XH4YleJW.js";import R from"./assertValidFileContents-CbIN7sy7.js";import T from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{o as M,i as P}from"./to-uint-8-array-7sXMoZwU.js";let g;const w=e=>(g??=p(import.meta.url))(e),n=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,y=e=>{if(typeof n<"u"&&n.versions&&n.versions.node){const[i,o]=n.versions.node.split(".").map(Number);if(i>22||i===22&&o>=3||i===20&&o>=16)return n.getBuiltinModule(e)}return w(e)},{mkdirSync:_,readFileSync:h,writeFileSync:v,statSync:S,renameSync:d,chownSync:b,chmodSync:j,unlinkSync:k}=y("node:fs"),H=(e,i,o)=>{o={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...o},T(e),R(i),e=x(e);const c=f(e,B),a=o.flag??"w",m=a.includes("a"),l=a.includes("x");if(c&&(!o.overwrite||l))throw new F(`file already exists, open '${e}'`);const r=M(e);try{!c&&o.recursive&&_(q(e),{recursive:!0});let t,s=typeof i=="string"?Buffer.from(i,o.encoding??"utf8"):P(i);if(m&&c&&(s=Buffer.concat([h(e),s])),v(r,s,{flag:"wx"}),c&&o.backup&&(t=S(e),o.chown??={gid:t.gid,uid:t.uid},d(e,`${e}.bak`)),o.chown)try{b(r,o.chown.uid,o.chown.gid)}catch{}const u=t&&o.mode===void 0?t.mode:o.mode;u!==void 0&&j(r,u),d(r,e)}catch(t){throw new Error(`Failed to write file at: ${e} - ${t.message}`,{cause:t})}finally{f(r)&&k(r)}};export{H as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as q}from"node:module";import{parse as I,stringify as N}from"ini";import{R_OK as O}from"./FIND_UP_STOP-CAwY1qU7.js";import B from"./isAccessible-B7guOm3k.js";import{d as L,m as M}from"./ini-preserve-D1DopDLd.js";import P from"./writeFile-Dnba9aVe.js";let A;const R=e=>(A??=q(import.meta.url))(e),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=e=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[t,n]=i.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return i.getBuiltinModule(e)}return R(e)},{readFile:E}=T("node:fs/promises"),D=async(e,t,n={})=>{const{eol:_,preserveStyle:g=!0,whitespace:y,...h}=n,{align:w,bracketedArray:l,newline:b,platform:v,section:p,sort:j,...k}=h;let a=_,d=y,o,c;if(g&&await B(e,O))try{o=await E(e,"utf8"),c=I(o,{bracketedArray:l??!0});const r=L(o);a??=r.eol,d??=r.whitespace}catch(r){if(r.code!=="ENOENT")throw r}const f={align:w,bracketedArray:l,newline:b,platform:v,section:p,sort:j,whitespace:d},m=(r,u)=>N(r,u===void 0?f:{...f,section:u});let s;o!==void 0&&c?s=M(o,c,t,m,{eol:a??`
|
|
2
|
-
`}):(s=m(t,p),a===`\r
|
|
3
|
-
`&&(s=s.replaceAll(/\r?\n/g,`\r
|
|
4
|
-
`))),await P(e,s,k)};export{D as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as A}from"node:module";import{parse as E,stringify as I}from"ini";import{R_OK as N}from"./FIND_UP_STOP-CAwY1qU7.js";import O from"./isAccessibleSync-XH4YleJW.js";import{d as B,m as L}from"./ini-preserve-D1DopDLd.js";import M from"./writeFileSync-pW8o2DG1.js";let R;const S=e=>(R??=A(import.meta.url))(e),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=e=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[t,n]=i.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return i.getBuiltinModule(e)}return S(e)},{readFileSync:k}=T("node:fs"),D=(e,t,n={})=>{const{eol:_,preserveStyle:g=!0,whitespace:y,...h}=n,{align:b,bracketedArray:a,newline:v,platform:w,section:p,sort:j,...q}=h;let c=_,f=y,o,l;if(g&&O(e,N))try{o=k(e,"utf8"),l=E(o,{bracketedArray:a??!0});const r=B(o);c??=r.eol,f??=r.whitespace}catch(r){if(r.code!=="ENOENT")throw r}const d={align:b,bracketedArray:a,newline:v,platform:w,section:p,sort:j,whitespace:f},m=(r,u)=>I(r,u===void 0?d:{...d,section:u});let s;o!==void 0&&l?s=L(o,l,t,m,{eol:c??`
|
|
2
|
-
`}):(s=m(t,p),c===`\r
|
|
3
|
-
`&&(s=s.replaceAll(/\r?\n/g,`\r
|
|
4
|
-
`))),M(e,s,q)};export{D as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as l}from"node:module";import{k as j}from"./index-B2MhYg3r.js";import{R_OK as N}from"./FIND_UP_STOP-CAwY1qU7.js";import b from"./isAccessible-B7guOm3k.js";import q from"./writeFile-Dnba9aVe.js";let _;const g=e=>(_??=l(import.meta.url))(e),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[t,r]=o.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return o.getBuiltinModule(e)}return g(e)},{readFile:y}=h("node:fs/promises"),B=async(e,t,r={})=>{const{detectIndent:c,indent:a,replacer:f,stringify:d=JSON.stringify,...p}={indent:" ",...r};let s=a,n=`
|
|
2
|
-
`;if(await b(e,N))try{const i=await y(e,"utf8");if(c){const{indent:u}=j(i);s=u}n=i.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(i){if(i.code!=="ENOENT")throw i}const m=d(t,f,s);await q(e,`${m}${n}`,p)};export{B as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as l}from"node:module";import{k as q}from"./index-B2MhYg3r.js";import y from"json5";import{R_OK as b}from"./FIND_UP_STOP-CAwY1qU7.js";import w from"./isAccessible-B7guOm3k.js";import N from"./writeFile-Dnba9aVe.js";let _;const g=e=>(_??=l(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[t,i]=r.versions.node.split(".").map(Number);if(t>22||t===22&&i>=3||t===20&&i>=16)return r.getBuiltinModule(e)}return g(e)},{readFile:j}=h("node:fs/promises"),O=async(e,t,i={})=>{const{detectIndent:a,indent:f,quote:p,replacer:d,...u}={indent:" ",...i};let s=f,n=`
|
|
2
|
-
`;if(await w(e,b))try{const o=await j(e,"utf8");if(a){const{indent:c}=q(o);c&&(s=c)}n=o.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(o){if(o.code!=="ENOENT")throw o}const m=y.stringify(t,{quote:p,replacer:d,space:s});await N(e,`${m}${n}`,u)};export{O as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as a}from"node:module";import{k as q}from"./index-B2MhYg3r.js";import y from"json5";import{R_OK as b}from"./FIND_UP_STOP-CAwY1qU7.js";import R from"./isAccessibleSync-XH4YleJW.js";import T from"./writeFileSync-pW8o2DG1.js";let _;const g=e=>(_??=a(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[t,s]=r.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return r.getBuiltinModule(e)}return g(e)},{readFileSync:j}=h("node:fs"),O=(e,t,s={})=>{const{detectIndent:f,indent:d,quote:p,replacer:u,...l}={indent:" ",...s};let i=d,n=`
|
|
2
|
-
`;if(R(e,b))try{const o=j(e,"utf8");if(f){const{indent:c}=q(o);c&&(i=c)}n=o.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(o){if(o.code!=="ENOENT")throw o}const m=y.stringify(t,{quote:p,replacer:u,space:i});T(e,`${m}${n}`,l)};export{O as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as _}from"node:module";import{k as j}from"./index-B2MhYg3r.js";import{R_OK as N}from"./FIND_UP_STOP-CAwY1qU7.js";import b from"./isAccessibleSync-XH4YleJW.js";import q from"./writeFileSync-pW8o2DG1.js";let a;const g=e=>(a??=_(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[t,n]=r.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return r.getBuiltinModule(e)}return g(e)},{readFileSync:y}=h("node:fs"),B=(e,t,n={})=>{const{detectIndent:c,indent:f,replacer:d,stringify:p=JSON.stringify,...l}={indent:" ",...n};let i=f,s=`
|
|
2
|
-
`;if(b(e,N))try{const o=y(e,"utf8");if(c){const{indent:m}=j(o);i=m}s=o.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(o){if(o.code!=="ENOENT")throw o}const u=p(t,d,i);q(e,`${u}${s}`,l)};export{B as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as f}from"node:module";import{k as h}from"./index-B2MhYg3r.js";import{R_OK as N}from"./FIND_UP_STOP-CAwY1qU7.js";import j from"./isAccessible-B7guOm3k.js";import{b as y}from"./jsonc-merge-Bkw73TLW.js";import T from"./writeFile-Dnba9aVe.js";let _;const g=e=>(_??=f(import.meta.url))(e),a=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,w=e=>{if(typeof a<"u"&&a.versions&&a.versions.node){const[t,n]=a.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return a.getBuiltinModule(e)}return g(e)},{readFile:b}=w("node:fs/promises"),x=async(e,t,n)=>{let r,o=n,s=`
|
|
2
|
-
`;if(!await j(e,N))return{indent:o,trailingNewline:s};try{if(r=await b(e,"utf8"),t){const{indent:i}=h(r);i&&(o=i)}s=r.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(i){if(i.code!=="ENOENT")throw i}return{existingText:r,indent:o,trailingNewline:s}},M=async(e,t,n={})=>{const{detectIndent:r,formattingOptions:o,indent:s,preserveComments:i=!0,replacer:c,...d}={indent:" ",...n},{existingText:l,indent:p,trailingNewline:u}=await x(e,r,s),m=y(l,t,i,p,u,o,c);await T(e,m,d)};export{M as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as a}from"node:module";import{k as b}from"./index-B2MhYg3r.js";import{R_OK as j}from"./FIND_UP_STOP-CAwY1qU7.js";import T from"./isAccessibleSync-XH4YleJW.js";import{b as x}from"./jsonc-merge-Bkw73TLW.js";import y from"./writeFileSync-pW8o2DG1.js";let _;const g=e=>(_??=a(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[t,i]=c.versions.node.split(".").map(Number);if(t>22||t===22&&i>=3||t===20&&i>=16)return c.getBuiltinModule(e)}return g(e)},{readFileSync:N}=h("node:fs"),O=(e,t,i)=>{let r,o=i,s=`
|
|
2
|
-
`;if(!T(e,j))return{indent:o,trailingNewline:s};try{if(r=N(e,"utf8"),t){const{indent:n}=b(r);n&&(o=n)}s=r.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(n){if(n.code!=="ENOENT")throw n}return{existingText:r,indent:o,trailingNewline:s}},M=(e,t,i={})=>{const{detectIndent:r,formattingOptions:o,indent:s,preserveComments:n=!0,replacer:d,...l}={indent:" ",...i},{existingText:u,indent:f,trailingNewline:p}=O(e,r,s),m=x(u,t,n,f,p,o,d);y(e,m,l)};export{M as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{stringify as a}from"smol-toml";import i from"./writeFile-Dnba9aVe.js";const p=async(t,o,r)=>{await i(t,a(o),r)};export{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{stringify as f}from"smol-toml";import i from"./writeFileSync-pW8o2DG1.js";const e=(o,r,t)=>{i(o,f(r),t)};export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{stringify as n}from"yaml";import t from"./writeFile-Dnba9aVe.js";async function l(p,c,e,f){let r,a,o;typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e!="function"?(r=e,a=r.replacer,o=r.space):typeof f=="object"?(r=f,a=e,o=r.space):(a=e,o=f);const i=n(c,a,o??r);await t(p,i,r)}export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{stringify as n}from"yaml";import t from"./writeFileSync-pW8o2DG1.js";function y(a,c,e,f){let r,o,p;typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e!="function"?(r=e,o=r.replacer,p=r.space):typeof f=="object"?(r=f,o=e,p=r.space):(o=e,p=f);const i=n(c,o,p??r);t(a,i,r)}export{y as default};
|