@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as x}from"node:module";import{resolve as W,join as z,normalize as P,basename as S}from"@visulima/path";import{toPath as B}from"@visulima/path/utils";import F from"./WalkError-B8qTd-v-.js";import O from"./assertValidFileOrDirectoryPath-CAHgg-jK.js";import{g as T,w as m,c as h}from"./walk-include-aizKyl9e.js";let E;const q=e=>(E??=x(import.meta.url))(e),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,N=e=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[t,s]=l.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return l.getBuiltinModule(e)}return q(e)},{readdir:R,realpath:M,stat:I}=N("node:fs/promises"),V=async e=>{const t=P(e),s=S(t),n=await I(t);return h(n,s,t)};async function*L(e,t={}){const{extensions:s,followSymlinks:n=!1,includeDirs:y=!0,includeFiles:_=!0,includeSymlinks:w=!0,match:v,maxDepth:u=Number.POSITIVE_INFINITY,skip:g}=t;if(O(e),u<0)return;const d=t.visited??new Set,c=v?v.map(i=>typeof i=="string"?T(i):i):void 0,a=g?g.map(i=>typeof i=="string"?T(i):i):void 0;if(e=W(B(e)),y&&m(e,s,c,a)&&(yield await V(e)),!(u<1||!m(e,void 0,void 0,a)))try{const i=await R(e,{withFileTypes:!0});for(const o of i){let r=z(e,o.name),k=o,{name:D}=o,b=o.isDirectory(),j=o.isFile();if(o.isSymbolicLink())if(n){const f=P(await M(r));if(d.has(f))continue;r=f;const p=await I(f);b=p.isDirectory(),j=p.isFile(),k=p,D=S(f)}else if(w&&m(r,s,c,a)){yield h(o,o.name,r);continue}else continue;b?(n&&d.add(r),yield*L(r,{extensions:s,followSymlinks:n,includeDirs:y,includeFiles:_,includeSymlinks:w,match:c,maxDepth:u-1,skip:a,visited:d})):j&&_&&m(r,s,c,a)&&(yield h(k,D,r))}}catch(i){throw i instanceof F?i:new F(i,e)}}export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o=e=>{const t=[],r=new Set;let s=0;for(const a of e){if(a==="{")t.push(s);else if(a==="}"){const l=t.pop();l!==void 0&&(r.add(l),r.add(s))}s+=1}let i=0,c=0,n="";for(const a of e)a==="{"?r.has(c)?(n+="(",i+=1):n+=String.raw`\{`:a==="}"?r.has(c)?(n+=")",i-=1):n+=String.raw`\}`:a===","&&i>0?n+="|":n+=a,c+=1;return n},g=e=>{const t=e.replace(/[$()+\\^]/g,String.raw`\$&`).replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`),r=o(t).replace(/\[!(.*?)\]/g,"[^$1]");try{return new RegExp(`^${r}$`)}catch(s){throw new Error(`Invalid glob pattern: ${e}`,{cause:s})}};class p{name;path;#e;constructor(t,r,s){this.#e=t,this.name=r,this.path=s}isDirectory(){return this.#e.isDirectory()}isFile(){return this.#e.isFile()}isSymbolicLink(){return this.#e.isSymbolicLink()}}const h=(e,t,r)=>new p(e,t,r),f=(e,t,r,s)=>{if(Array.isArray(t)&&t.length>0&&!t.some(c=>e.endsWith(c)))return!1;const i=e.includes("\\")?e.replaceAll("\\","/"):e;return r&&!r.some(c=>c.test(i))?!1:!s?.some(c=>c.test(i))};export{h as c,g,f as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as x}from"node:module";import{resolve as W,join as z,normalize as m,basename as P}from"@visulima/path";import{toPath as B}from"@visulima/path/utils";import F from"./WalkError-B8qTd-v-.js";import O from"./assertValidFileOrDirectoryPath-CAHgg-jK.js";import{g as T,w as f,c as y}from"./walk-include-aizKyl9e.js";let E;const q=e=>(E??=x(import.meta.url))(e),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,N=e=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[t,s]=l.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return l.getBuiltinModule(e)}return q(e)},{readdirSync:R,realpathSync:M,statSync:I}=N("node:fs"),V=e=>{const t=m(e),s=I(t);return y(s,P(t),t)};function*L(e,t={}){const{extensions:s,followSymlinks:u=!1,includeDirs:_=!0,includeFiles:v=!0,includeSymlinks:g=!0,match:k,maxDepth:d=Number.POSITIVE_INFINITY,skip:D}=t;if(O(e),d<0)return;const p=t.visited??new Set,c=k?k.map(i=>typeof i=="string"?T(i):i):void 0,r=D?D.map(i=>typeof i=="string"?T(i):i):void 0;if(e=W(B(e)),_&&f(e,s,c,r)&&(yield V(e)),!(d<1||!f(e,void 0,void 0,r)))try{const i=R(e,{withFileTypes:!0});for(const o of i){let n=z(e,o.name),S=o,{name:w}=o,b=o.isDirectory(),j=o.isFile();if(o.isSymbolicLink())if(u){const a=m(M(n));if(p.has(a))continue;n=a;const h=I(a);b=h.isDirectory(),j=h.isFile(),S=h,w=P(a)}else if(g&&f(n,s,c,r)){yield y(o,o.name,m(n));continue}else continue;b?(u&&p.add(n),yield*L(n,{extensions:s,followSymlinks:u,includeDirs:_,includeFiles:v,includeSymlinks:g,match:c,maxDepth:d-1,skip:r,visited:p})):j&&v&&f(n,s,c,r)&&(yield y(S,w,m(n)))}}catch(i){throw i instanceof F?i:new F(i,e)}}export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as w}from"node:module";import{dirname as k}from"@visulima/path";import{toPath as p}from"@visulima/path/utils";import{F_OK as q}from"./FIND_UP_STOP-pQqZdUPw.js";import B from"./AlreadyExistsError-DEb3UWja.js";import n from"./isAccessible-CqNOFdZu.js";import E from"./assertValidFileContents-CbIN7sy7.js";import P from"./assertValidFileOrDirectoryPath-CAHgg-jK.js";import{t as A,a as R}from"./to-uint-8-array-DlTu4L-l.js";let g;const _=e=>(g??=w(import.meta.url))(e),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,y=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[i,r]=s.versions.node.split(".").map(Number);if(i>22||i===22&&r>=3||i===20&&r>=16)return s.getBuiltinModule(e)}return _(e)},{mkdir:v,readFile:b,writeFile:F,stat:x,rename:d,chown:h,chmod:j,unlink:$}=y("node:fs/promises"),z=async(e,i,r)=>{r={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},P(e),E(i),e=p(e);const o=await n(e,q),f=r.flag??"w",m=f.includes("a"),u=f.includes("x");if(o&&(!r.overwrite||u))throw new B(`file already exists, open '${e}'`);const a=A(e);try{!o&&r.recursive&&await v(k(e),{recursive:!0});let t,c=typeof i=="string"?Buffer.from(i,r.encoding??"utf8"):R(i);if(m&&o&&(c=Buffer.concat([await b(e),c])),await F(a,c,{flag:"wx"}),o&&r.backup&&(t=await x(e),r.chown??={gid:t.gid,uid:t.uid},await d(e,`${e}.bak`)),r.chown)try{await h(a,r.chown.uid,r.chown.gid)}catch{}const l=t&&r.mode===void 0?t.mode:r.mode;l!==void 0&&await j(a,l),await d(a,e)}catch(t){throw new Error(`Failed to write file at: ${e} - ${t.message}`,{cause:t})}finally{await n(a)&&await $(a)}};export{z as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as y}from"node:module";import{dirname as k}from"@visulima/path";import{toPath as $}from"@visulima/path/utils";import{F_OK as p}from"./FIND_UP_STOP-pQqZdUPw.js";import q from"./AlreadyExistsError-DEb3UWja.js";import d from"./isAccessibleSync-DYKTrrvc.js";import B from"./assertValidFileContents-CbIN7sy7.js";import E from"./assertValidFileOrDirectoryPath-CAHgg-jK.js";import{t as P,a as A}from"./to-uint-8-array-DlTu4L-l.js";let w;const g=e=>(w??=y(import.meta.url))(e),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_=e=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[i,r]=o.versions.node.split(".").map(Number);if(i>22||i===22&&r>=3||i===20&&r>=16)return o.getBuiltinModule(e)}return g(e)},{mkdirSync:v,readFileSync:S,writeFileSync:b,statSync:F,renameSync:l,chownSync:x,chmodSync:h,unlinkSync:j}=_("node:fs"),U=(e,i,r)=>{r={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},E(e),B(i),e=$(e);const s=d(e,p),a=r.flag??"w",u=a.includes("a"),m=a.includes("x");if(s&&(!r.overwrite||m))throw new q(`file already exists, open '${e}'`);const t=P(e);try{!s&&r.recursive&&v(k(e),{recursive:!0});let c,n=typeof i=="string"?Buffer.from(i,r.encoding??"utf8"):A(i);if(u&&s&&(n=Buffer.concat([S(e),n])),b(t,n,{flag:"wx"}),s&&r.backup&&(c=F(e),r.chown??={gid:c.gid,uid:c.uid},l(e,`${e}.bak`)),r.chown)try{x(t,r.chown.uid,r.chown.gid)}catch{}const f=c&&r.mode===void 0?c.mode:r.mode;f!==void 0&&h(t,f),l(t,e)}catch(c){throw new Error(`Failed to write file at: ${e} - ${c.message}`,{cause:c})}finally{d(t)&&j(t)}};export{U as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{createRequire as q}from"node:module";import{parse as E,stringify as I}from"ini";import{R_OK as S}from"./FIND_UP_STOP-pQqZdUPw.js";import k from"./isAccessible-CqNOFdZu.js";import{d as B,m as F}from"./ini-preserve-D3Z1KcgN.js";import M from"./writeFile-BIBP7wbK.js";let A;const O=e=>(A??=q(import.meta.url))(e),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,R=e=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[r,n]=o.versions.node.split(".").map(Number);if(r>22||r===22&&n>=3||r===20&&n>=16)return o.getBuiltinModule(e)}return O(e)},{readFile:x}=R("node:fs/promises"),C=async(e,r,n={})=>{const{eol:_,preserveStyle:g=!0,whitespace:w,...y}=n,{align:b,bracketedArray:a,newline:h,platform:v,section:f,sort:j,...T}=y;let c=_,p=w,s,l;if(g?await k(e,S):!1)try{s=await x(e,"utf8"),l=E(s,{bracketedArray:a??!0});const t=B(s);c??=t.eol,p??=t.whitespace}catch(t){if(t.code!=="ENOENT")throw t}const d={align:b,bracketedArray:a,newline:h,platform:v,section:f,sort:j,whitespace:p},u=(t,m)=>I(t,m===void 0?d:{...d,section:m});let i;s!==void 0&&l?i=F(s,l,r,u,{eol:c??`
|
|
2
|
+
`}):(i=u(r,f),c===`\r
|
|
3
|
+
`&&(i=i.replaceAll(/\r?\n/g,`\r
|
|
4
|
+
`))),await M(e,i,T)};export{C as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{createRequire as T}from"node:module";import{parse as x,stringify as E}from"ini";import{R_OK as I}from"./FIND_UP_STOP-pQqZdUPw.js";import k from"./isAccessibleSync-DYKTrrvc.js";import{d as B,m as F}from"./ini-preserve-D3Z1KcgN.js";import M from"./writeFileSync-DJoHk3Ks.js";let q;const A=e=>(q??=T(import.meta.url))(e),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,O=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[t,n]=s.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return s.getBuiltinModule(e)}return A(e)},{readFileSync:R}=O("node:fs"),z=(e,t,n={})=>{const{eol:_,preserveStyle:y=!0,whitespace:g,...h}=n,{align:v,bracketedArray:a,newline:w,platform:b,section:d,sort:S,...j}=h;let c=_,f=g,o,l;if(y&&k(e,I))try{o=R(e,"utf8"),l=x(o,{bracketedArray:a??!0});const r=B(o);c??=r.eol,f??=r.whitespace}catch(r){if(r.code!=="ENOENT")throw r}const p={align:v,bracketedArray:a,newline:w,platform:b,section:d,sort:S,whitespace:f},u=(r,m)=>E(r,m===void 0?p:{...p,section:m});let i;o!==void 0&&l?i=F(o,l,t,u,{eol:c??`
|
|
2
|
+
`}):(i=u(t,d),c===`\r
|
|
3
|
+
`&&(i=i.replaceAll(/\r?\n/g,`\r
|
|
4
|
+
`))),M(e,i,j)};export{z as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{createRequire as m}from"node:module";import{d as y}from"./index-CBWLeiRp.js";import{R_OK as b}from"./FIND_UP_STOP-pQqZdUPw.js";import h from"./isAccessible-CqNOFdZu.js";import N from"./writeFile-BIBP7wbK.js";let _;const g=e=>(_??=m(import.meta.url))(e),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,w=e=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[t,r]=i.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return i.getBuiltinModule(e)}return g(e)},{readFile:j}=w("node:fs/promises"),v=async(e,t,r={})=>{const{detectIndent:c,indent:d,replacer:a,stringify:f=JSON.stringify,...l}={indent:" ",...r};let o=d,s=`
|
|
2
|
+
`;if(await h(e,b))try{const n=await j(e,"utf8");if(c){const{indent:u}=y(n);o=u}s=n.endsWith(`
|
|
3
|
+
`)?`
|
|
4
|
+
`:""}catch(n){if(n.code!=="ENOENT")throw n}const p=f(t,a,o);await N(e,`${p}${s}`,l)};export{v as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{createRequire as m}from"node:module";import{d as y}from"./index-CBWLeiRp.js";import b from"json5";import{R_OK as h}from"./FIND_UP_STOP-pQqZdUPw.js";import q from"./isAccessible-CqNOFdZu.js";import N from"./writeFile-BIBP7wbK.js";let _;const g=e=>(_??=m(import.meta.url))(e),n=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,w=e=>{if(typeof n<"u"&&n.versions&&n.versions.node){const[t,o]=n.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return n.getBuiltinModule(e)}return g(e)},{readFile:j}=w("node:fs/promises"),B=async(e,t,o={})=>{const{detectIndent:d,indent:a,quote:f,replacer:l,...p}={indent:" ",...o};let r=a,s=`
|
|
2
|
+
`;if(await q(e,h))try{const i=await j(e,"utf8");if(d){const{indent:c}=y(i);c&&(r=c)}s=i.endsWith(`
|
|
3
|
+
`)?`
|
|
4
|
+
`:""}catch(i){if(i.code!=="ENOENT")throw i}const u=b.stringify(t,{quote:f,replacer:l,space:r});await N(e,`${u}${s}`,p)};export{B as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{createRequire as a}from"node:module";import{d as b}from"./index-CBWLeiRp.js";import h from"json5";import{R_OK as q}from"./FIND_UP_STOP-pQqZdUPw.js";import w from"./isAccessibleSync-DYKTrrvc.js";import N from"./writeFileSync-DJoHk3Ks.js";let _;const y=e=>(_??=a(import.meta.url))(e),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=e=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[t,o]=i.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return i.getBuiltinModule(e)}return y(e)},{readFileSync:j}=g("node:fs"),$=(e,t,o={})=>{const{detectIndent:d,indent:f,quote:l,replacer:u,...p}={indent:" ",...o};let r=f,s=`
|
|
2
|
+
`;if(w(e,q))try{const n=j(e,"utf8");if(d){const{indent:c}=b(n);c&&(r=c)}s=n.endsWith(`
|
|
3
|
+
`)?`
|
|
4
|
+
`:""}catch(n){if(n.code!=="ENOENT")throw n}const m=h.stringify(t,{quote:l,replacer:u,space:r});N(e,`${m}${s}`,p)};export{$ as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{createRequire as a}from"node:module";import{d as b}from"./index-CBWLeiRp.js";import{R_OK as h}from"./FIND_UP_STOP-pQqZdUPw.js";import w from"./isAccessibleSync-DYKTrrvc.js";import N from"./writeFileSync-DJoHk3Ks.js";let m;const y=e=>(m??=a(import.meta.url))(e),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=e=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[n,r]=i.versions.node.split(".").map(Number);if(n>22||n===22&&r>=3||n===20&&r>=16)return i.getBuiltinModule(e)}return y(e)},{readFileSync:j}=g("node:fs"),T=(e,n,r={})=>{const{detectIndent:c,indent:d,replacer:f,stringify:l=JSON.stringify,...u}={indent:" ",...r};let o=d,s=`
|
|
2
|
+
`;if(w(e,h))try{const t=j(e,"utf8");if(c){const{indent:_}=b(t);o=_}s=t.endsWith(`
|
|
3
|
+
`)?`
|
|
4
|
+
`:""}catch(t){if(t.code!=="ENOENT")throw t}const p=l(n,f,o);N(e,`${p}${s}`,u)};export{T as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{createRequire as m}from"node:module";import{d as j}from"./index-CBWLeiRp.js";import{R_OK as x}from"./FIND_UP_STOP-pQqZdUPw.js";import y from"./isAccessible-CqNOFdZu.js";import{b as O}from"./jsonc-merge-BGm21l00.js";import T from"./writeFile-BIBP7wbK.js";let _;const g=e=>(_??=m(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,w=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[t,n]=c.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return c.getBuiltinModule(e)}return g(e)},{readFile:b}=w("node:fs/promises"),h=async(e,t,n)=>{let r,s=n,o=`
|
|
2
|
+
`;if(!await y(e,x))return{indent:s,trailingNewline:o};try{if(r=await b(e,"utf8"),t){const{indent:i}=j(r);i&&(s=i)}o=r.endsWith(`
|
|
3
|
+
`)?`
|
|
4
|
+
`:""}catch(i){if(i.code!=="ENOENT")throw i}return{existingText:r,indent:s,trailingNewline:o}},B=async(e,t,n={})=>{const{detectIndent:r,formattingOptions:s,indent:o,preserveComments:a=!0,replacer:i,...d}={indent:" ",...n},{existingText:l,indent:u,trailingNewline:f}=await h(e,r,o),p=O(l,t,a,u,f,s,i);await T(e,p,d)};export{B as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{createRequire as a}from"node:module";import{d as j}from"./index-CBWLeiRp.js";import{R_OK as w}from"./FIND_UP_STOP-pQqZdUPw.js";import x from"./isAccessibleSync-DYKTrrvc.js";import{b as O}from"./jsonc-merge-BGm21l00.js";import T from"./writeFileSync-DJoHk3Ks.js";let _;const g=e=>(_??=a(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,y=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:b}=y("node:fs"),h=(e,t,i)=>{let r,o=i,s=`
|
|
2
|
+
`;if(!x(e,w))return{indent:o,trailingNewline:s};try{if(r=b(e,"utf8"),t){const{indent:n}=j(r);n&&(o=n)}s=r.endsWith(`
|
|
3
|
+
`)?`
|
|
4
|
+
`:""}catch(n){if(n.code!=="ENOENT")throw n}return{existingText:r,indent:o,trailingNewline:s}},I=(e,t,i={})=>{const{detectIndent:r,formattingOptions:o,indent:s,preserveComments:n=!0,replacer:d,...l}={indent:" ",...i},{existingText:u,indent:f,trailingNewline:p}=h(e,r,s),m=O(u,t,n,f,p,o,d);T(e,m,l)};export{I as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{stringify as o}from"smol-toml";import a from"./writeFile-BIBP7wbK.js";const f=async(t,i,r)=>{await a(t,o(i),r)};export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{stringify as o}from"smol-toml";import e from"./writeFileSync-DJoHk3Ks.js";const n=(r,t,i)=>{e(r,o(t),i)};export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{stringify as a}from"@visulima/yaml";import c from"./writeFile-BIBP7wbK.js";async function p(n,s,t,o){let e,i,f;typeof t=="object"&&t!==null&&!Array.isArray(t)&&typeof t!="function"?(e=t,i=e.replacer,f=e.space):typeof o=="object"?(e=o,i=t,f=e.space):(i=t,f=o);const y=a(s,i,f??e);await c(n,y,e)}export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{stringify as c}from"@visulima/yaml";import l from"./writeFileSync-DJoHk3Ks.js";function p(o,s,t,n){let e,f,i;typeof t=="object"&&t!==null&&!Array.isArray(t)&&typeof t!="function"?(e=t,f=e.replacer,i=e.space):typeof n=="object"?(e=n,f=t,i=e.space):(f=t,i=n);const y=c(s,f,i??e);l(o,y,e)}export{p as default};
|
package/dist/size.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as
|
|
1
|
+
import{createRequire as b}from"node:module";import{toPath as l}from"@visulima/path/utils";let z;const _=e=>(z??=b(import.meta.url))(e),n=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=e=>{if(typeof n<"u"&&n.versions&&n.versions.node){const[r,t]=n.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return n.getBuiltinModule(e)}return _(e)},{readFileSync:h,statSync:P,createReadStream:w,existsSync:u}=c("node:fs"),{isAbsolute:B,resolve:p}=c("node:path"),{Readable:R}=c("node:stream"),{URL:i}=c("node:url"),{brotliCompressSync:f,gzipSync:a,createGzip:j,createBrotliCompress:q}=c("node:zlib"),g=e=>{if(B(e))return u(e);try{return u(p(e))}catch{return!1}},v=async e=>{let r=0;for await(const t of e)r+=Buffer.from(t).length;return r},S=async(e,r)=>{let t=0;const s=r();return await new Promise((o,m)=>{s.on("data",d=>{t+=d.length}),s.on("end",()=>{o(t)}),s.on("error",m),e.on("error",m),e.pipe(s)})},y=async(e,r,t)=>{if(e instanceof i||typeof e=="string"){const s=l(e);if(g(s)){const o=w(s);return await t(o)}if(typeof e=="string")return r(Buffer.from(e))}return e instanceof R?await t(e):r(e)},C=async(e,r)=>await y(e,o=>a(o,r).length,async o=>await S(o,()=>j(r))),T=async(e,r)=>await y(e,o=>f(o,r).length,async o=>await S(o,()=>q(r))),M=async e=>await y(e,s=>s.length,async s=>await v(s)),k=(e,r)=>{if(e instanceof i||typeof e=="string"){const t=l(e);if(g(t))return a(h(t),r).length;if(typeof e=="string")return a(Buffer.from(e),r).length}return a(e,r).length},A=(e,r)=>{if(e instanceof i||typeof e=="string"){const t=l(e);if(g(t))return f(h(t),r).length;if(typeof e=="string")return f(Buffer.from(e),r).length}return f(e,r).length},F=e=>{if(e instanceof i||typeof e=="string"){const r=l(e);if(g(r))return P(r).size;if(typeof e=="string")return Buffer.from(e).length}return e.length};export{T as brotliSize,A as brotliSizeSync,C as gzipSize,k as gzipSizeSync,M as rawSize,F as rawSizeSync};
|
package/dist/toml.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CompressionType, i as ReadTomlOptions, j as WriteTomlOptions } from "./packem_shared/types.d-
|
|
1
|
+
import { C as CompressionType, i as ReadTomlOptions, j as WriteTomlOptions } from "./packem_shared/types.d-B-T1rDxl.js";
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import 'fdir';
|
|
4
4
|
/**
|
package/dist/toml.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as r}from"./packem_shared/readToml-
|
|
1
|
+
import{default as r}from"./packem_shared/readToml-jD08lZRN.js";import{default as t}from"./packem_shared/readTomlSync-0J8gIalg.js";import{default as l}from"./packem_shared/writeToml-Frvwh0Kn.js";import{default as d}from"./packem_shared/writeTomlSync-BvKdlKvE.js";export{r as readToml,t as readTomlSync,l as writeToml,d as writeTomlSync};
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { J as JSONError } from "./packem_shared/json-error.d-COL8oxF_.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { k as CodeFrameOptions, l as JsonReviver } from "./packem_shared/types.d-B-T1rDxl.js";
|
|
3
|
+
import { J as JsonValue } from "./packem_shared/json-value.d-DZqAihX4.js";
|
|
4
4
|
export { toPath } from '@visulima/path/utils';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'fdir';
|
package/dist/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as e}from"./packem_shared/JSONError-Cvp9ycba.js";import{default as a}from"./packem_shared/assertValidFileContents-CbIN7sy7.js";import{default as f}from"./packem_shared/assertValidFileOrDirectoryPath-
|
|
1
|
+
import{default as e}from"./packem_shared/JSONError-Cvp9ycba.js";import{default as a}from"./packem_shared/assertValidFileContents-CbIN7sy7.js";import{default as f}from"./packem_shared/assertValidFileOrDirectoryPath-CAHgg-jK.js";import{default as m}from"./packem_shared/parseJson-gfl5PTTo.js";import{default as d}from"./packem_shared/stripJsonComments-Do7s7No5.js";import{toPath as x}from"@visulima/path/utils";export{e as JSONError,a as assertValidFileContents,f as assertValidFileOrDirectoryPath,m as parseJson,d as stripJsonComments,x as toPath};
|
package/dist/yaml.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CompressionType, m as ReadYamlOptions, Y as YamlReviver, n as WriteYamlOptions, o as JsonReplacer } from "./packem_shared/types.d-
|
|
2
|
-
export type { p as YamlReplacer } from "./packem_shared/types.d-
|
|
1
|
+
import { C as CompressionType, m as ReadYamlOptions, Y as YamlReviver, n as WriteYamlOptions, o as JsonReplacer } from "./packem_shared/types.d-B-T1rDxl.js";
|
|
2
|
+
export type { p as YamlReplacer } from "./packem_shared/types.d-B-T1rDxl.js";
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'fdir';
|
|
5
5
|
declare function readYaml<R = Record<string, unknown>>(path: URL | string, options?: ReadYamlOptions<CompressionType>): Promise<R>;
|
package/dist/yaml.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as r}from"./packem_shared/readYaml-
|
|
1
|
+
import{default as r}from"./packem_shared/readYaml-C63_W9Qg.js";import{default as f}from"./packem_shared/readYamlSync-CuyDW6xR.js";import{default as m}from"./packem_shared/writeYaml-C4IGXTOo.js";import{default as d}from"./packem_shared/writeYamlSync-BAbWtkvq.js";export{r as readYaml,f as readYamlSync,m as writeYaml,d as writeYamlSync};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/fs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "Human friendly file system utilities for Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -61,11 +61,6 @@
|
|
|
61
61
|
],
|
|
62
62
|
"homepage": "https://visulima.com/packages/fs/",
|
|
63
63
|
"bugs": "https://github.com/visulima/visulima/issues",
|
|
64
|
-
"license": "MIT",
|
|
65
|
-
"author": {
|
|
66
|
-
"name": "Daniel Bannert",
|
|
67
|
-
"email": "d.bannert@anolilab.de"
|
|
68
|
-
},
|
|
69
64
|
"repository": {
|
|
70
65
|
"type": "git",
|
|
71
66
|
"url": "git+https://github.com/visulima/visulima.git",
|
|
@@ -81,19 +76,13 @@
|
|
|
81
76
|
"url": "https://anolilab.com/support"
|
|
82
77
|
}
|
|
83
78
|
],
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
],
|
|
90
|
-
"os": [
|
|
91
|
-
"darwin",
|
|
92
|
-
"linux",
|
|
93
|
-
"win32"
|
|
94
|
-
],
|
|
95
|
-
"type": "module",
|
|
79
|
+
"license": "MIT",
|
|
80
|
+
"author": {
|
|
81
|
+
"name": "Daniel Bannert",
|
|
82
|
+
"email": "d.bannert@anolilab.de"
|
|
83
|
+
},
|
|
96
84
|
"sideEffects": false,
|
|
85
|
+
"type": "module",
|
|
97
86
|
"exports": {
|
|
98
87
|
".": {
|
|
99
88
|
"types": "./dist/index.d.ts",
|
|
@@ -153,21 +142,26 @@
|
|
|
153
142
|
},
|
|
154
143
|
"./package.json": "./package.json"
|
|
155
144
|
},
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
|
|
145
|
+
"files": [
|
|
146
|
+
"dist/**",
|
|
147
|
+
"README.md",
|
|
148
|
+
"CHANGELOG.md",
|
|
149
|
+
"LICENSE.md"
|
|
150
|
+
],
|
|
160
151
|
"dependencies": {
|
|
161
|
-
"@visulima/path": "
|
|
152
|
+
"@visulima/path": "4.0.0"
|
|
162
153
|
},
|
|
163
154
|
"peerDependencies": {
|
|
155
|
+
"@visulima/yaml": "1.0.0",
|
|
164
156
|
"ini": "^7.0.0",
|
|
165
157
|
"json5": "^2.2.3",
|
|
166
158
|
"jsonc-parser": "^3.3.1",
|
|
167
|
-
"smol-toml": "^1.7.
|
|
168
|
-
"yaml": ">=2.9.0"
|
|
159
|
+
"smol-toml": "^1.7.1"
|
|
169
160
|
},
|
|
170
161
|
"peerDependenciesMeta": {
|
|
162
|
+
"@visulima/yaml": {
|
|
163
|
+
"optional": true
|
|
164
|
+
},
|
|
171
165
|
"ini": {
|
|
172
166
|
"optional": true
|
|
173
167
|
},
|
|
@@ -179,12 +173,18 @@
|
|
|
179
173
|
},
|
|
180
174
|
"smol-toml": {
|
|
181
175
|
"optional": true
|
|
182
|
-
},
|
|
183
|
-
"yaml": {
|
|
184
|
-
"optional": true
|
|
185
176
|
}
|
|
186
177
|
},
|
|
187
178
|
"engines": {
|
|
188
179
|
"node": "^22.14.0 || >=24.10.0"
|
|
180
|
+
},
|
|
181
|
+
"os": [
|
|
182
|
+
"darwin",
|
|
183
|
+
"linux",
|
|
184
|
+
"win32"
|
|
185
|
+
],
|
|
186
|
+
"publishConfig": {
|
|
187
|
+
"access": "public",
|
|
188
|
+
"provenance": true
|
|
189
189
|
}
|
|
190
190
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const _=0,O=4,S=2,o=1,K=Symbol("findUpStop"),N=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*[\s\S]*?\*\//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 +0,0 @@
|
|
|
1
|
-
function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}export{o as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=n=>{if(!n||!(n instanceof URL)&&typeof n!="string")throw new TypeError("Path must be a non-empty string or URL.")};export{t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=r=>{const e={force:!0,recursive:!0};return r?.maxRetries!==void 0&&(e.maxRetries=r.maxRetries),r?.retryDelay!==void 0&&(e.retryDelay=r.retryDelay),e};export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import n from"./walk-B211aFS7.js";const e=async(r,s={})=>{Array.isArray(s.extensions)||(s.extensions=["js","mjs","cjs","ts"]);const o=[];for await(const t of n(r,s))o.push(t.path);return o};export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"./walkSync-VeMvHYLk.js";const a=(r,s={})=>{Array.isArray(s.extensions)||(s.extensions=["js","mjs","cjs","ts"]);const o=[];for(const n of t(r,s))o.push(n.path);return o};export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as v}from"node:module";import{toPath as n}from"@visulima/path/utils";import j from"./AlreadyExistsError-DEb3UWja.js";import c from"./assertValidFileOrDirectoryPath-BTlt945W.js";let y;const h=e=>(y??=v(import.meta.url))(e),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[r,t]=s.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return s.getBuiltinModule(e)}return h(e)},{cp:g}=b("node:fs/promises"),w=async(e,r,t={})=>{c(e),c(r);const{dereference:a=!1,errorOnExist:f=!0,filter:m,overwrite:l=!0,preserveTimestamps:p=!1,recursive:u=!0,verbatimSymlinks:d=!1}=t,_=n(e),o=n(r);try{await g(_,o,{dereference:a,errorOnExist:f,filter:m,force:l,preserveTimestamps:p,recursive:u,verbatimSymlinks:d})}catch(i){throw i?.code==="ERR_FS_CP_EEXIST"?new j(`destination already exists, copy '${o}'`):i}};export{w as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as v}from"node:module";import{toPath as n}from"@visulima/path/utils";import j from"./AlreadyExistsError-DEb3UWja.js";import c from"./assertValidFileOrDirectoryPath-BTlt945W.js";let y;const h=e=>(y??=v(import.meta.url))(e),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[r,t]=s.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return s.getBuiltinModule(e)}return h(e)},{cpSync:g}=b("node:fs"),q=(e,r,t={})=>{c(e),c(r);const{dereference:a=!1,errorOnExist:f=!0,filter:l,overwrite:m=!0,preserveTimestamps:p=!1,recursive:u=!0,verbatimSymlinks:d=!1}=t,_=n(e),o=n(r);try{g(_,o,{dereference:a,errorOnExist:f,filter:l,force:m,preserveTimestamps:p,recursive:u,verbatimSymlinks:d})}catch(i){throw i?.code==="ERR_FS_CP_EEXIST"?new j(`destination already exists, copy '${o}'`):i}};export{q as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as c}from"node:module";import{join as _}from"@visulima/path";import{toPath as l}from"@visulima/path/utils";import j from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{t as g}from"./build-rm-options-avnusYx-.js";let a;const u=e=>(a??=c(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,i=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[o,s]=r.versions.node.split(".").map(Number);if(o>22||o===22&&s>=3||o===20&&s>=16)return r.getBuiltinModule(e)}return u(e)},{existsSync:f}=i("node:fs"),{mkdir:m,readdir:d,rm:p}=i("node:fs/promises"),w=async(e,o)=>{if(j(e),!f(e)){await m(e,{recursive:!0});return}const s=await d(e),t=g(o);for(const n of s)await p(_(l(e),n),t)};export{w as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as t}from"node:module";import{join as p}from"@visulima/path";import{toPath as _}from"@visulima/path/utils";import l from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{t as j}from"./build-rm-options-avnusYx-.js";let n;const c=e=>(n??=t(import.meta.url))(e),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=e=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[r,s]=o.versions.node.split(".").map(Number);if(r>22||r===22&&s>=3||r===20&&s>=16)return o.getBuiltinModule(e)}return c(e)},{existsSync:f,mkdirSync:m,readdirSync:a,rmSync:d}=u("node:fs"),v=(e,r)=>{if(l(e),!f(e)){m(e,{recursive:!0});return}const s=j(r);for(const i of a(e))d(p(_(e),i),s)};export{v as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as n}from"node:module";import p from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{g as i}from"./get-file-info-type-DzWpohDB.js";let c;const a=r=>(c??=n(import.meta.url))(r),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=r=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[e,t]=o.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return o.getBuiltinModule(r)}return a(r)},{lstat:s,mkdir:d}=u("node:fs/promises"),m=async r=>{p(r);try{const e=await s(r);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(i(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await d(r,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const t=await s(r);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(i(t))}'`,{cause:e})}};export{m as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as i}from"node:module";import{dirname as a}from"@visulima/path";import{toPath as l}from"@visulima/path/utils";import m from"./assertValidFileOrDirectoryPath-BTlt945W.js";import u from"./ensureDirSync-B0w9WMwE.js";import{g as d}from"./get-file-info-type-DzWpohDB.js";let s;const n=e=>(s??=i(import.meta.url))(e),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=e=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[r,t]=o.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return o.getBuiltinModule(e)}return n(e)},{lstatSync:f,writeFileSync:p}=c("node:fs"),T=e=>{m(e);try{const r=f(e);if(!r.isFile())throw new Error(`Ensure path exists, expected 'file', got '${String(d(r))}'`)}catch(r){if(r.code==="ENOENT"){u(a(l(e))),p(e,new Uint8Array);return}throw r}};export{T as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as p}from"node:module";import{toNamespacedPath as n,dirname as h}from"@visulima/path";import{toPath as c}from"@visulima/path/utils";import m from"./assertValidFileOrDirectoryPath-BTlt945W.js";import g from"./ensureDir-BEiomfxz.js";import{d as j}from"./is-stats-identical-l1GRN4Qu.js";let u;const f=e=>(u??=p(import.meta.url))(e),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[t,o]=s.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return s.getBuiltinModule(e)}return f(e)},{lstat:a,link:_}=d("node:fs/promises"),R=async(e,t)=>{m(e),m(t),e=n(c(e)),t=n(c(t));let o;try{o=await a(t)}catch{}let i;try{i=await a(e)}catch(l){const r=l;throw r.message=r.message.replace("lstat","ensureLink"),r}o&&j(i,o)||(await g(h(t)),await _(e,t))};export{R as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as p}from"node:module";import{toNamespacedPath as c,dirname as h}from"@visulima/path";import{toPath as a}from"@visulima/path/utils";import m from"./assertValidFileOrDirectoryPath-BTlt945W.js";import g from"./ensureDirSync-B0w9WMwE.js";import{d as y}from"./is-stats-identical-l1GRN4Qu.js";let u;const f=e=>(u??=p(import.meta.url))(e),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[o,t]=s.versions.node.split(".").map(Number);if(o>22||o===22&&t>=3||o===20&&t>=16)return s.getBuiltinModule(e)}return f(e)},{lstatSync:i,linkSync:_}=d("node:fs"),T=(e,o)=>{m(e),m(o),e=c(a(e)),o=c(a(o));let t;try{t=i(o)}catch{}let n;try{n=i(e)}catch(l){const r=l;throw r.message=r.message.replace("lstat","ensureLink"),r}t&&y(n,t)||(g(h(o)),_(e,o))};export{T as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as g}from"node:module";import{toNamespacedPath as m,dirname as P,resolve as S}from"@visulima/path";import{toPath as p}from"@visulima/path/utils";import d from"./assertValidFileOrDirectoryPath-BTlt945W.js";import q from"./ensureDir-BEiomfxz.js";import{g as u}from"./get-file-info-type-DzWpohDB.js";import{d as x}from"./is-stats-identical-l1GRN4Qu.js";import{t as E}from"./resolve-symlink-target-CWrn0v4P.js";import h from"./AlreadyExistsError-DEb3UWja.js";let j;const b=i=>(j??=g(import.meta.url))(i),t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=i=>{if(typeof t<"u"&&t.versions&&t.versions.node){const[e,o]=t.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return t.getBuiltinModule(i)}return b(i)},{lstat:c,stat:f,symlink:k,readlink:v}=T("node:fs/promises"),R=process.platform==="win32"||/^(?:msys|cygwin)$/.test(process.env.OSTYPE),Y=async(i,e,o)=>{d(i),d(e);const r=E(i,e);e=m(p(e));try{if((await c(e)).isSymbolicLink()){const[s,n]=await Promise.all([f(r),f(e)]);if(x(s,n))return}}catch{}const w=await c(r),y=u(w);await q(P(e));let a=o??"file";o||(R?a="junction":a=y==="dir"?"dir":"file");try{await k(m(p(r)),e,a)}catch(s){if(s.code!=="EEXIST")throw s;const n=await c(e);if(!n.isSymbolicLink())throw new h(`A ${String(u(n))} already exists at the path: ${e}`);const _=await v(e),l=m(S(_));if(l!==r)throw new h(`A symlink targeting to an undesired path already exists: ${e} -> ${l}`)}};export{Y as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as j}from"node:module";import{toNamespacedPath as l,dirname as q,resolve as x}from"@visulima/path";import{toPath as p}from"@visulima/path/utils";import d from"./assertValidFileOrDirectoryPath-BTlt945W.js";import P from"./ensureDirSync-B0w9WMwE.js";import{g as u}from"./get-file-info-type-DzWpohDB.js";import{d as y}from"./is-stats-identical-l1GRN4Qu.js";import{t as E}from"./resolve-symlink-target-CWrn0v4P.js";import _ from"./AlreadyExistsError-DEb3UWja.js";let w;const b=o=>(w??=j(import.meta.url))(o),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=o=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[e,r]=i.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return i.getBuiltinModule(o)}return b(o)},{lstatSync:m,statSync:c,symlinkSync:k,readlinkSync:v}=T("node:fs"),R=process.platform==="win32"||/^(?:msys|cygwin)$/.test(process.env.OSTYPE),Y=(o,e,r)=>{d(o),d(e);const t=E(o,e);e=l(p(e));try{if(m(e).isSymbolicLink()&&y(c(t),c(e))){const s=c(t),n=c(e);if(y(s,n))return}}catch{}const h=m(t),g=u(h);P(q(e));let a=r??"file";r||(R?a="junction":a=g==="dir"?"dir":"file");try{k(l(p(t)),e,a)}catch(s){if(s.code!=="EEXIST")throw s;const n=m(e);if(!n.isSymbolicLink())throw new _(`A ${String(u(n))} already exists at the path: ${e}`);const S=v(e),f=l(x(S));if(f!==t)throw new _(`A symlink targeting to an undesired path already exists: ${e} -> ${f}`)}};export{Y as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as g}from"node:module";import{resolve as c,parse as T,isAbsolute as v,dirname as q}from"@visulima/path";import{toPath as f}from"@visulima/path/utils";import{FIND_UP_STOP as B}from"./FIND_UP_STOP-CAwY1qU7.js";let w;const h=t=>(w??=g(import.meta.url))(t),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=t=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[o,i]=s.versions.node.split(".").map(Number);if(o>22||o===22&&i>=3||o===20&&i>=16)return s.getBuiltinModule(t)}return h(t)},{stat:A,lstat:j}=b("node:fs/promises"),D=async(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 i=o.cwd?f(o.cwd):process.cwd();let r=c(i);const{root:a}=T(r),y=f(o.stopAt??a),m=c(r,y),u=o.type??"file",d=async function(n){return typeof t=="function"?[await t(n)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]};o.allowSymlinks??=!0;const _=o.allowSymlinks?A:j;for(;r;){const n=await d(r);for(let e of n){if(e===B)return;if(e===void 0)continue;Buffer.isBuffer(e)?e=e.toString():e instanceof URL&&(e=f(e));const l=v(e)?e:c(r,e);try{const p=await _(l);if(u==="file"&&p.isFile()||u==="directory"&&p.isDirectory())return l}catch{}}if(r===m||r===a)break;r=q(r)}};export{D as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as _}from"node:module";import{resolve as i,parse as A,isAbsolute as S,dirname as T}from"@visulima/path";import{toPath as c}from"@visulima/path/utils";import{FIND_UP_STOP as v}from"./FIND_UP_STOP-CAwY1qU7.js";let g;const h=e=>(g??=_(import.meta.url))(e),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[o,n]=s.versions.node.split(".").map(Number);if(o>22||o===22&&n>=3||o===20&&n>=16)return s.getBuiltinModule(e)}return h(e)},{statSync:w,lstatSync:j}=b("node:fs"),k=(e,o={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const n=o.cwd?c(o.cwd):process.cwd();let r=i(n);const{root:f}=A(r),p=c(o.stopAt??f),y=i(r,p),u=o.type??"file",d=function(t){return typeof e=="function"?[e(t)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]};o.allowSymlinks??=!0;const m=o.allowSymlinks?w:j;for(;r;){for(let t of d(r)){if(t===v)return;if(t===void 0)continue;Buffer.isBuffer(t)?t=t.toString():t instanceof URL&&(t=c(t));const a=S(t)?t:i(r,t);try{const l=m(a);if(u==="file"&&l.isFile()||u==="directory"&&l.isDirectory())return a}catch{}}if(r===y||r===f)break;r=T(r)}};export{k as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as o}from"./index-CPZbuHkp.js";const i=async(a,t)=>await o(a,t);export{i as default};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { G as GlobOptions } from "./types.d-C-RhhzcS.js";
|
|
2
|
-
/**
|
|
3
|
-
* Asynchronously matches files on disk using one or more glob patterns.
|
|
4
|
-
*
|
|
5
|
-
* Powered by [`tinyglobby`](https://github.com/SuperchupuDev/tinyglobby); `tinyglobby` is bundled into the
|
|
6
|
-
* built output so it does not appear as a runtime dependency of `@visulima/fs`.
|
|
7
|
-
*
|
|
8
|
-
* Pattern forms:
|
|
9
|
-
*
|
|
10
|
-
* - Plain glob — `src/**\/*.ts`
|
|
11
|
-
* - Negated pattern — `!src/**\/*.spec.ts` inside `patterns` adds to the internal ignore list (same as passing it via `ignore`).
|
|
12
|
-
* - Negated ignore — a leading `!` inside {@link GlobOptions.ignore} _un-ignores_ entries that an earlier ignore pattern would drop, e.g. `ignore: ["dist/**", "!dist/index.d.ts"]`.
|
|
13
|
-
* @param patterns A single glob pattern or an array of glob patterns.
|
|
14
|
-
* @param options Optional glob options. See {@link GlobOptions}.
|
|
15
|
-
* @returns A promise resolving to the array of matched paths. Paths are relative to {@link GlobOptions.cwd} unless {@link GlobOptions.absolute} is `true`.
|
|
16
|
-
* @example
|
|
17
|
-
* ```javascript
|
|
18
|
-
* import { glob } from "@visulima/fs";
|
|
19
|
-
*
|
|
20
|
-
* const jsFiles = await glob("src/**\/*.{js,ts}", { cwd: process.cwd(), ignore: ["**\/node_modules/**"] });
|
|
21
|
-
* console.log(jsFiles);
|
|
22
|
-
*
|
|
23
|
-
* // Negated ignore: drop everything under `ignored/` except `ignored/keep.ts`.
|
|
24
|
-
* const keep = await glob("**\/*.ts", { ignore: ["ignored/**", "!ignored/keep.ts"] });
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
declare const glob: (patterns: string | ReadonlyArray<string>, options?: GlobOptions) => Promise<string[]>;
|
|
28
|
-
/**
|
|
29
|
-
* Synchronously matches files on disk using one or more glob patterns.
|
|
30
|
-
*
|
|
31
|
-
* Synchronous counterpart of `glob`. Powered by [`tinyglobby`](https://github.com/SuperchupuDev/tinyglobby);
|
|
32
|
-
* bundled into the built output so it does not appear as a runtime dependency of `@visulima/fs`.
|
|
33
|
-
*
|
|
34
|
-
* Pattern forms:
|
|
35
|
-
*
|
|
36
|
-
* - Plain glob — `src/**\/*.ts`
|
|
37
|
-
* - Negated pattern — `!src/**\/*.spec.ts` inside `patterns` adds to the internal ignore list.
|
|
38
|
-
* - Negated ignore — a leading `!` inside {@link GlobOptions.ignore} _un-ignores_ entries that an earlier ignore pattern would drop, e.g. `ignore: ["dist/**", "!dist/index.d.ts"]`.
|
|
39
|
-
* @param patterns A single glob pattern or an array of glob patterns.
|
|
40
|
-
* @param options Optional glob options. See {@link GlobOptions}.
|
|
41
|
-
* @returns The array of matched paths. Paths are relative to {@link GlobOptions.cwd} unless {@link GlobOptions.absolute} is `true`.
|
|
42
|
-
* @example
|
|
43
|
-
* ```javascript
|
|
44
|
-
* import { globSync } from "@visulima/fs";
|
|
45
|
-
*
|
|
46
|
-
* const jsFiles = globSync(["src/**\/*.ts", "!**\/*.spec.ts"]);
|
|
47
|
-
* console.log(jsFiles);
|
|
48
|
-
*
|
|
49
|
-
* // Negated ignore: drop everything under `ignored/` except `ignored/keep.ts`.
|
|
50
|
-
* const keep = globSync("**\/*.ts", { ignore: ["ignored/**", "!ignored/keep.ts"] });
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
declare const globSync: (patterns: string | ReadonlyArray<string>, options?: GlobOptions) => string[];
|
|
54
|
-
export { globSync as a, glob as g };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as r}from"./index-CPZbuHkp.js";const s=(t,o)=>r(t,o);export{s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const b=/^(?:( )+|\t+)/,u="space";function d(n,t,e){return n&&t===u&&e===1}function h(n,t){const e=new Map;let o=0,r,c;for(const i of n.split(/\n/g)){if(!i)continue;const f=i.match(b);if(f===null)o=0,r="";else{const a=f[0].length,s=f[1]?u:"tab";if(d(t,s,a))continue;s!==r&&(o=0),r=s;let p=1,g=0;const m=a-o;if(o=a,m===0)p=0,g=1;else{const y=Math.abs(m);if(d(t,s,y))continue;c=w(s,y)}const l=e.get(c);e.set(c,l===void 0?[1,0]:[l[0]+p,l[1]+g])}}return e}function w(n,t){return(n===u?"s":"t")+String(t)}function E(n){const t=n[0]==="s"?u:"tab",e=Number(n.slice(1));return{type:t,amount:e}}function v(n){let t,e=0,o=0;for(const[r,[c,i]]of n)(c>e||c===e&&i>o)&&(e=c,o=i,t=r);return t}function x(n,t){return(n===u?" ":" ").repeat(t)}function M(n){if(typeof n!="string")throw new TypeError("Expected a string");let t=h(n,!0);t.size===0&&(t=h(n,!1));const e=v(t);let o,r=0,c="";return e!==void 0&&({type:o,amount:r}=E(e),c=x(o,r)),{amount:r,type:o,indent:c}}export{M as k};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
var o,c;function b(){if(c)return o;c=1;/*!
|
|
2
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
5
|
-
* Licensed under the MIT License.
|
|
6
|
-
*/return o=function(s){if(typeof s!="string"||s==="")return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(s);){if(e[2])return!0;s=s.slice(e.index+e[0].length)}return!1},o}var x,O;function q(){if(O)return x;O=1;/*!
|
|
7
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
10
|
-
* Released under the MIT License.
|
|
11
|
-
*/var s=b(),e={"{":"}","(":")","[":"]"},g=function(t){if(t[0]==="!")return!0;for(var r=0,u=-2,f=-2,a=-2,l=-2,n=-2;r<t.length;){if(t[r]==="*"||t[r+1]==="?"&&/[\].+)]/.test(t[r])||f!==-1&&t[r]==="["&&t[r+1]!=="]"&&(f<r&&(f=t.indexOf("]",r)),f>r&&(n===-1||n>f||(n=t.indexOf("\\",r),n===-1||n>f)))||a!==-1&&t[r]==="{"&&t[r+1]!=="}"&&(a=t.indexOf("}",r),a>r&&(n=t.indexOf("\\",r),n===-1||n>a))||l!==-1&&t[r]==="("&&t[r+1]==="?"&&/[:!=]/.test(t[r+2])&&t[r+3]!==")"&&(l=t.indexOf(")",r),l>r&&(n=t.indexOf("\\",r),n===-1||n>l))||u!==-1&&t[r]==="("&&t[r+1]!=="|"&&(u<r&&(u=t.indexOf("|",r)),u!==-1&&t[u+1]!==")"&&(l=t.indexOf(")",u),l>u&&(n=t.indexOf("\\",u),n===-1||n>l))))return!0;if(t[r]==="\\"){var h=t[r+1];r+=2;var v=e[h];if(v){var d=t.indexOf(v,r);d!==-1&&(r=d+1)}if(t[r]==="!")return!0}else r++}return!1},i=function(t){if(t[0]==="!")return!0;for(var r=0;r<t.length;){if(/[*?{}()[\]]/.test(t[r]))return!0;if(t[r]==="\\"){var u=t[r+1];r+=2;var f=e[u];if(f){var a=t.indexOf(f,r);a!==-1&&(r=a+1)}if(t[r]==="!")return!0}else r++}return!1};return x=function(t,r){if(typeof t!="string"||t==="")return!1;if(s(t))return!0;var u=g;return r&&r.strict===!1&&(u=i),u(t)},x}export{q as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as it}from"node:module";import{a as $}from"./index-LUKYN3u3.js";let ut;const lt=t=>(ut??=it(import.meta.url))(t),P=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,D=t=>{if(typeof P<"u"&&P.versions&&P.versions.node){const[e,s]=P.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return P.getBuiltinModule(t)}return lt(t)},B=D("fs"),ct={...B,default:B},{statSync:at,stat:ht,realpathSync:pt,realpath:ft,readdirSync:gt,readdir:dt}=D("fs"),{sep:G,basename:yt,dirname:A,resolve:N,normalize:mt,relative:bt,posix:S,isAbsolute:vt}=D("path"),{fileURLToPath:wt}=D("url"),{createRequire:St}=D("module");var C=St(import.meta.url);function $t(t){let e=mt(t);return e.length>1&&e[e.length-1]===G&&(e=e.substring(0,e.length-1)),e}const kt=/[\\/]/g;function U(t,e){return t.replace(kt,e)}const Pt=/^[a-z]:[\\/]$/i;function xt(t){return t==="/"||Pt.test(t)}function j(t,e){const{resolvePaths:s,normalizePath:r,pathSeparator:n}=e,i=process.platform==="win32"&&t.includes("/")||t.startsWith(".");if(s&&(t=N(t)),(r||i)&&(t=$t(t)),t===".")return"";const o=t[t.length-1]!==n;return U(o?t+n:t,n)}function Q(t,e){return e+t}function Dt(t,e){return function(s,r){return r.startsWith(t)?r.slice(t.length)+s:U(bt(t,r),e.pathSeparator)+e.pathSeparator+s}}function Ft(t){return t}function _t(t,e,s){return e+t+s}function qt(t,e){const{relativePaths:s,includeBasePath:r}=e;return s&&t?Dt(t,e):r?Q:Ft}function Et(t){return function(e,s){s.push(e.substring(t.length)||".")}}function jt(t){return function(e,s,r){const n=e.substring(t.length)||".";r.every(i=>i(n,!0))&&s.push(n)}}const Ot=(t,e)=>{e.push(t||".")},At=(t,e,s)=>{const r=t||".";s.every(n=>n(r,!0))&&e.push(r)},Rt=()=>{};function Wt(t,e){const{includeDirs:s,filters:r,relativePaths:n}=e;return s?n?r&&r.length?jt(t):Et(t):r&&r.length?At:Ot:Rt}const Bt=(t,e,s,r)=>{r.every(n=>n(t,!1))&&s.files++},Ct=(t,e,s,r)=>{r.every(n=>n(t,!1))&&e.push(t)},Mt=(t,e,s,r)=>{s.files++},Lt=(t,e)=>{e.push(t)},It=()=>{};function Tt(t){const{excludeFiles:e,filters:s,onlyCounts:r}=t;return e?It:s&&s.length?r?Bt:Ct:r?Mt:Lt}const zt=t=>t,Gt=()=>[""].slice(0,0);function Nt(t){return t.group?Gt:zt}const Ut=(t,e,s)=>{t.push({directory:e,files:s,dir:e})},Qt=()=>{};function Yt(t){return t.group?Ut:Qt}const Zt=function(t,e,s){const{queue:r,fs:n,options:{suppressErrors:i}}=e;r.enqueue(),n.realpath(t,(o,u)=>{if(o)return r.dequeue(i?null:o,e);n.stat(u,(g,f)=>{if(g)return r.dequeue(i?null:g,e);if(f.isDirectory()&&Y(t,u,e))return r.dequeue(null,e);s(f,u),r.dequeue(null,e)})})},Ht=function(t,e,s){const{queue:r,fs:n,options:{suppressErrors:i}}=e;r.enqueue();try{const o=n.realpathSync(t),u=n.statSync(o);if(u.isDirectory()&&Y(t,o,e))return;s(u,o)}catch(o){if(!i)throw o}};function Jt(t,e){return!t.resolveSymlinks||t.excludeSymlinks?null:e?Ht:Zt}function Y(t,e,s){if(s.options.useRealPaths)return Kt(e,s);let r=A(t),n=1;for(;r!==s.root&&n<2;){const i=s.symlinks.get(r);i&&(i===e||i.startsWith(e)||e.startsWith(i))?n++:r=A(r)}return s.symlinks.set(t,e),n>1}function Kt(t,e){return e.visited.includes(t+e.options.pathSeparator)}const Vt=t=>t.counts,Xt=t=>t.groups,te=t=>t.paths,ee=t=>t.paths.slice(0,t.options.maxFiles),se=(t,e,s)=>(F(e,s,t.counts,t.options.suppressErrors),null),re=(t,e,s)=>(F(e,s,t.paths,t.options.suppressErrors),null),ne=(t,e,s)=>(F(e,s,t.paths.slice(0,t.options.maxFiles),t.options.suppressErrors),null),oe=(t,e,s)=>(F(e,s,t.groups,t.options.suppressErrors),null);function F(t,e,s,r){e(t&&!r?t:null,s)}function ie(t,e){const{onlyCounts:s,group:r,maxFiles:n}=t;return s?e?Vt:se:r?e?Xt:oe:n?e?ee:ne:e?te:re}const Z={withFileTypes:!0},ue=(t,e,s,r,n)=>{if(t.queue.enqueue(),r<0)return t.queue.dequeue(null,t);const{fs:i}=t;t.visited.push(e),t.counts.directories++,i.readdir(e||".",Z,(o,u=[])=>{n(u,s,r),t.queue.dequeue(t.options.suppressErrors?null:o,t)})},le=(t,e,s,r,n)=>{const{fs:i}=t;if(r<0)return;t.visited.push(e),t.counts.directories++;let o=[];try{o=i.readdirSync(e||".",Z)}catch(u){if(!t.options.suppressErrors)throw u}n(o,s,r)};function ce(t){return t?le:ue}var ae=class{count=0;constructor(t){this.onQueueEmpty=t}enqueue(){return this.count++,this.count}dequeue(t,e){this.onQueueEmpty&&(--this.count<=0||t)&&(this.onQueueEmpty(t,e),t&&(e.controller.abort(),this.onQueueEmpty=void 0))}},he=class{_files=0;_directories=0;set files(t){this._files=t}get files(){return this._files}set directories(t){this._directories=t}get directories(){return this._directories}get dirs(){return this._directories}},pe=class{aborted=!1;abort(){this.aborted=!0}},H=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(t,e,s){this.isSynchronous=!s,this.callbackInvoker=ie(e,this.isSynchronous),this.root=j(t,e),this.state={root:xt(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new he,options:e,queue:new ae((r,n)=>this.callbackInvoker(n,r,s)),symlinks:new Map,visited:[""].slice(0,0),controller:new pe,fs:e.fs||ct},this.joinPath=qt(this.root,e),this.pushDirectory=Wt(this.root,e),this.pushFile=Tt(e),this.getArray=Nt(e),this.groupFiles=Yt(e),this.resolveSymlink=Jt(e,this.isSynchronous),this.walkDirectory=ce(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(t,e,s)=>{const{paths:r,options:{filters:n,resolveSymlinks:i,excludeSymlinks:o,exclude:u,maxFiles:g,signal:f,useRealPaths:y,pathSeparator:h},controller:m}=this.state;if(m.aborted||f&&f.aborted||g&&r.length>g)return;const l=this.getArray(this.state.paths);for(let p=0;p<t.length;++p){const a=t[p];if(a.isFile()||a.isSymbolicLink()&&!i&&!o){const c=this.joinPath(a.name,e);this.pushFile(c,l,this.state.counts,n)}else if(a.isDirectory()){let c=_t(a.name,e,this.state.options.pathSeparator);if(u&&u(a.name,c))continue;this.pushDirectory(c,r,n),this.walkDirectory(this.state,c,c,s-1,this.walk)}else if(this.resolveSymlink&&a.isSymbolicLink()){let c=Q(a.name,e);this.resolveSymlink(c,this.state,(_,d)=>{if(_.isDirectory()){if(d=j(d,this.state.options),u&&u(a.name,y?d:c+h))return;this.walkDirectory(this.state,d,y?d:c+h,s-1,this.walk)}else{d=y?d:c;const k=yt(d),q=j(A(d),this.state.options);d=this.joinPath(k,q),this.pushFile(d,l,this.state.counts,n)}})}}this.groupFiles(this.state.groups,e,l)}};function fe(t,e){return new Promise((s,r)=>{J(t,e,(n,i)=>{if(n)return r(n);s(i)})})}function J(t,e,s){new H(t,e,s).start()}function ge(t,e){return new H(t,e).start()}var M=class{constructor(e,s){this.root=e,this.options=s}withPromise(){return fe(this.root,this.options)}withCallback(e){J(this.root,this.options,e)}sync(){return ge(this.root,this.options)}};let K=null;try{C.resolve("picomatch"),K=C("picomatch")}catch{}var de=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:G,filters:[]};globFunction;constructor(t){this.options={...this.options,...t},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(t){return this.options.pathSeparator=t,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(t){return this.options.maxDepth=t,this}withMaxFiles(t){return this.options.maxFiles=t,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:t=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=t,this.withFullPaths()}withAbortSignal(t){return this.options.signal=t,this}normalize(){return this.options.normalizePath=!0,this}filter(t){return this.options.filters.push(t),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(t){return this.options.exclude=t,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(t){return new M(t||".",this.options)}withGlobFunction(t){return this.globFunction=t,this}crawlWithOptions(t,e){return this.options={...this.options,...e},new M(t||".",this.options)}glob(...t){return this.globFunction?this.globWithOptions(t):this.globWithOptions(t,{dot:!0})}globWithOptions(t,...e){const s=this.globFunction||K;if(!s)throw new Error("Please specify a glob function to use glob matching.");var r=this.globCache[t.join("\0")];return r||(r=s(t,...e),this.globCache[t.join("\0")]=r),this.options.filters.push(n=>r(n)),this}};const ye=Array.isArray,V=/\\/g,me=/^[A-Za-z]:$/,X=process.platform==="win32",be=/^(\/?\.\.)+$/;function L(t,e={}){const s=t.length,r=Array(s),n=Array(s);let i,o;for(i=0;i<s;i++){const u=tt(t[i]);r[i]=u;const g=u.length,f=Array(g);for(o=0;o<g;o++)f[o]=$(u[o],e);n[i]=f}return u=>{const g=u.split("/");if(g[0]===".."&&be.test(u))return!0;for(i=0;i<s;i++){const f=r[i],y=n[i],h=g.length,m=Math.min(h,f.length);for(o=0;o<m;){const l=f[o];if(l.includes("/"))return!0;if(!y[o](g[o]))break;if(!e.noglobstar&&l==="**")return!0;o++}if(o===h)return!0}return!1}}const ve=/^[A-Z]:\/$/i,we=X?t=>ve.test(t):t=>t==="/";function I(t,e,s){if(t===e||e.startsWith(`${t}/`)){if(s){const n=t.length+ +!we(t);return(i,o)=>i.slice(n,o?-1:void 0)||"."}const r=e.slice(t.length+1);return r?(n,i)=>{if(n===".")return r;const o=`${r}/${n}`;return i?o.slice(0,-1):o}:(n,i)=>i&&n!=="."?n.slice(0,-1):n}return s?r=>S.relative(t,r)||".":r=>S.relative(t,`${e}/${r}`)||"."}function Se(t,e){if(e.startsWith(`${t}/`)){const s=e.slice(t.length+1);return r=>`${s}/${r}`}return s=>{const r=S.relative(t,`${e}/${s}`);return s[s.length-1]==="/"&&r!==""?`${r}/`:r||"."}}function T(t){return t.replace(me,e=>`${e}/`)}const $e={parts:!0};function tt(t){var e;const s=$.scan(t,$e);return!((e=s.parts)===null||e===void 0)&&e.length?s.parts:[t]}const ke=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,Pe=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,xe=t=>t.replace(ke,"\\$&"),De=t=>t.replace(Pe,"\\$&"),Fe=X?De:xe;function _e(t,e){const s=$.scan(t);return s.isGlob||s.negated}function x(...t){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...t)}function et(t){return typeof t=="string"?[t]:t??[]}const qe=/^(\/?\.\.)+/,Ee=/\\(?=[()[\]{}!*+?@|])/g;function O(t,e,s,r){var n;const i=e.cwd;let o=t;t[t.length-1]==="/"&&(o=t.slice(0,-1));const u=o.lastIndexOf("/"),g=(u===-1?o:o.slice(u+1)).startsWith("!(");o[o.length-1]!=="*"&&!g&&e.expandDirectories&&(o+="/**");const f=Fe(i);o=vt(o.replace(Ee,""))?S.relative(f,o):S.normalize(o);const y=(n=qe.exec(o))===null||n===void 0?void 0:n[0],h=tt(o);if(y){const l=(y.length+1)/3;let p=0;const a=f.split("/");for(;p<l&&h[p+l]===a[a.length+p-l];)o=o.slice(0,(l-p-1)*3)+o.slice((l-p)*3+h[p+l].length+1)||".",p++;const c=S.join(i,y.slice(p*3));c[0]!=="."&&s.root.length>c.length&&(s.root=T(c),s.depthOffset=-l+p)}if(!r&&s.depthOffset>=0){var m;(m=s.commonPath)!==null&&m!==void 0||(s.commonPath=h);const l=[],p=Math.min(s.commonPath.length,h.length);for(let a=0;a<p;a++){const c=h[a];if(c==="**"&&!h[a+1]){l.pop();break}if(a===h.length-1||c!==s.commonPath[a]||_e(c))break;l.push(c)}s.depthOffset=l.length,s.commonPath=l,s.root=T(l.length>0?S.join(i,...l):i)}return o}function je(t,e,s){const r=[],n=[],i=[];for(const o of t.ignore)o&&(o[0]!=="!"||o[1]==="("?n.push(O(o,t,s,!0)):i.push(o.slice(1)));for(const o of e)o&&(o[0]!=="!"||o[1]==="("?r.push(O(o,t,s,!1)):(o[1]!=="!"||o[2]==="(")&&n.push(O(o.slice(1),t,s,!0)));return{match:r,ignore:n,unignore:i}}function Oe(t,e){const s=t.cwd,r={root:s,depthOffset:0},n=je(t,e,r);t.debug&&x("internal processing patterns:",n);const{absolute:i,caseSensitiveMatch:o,debug:u,dot:g,followSymbolicLinks:f,onlyDirectories:y}=t,h=r.root.replace(V,""),m={dot:g,nobrace:t.braceExpansion===!1,nocase:!o,noextglob:t.extglob===!1,noglobstar:t.globstar===!1,posix:!0},l=n.unignore.length>0,p=l?$(n.unignore,m):void 0,a=l?L(n.unignore,m):void 0,c=$(n.match,{...m,ignore:n.ignore,onIgnore:p?v=>p(v.output)&&$.constants.UNIGNORE:void 0}),_=$(n.ignore,m),d=L(n.match,m),k=I(s,h,i),q=i?k:I(s,h,!0),nt=n.match.length>0&&n.match.every(v=>v==="**"||v==="**/*"),E=n.ignore.length>0||l||!nt?(v,w)=>{const b=q(w,!0);return b==="."||a&&a(b)?!1:!d(b)||_(b)}:void 0;let R;t.deep!==void 0&&(R=Math.round(t.deep-r.depthOffset));const ot=new de({filters:[u?(v,w)=>{const b=k(v,w),W=c(b);return W&&x(`matched ${b}`),W}:(v,w)=>{const b=k(v,w);return c(b)}],exclude:u&&E?(v,w)=>{const b=E(v,w);return x(`${b?"skipped":"crawling"} ${w}`),b}:E,fs:t.fs,pathSeparator:"/",relativePaths:!i,resolvePaths:i,includeBasePath:i,resolveSymlinks:f,excludeSymlinks:!f,excludeFiles:y,includeDirs:y||!t.onlyFiles,maxDepth:R,signal:t.signal}).crawl(h);return t.debug&&x("internal properties:",{...r,root:h}),[ot,s!==h&&!i&&Se(s,h)]}function st(t,e){if(e)for(let s=t.length-1;s>=0;s--)t[s]=e(t[s]);return t}const z={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function Ae(t){const e=Object.assign({},t);for(const s in z)e[s]===void 0&&Object.assign(e,{[s]:z[s]});return e.cwd=(e.cwd instanceof URL?wt(e.cwd):N(e.cwd||process.cwd())).replace(V,"/"),e.ignore=et(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||dt,readdirSync:e.fs.readdirSync||gt,realpath:e.fs.realpath||ft,realpathSync:e.fs.realpathSync||pt,stat:e.fs.stat||ht,statSync:e.fs.statSync||at}),e.debug&&x("globbing with options:",e),e}function rt(t,e={}){var s;if(t&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");const r=ye(t)||typeof t=="string",n=et((s=r?t:t.patterns)!==null&&s!==void 0?s:"**/*"),i=Ae(r?e:t);return n.length>0?Oe(i,n):[]}async function Ce(t,e){const[s,r]=rt(t,e);return s?st(await s.withPromise(),r):[]}function Me(t,e){const[s,r]=rt(t,e);return s?st(s.sync(),r):[]}export{Me as E,Ce as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as kt}from"./_commonjsHelpers-CWAkuNXM.js";var Et={},bt,$t;function ht(){if($t)return bt;$t=1;const S="[^\\\\/]",d=Symbol("unignore"),H="\\.",q="\\+",F="\\?",i="\\/",s="(?=.)",l="[^/]",f=`(?:${i}|$)`,T=`(?:^|${i})`,C=`${H}{1,2}${f}`,U=`(?!${H})`,D=`(?!${T}${C})`,L=`(?!${H}{0,1}${f})`,K=`(?!${C})`,lt=`[^.${i}]`,j=`${l}*?`,z="/",J={DOT_LITERAL:H,PLUS_LITERAL:q,QMARK_LITERAL:F,SLASH_LITERAL:i,ONE_CHAR:s,QMARK:l,END_ANCHOR:f,DOTS_SLASH:C,NO_DOT:U,NO_DOTS:D,NO_DOT_SLASH:L,NO_DOTS_SLASH:K,QMARK_NO_DOT:lt,STAR:j,START_ANCHOR:T,SEP:z},r={...J,SLASH_LITERAL:"[\\\\/]",QMARK:S,STAR:`${S}*?`,DOTS_SLASH:`${H}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${H})`,NO_DOTS:`(?!(?:^|[\\\\/])${H}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${H}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${H}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},c={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return bt={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:c,UNIGNORE:d,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?r:J}},bt}var dt;function gt(){return dt||(dt=1,(function(S){const{REGEX_BACKSLASH:d,REGEX_REMOVE_BACKSLASH:H,REGEX_SPECIAL_CHARS:q,REGEX_SPECIAL_CHARS_GLOBAL:F}=ht();S.isObject=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),S.hasRegexChars=i=>q.test(i),S.isRegexChar=i=>i.length===1&&S.hasRegexChars(i),S.escapeRegex=i=>i.replace(F,"\\$1"),S.toPosixSlashes=i=>i.replace(d,"/"),S.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const i=navigator.platform.toLowerCase();return i==="win32"||i==="windows"}return process.platform?process.platform==="win32":!1},S.removeBackslashes=i=>i.replace(H,s=>s==="\\"?"":s),S.escapeLast=(i,s,l)=>{const f=i.lastIndexOf(s,l);return f===-1?i:i[f-1]==="\\"?S.escapeLast(i,s,f-1):`${i.slice(0,f)}\\${i.slice(f)}`},S.removePrefix=(i,s={})=>{let l=i;return l.startsWith("./")&&(l=l.slice(2),s.prefix="./"),l},S.wrapOutput=(i,s={},l={})=>{const f=l.contains?"":"^",T=l.contains?"":"$";let C=`${f}(?:${i})${T}`;return s.negated===!0&&(C=`(?:^(?!${C}).*$)`),C},S.basename=(i,{windows:s}={})=>{const l=i.split(s?/[\\/]/:"/"),f=l[l.length-1];return f===""?l[l.length-2]:f}})(Et)),Et}var yt,vt;function Nt(){if(vt)return yt;vt=1;const S=gt(),{CHAR_ASTERISK:d,CHAR_AT:H,CHAR_BACKWARD_SLASH:q,CHAR_COMMA:F,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:s,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:f,CHAR_LEFT_PARENTHESES:T,CHAR_LEFT_SQUARE_BRACKET:C,CHAR_PLUS:U,CHAR_QUESTION_MARK:D,CHAR_RIGHT_CURLY_BRACE:L,CHAR_RIGHT_PARENTHESES:K,CHAR_RIGHT_SQUARE_BRACKET:lt}=ht(),j=r=>r===l||r===q,z=r=>{r.isPrefix!==!0&&(r.depth=r.isGlobstar?1/0:1)};return yt=(r,c)=>{const t=c||{},b=r.length-1,h=t.parts===!0||t.scanToEnd===!0,A=[],p=[],R=[];let G=r,M=-1,w=0,et=0,Q=!1,ut=!1,m=!1,st=!1,ft=!1,nt=!1,v=!1,rt=!1,Rt=!1,W=!1,X=0,V,_,y={value:"",depth:0,isGlob:!1};const n=()=>M>=b,Z=()=>G.charCodeAt(M+1),B=()=>(V=_,G.charCodeAt(++M));for(;M<b;){_=B();let x;if(_===q){v=y.backslashes=!0,_=B(),_===f&&(nt=!0);continue}if(nt===!0||_===f){for(X++;n()!==!0&&(_=B());){if(_===q){v=y.backslashes=!0,B();continue}if(_===f){X++;continue}if(nt!==!0&&_===i&&(_=B())===i){if(Q=y.isBrace=!0,m=y.isGlob=!0,W=!0,h===!0)continue;break}if(nt!==!0&&_===F){if(Q=y.isBrace=!0,m=y.isGlob=!0,W=!0,h===!0)continue;break}if(_===L&&(X--,X===0)){nt=!1,Q=y.isBrace=!0,W=!0;break}}if(h===!0)continue;break}if(_===l){if(A.push(M),p.push(y),y={value:"",depth:0,isGlob:!1},W===!0)continue;if(V===i&&M===w+1){w+=2;continue}et=M+1;continue}if(t.noext!==!0&&(_===U||_===H||_===d||_===D||_===s)&&Z()===T){if(m=y.isGlob=!0,st=y.isExtglob=!0,W=!0,_===s&&M===w&&(Rt=!0),h===!0){for(;n()!==!0&&(_=B());){if(_===q){v=y.backslashes=!0,_=B();continue}if(_===K){m=y.isGlob=!0,W=!0;break}}continue}break}if(_===d){if(V===d&&(ft=y.isGlobstar=!0),m=y.isGlob=!0,W=!0,h===!0)continue;break}if(_===D){if(m=y.isGlob=!0,W=!0,h===!0)continue;break}if(_===C){for(;n()!==!0&&(x=B());){if(x===q){v=y.backslashes=!0,B();continue}if(x===lt){ut=y.isBracket=!0,m=y.isGlob=!0,W=!0;break}}if(h===!0)continue;break}if(t.nonegate!==!0&&_===s&&M===w){rt=y.negated=!0,w++;continue}if(t.noparen!==!0&&_===T){if(m=y.isGlob=!0,h===!0){for(;n()!==!0&&(_=B());){if(_===T){v=y.backslashes=!0,_=B();continue}if(_===K){W=!0;break}}continue}break}if(m===!0){if(W=!0,h===!0)continue;break}}t.noext===!0&&(st=!1,m=!1);let I=G,e="",u="";w>0&&(e=G.slice(0,w),G=G.slice(w),et-=w),I&&m===!0&&et>0?(I=G.slice(0,et),u=G.slice(et)):m===!0?(I="",u=G):I=G,I&&I!==""&&I!=="/"&&I!==G&&j(I.charCodeAt(I.length-1))&&(I=I.slice(0,-1)),t.unescape===!0&&(u&&(u=S.removeBackslashes(u)),I&&v===!0&&(I=S.removeBackslashes(I)));const tt={prefix:e,input:r,start:w,base:I,glob:u,isBrace:Q,isBracket:ut,isGlob:m,isExtglob:st,isGlobstar:ft,negated:rt,negatedExtglob:Rt};if(t.tokens===!0&&(tt.maxDepth=0,j(_)||p.push(y),tt.tokens=p),t.parts===!0||t.tokens===!0){let x;for(let k=0;k<A.length;k++){const it=x?x+1:w,Y=A[k],pt=r.slice(it,Y);t.tokens&&(k===0&&w!==0?(p[k].isPrefix=!0,p[k].value=e):p[k].value=pt,z(p[k]),tt.maxDepth+=p[k].depth),(k!==0||pt!=="")&&R.push(pt),x=Y}if(x&&x+1<r.length){const k=r.slice(x+1);R.push(k),t.tokens&&(p[p.length-1].value=k,z(p[p.length-1]),tt.maxDepth+=p[p.length-1].depth)}tt.slashes=A,tt.parts=R}return tt},yt}var Ct,Ht;function It(){if(Ht)return Ct;Ht=1;const S=ht(),d=gt(),{MAX_LENGTH:H,POSIX_REGEX_SOURCE:q,REGEX_NON_SPECIAL_CHARS:F,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:s}=S,l=(r,c)=>typeof c.expandRange=="function"?c.expandRange(...r,c):(r.sort(),`[${r.join("-")}]`),f=(r,c)=>`Missing ${r}: "${c}" - use "\\\\${c}" to match literal characters`,T=r=>{const c=[];let t=0,b=0,h=0,A="",p=!1;for(const R of r){if(p===!0){A+=R,p=!1;continue}if(R==="\\"){A+=R,p=!0;continue}if(R==='"'){h=h===1?0:1,A+=R;continue}if(h===0){if(R==="[")t++;else if(R==="]"&&t>0)t--;else if(t===0){if(R==="(")b++;else if(R===")"&&b>0)b--;else if(R==="|"&&b===0){c.push(A),A="";continue}}}A+=R}return c.push(A),c},C=r=>{let c=!1;for(const t of r){if(c===!0){c=!1;continue}if(t==="\\"){c=!0;continue}if(/[?*+@!()[\]{}]/.test(t))return!1}return!0},U=r=>{let c=r.trim(),t=!0;for(;t===!0;)t=!1,/^@\([^\\()[\]{}|]+\)$/.test(c)&&(c=c.slice(2,-1),t=!0);if(C(c))return c.replace(/\\(.)/g,"$1")},D=r=>{const c=r.map(U).filter(Boolean);for(let t=0;t<c.length;t++)for(let b=t+1;b<c.length;b++){const h=c[t],A=c[b],p=h[0];if(!(!p||h!==p.repeat(h.length)||A!==p.repeat(A.length))&&(h===A||h.startsWith(A)||A.startsWith(h)))return!0}return!1},L=(r,c=!0)=>{if(r[0]!=="+"&&r[0]!=="*"||r[1]!=="(")return;let t=0,b=0,h=0,A=!1;for(let p=1;p<r.length;p++){const R=r[p];if(A===!0){A=!1;continue}if(R==="\\"){A=!0;continue}if(R==='"'){h=h===1?0:1;continue}if(h!==1){if(R==="["){t++;continue}if(R==="]"&&t>0){t--;continue}if(!(t>0)){if(R==="("){b++;continue}if(R===")"&&(b--,b===0))return c===!0&&p!==r.length-1?void 0:{type:r[0],body:r.slice(2,p),end:p}}}}},K=r=>`${r.length===1?d.escapeRegex(r[0]):`[${r.map(c=>d.escapeRegex(c)).join("")}]`}*`,lt=r=>{let c=0;const t=[];for(;c<r.length;){const b=L(r.slice(c),!1);if(!b||b.type!=="*")return;const h=T(b.body).map(p=>p.trim());if(h.length!==1)return;const A=U(h[0]);if(!A||A.length!==1)return;t.push(A),c+=b.end+1}if(!(t.length<1))return t},j=r=>{let c=0,t=r.trim(),b=L(t);for(;b;)c++,t=b.body.trim(),b=L(t);return c},z=(r,c)=>{if(c.maxExtglobRecursion===!1)return{risky:!1};const t=typeof c.maxExtglobRecursion=="number"?c.maxExtglobRecursion:S.DEFAULT_MAX_EXTGLOB_RECURSION,b=T(r).map(R=>R.trim());if(b.length>1&&(b.some(R=>R==="")||b.some(R=>/^[*?]+$/.test(R))||D(b)))return{risky:!0};const h=[];let A=!1,p=!0;for(const R of b){const G=lt(R);if(G){A=!0,h.push(...G);continue}const M=U(R);if(M&&M.length===1){h.push(M);continue}if(p=!1,j(R)>t)return{risky:!0}}return A?p?{risky:!0,safeOutput:K([...new Set(h)])}:{risky:!0}:{risky:!1}},J=(r,c)=>{if(typeof r!="string")throw new TypeError("Expected a string");r=s[r]||r;const t={...c},b=typeof t.maxLength=="number"?Math.min(H,t.maxLength):H;let h=r.length;if(h>b)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${b}`);const A={type:"bos",value:"",output:t.prepend||""},p=[A],R=t.capture?"":"?:",G=S.globChars(t.windows),M=S.extglobChars(G),{DOT_LITERAL:w,PLUS_LITERAL:et,SLASH_LITERAL:Q,ONE_CHAR:ut,DOTS_SLASH:m,NO_DOT:st,NO_DOT_SLASH:ft,NO_DOTS_SLASH:nt,QMARK:v,QMARK_NO_DOT:rt,STAR:Rt,START_ANCHOR:W}=G,X=a=>`(${R}(?:(?!${W}${a.dot?m:w}).)*?)`,V=t.dot?"":st,_=t.dot?v:rt;let y=t.bash===!0?X(t):Rt;t.capture&&(y=`(${y})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);const n={input:r,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:p};r=d.removePrefix(r,n),h=r.length;const Z=[],B=[],I=[];let e=A,u;const tt=()=>n.index===h-1,x=n.peek=(a=1)=>r[n.index+a],k=n.advance=()=>r[++n.index]||"",it=()=>r.slice(n.index+1),Y=(a="",O=0)=>{n.consumed+=a,n.index+=O},pt=a=>{n.output+=a.output!=null?a.output:a.value,Y(a.value)},Lt=()=>{let a=1;for(;x()==="!"&&(x(2)!=="("||x(3)==="?");)k(),n.start++,a++;return a%2===0?!1:(n.negated=!0,n.start++,!0)},At=a=>{n[a]++,I.push(a)},ct=a=>{n[a]--,I.pop()},g=a=>{if(e.type==="globstar"){const O=n.braces>0&&(a.type==="comma"||a.type==="brace"),o=a.extglob===!0||Z.length&&(a.type==="pipe"||a.type==="paren");a.type!=="slash"&&a.type!=="paren"&&!O&&!o&&(n.output=n.output.slice(0,-e.output.length),e.type="star",e.value="*",e.output=y,n.output+=e.output)}if(Z.length&&a.type!=="paren"&&(Z[Z.length-1].inner+=a.value),(a.value||a.output)&&pt(a),e&&e.type==="text"&&a.type==="text"){e.output=(e.output||e.value)+a.value,e.value+=a.value;return}a.prev=e,p.push(a),e=a},_t=(a,O)=>{const o={...M[O],conditions:1,inner:""};o.prev=e,o.parens=n.parens,o.output=n.output,o.startIndex=n.index,o.tokensIndex=p.length;const E=(t.capture?"(":"")+o.open;At("parens"),g({type:a,value:O,output:n.output?"":ut}),g({type:"paren",extglob:!0,value:k(),output:E}),Z.push(o)},mt=a=>{const O=r.slice(a.startIndex,n.index+1),o=r.slice(a.startIndex+2,n.index),E=z(o,t);if((a.type==="plus"||a.type==="star")&&E.risky){const $=E.safeOutput?(a.output?"":ut)+(t.capture?`(${E.safeOutput})`:E.safeOutput):void 0,ot=p[a.tokensIndex];ot.type="text",ot.value=O,ot.output=$||d.escapeRegex(O);for(let at=a.tokensIndex+1;at<p.length;at++)p[at].value="",p[at].output="",delete p[at].suffix;n.output=a.output+ot.output,n.backtrack=!0,g({type:"paren",extglob:!0,value:u,output:""}),ct("parens");return}let N=a.close+(t.capture?")":""),P;if(a.type==="negate"){let $=y;if(a.inner&&a.inner.length>1&&a.inner.includes("/")&&($=X(t)),($!==y||tt()||/^\)+$/.test(it()))&&(N=a.close=`)$))${$}`),a.inner.includes("*")&&(P=it())&&/^\.[^\\/.]+$/.test(P)){const ot=J(P,{...c,fastpaths:!1}).output;N=a.close=`)${ot})${$})`}a.prev.type==="bos"&&(n.negatedExtglob=!0)}g({type:"paren",extglob:!0,value:u,output:N}),ct("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(r)){let a=!1,O=r.replace(i,(o,E,N,P,$,ot)=>P==="\\"?(a=!0,o):P==="?"?E?E+P+($?v.repeat($.length):""):ot===0?_+($?v.repeat($.length):""):v.repeat(N.length):P==="."?w.repeat(N.length):P==="*"?E?E+P+($?y:""):y:E?o:`\\${o}`);return a===!0&&(t.unescape===!0?O=O.replace(/\\/g,""):O=O.replace(/\\+/g,o=>o.length%2===0?"\\\\":o?"\\":"")),O===r&&t.contains===!0?(n.output=r,n):(n.output=d.wrapOutput(O,n,c),n)}for(;!tt();){if(u=k(),u==="\0")continue;if(u==="\\"){const o=x();if(o==="/"&&t.bash!==!0||o==="."||o===";")continue;if(!o){u+="\\",g({type:"text",value:u});continue}const E=/^\\+/.exec(it());let N=0;if(E&&E[0].length>2&&(N=E[0].length,n.index+=N,N%2!==0&&(u+="\\")),t.unescape===!0?u=k():u+=k(),n.brackets===0){g({type:"text",value:u});continue}}if(n.brackets>0&&(u!=="]"||e.value==="["||e.value==="[^")){if(t.posix!==!1&&u===":"){const o=e.value.slice(1);if(o.includes("[")&&(e.posix=!0,o.includes(":"))){const E=e.value.lastIndexOf("["),N=e.value.slice(0,E),P=e.value.slice(E+2),$=q[P];if($){e.value=N+$,n.backtrack=!0,k(),!A.output&&p.indexOf(e)===1&&(A.output=ut);continue}}}(u==="["&&x()!==":"||u==="-"&&x()==="]")&&(u=`\\${u}`),u==="]"&&(e.value==="["||e.value==="[^")&&(u=`\\${u}`),t.posix===!0&&u==="!"&&e.value==="["&&(u="^"),e.value+=u,pt({value:u});continue}if(n.quotes===1&&u!=='"'){u=d.escapeRegex(u),e.value+=u,pt({value:u});continue}if(u==='"'){n.quotes=n.quotes===1?0:1,t.keepQuotes===!0&&g({type:"text",value:u});continue}if(u==="("){At("parens"),g({type:"paren",value:u});continue}if(u===")"){if(n.parens===0&&t.strictBrackets===!0)throw new SyntaxError(f("opening","("));const o=Z[Z.length-1];if(o&&n.parens===o.parens+1){mt(Z.pop());continue}g({type:"paren",value:u,output:n.parens?")":"\\)"}),ct("parens");continue}if(u==="["){if(t.nobracket===!0||!it().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(f("closing","]"));u=`\\${u}`}else At("brackets");g({type:"bracket",value:u});continue}if(u==="]"){if(t.nobracket===!0||e&&e.type==="bracket"&&e.value.length===1){g({type:"text",value:u,output:`\\${u}`});continue}if(n.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(f("opening","["));g({type:"text",value:u,output:`\\${u}`});continue}ct("brackets");const o=e.value.slice(1);if(e.posix!==!0&&o[0]==="^"&&!o.includes("/")&&(u=`/${u}`),e.value+=u,pt({value:u}),t.literalBrackets===!1||d.hasRegexChars(o))continue;const E=d.escapeRegex(e.value);if(n.output=n.output.slice(0,-e.value.length),t.literalBrackets===!0){n.output+=E,e.value=E;continue}e.value=`(${R}${E}|${e.value})`,n.output+=e.value;continue}if(u==="{"&&t.nobrace!==!0){At("braces");const o={type:"brace",value:u,output:"(",outputIndex:n.output.length,tokensIndex:n.tokens.length};B.push(o),g(o);continue}if(u==="}"){const o=B[B.length-1];if(t.nobrace===!0||!o){g({type:"text",value:u,output:u});continue}let E=")";if(o.dots===!0){const N=p.slice(),P=[];for(let $=N.length-1;$>=0&&(p.pop(),N[$].type!=="brace");$--)N[$].type!=="dots"&&P.unshift(N[$].value);E=l(P,t),n.backtrack=!0}if(o.comma!==!0&&o.dots!==!0){const N=n.output.slice(0,o.outputIndex),P=n.tokens.slice(o.tokensIndex);o.value=o.output="\\{",u=E="\\}",n.output=N;for(const $ of P)n.output+=$.output||$.value}g({type:"brace",value:u,output:E}),ct("braces"),B.pop();continue}if(u==="|"){Z.length>0&&Z[Z.length-1].conditions++,g({type:"text",value:u});continue}if(u===","){let o=u;const E=B[B.length-1];E&&I[I.length-1]==="braces"&&(E.comma=!0,o="|"),g({type:"comma",value:u,output:o});continue}if(u==="/"){if(e.type==="dot"&&n.index===n.start+1){n.start=n.index+1,n.consumed="",n.output="",p.pop(),e=A;continue}g({type:"slash",value:u,output:Q});continue}if(u==="."){if(n.braces>0&&e.type==="dot"){e.value==="."&&(e.output=w);const o=B[B.length-1];e.type="dots",e.output+=u,e.value+=u,o.dots=!0;continue}if(n.braces+n.parens===0&&e.type!=="bos"&&e.type!=="slash"){g({type:"text",value:u,output:w});continue}g({type:"dot",value:u,output:w});continue}if(u==="?"){if(!(e&&e.value==="(")&&t.noextglob!==!0&&x()==="("&&x(2)!=="?"){_t("qmark",u);continue}if(e&&e.type==="paren"){const o=x();let E=u;(e.value==="("&&!/[!=<:]/.test(o)||o==="<"&&!/<([!=]|\w+>)/.test(it()))&&(E=`\\${u}`),g({type:"text",value:u,output:E});continue}if(t.dot!==!0&&(e.type==="slash"||e.type==="bos")){g({type:"qmark",value:u,output:rt});continue}g({type:"qmark",value:u,output:v});continue}if(u==="!"){if(t.noextglob!==!0&&x()==="("&&(x(2)!=="?"||!/[!=<:]/.test(x(3)))){_t("negate",u);continue}if(t.nonegate!==!0&&n.index===0){Lt();continue}}if(u==="+"){if(t.noextglob!==!0&&x()==="("&&x(2)!=="?"){_t("plus",u);continue}if(e&&e.value==="("||t.regex===!1){g({type:"plus",value:u,output:et});continue}if(e&&(e.type==="bracket"||e.type==="paren"||e.type==="brace")||n.parens>0){g({type:"plus",value:u});continue}g({type:"plus",value:et});continue}if(u==="@"){if(t.noextglob!==!0&&x()==="("&&x(2)!=="?"){g({type:"at",extglob:!0,value:u,output:""});continue}g({type:"text",value:u});continue}if(u!=="*"){(u==="$"||u==="^")&&(u=`\\${u}`);const o=F.exec(it());o&&(u+=o[0],n.index+=o[0].length),g({type:"text",value:u});continue}if(e&&(e.type==="globstar"||e.star===!0)){e.type="star",e.star=!0,e.value+=u,e.output=y,n.backtrack=!0,n.globstar=!0,Y(u);continue}let a=it();if(t.noextglob!==!0&&/^\([^?]/.test(a)){_t("star",u);continue}if(e.type==="star"){if(t.noglobstar===!0){Y(u);continue}const o=e.prev,E=o.prev,N=o.type==="slash"||o.type==="bos",P=E&&(E.type==="star"||E.type==="globstar");if(t.bash===!0&&(!N||a[0]&&a[0]!=="/")){g({type:"star",value:u,output:""});continue}const $=n.braces>0&&(o.type==="comma"||o.type==="brace"),ot=Z.length&&(o.type==="pipe"||o.type==="paren");if(!N&&o.type!=="paren"&&!$&&!ot){g({type:"star",value:u,output:""});continue}for(;a.slice(0,3)==="/**";){const at=r[n.index+4];if(at&&at!=="/")break;a=a.slice(3),Y("/**",3)}if(o.type==="bos"&&tt()){e.type="globstar",e.value+=u,e.output=X(t),n.output=e.output,n.globstar=!0,Y(u);continue}if(o.type==="slash"&&o.prev.type!=="bos"&&!P&&tt()){n.output=n.output.slice(0,-(o.output+e.output).length),o.output=`(?:${o.output}`,e.type="globstar",e.output=X(t)+(t.strictSlashes?")":"|$)"),e.value+=u,n.globstar=!0,n.output+=o.output+e.output,Y(u);continue}if(o.type==="slash"&&o.prev.type!=="bos"&&a[0]==="/"){const at=a[1]!==void 0?"|$":"";n.output=n.output.slice(0,-(o.output+e.output).length),o.output=`(?:${o.output}`,e.type="globstar",e.output=`${X(t)}${Q}|${Q}${at})`,e.value+=u,n.output+=o.output+e.output,n.globstar=!0,Y(u+k()),g({type:"slash",value:"/",output:""});continue}if(o.type==="bos"&&a[0]==="/"){e.type="globstar",e.value+=u,e.output=`(?:^|${Q}|${X(t)}${Q})`,n.output=e.output,n.globstar=!0,Y(u+k()),g({type:"slash",value:"/",output:""});continue}if($&&a[0]==="/"){e.type="globstar",e.value+=u,e.output=`(?:^|${Q}|${X(t)}${Q})`,n.output+=e.output,n.globstar=!0,Y(u+k()),g({type:"slash",value:"/",output:""});continue}n.output=n.output.slice(0,-e.output.length),e.type="globstar",e.output=X(t),e.value+=u,n.output+=e.output,n.globstar=!0,Y(u);continue}const O={type:"star",value:u,output:y};if(t.bash===!0){O.output=".*?",(e.type==="bos"||e.type==="slash")&&(O.output=V+O.output),g(O);continue}if(e&&(e.type==="bracket"||e.type==="paren")&&t.regex===!0){O.output=u,g(O);continue}(n.index===n.start||e.type==="slash"||e.type==="dot")&&(e.type==="dot"?(n.output+=ft,e.output+=ft):t.dot===!0?(n.output+=nt,e.output+=nt):(n.output+=V,e.output+=V),x()!=="*"&&(n.output+=ut,e.output+=ut)),g(O)}for(;n.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(f("closing","]"));n.output=d.escapeLast(n.output,"["),ct("brackets")}for(;n.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(f("closing",")"));n.output=d.escapeLast(n.output,"("),ct("parens")}for(;n.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(f("closing","}"));n.output=d.escapeLast(n.output,"{"),ct("braces")}if(t.strictSlashes!==!0&&(e.type==="star"||e.type==="bracket")&&g({type:"maybe_slash",value:"",output:`${Q}?`}),n.backtrack===!0){n.output="";for(const a of n.tokens)n.output+=a.output!=null?a.output:a.value,a.suffix&&(n.output+=a.suffix)}return n};return J.fastpaths=(r,c)=>{const t={...c},b=typeof t.maxLength=="number"?Math.min(H,t.maxLength):H,h=r.length;if(h>b)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${b}`);r=s[r]||r;const{DOT_LITERAL:A,SLASH_LITERAL:p,ONE_CHAR:R,DOTS_SLASH:G,NO_DOT:M,NO_DOTS:w,NO_DOTS_SLASH:et,STAR:Q,START_ANCHOR:ut}=S.globChars(t.windows),m=t.dot?w:M,st=t.dot?et:M,ft=t.capture?"":"?:",nt={negated:!1,prefix:""};let v=t.bash===!0?".*?":Q;t.capture&&(v=`(${v})`);const rt=V=>V.noglobstar===!0?v:`(${ft}(?:(?!${ut}${V.dot?G:A}).)*?)`,Rt=V=>{switch(V){case"*":return`${m}${R}${v}`;case".*":return`${A}${R}${v}`;case"*.*":return`${m}${v}${A}${R}${v}`;case"*/*":return`${m}${v}${p}${R}${st}${v}`;case"**":return m+rt(t);case"**/*":return`(?:${m}${rt(t)}${p})?${st}${R}${v}`;case"**/*.*":return`(?:${m}${rt(t)}${p})?${st}${v}${A}${R}${v}`;case"**/.*":return`(?:${m}${rt(t)}${p})?${A}${R}${v}`;default:{const _=/^(.*?)\.(\w+)$/.exec(V);if(!_)return;const y=Rt(_[1]);return y?y+A+_[2]:void 0}}},W=d.removePrefix(r,nt);let X=Rt(W);return X&&t.strictSlashes!==!0&&(X+=`${p}?`),X},Ct=J,Ct}var St,Ot;function wt(){if(Ot)return St;Ot=1;const S=Nt(),d=It(),H=gt(),q=ht(),F=s=>s&&typeof s=="object"&&!Array.isArray(s),i=(s,l,f=!1)=>{if(Array.isArray(s)){const j=s.map(z=>i(z,l,f));return z=>{for(const J of j){const r=J(z);if(r)return r}return!1}}const T=F(s)&&s.tokens&&s.input;if(s===""||typeof s!="string"&&!T)throw new TypeError("Expected pattern to be a non-empty string");const C=l||{},U=C.windows,D=T?i.compileRe(s,l):i.makeRe(s,l,!1,!0),L=D.state;delete D.state;let K=()=>!1;if(C.ignore){const j={...l,ignore:null,onMatch:null,onResult:null};K=i(C.ignore,j,f)}const lt=(j,z=!1)=>{const{isMatch:J,match:r,output:c}=i.test(j,D,l,{glob:s,posix:U}),t={glob:s,state:L,regex:D,posix:U,input:j,output:c,match:r,isMatch:J};if(typeof C.onResult=="function"&&C.onResult(t),J===!1)return t.isMatch=!1,z?t:!1;t:if(K(j)){if(typeof C.onIgnore=="function"&&C.onIgnore(t)===q.UNIGNORE){t.isMatch=!0;break t}return t.isMatch=!1,z?t:!1}return typeof C.onMatch=="function"&&C.onMatch(t),z?t:!0};return f&&(lt.state=L),lt};return i.test=(s,l,f,{glob:T,posix:C}={})=>{if(typeof s!="string")throw new TypeError("Expected input to be a string");if(s==="")return{isMatch:!1,output:""};const U=f||{},D=U.format||(C?H.toPosixSlashes:null);let L=s===T,K=L&&D?D(s):s;return L===!1&&(K=D?D(s):s,L=K===T),(L===!1||U.capture===!0)&&(U.matchBase===!0||U.basename===!0?L=i.matchBase(s,l,f,C):L=l.exec(K)),{isMatch:!!L,match:L,output:K}},i.matchBase=(s,l,f,T=f&&f.windows)=>(l instanceof RegExp?l:i.makeRe(l,f)).test(H.basename(s,{windows:T})),i.isMatch=(s,l,f)=>i(l,f)(s),i.parse=(s,l)=>Array.isArray(s)?s.map(f=>i.parse(f,l)):d(s,{...l,fastpaths:!1}),i.scan=(s,l)=>S(s,l),i.compileRe=(s,l,f=!1,T=!1)=>{if(f===!0)return s.output;const C=l||{},U=C.contains?"":"^",D=C.contains?"":"$";let L=`${U}(?:${s.output})${D}`;s&&s.negated===!0&&(L=`^(?!${L}).*$`);const K=i.toRegex(L,l);return T===!0&&(K.state=s),K},i.makeRe=(s,l={},f=!1,T=!1)=>{if(!s||typeof s!="string")throw new TypeError("Expected a non-empty string");let C={negated:!1,fastpaths:!0};return l.fastpaths!==!1&&(s[0]==="."||s[0]==="*")&&(C.output=d.fastpaths(s,l)),C.output||(C=d(s,l)),i.compileRe(C,l,f,T)},i.toRegex=(s,l)=>{try{const f=l||{};return new RegExp(s,f.flags||(f.nocase?"i":""))}catch(f){if(l&&l.debug===!0)throw f;return/$^/}},i.constants=q,St=i,St}var xt,Tt;function Bt(){if(Tt)return xt;Tt=1;const S=wt(),d=gt();function H(q,F,i=!1){return F&&(F.windows===null||F.windows===void 0)&&(F={...F,windows:d.isWindows()}),S(q,F,i)}return Object.assign(H,S),xt=H,xt}var Gt=Bt();const Dt=kt(Gt);export{Dt as a};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
const v=globalThis.process??Object.create(null),d={versions:{}},x=new Proxy(v,{get(e,t){if(t in e)return e[t];if(t in d)return d[t]}}),M=e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
2
|
-
`),B=(e,t,l,n)=>{const s={column:0,line:-1,...e.start},a={...s,...e.end},c=s.line,i=s.column,f=a.line,p=a.column;let m=Math.max(c-(l+1),0),h=Math.min(t.length,f+n);c===-1&&(m=0),f===-1&&(h=t.length);const y=f-c,o={};if(y)for(let r=0;r<=y;r++){const u=r+c;if(!i)o[u]=!0;else if(r===0){const g=t[u-1]?.length;o[u]=[i,(g??0)-i+1]}else if(r===y)o[u]=[0,p];else{const g=t[u-r]?.length;o[u]=[0,g]}}else i===p?o[c]=i?[i,0]:!0:o[c]=[i,(p??0)-(i??0)];return{end:h,markerLines:o,start:m}},E=x.platform==="win32"&&!x.env?.WT_SESSION?">":"❯",O=(e,t,l)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...l,color:{gutter:r=>r,marker:r=>r,message:r=>r,...l?.color}},s=typeof t.start.column=="number";let a=(e.includes("\r")?M(e):e).split(`
|
|
3
|
-
`);typeof n.tabWidth=="number"&&e.includes(" ")&&(a=a.map(r=>r.replaceAll(" "," ".repeat(n.tabWidth))));const{end:c,markerLines:i,start:f}=B(t,a,n.linesAbove,n.linesBelow),p=String(c).length,{gutter:m,marker:h,message:y}=n.color;let o=a.slice(f,c).map((r,u)=>{const g=f+1+u,A=i[g],S=String(g).padStart(p),k=!i[g+1],$=` ${S}${n.showGutter?" |":""}`;if(A){let b="";if(Array.isArray(A)){const j=r.replaceAll(/[^\t]/g," ").slice(0,Math.max(A[0]-1,0)),W=A[1]||1;b=[`
|
|
4
|
-
`,n.prefix+m($.replaceAll(/\d/g," "))," ",j,h("^").repeat(W)].join(""),k&&n.message&&(b+=` ${y(n.message)}`)}return[n.prefix+h(E),m($),r.length>0?` ${r}`:"",b].join("")}return`${n.prefix} ${m($)}${r.length>0?` ${r}`:""}`}).join(`
|
|
5
|
-
`);return n.message&&!s&&(o=`${n.prefix+" ".repeat(p+1)+n.message}
|
|
6
|
-
${o}`),o},w=(e,t)=>{let l=0,n=t.length-2;for(;l<n;){const s=l+(n-l>>1);if(e<t[s])n=s-1;else if(e>=t[s+1])l=s+1;else{l=s;break}}return l},G=/\n|\r(?!\n)/,L=e=>e.split(G).reduce((t,l)=>(t.push(t.at(-1)+l.length+1),t),[0]),T=(e,t,l)=>{if(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0)return{column:0,line:0};if(typeof t!="number"||typeof e=="string"&&t>=e.length||Array.isArray(e)&&t+1>=e.at(-1))return{column:0,line:0};if(typeof e=="string"){const s=L(e),a=w(t,s);return{column:t-s[a]+1,line:a+1}}const n=w(t,e);return{column:t-e[n]+1,line:n+1}};export{O as W,T as a};
|