@visulima/fs 5.0.10 → 5.0.11
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 +2 -0
- package/dist/eol.d.ts +25 -25
- package/dist/eol.js +2 -2
- package/dist/error.d.ts +218 -218
- package/dist/glob-parent.d.ts +27 -27
- package/dist/glob-parent.js +1 -1
- package/dist/glob.d.ts +2 -2
- package/dist/glob.js +1 -1
- package/dist/index.d.ts +765 -765
- package/dist/index.js +1 -1
- package/dist/ini.d.ts +59 -59
- package/dist/ini.js +1 -1
- package/dist/is-glob.d.ts +26 -26
- package/dist/json5.d.ts +25 -25
- package/dist/json5.js +1 -1
- package/dist/jsonc.d.ts +54 -54
- package/dist/jsonc.js +1 -1
- package/dist/match.d.ts +40 -40
- package/dist/packem_shared/{collect-CIKDOMiD.js → collect-B0S0bJoE.js} +1 -1
- package/dist/packem_shared/{collectSync-D0FRLLqg.js → collectSync-0M1eoilI.js} +1 -1
- package/dist/packem_shared/copy-DiR5_5iA.js +1 -0
- package/dist/packem_shared/copySync-DffsYlhb.js +1 -0
- package/dist/packem_shared/emptyDir-BlBeczk0.js +1 -0
- package/dist/packem_shared/emptyDirSync-DfUZ9Ejz.js +1 -0
- package/dist/packem_shared/ensureDir-BEiomfxz.js +1 -0
- package/dist/packem_shared/ensureDirSync-B0w9WMwE.js +1 -0
- package/dist/packem_shared/ensureFile-waD4hDO8.js +1 -0
- package/dist/packem_shared/ensureFileSync-CG07zjV7.js +1 -0
- package/dist/packem_shared/ensureLink-Dz-PDWa5.js +1 -0
- package/dist/packem_shared/ensureLinkSync-BZH7TaSQ.js +1 -0
- package/dist/packem_shared/ensureSymlink-Byi6ajoE.js +1 -0
- package/dist/packem_shared/ensureSymlinkSync-D7OCsAd8.js +1 -0
- package/dist/packem_shared/findUp-Ylerv_a2.js +1 -0
- package/dist/packem_shared/findUpSync-BWBPRzEq.js +1 -0
- package/dist/packem_shared/glob-BUjyjdE8.js +1 -0
- package/dist/packem_shared/glob-sync.d-DaAZHTsv.d.ts +54 -0
- package/dist/packem_shared/globSync-Bk9TUV7x.js +1 -0
- package/dist/packem_shared/index-CPZbuHkp.js +1 -0
- package/dist/packem_shared/isAccessible-B7guOm3k.js +1 -0
- package/dist/packem_shared/isAccessibleSync-XH4YleJW.js +1 -0
- package/dist/packem_shared/json-error.d-COL8oxF_.d.ts +52 -0
- package/dist/packem_shared/move-KhPRvsRd.js +1 -0
- package/dist/packem_shared/{parseJson-EASgP4J9.js → parseJson-_OfIPruP.js} +1 -1
- package/dist/packem_shared/readFile-VgxUDrNH.js +1 -0
- package/dist/packem_shared/readFileSync-CloFeQw8.js +1 -0
- package/dist/packem_shared/{readIni-BsXudu2r.js → readIni-CEXHWn92.js} +1 -1
- package/dist/packem_shared/readIniSync-DsxVHypc.js +1 -0
- package/dist/packem_shared/{readJson-CcAsHxE5.js → readJson-Q3T3RlSy.js} +1 -1
- package/dist/packem_shared/{readJson5-CM1TIiHd.js → readJson5-S68aVros.js} +1 -1
- package/dist/packem_shared/{readJson5Sync-Bc26c3Fy.js → readJson5Sync-Bi9Rv46R.js} +1 -1
- package/dist/packem_shared/{readJsonSync-DuMMeB3s.js → readJsonSync-BnWiH5-R.js} +1 -1
- package/dist/packem_shared/{readJsonc-BZjMw_0f.js → readJsonc-DSoFyuDk.js} +1 -1
- package/dist/packem_shared/{readJsoncSync-C-xzeZz4.js → readJsoncSync-CLtlvFKV.js} +1 -1
- package/dist/packem_shared/readToml-CN_xnICv.js +1 -0
- package/dist/packem_shared/readTomlSync-B9TVGzen.js +1 -0
- package/dist/packem_shared/{readYaml-DvPxndW_.js → readYaml-DcpUq11D.js} +1 -1
- package/dist/packem_shared/{readYamlSync-DZ-0hSbZ.js → readYamlSync-D5RVZwco.js} +1 -1
- package/dist/packem_shared/remove-D_CUIlBL.js +1 -0
- package/dist/packem_shared/removeSync-F4nKiwrU.js +1 -0
- package/dist/packem_shared/renderError-DjesnVYT-pWsLqw-_.js +6 -0
- package/dist/packem_shared/sanitize-aEqeyx4d.js +1 -0
- package/dist/packem_shared/to-uint-8-array-7sXMoZwU.js +1 -0
- package/dist/packem_shared/{types.d-BMdL_ygj.d.ts → types.d-D3Jo_iA-.d.ts} +361 -383
- package/dist/packem_shared/walk-BReeHTKb.js +1 -0
- package/dist/packem_shared/walkSync-yHJUIJb9.js +1 -0
- package/dist/packem_shared/writeFile-srDcYaRC.js +1 -0
- package/dist/packem_shared/writeFileSync-Ddl_u4my.js +1 -0
- package/dist/packem_shared/writeIni-CKinbquM.js +4 -0
- package/dist/packem_shared/writeIniSync-BISRFyg0.js +4 -0
- package/dist/packem_shared/writeJson-DlCrFMXb.js +4 -0
- package/dist/packem_shared/writeJson5-rSp3QAKP.js +4 -0
- package/dist/packem_shared/writeJson5Sync-tSBBKnaP.js +4 -0
- package/dist/packem_shared/writeJsonSync-CKqVRz_9.js +4 -0
- package/dist/packem_shared/writeJsonc-bxz1jdeU.js +4 -0
- package/dist/packem_shared/writeJsoncSync-C-W0H9qP.js +4 -0
- package/dist/packem_shared/{writeToml-IuMO-yDu.js → writeToml-CrpfWNyK.js} +1 -1
- package/dist/packem_shared/{writeTomlSync-DhL7hHzB.js → writeTomlSync-DveRchLG.js} +1 -1
- package/dist/packem_shared/{writeYaml-ClQgvQID.js → writeYaml-DvSQ_Jbn.js} +1 -1
- package/dist/packem_shared/{writeYamlSync-DrXtHQQq.js → writeYamlSync-CEf0PUGQ.js} +1 -1
- package/dist/size.d.ts +236 -236
- package/dist/size.js +1 -1
- package/dist/toml.d.ts +52 -52
- package/dist/toml.js +1 -1
- package/dist/utils.d.ts +88 -88
- package/dist/utils.js +1 -1
- package/dist/yaml.d.ts +2 -2
- package/dist/yaml.js +1 -1
- package/package.json +1 -1
- package/dist/packem_shared/copy-Beb64BYG.js +0 -1
- package/dist/packem_shared/copySync-CagcIEBi.js +0 -1
- package/dist/packem_shared/emptyDir-C7lyd1lW.js +0 -1
- package/dist/packem_shared/emptyDirSync-B8EYpmO9.js +0 -1
- package/dist/packem_shared/ensureDir-DGarVZw8.js +0 -1
- package/dist/packem_shared/ensureDirSync-CsgPrsDH.js +0 -1
- package/dist/packem_shared/ensureFile-CMugWljp.js +0 -1
- package/dist/packem_shared/ensureFileSync-CJYTEx2r.js +0 -1
- package/dist/packem_shared/ensureLink-ChShf3lf.js +0 -1
- package/dist/packem_shared/ensureLinkSync-DPpq0I2Z.js +0 -1
- package/dist/packem_shared/ensureSymlink-y4FZjfxA.js +0 -1
- package/dist/packem_shared/ensureSymlinkSync-TcHssCH7.js +0 -1
- package/dist/packem_shared/findUp-Cii5ATt5.js +0 -1
- package/dist/packem_shared/findUpSync-C9Lkh7-v.js +0 -1
- package/dist/packem_shared/glob-DMbPwGSj.js +0 -1
- package/dist/packem_shared/glob-sync.d-hXe38TnZ.d.ts +0 -54
- package/dist/packem_shared/globSync-DiP2rtGn.js +0 -1
- package/dist/packem_shared/index-Ct4GqZSP.js +0 -1
- package/dist/packem_shared/isAccessible-PmWJhV6I.js +0 -1
- package/dist/packem_shared/isAccessibleSync-BrbOtwdr.js +0 -1
- package/dist/packem_shared/json-error.d-DVILOyHc.d.ts +0 -52
- package/dist/packem_shared/move-DopmzT-2.js +0 -1
- package/dist/packem_shared/readFile-BswaBgM0.js +0 -1
- package/dist/packem_shared/readFileSync-_fDF6Oj1.js +0 -1
- package/dist/packem_shared/readIniSync-DKwRbbs9.js +0 -1
- package/dist/packem_shared/readToml-D4jpe9q_.js +0 -1
- package/dist/packem_shared/readTomlSync-B5PIYT9z.js +0 -1
- package/dist/packem_shared/remove-CSbrd0dl.js +0 -1
- package/dist/packem_shared/removeSync-BoLAzRQE.js +0 -1
- package/dist/packem_shared/renderError-B3ePOoBG-Bi9WKMjv.js +0 -6
- package/dist/packem_shared/sanitize-DGZ3w-_w.js +0 -1
- package/dist/packem_shared/to-uint-8-array-BImOQNXm.js +0 -1
- package/dist/packem_shared/walk-OX4-6oCP.js +0 -1
- package/dist/packem_shared/walkSync-BPs6czIM.js +0 -1
- package/dist/packem_shared/writeFile-BrMtsJY7.js +0 -1
- package/dist/packem_shared/writeFileSync-W7Mf4BNy.js +0 -1
- package/dist/packem_shared/writeIni-BWX3cP1K.js +0 -4
- package/dist/packem_shared/writeIniSync-fOdgPFfL.js +0 -4
- package/dist/packem_shared/writeJson-bEVi25gX.js +0 -4
- package/dist/packem_shared/writeJson5-Ch8TpNPI.js +0 -4
- package/dist/packem_shared/writeJson5Sync-BrctV_Mk.js +0 -4
- package/dist/packem_shared/writeJsonSync-DkGnd416.js +0 -4
- package/dist/packem_shared/writeJsonc-CefrwsOc.js +0 -4
- package/dist/packem_shared/writeJsoncSync-BskDjn8o.js +0 -4
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as t}from"node:module";import a from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{t as m}from"./build-rm-options-avnusYx-.js";const i=t(import.meta.url),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,n=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[o,r]=s.versions.node.split(".").map(Number);if(o>22||o===22&&r>=3||o===20&&r>=16)return s.getBuiltinModule(e)}return i(e)},{rm:c}=n("node:fs/promises"),l=async(e,o={})=>{a(e),await c(e,m(o))};export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as t}from"node:module";import u from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{t as f}from"./build-rm-options-avnusYx-.js";const n=t(import.meta.url),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,i=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[o,r]=s.versions.node.split(".").map(Number);if(o>22||o===22&&r>=3||o===20&&r>=16)return s.getBuiltinModule(e)}return n(e)},{rmSync:c}=i("node:fs"),_=(e,o={})=>{u(e),c(e,f(o))};export{_ as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{createRequire as B}from"node:module";const W=B(import.meta.url),y=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,q=e=>{if(typeof y<"u"&&y.versions&&y.versions.node){const[r,t]=y.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return y.getBuiltinModule(e)}return W(e)},{createRequire:w}=q("node:module"),N=globalThis.process??Object.create(null),_={versions:{}},x=new Proxy(N,{get(e,r){if(r in e)return e[r];if(r in _)return _[r]}}),I=e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
2
|
-
`),G=(e,r,t,n)=>{const s={column:0,line:-1,...e.start},a={...s,...e.end},u=s.line,i=s.column,g=a.line,f=a.column;let m=Math.max(u-(t+1),0),h=Math.min(r.length,g+n);u===-1&&(m=0),g===-1&&(h=r.length);const d=g-u,l={};if(d)for(let o=0;o<=d;o++){const c=o+u;if(!i)l[c]=!0;else if(o===0){const p=r[c-1]?.length;l[c]=[i,(p??0)-i+1]}else if(o===d)l[c]=[0,f];else{const p=r[c-o]?.length;l[c]=[0,p]}}else i===f?l[u]=i?[i,0]:!0:l[u]=[i,(f??0)-(i??0)];return{end:h,markerLines:l,start:m}},L=x.platform==="win32"&&!x.env?.WT_SESSION?">":"❯",F=(e,r,t)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...t,color:{gutter:o=>o,marker:o=>o,message:o=>o,...t?.color}},s=typeof r.start.column=="number";let a=(e.includes("\r")?I(e):e).split(`
|
|
3
|
-
`);typeof n.tabWidth=="number"&&e.includes(" ")&&(a=a.map(o=>o.replaceAll(" "," ".repeat(n.tabWidth))));const{end:u,markerLines:i,start:g}=G(r,a,n.linesAbove,n.linesBelow),f=String(u).length,{gutter:m,marker:h,message:d}=n.color;let l=a.slice(g,u).map((o,c)=>{const p=g+1+c,A=i[p],M=String(p).padStart(f),R=!i[p+1],v=` ${M}${n.showGutter?" |":""}`;if(A){let $="";if(Array.isArray(A)){const S=o.replaceAll(/[^\t]/g," ").slice(0,Math.max(A[0]-1,0)),k=A[1]||1;$=[`
|
|
4
|
-
`,n.prefix+m(v.replaceAll(/\d/g," "))," ",S,h("^").repeat(k)].join(""),R&&n.message&&($+=` ${d(n.message)}`)}return[n.prefix+h(L),m(v),o.length>0?` ${o}`:"",$].join("")}return`${n.prefix} ${m(v)}${o.length>0?` ${o}`:""}`}).join(`
|
|
5
|
-
`);return n.message&&!s&&(l=`${n.prefix+" ".repeat(f+1)+n.message}
|
|
6
|
-
${l}`),l},j=(e,r)=>{let t=0,n=r.length-2;for(;t<n;){const s=t+(n-t>>1);if(e<r[s])n=s-1;else if(e>=r[s+1])t=s+1;else{t=s;break}}return t},O=/\n|\r(?!\n)/,P=e=>e.split(O).reduce((r,t)=>(r.push(r.at(-1)+t.length+1),r),[0]),H=(e,r,t)=>{if(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0)return{column:0,line:0};if(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 s=P(e),a=j(r,s);return{column:r-s[a]+1,line:a+1}}const n=j(r,e);return{column:r-e[n]+1,line:n+1}},U=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&U.set("AggregateError",AggregateError);const V=w(import.meta.url),b=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,z=e=>{if(typeof b<"u"&&b.versions&&b.versions.node){const[r,t]=b.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return b.getBuiltinModule(e)}return V(e)};z("node:util");const C=w(import.meta.url),E=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=e=>{if(typeof E<"u"&&E.versions&&E.versions.node){const[r,t]=E.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return E.getBuiltinModule(e)}return C(e)};T("node:fs");T("node:path");T("node:url");export{F as W,H as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as h}from"node:module";const j=h(import.meta.url),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,{platform:p}=d,l="unnamed",x=128,u={'"':"ˮ","*":"⁎","/":"⁄",":":"꞉","<":"‹",">":"›","?":"ʔ","\\":"∖","|":"ǀ"},m=/[\u0000-\u001F\u0080-\u009F]/g,w=/^(?:\.+[/\\]+)+|^\.+$/g,a=/^(?:con|prn|aux|nul|com\d|lpt\d)$/i,_=/[<>:"/\\|?*]/g,b=/\//g,c=new Set([" "," ","."]),f=(n,r)=>r>0&&r<n.length-1,$=(n,r)=>{const t=n.lastIndexOf(".");if(!f(n,t))return n.slice(0,r);const e=n.slice(0,t),i=n.slice(t),s=r-i.length;return s>0?`${e.slice(0,s)}${i}`:n.slice(0,r)},g=n=>{let r=0,t=n.length;for(;r<t;){const e=n[r];if(e===void 0||!c.has(e))break;r+=1}for(;t>r;){const e=n[t-1];if(e===void 0||!c.has(e))break;t-=1}return n.slice(r,t)},v=n=>{const r=n.lastIndexOf(".");if(f(n,r)){const e=n.slice(0,r),i=n.slice(r);let s=e;for(;s.length>0;){const o=s.at(-1);if(o===void 0||!c.has(o))break;s=s.slice(0,-1)}return s.length===0?i.slice(1):`${s}${i}`}let t=n;for(;t.length>0;){const e=t.at(-1);if(e===void 0||!c.has(e))break;t=t.slice(0,-1)}return t},I=n=>{const r=n.lastIndexOf(".");if(f(n,r))return!1;if(a.test(n))return!0;let t=n;for(;t.length>0;){const e=t.at(-1);if(e===void 0||!c.has(e))break;t=t.slice(0,-1)}return!!(t.length>0&&a.test(t))},O=n=>{const r=n.lastIndexOf(".");if(f(n,r)){const i=n.slice(0,r),s=n.slice(r),o=g(i);return o.length===0?void 0:`${o}${s}`}const t=n.trim();if(t.length>0&&t[0]==="."&&t.length<=5&&t.indexOf(".",1)===-1)return;const e=g(n);if(e.length!==0)return e},k=n=>{const r=n?.filesystem??"auto";return r==="auto"?p==="win32"?"win32":"unix":r==="darwin"?"unix":r},q=(n,r)=>{if(typeof n!="string"||n.length===0)return l;const t=k(r);let e=n;if(e=e.replace(m,""),e.length===0||(e=e.replace(w,""),e.length===0))return l;if(t==="win32"||t==="fat32"){const s=e.lastIndexOf(".");if(!f(e,s)&&a.test(e))return l}if(e=t==="win32"||t==="fat32"?e.replaceAll(_,s=>u[s]??""):e.replaceAll(b,u["/"]),e=e.trim(),(t==="win32"||t==="fat32")&&(I(e)||t==="win32"&&(e=v(e),e.length===0)))return l;if(t==="fat32"){const s=O(e);if(s===void 0)return l;e=s}if(e.length===0)return l;const i=r?.maxLength??x;return e.length>i&&(e=$(e,i),e.length===0)?l:e};export{q as sanitize};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as o}from"node:module";const s=o(import.meta.url),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,i=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 s(e)},{randomBytes:f}=i("node:crypto"),a=e=>`${e}.${process.pid.toString(36)}.${f(6).toString("hex")}.tmp`,c=new TextEncoder,p=e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return c.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.")};export{p as i,a as o};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as x}from"node:module";import{resolve as $,join as q,normalize as P,basename as z}from"@visulima/path";import{toPath as B}from"@visulima/path/utils";import D from"./WalkError-B8qTd-v-.js";import E from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{a as S,s as m,l as p}from"./walk-include-BXhGSn6t.js";const F=x(import.meta.url),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=e=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[t,o]=l.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return l.getBuiltinModule(e)}return F(e)},{readdir:I,realpath:N,stat:j}=T("node:fs/promises"),M=async e=>{const t=P(e),o=z(t),r=await j(t);return p(r,o,t)};async function*R(e,t={}){const{extensions:o,followSymlinks:r=!1,includeDirs:y=!0,includeFiles:h=!0,includeSymlinks:_=!0,match:w,maxDepth:f=Number.POSITIVE_INFINITY,skip:v}=t;if(E(e),f<0)return;const u=t.visited??new Set,c=w?w.map(i=>typeof i=="string"?S(i):i):void 0,a=v?v.map(i=>typeof i=="string"?S(i):i):void 0;if(e=$(B(e)),y&&m(e,o,c,a)&&(yield await M(e)),!(f<1||!m(e,void 0,void 0,a)))try{const i=await I(e,{withFileTypes:!0});for(const s of i){let n=q(e,s.name),g=s.isDirectory(),k=s.isFile();if(s.isSymbolicLink())if(r){const d=await N(n);if(u.has(d))continue;n=d;const b=await j(d);g=b.isDirectory(),k=b.isFile()}else if(_&&m(n,o,c,a)){yield p(s,s.name,n);continue}else continue;g?(r&&u.add(n),yield*R(n,{extensions:o,followSymlinks:r,includeDirs:y,includeFiles:h,includeSymlinks:_,match:c,maxDepth:f-1,skip:a,visited:u})):k&&h&&m(n,o,c,a)&&(yield p(s,s.name,n))}}catch(i){throw i instanceof D?i:new D(i,e)}}export{R as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as T}from"node:module";import{resolve as P,join as $,normalize as p,basename as z}from"@visulima/path";import{toPath as B}from"@visulima/path/utils";import F from"./WalkError-B8qTd-v-.js";import E from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{a as j,s as m,l as y}from"./walk-include-BXhGSn6t.js";const x=T(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,I=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[o,t]=c.versions.node.split(".").map(Number);if(o>22||o===22&&t>=3||o===20&&t>=16)return c.getBuiltinModule(e)}return x(e)},{readdirSync:N,realpathSync:q,statSync:w}=I("node:fs"),M=e=>{const o=p(e),t=w(o);return y(t,z(o),o)};function*R(e,o={}){const{extensions:t,followSymlinks:a=!1,includeDirs:h=!0,includeFiles:_=!0,includeSymlinks:S=!0,match:v,maxDepth:f=Number.POSITIVE_INFINITY,skip:g}=o;if(E(e),f<0)return;const d=o.visited??new Set,l=v?v.map(i=>typeof i=="string"?j(i):i):void 0,r=g?g.map(i=>typeof i=="string"?j(i):i):void 0;if(e=P(B(e)),h&&m(e,t,l,r)&&(yield M(e)),!(f<1||!m(e,void 0,void 0,r)))try{const i=N(e,{withFileTypes:!0});for(const n of i){let s=$(e,n.name),k=n.isDirectory(),b=n.isFile();if(n.isSymbolicLink())if(a){const u=q(s);if(d.has(u))continue;s=u;const D=w(u);k=D.isDirectory(),b=D.isFile()}else if(S&&m(s,t,l,r)){yield y(n,n.name,p(s));continue}else continue;k?(a&&d.add(s),yield*R(s,{extensions:t,followSymlinks:a,includeDirs:h,includeFiles:_,includeSymlinks:S,match:l,maxDepth:f-1,skip:r,visited:d})):b&&_&&m(s,t,l,r)&&(yield y(n,n.name,p(s)))}}catch(i){throw i instanceof F?i:new F(i,e)}}export{R as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as f}from"node:module";import{dirname as _}from"@visulima/path";import{toPath as y}from"@visulima/path/utils";import{F_OK as v}from"./FIND_UP_STOP-CAwY1qU7.js";import b from"./AlreadyExistsError-DEb3UWja.js";import c from"./isAccessible-PmWJhV6I.js";import j from"./assertValidFileContents-CbIN7sy7.js";import k from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{o as q,i as x}from"./to-uint-8-array-BImOQNXm.js";const m=f(import.meta.url),a=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=i=>{if(typeof a<"u"&&a.versions&&a.versions.node){const[e,o]=a.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return a.getBuiltinModule(i)}return m(i)},{mkdir:d,writeFile:w,stat:l,rename:n,chown:p,chmod:g,unlink:h}=u("node:fs/promises"),O=async(i,e,o)=>{o={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...o},k(i),j(e),i=y(i);const s=await c(i,v);if(s&&!o.overwrite)throw new b(`file already exists, open '${i}'`);const r=q(i);try{!s&&o.recursive&&await d(_(i),{recursive:!0});let t;if(await w(r,typeof e=="string"?Buffer.from(e,o.encoding??"utf8"):x(e),{flag:"wx"}),s&&o.backup&&(t=await l(i),o.chown??={gid:t.gid,uid:t.uid},await n(i,`${i}.bak`)),o.chown)try{await p(r,o.chown.uid,o.chown.gid)}catch{}await g(r,t&&!o.mode?t.mode:o.mode??438),await n(r,i)}catch(t){throw new Error(`Failed to write file at: ${i} - ${t.message}`,{cause:t})}finally{await c(r)&&await h(r)}};export{O as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as m}from"node:module";import{dirname as h}from"@visulima/path";import{toPath as _}from"@visulima/path/utils";import{F_OK as v}from"./FIND_UP_STOP-CAwY1qU7.js";import b from"./AlreadyExistsError-DEb3UWja.js";import f from"./isAccessibleSync-BrbOtwdr.js";import S from"./assertValidFileContents-CbIN7sy7.js";import j from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{o as k,i as q}from"./to-uint-8-array-BImOQNXm.js";const a=m(import.meta.url),n=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=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 a(e)},{mkdirSync:d,writeFileSync:l,statSync:p,renameSync:s,chownSync:g,chmodSync:w,unlinkSync:y}=u("node:fs"),K=(e,i,o)=>{o={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...o},j(e),S(i),e=_(e);const c=f(e,v);if(c&&!o.overwrite)throw new b(`file already exists, open '${e}'`);const r=k(e);try{!c&&o.recursive&&d(h(e),{recursive:!0});let t;if(l(r,typeof i=="string"?Buffer.from(i,o.encoding??"utf8"):q(i),{flag:"wx"}),c&&o.backup&&(t=p(e),o.chown??={gid:t.gid,uid:t.uid},s(e,`${e}.bak`)),o.chown)try{g(r,o.chown.uid,o.chown.gid)}catch{}w(r,t&&!o.mode?t.mode:o.mode??438),s(r,e)}catch(t){throw new Error(`Failed to write file at: ${e} - ${t.message}`,{cause:t})}finally{f(r)&&y(r)}};export{K as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as A}from"node:module";import{parse as I,stringify as N}from"ini";import{R_OK as O}from"./FIND_UP_STOP-CAwY1qU7.js";import R from"./isAccessible-PmWJhV6I.js";import{d as B,m as L}from"./ini-preserve-D1DopDLd.js";import M from"./writeFile-BrMtsJY7.js";const E=A(import.meta.url),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=r=>{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(r)}return E(r)},{readFile:q}=T("node:fs/promises"),C=async(r,t,n={})=>{const{eol:g,preserveStyle:_=!0,whitespace:y,...w}=n,{align:h,bracketedArray:l,newline:b,platform:v,section:p,sort:j,...k}=w;let a=g,f=y,o,c;if(_&&await R(r,O))try{o=await q(r,"utf8"),c=I(o,{bracketedArray:l??!0});const e=B(o);a??=e.eol,f??=e.whitespace}catch(e){if(e.code!=="ENOENT")throw e}const m={align:h,bracketedArray:l,newline:b,platform:v,section:p,sort:j,whitespace:f},d=(e,u)=>N(e,u===void 0?m:{...m,section:u});let s;o!==void 0&&c?s=L(o,c,t,d,{eol:a??`
|
|
2
|
-
`}):(s=d(t,p),a===`\r
|
|
3
|
-
`&&(s=s.replaceAll(/\r?\n/g,`\r
|
|
4
|
-
`))),await M(r,s,k)};export{C as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as S}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-BrbOtwdr.js";import{d as R,m as B}from"./ini-preserve-D1DopDLd.js";import L from"./writeFileSync-W7Mf4BNy.js";const T=S(import.meta.url),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=r=>{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(r)}return T(r)},{readFileSync:q}=k("node:fs"),C=(r,t,n={})=>{const{eol:_,preserveStyle:g=!0,whitespace:y,...h}=n,{align:b,bracketedArray:a,newline:v,platform:w,section:p,sort:j,...A}=h;let c=_,f=y,o,l;if(g&&O(r,N))try{o=q(r,"utf8"),l=E(o,{bracketedArray:a??!0});const e=R(o);c??=e.eol,f??=e.whitespace}catch(e){if(e.code!=="ENOENT")throw e}const m={align:b,bracketedArray:a,newline:v,platform:w,section:p,sort:j,whitespace:f},d=(e,u)=>I(e,u===void 0?m:{...m,section:u});let s;o!==void 0&&l?s=B(o,l,t,d,{eol:c??`
|
|
2
|
-
`}):(s=d(t,p),c===`\r
|
|
3
|
-
`&&(s=s.replaceAll(/\r?\n/g,`\r
|
|
4
|
-
`))),L(r,s,A)};export{C as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as u}from"node:module";import{k as h}from"./index-B2MhYg3r.js";import{R_OK as j}from"./FIND_UP_STOP-CAwY1qU7.js";import N from"./isAccessible-PmWJhV6I.js";import b from"./writeFile-BrMtsJY7.js";const _=u(import.meta.url),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=e=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[t,s]=i.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return i.getBuiltinModule(e)}return _(e)},{readFile:y}=g("node:fs/promises"),O=async(e,t,s={})=>{const{detectIndent:c,indent:a,replacer:f,stringify:d=JSON.stringify,...p}={indent:" ",...s};let r=a,n=`
|
|
2
|
-
`;if(await N(e,j))try{const o=await y(e,"utf8");if(c){const{indent:l}=h(o);r=l}n=o.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(o){if(o.code!=="ENOENT")throw o}const m=d(t,f,r);await b(e,`${m}${n}`,p)};export{O as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as l}from"node:module";import{k as y}from"./index-B2MhYg3r.js";import j from"json5";import{R_OK as q}from"./FIND_UP_STOP-CAwY1qU7.js";import b from"./isAccessible-PmWJhV6I.js";import w from"./writeFile-BrMtsJY7.js";const _=l(import.meta.url),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=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 _(e)},{readFile:h}=g("node:fs/promises"),M=async(e,t,i={})=>{const{detectIndent:a,indent:f,quote:p,replacer:d,...m}={indent:" ",...i};let s=f,n=`
|
|
2
|
-
`;if(await b(e,q))try{const o=await h(e,"utf8");if(a){const{indent:c}=y(o);c&&(s=c)}n=o.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(o){if(o.code!=="ENOENT")throw o}const u=j.stringify(t,{quote:p,replacer:d,space:s});await w(e,`${u}${n}`,m)};export{M as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as a}from"node:module";import{k as y}from"./index-B2MhYg3r.js";import j from"json5";import{R_OK as q}from"./FIND_UP_STOP-CAwY1qU7.js";import b from"./isAccessibleSync-BrbOtwdr.js";import T from"./writeFileSync-W7Mf4BNy.js";const _=a(import.meta.url),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=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 _(e)},{readFileSync:h}=g("node:fs"),O=(e,t,s={})=>{const{detectIndent:f,indent:d,quote:p,replacer:m,...u}={indent:" ",...s};let i=d,n=`
|
|
2
|
-
`;if(b(e,q))try{const o=h(e,"utf8");if(f){const{indent:c}=y(o);c&&(i=c)}n=o.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(o){if(o.code!=="ENOENT")throw o}const l=j.stringify(t,{quote:p,replacer:m,space:i});T(e,`${l}${n}`,u)};export{O as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as a}from"node:module";import{k as h}from"./index-B2MhYg3r.js";import{R_OK as j}from"./FIND_UP_STOP-CAwY1qU7.js";import N from"./isAccessibleSync-BrbOtwdr.js";import b from"./writeFileSync-W7Mf4BNy.js";const _=a(import.meta.url),n=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=e=>{if(typeof n<"u"&&n.versions&&n.versions.node){const[t,r]=n.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return n.getBuiltinModule(e)}return _(e)},{readFileSync:y}=g("node:fs"),$=(e,t,r={})=>{const{detectIndent:c,indent:f,replacer:d,stringify:p=JSON.stringify,...l}={indent:" ",...r};let i=f,s=`
|
|
2
|
-
`;if(N(e,j))try{const o=y(e,"utf8");if(c){const{indent:u}=h(o);i=u}s=o.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(o){if(o.code!=="ENOENT")throw o}const m=p(t,d,i);b(e,`${m}${s}`,l)};export{$ as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as u}from"node:module";import{k as b}from"./index-B2MhYg3r.js";import{R_OK as N}from"./FIND_UP_STOP-CAwY1qU7.js";import h from"./isAccessible-PmWJhV6I.js";import{b as y}from"./jsonc-merge-Bkw73TLW.js";import T from"./writeFile-BrMtsJY7.js";const _=u(import.meta.url),a=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=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 _(e)},{readFile:w}=g("node:fs/promises"),j=async(e,t,n)=>{let r,o=n,s=`
|
|
2
|
-
`;if(!await h(e,N))return{indent:o,trailingNewline:s};try{if(r=await w(e,"utf8"),t){const{indent:i}=b(r);i&&(o=i)}s=r.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(i){if(i.code!=="ENOENT")throw i}return{existingText:r,indent:o,trailingNewline:s}},B=async(e,t,n={})=>{const{detectIndent:r,formattingOptions:o,indent:s,preserveComments:i=!0,replacer:c,...d}={indent:" ",...n},{existingText:l,indent:m,trailingNewline:p}=await j(e,r,s),f=y(l,t,i,m,p,o,c);await T(e,f,d)};export{B 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 h}from"./FIND_UP_STOP-CAwY1qU7.js";import T from"./isAccessibleSync-BrbOtwdr.js";import{b as j}from"./jsonc-merge-Bkw73TLW.js";import x from"./writeFileSync-W7Mf4BNy.js";const _=a(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=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 _(e)},{readFileSync:N}=g("node:fs"),y=(e,t,i)=>{let r,o=i,s=`
|
|
2
|
-
`;if(!T(e,h))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}},E=(e,t,i={})=>{const{detectIndent:r,formattingOptions:o,indent:s,preserveComments:n=!0,replacer:d,...l}={indent:" ",...i},{existingText:f,indent:m,trailingNewline:p}=y(e,r,s),u=j(f,t,n,m,p,o,d);x(e,u,l)};export{E as default};
|