@visulima/fs 6.0.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.
Files changed (169) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/LICENSE.md +130 -1
  3. package/dist/eol.js +3 -3
  4. package/dist/glob-parent.js +1 -1
  5. package/dist/glob.d.ts +54 -2
  6. package/dist/glob.js +1 -1
  7. package/dist/index.d.ts +4 -4
  8. package/dist/index.js +1 -1
  9. package/dist/ini.d.ts +2 -2
  10. package/dist/ini.js +1 -1
  11. package/dist/is-glob.js +1 -1
  12. package/dist/json5.d.ts +2 -2
  13. package/dist/json5.js +1 -1
  14. package/dist/jsonc.d.ts +2 -2
  15. package/dist/jsonc.js +1 -1
  16. package/dist/match.js +1 -1
  17. package/dist/packem_shared/FIND_UP_STOP-pQqZdUPw.js +1 -0
  18. package/dist/packem_shared/_commonjsHelpers-CqkleIqs.js +1 -0
  19. package/dist/packem_shared/assertValidFileOrDirectoryPath-CAHgg-jK.js +1 -0
  20. package/dist/packem_shared/build-rm-options-_U1T9rOz.js +1 -0
  21. package/dist/packem_shared/collect-DXVMgRiZ.js +1 -0
  22. package/dist/packem_shared/collectSync-jjcJdHox.js +1 -0
  23. package/dist/packem_shared/copy-Cv8Vvdrc.js +1 -0
  24. package/dist/packem_shared/copySync-JIxmcGrd.js +1 -0
  25. package/dist/packem_shared/emptyDir-DQ1LfO2i.js +1 -0
  26. package/dist/packem_shared/emptyDirSync-BXDqirP1.js +1 -0
  27. package/dist/packem_shared/ensureDir-qy_X-WeG.js +1 -0
  28. package/dist/packem_shared/{ensureDirSync-B0w9WMwE.js → ensureDirSync-ONFJBCbg.js} +1 -1
  29. package/dist/packem_shared/{ensureFile-waD4hDO8.js → ensureFile-q1ozF6q5.js} +1 -1
  30. package/dist/packem_shared/ensureFileSync-B6eR38N_.js +1 -0
  31. package/dist/packem_shared/ensureLink-BpsTVGAm.js +1 -0
  32. package/dist/packem_shared/ensureLinkSync-B5moWvh3.js +1 -0
  33. package/dist/packem_shared/ensureSymlink-BF0BwVPy.js +1 -0
  34. package/dist/packem_shared/ensureSymlinkSync-D-JzDuD7.js +1 -0
  35. package/dist/packem_shared/findUp-BlQ1EUhu.js +1 -0
  36. package/dist/packem_shared/findUpSync-CF1OXVQw.js +1 -0
  37. package/dist/packem_shared/glob-Cyk1H9ZL.js +1 -0
  38. package/dist/packem_shared/globSync-Cm0u7eCn.js +1 -0
  39. package/dist/packem_shared/index-CBWLeiRp.js +1 -0
  40. package/dist/packem_shared/index-DDkv7LRn.js +1 -0
  41. package/dist/packem_shared/index-DGueExxA.js +1 -0
  42. package/dist/packem_shared/index-ovH_d7Hf.js +11 -0
  43. package/dist/packem_shared/indexToLineColumn-BHKDfaPx-DS9KxkE-.js +6 -0
  44. package/dist/packem_shared/ini-preserve-D3Z1KcgN.js +4 -0
  45. package/dist/packem_shared/is-stats-identical-DOh8_0KH.js +1 -0
  46. package/dist/packem_shared/isAccessible-CqNOFdZu.js +1 -0
  47. package/dist/packem_shared/isAccessibleSync-DYKTrrvc.js +1 -0
  48. package/dist/packem_shared/json-value.d-DZqAihX4.d.ts +29 -0
  49. package/dist/packem_shared/jsonc-merge-BGm21l00.js +2 -0
  50. package/dist/packem_shared/map-read-error-8dAe6Qhr.js +1 -0
  51. package/dist/packem_shared/move-DG3P4i6Y.js +1 -0
  52. package/dist/packem_shared/parseJson-gfl5PTTo.js +1 -0
  53. package/dist/packem_shared/readFile-DbKGLwIK.js +1 -0
  54. package/dist/packem_shared/readFileSync-CTTHkZ_p.js +1 -0
  55. package/dist/packem_shared/readIni-C9VUitQm.js +1 -0
  56. package/dist/packem_shared/readIniSync-DhMbhDPx.js +1 -0
  57. package/dist/packem_shared/readJson-CClJlGok.js +1 -0
  58. package/dist/packem_shared/readJson5-D33tgtEU.js +1 -0
  59. package/dist/packem_shared/readJson5Sync-DEd-ejtp.js +1 -0
  60. package/dist/packem_shared/readJsonSync-CbryXYxN.js +1 -0
  61. package/dist/packem_shared/readJsonc-Cp1KzmVx.js +1 -0
  62. package/dist/packem_shared/readJsoncSync-sE30rJ5W.js +1 -0
  63. package/dist/packem_shared/readToml-jD08lZRN.js +1 -0
  64. package/dist/packem_shared/readTomlSync-0J8gIalg.js +1 -0
  65. package/dist/packem_shared/readYaml-C63_W9Qg.js +1 -0
  66. package/dist/packem_shared/readYamlSync-CuyDW6xR.js +1 -0
  67. package/dist/packem_shared/remove-4ofpEuH1.js +1 -0
  68. package/dist/packem_shared/removeSync-g1D5kONg.js +1 -0
  69. package/dist/packem_shared/resolve-symlink-target-D4Pb9Fjw.js +1 -0
  70. package/dist/packem_shared/sanitize-B1LHjdjC.js +1 -0
  71. package/dist/packem_shared/stripJsonComments-Do7s7No5.js +1 -0
  72. package/dist/packem_shared/to-uint-8-array-DlTu4L-l.js +1 -0
  73. package/dist/packem_shared/{types.d-CgCO6qUp.d.ts → types.d-B-T1rDxl.d.ts} +1 -1
  74. package/dist/packem_shared/walk-Brue5N30.js +1 -0
  75. package/dist/packem_shared/walk-include-aizKyl9e.js +1 -0
  76. package/dist/packem_shared/walkSync-BWGgTwUy.js +1 -0
  77. package/dist/packem_shared/writeFile-BIBP7wbK.js +1 -0
  78. package/dist/packem_shared/writeFileSync-DJoHk3Ks.js +1 -0
  79. package/dist/packem_shared/writeIni--gog68qN.js +4 -0
  80. package/dist/packem_shared/writeIniSync-BL_z8aMQ.js +4 -0
  81. package/dist/packem_shared/writeJson-DmN1UqZc.js +4 -0
  82. package/dist/packem_shared/writeJson5-CPRmF2K7.js +4 -0
  83. package/dist/packem_shared/writeJson5Sync-BiUfm-cZ.js +4 -0
  84. package/dist/packem_shared/writeJsonSync-BiFyXQ5h.js +4 -0
  85. package/dist/packem_shared/writeJsonc-B4ahk9a2.js +4 -0
  86. package/dist/packem_shared/writeJsoncSync-lBv1IFDo.js +4 -0
  87. package/dist/packem_shared/writeToml-Frvwh0Kn.js +1 -0
  88. package/dist/packem_shared/writeTomlSync-BvKdlKvE.js +1 -0
  89. package/dist/packem_shared/writeYaml-C4IGXTOo.js +1 -0
  90. package/dist/packem_shared/writeYamlSync-BAbWtkvq.js +1 -0
  91. package/dist/size.js +1 -1
  92. package/dist/toml.d.ts +1 -1
  93. package/dist/toml.js +1 -1
  94. package/dist/utils.d.ts +2 -2
  95. package/dist/utils.js +1 -1
  96. package/dist/yaml.d.ts +2 -2
  97. package/dist/yaml.js +1 -1
  98. package/package.json +2 -2
  99. package/dist/packem_shared/FIND_UP_STOP-CAwY1qU7.js +0 -1
  100. package/dist/packem_shared/_commonjsHelpers-CWAkuNXM.js +0 -1
  101. package/dist/packem_shared/assertValidFileOrDirectoryPath-BTlt945W.js +0 -1
  102. package/dist/packem_shared/build-rm-options-avnusYx-.js +0 -1
  103. package/dist/packem_shared/collect-Dbo3K4iq.js +0 -1
  104. package/dist/packem_shared/collectSync-BLLtRqQ4.js +0 -1
  105. package/dist/packem_shared/copy-DiR5_5iA.js +0 -1
  106. package/dist/packem_shared/copySync-DffsYlhb.js +0 -1
  107. package/dist/packem_shared/emptyDir-BlBeczk0.js +0 -1
  108. package/dist/packem_shared/emptyDirSync-DfUZ9Ejz.js +0 -1
  109. package/dist/packem_shared/ensureDir-BEiomfxz.js +0 -1
  110. package/dist/packem_shared/ensureFileSync-CG07zjV7.js +0 -1
  111. package/dist/packem_shared/ensureLink-Dz-PDWa5.js +0 -1
  112. package/dist/packem_shared/ensureLinkSync-BZH7TaSQ.js +0 -1
  113. package/dist/packem_shared/ensureSymlink-Byi6ajoE.js +0 -1
  114. package/dist/packem_shared/ensureSymlinkSync-D7OCsAd8.js +0 -1
  115. package/dist/packem_shared/findUp-BHCEMf5y.js +0 -1
  116. package/dist/packem_shared/findUpSync-BKJsHMQN.js +0 -1
  117. package/dist/packem_shared/glob-BUjyjdE8.js +0 -1
  118. package/dist/packem_shared/glob-sync.d-SlQXhcIG.d.ts +0 -54
  119. package/dist/packem_shared/globSync-Bk9TUV7x.js +0 -1
  120. package/dist/packem_shared/index-B2MhYg3r.js +0 -1
  121. package/dist/packem_shared/index-BHy3Kcr7.js +0 -11
  122. package/dist/packem_shared/index-CPZbuHkp.js +0 -1
  123. package/dist/packem_shared/index-LUKYN3u3.js +0 -1
  124. package/dist/packem_shared/indexToLineColumn-BfkIsWHQ-DQJmePiQ.js +0 -6
  125. package/dist/packem_shared/ini-preserve-D1DopDLd.js +0 -4
  126. package/dist/packem_shared/is-stats-identical-l1GRN4Qu.js +0 -1
  127. package/dist/packem_shared/isAccessible-B7guOm3k.js +0 -1
  128. package/dist/packem_shared/isAccessibleSync-XH4YleJW.js +0 -1
  129. package/dist/packem_shared/jsonc-merge-Bkw73TLW.js +0 -2
  130. package/dist/packem_shared/map-read-error-CR3rQUxx.js +0 -1
  131. package/dist/packem_shared/move-KhPRvsRd.js +0 -1
  132. package/dist/packem_shared/parseJson-lm3MUNdf.js +0 -1
  133. package/dist/packem_shared/readFile-VgxUDrNH.js +0 -1
  134. package/dist/packem_shared/readFileSync-CloFeQw8.js +0 -1
  135. package/dist/packem_shared/readIni-CEXHWn92.js +0 -1
  136. package/dist/packem_shared/readIniSync-DsxVHypc.js +0 -1
  137. package/dist/packem_shared/readJson-DV2KxaEJ.js +0 -1
  138. package/dist/packem_shared/readJson5-S68aVros.js +0 -1
  139. package/dist/packem_shared/readJson5Sync-Bi9Rv46R.js +0 -1
  140. package/dist/packem_shared/readJsonSync-DweZd5ZA.js +0 -1
  141. package/dist/packem_shared/readJsonc-Dqh-elUt.js +0 -1
  142. package/dist/packem_shared/readJsoncSync-Dy2PZG5g.js +0 -1
  143. package/dist/packem_shared/readToml-CN_xnICv.js +0 -1
  144. package/dist/packem_shared/readTomlSync-B9TVGzen.js +0 -1
  145. package/dist/packem_shared/readYaml-BT3HBFQv.js +0 -1
  146. package/dist/packem_shared/readYamlSync-Cx-zy2cS.js +0 -1
  147. package/dist/packem_shared/remove-D_CUIlBL.js +0 -1
  148. package/dist/packem_shared/removeSync-F4nKiwrU.js +0 -1
  149. package/dist/packem_shared/resolve-symlink-target-CWrn0v4P.js +0 -1
  150. package/dist/packem_shared/sanitize-aEqeyx4d.js +0 -1
  151. package/dist/packem_shared/stripJsonComments-Bfcn2PKv.js +0 -1
  152. package/dist/packem_shared/to-uint-8-array-7sXMoZwU.js +0 -1
  153. package/dist/packem_shared/walk-B211aFS7.js +0 -1
  154. package/dist/packem_shared/walk-include-2NQzWTCI.js +0 -1
  155. package/dist/packem_shared/walkSync-VeMvHYLk.js +0 -1
  156. package/dist/packem_shared/writeFile-Dnba9aVe.js +0 -1
  157. package/dist/packem_shared/writeFileSync-pW8o2DG1.js +0 -1
  158. package/dist/packem_shared/writeIni-DgZ-0EUD.js +0 -4
  159. package/dist/packem_shared/writeIniSync-Buz4Cove.js +0 -4
  160. package/dist/packem_shared/writeJson-vexC7dw2.js +0 -4
  161. package/dist/packem_shared/writeJson5-DeW_smOs.js +0 -4
  162. package/dist/packem_shared/writeJson5Sync-Cz5pwaPh.js +0 -4
  163. package/dist/packem_shared/writeJsonSync-DJLfN5iT.js +0 -4
  164. package/dist/packem_shared/writeJsonc-BqJQS0Mk.js +0 -4
  165. package/dist/packem_shared/writeJsoncSync-CchlR2KW.js +0 -4
  166. package/dist/packem_shared/writeToml-Bn-wQdaM.js +0 -1
  167. package/dist/packem_shared/writeTomlSync-CTv4RXkJ.js +0 -1
  168. package/dist/packem_shared/writeYaml-CpWDXOUF.js +0 -1
  169. package/dist/packem_shared/writeYamlSync-9MG5_lNI.js +0 -1
@@ -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};
@@ -1,4 +0,0 @@
1
- const v=/^\s*(?:[;#].*)?$/,$=/^\s*\[([^\]]+)\]\s*$/,h=/\r?\n/,j=/\r?\n$/,D=/^[^=]+=/,m=e=>e===" "||e===" ",S=e=>{let t=0;for(;t<e.length&&m(e[t]);)t+=1;return{indent:e.slice(0,t),rest:e.slice(t)}},x=e=>{let t=e.length;for(;t>0&&m(e[t-1]);)t-=1;return{rest:e.slice(0,t),trailing:e.slice(t)}},b=e=>{const t=e.indexOf("=");if(t===-1)return;const n=e.slice(0,t),r=e.slice(t+1),{indent:i,rest:s}=S(n),{rest:o,trailing:c}=x(s);if(o===""||o.startsWith(";")||o.startsWith("#")||o.startsWith("["))return;const{indent:f,rest:y}=S(r),{rest:p,trailing:g}=x(y);return{after:f,before:c,indent:i,key:o,trailing:g,value:p}},I=e=>{let t=0,n=0;for(const r of e.split(h)){if(v.test(r)||$.test(r))continue;const i=b(r);i&&(i.before===" "&&i.after===" "?t+=1:i.before===""&&i.after===""&&(n+=1))}return{spaced:t,unspaced:n}},k=(e,t)=>{if(!e)return;if(t===void 0)return e;let n=e;for(const r of t.split("."))if(n&&typeof n=="object"&&!Array.isArray(n))n=n[r];else return;return n&&typeof n=="object"&&!Array.isArray(n)?n:void 0},N=(e,t)=>{for(const n of e.split(h)){if(!n||n.startsWith("["))continue;const r=D.exec(n);if(!r)continue;const i=n.slice(0,r[0].length-1).trim();if(i===t||i===`${t}[]`)return n.slice(r[0].length).trimStart()}return""},J=(e,t)=>{if(e.trim()==="")return{line:{kind:"blank",raw:e,section:t},nextSection:t};const n=e.trimStart();if(n.startsWith(";")||n.startsWith("#"))return{line:{kind:"comment",raw:e,section:t},nextSection:t};const r=$.exec(e);if(r){const s=r[1];return{line:{kind:"header",raw:e,section:s},nextSection:s}}const i=b(e);return i?{line:{key:i.key,kind:"key",raw:e,section:t},nextSection:t}:{line:{kind:"unknown",raw:e,section:t},nextSection:t}},L=e=>{const t=e.replace(j,"").split(h),n=[];let r;for(const i of t){const{line:s,nextSection:o}=J(i,r);n.push(s),r=o}return n},M=(e,t,n)=>{const r=b(e.raw);if(!r||!e.key)return e.raw;const i=n({[e.key]:t}),s=N(i,e.key);return`${r.indent}${r.key}${r.before}=${r.after}${s}${r.trailing}`},W=(e,t=[])=>{const n=[];for(const[r,i]of Object.entries(e))if(i&&typeof i=="object"&&!Array.isArray(i)){const s=[...t,r];n.push(s.join("."),...W(i,s))}return n},A=(e,t)=>{const n={};for(const[r,i]of Object.entries(e))t.has(r)||i&&typeof i=="object"&&!Array.isArray(i)||(n[r]=i);return n},O=(e,t)=>{const n=[];for(const r of t.split(h))r!==""&&n.push(r);n.length>0&&e.push(...n)},P=e=>{const{line:t,markWritten:n,nextData:r,oldData:i,renderValue:s}=e;if(!t.key)return t.raw;const o=k(r,t.section);if(!o||!(t.key in o))return;n(t.section,t.key);const c=k(i,t.section)?.[t.key],f=o[t.key];return JSON.stringify(c)===JSON.stringify(f)?t.raw:s(t,f)},V=(e,t,n,r,i)=>{const s=k(r,t);if(!s)return;const o=n.get(t)??new Set,c=A(s,o);Object.keys(c).length!==0&&O(e,i(c))},E=(e,t,n,r)=>{const i=new Set(t.filter(s=>s.kind==="header"&&s.section).map(s=>s.section));for(const s of W(n)){if(i.has(s))continue;const o=k(n,s);if(!o||Object.keys(o).length===0)continue;const c=A(o,new Set);Object.keys(c).length!==0&&O(e,r(c,s))}},K=e=>{const t=e.includes(`\r
2
- `)?`\r
3
- `:`
4
- `,{spaced:n,unspaced:r}=I(e);return{eol:t,whitespace:n>0&&n>=r}},R=(e,t,n,r,i)=>{const{eol:s}=i,o=j.test(e),c=L(e),f=new Map,y=new Map;for(const[l,a]of c.entries())a.kind!=="blank"&&y.set(a.section,l);const p=(l,a)=>{let u=f.get(l);u||(u=new Set,f.set(l,u)),u.add(a)},g=(l,a)=>M(l,a,r),d=[];for(const[l,a]of c.entries()){if(a.kind==="key"){const u=P({line:a,markWritten:p,nextData:n,oldData:t,renderValue:g});u!==void 0&&d.push(u);continue}d.push(a.raw),y.get(a.section)===l&&V(d,a.section,f,n,r)}E(d,c,n,r);const w=d.join(s);return o&&!w.endsWith(s)?`${w}${s}`:w};export{K as d,R as m};
@@ -1 +0,0 @@
1
- const e=(n,d)=>!!d.ino&&!!d.dev&&d.ino===n.ino&&d.dev===n.dev;export{e as d};
@@ -1 +0,0 @@
1
- import{createRequire as t}from"node:module";import{toPath as a}from"@visulima/path/utils";import{F_OK as f}from"./FIND_UP_STOP-CAwY1qU7.js";import _ from"./assertValidFileOrDirectoryPath-BTlt945W.js";let n;const i=e=>(n??=t(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,s]=o.versions.node.split(".").map(Number);if(r>22||r===22&&s>=3||r===20&&s>=16)return o.getBuiltinModule(e)}return i(e)},{access:u}=c("node:fs/promises");async function g(e,r=f){_(e),e=a(e);try{return await u(e,r),!0}catch{return!1}}export{g as default};
@@ -1 +0,0 @@
1
- import{createRequire as s}from"node:module";import{toPath as a}from"@visulima/path/utils";import{F_OK as f}from"./FIND_UP_STOP-CAwY1qU7.js";import _ from"./assertValidFileOrDirectoryPath-BTlt945W.js";let n;const i=e=>(n??=s(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 i(e)},{accessSync:u}=c("node:fs");function g(e,r=f){_(e),e=a(e);try{return u(e,r),!0}catch{return!1}}export{g as default};
@@ -1,2 +0,0 @@
1
- import{parse as u,modify as g,applyEdits as l}from"jsonc-parser";const y=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),c=(t,i,e)=>{const r=g(t.text,i,e,{formattingOptions:t.formattingOptions});t.text=l(t.text,r)},m=(t,i,e,r,s)=>{const o=new Set([...Object.keys(i),...Object.keys(e)]);for(const n of o){const a=[...r,n];n in e?n in i?s(t,i[n],e[n],a):c(t,a,e[n]):c(t,a,void 0)}},p=(t,i,e,r)=>{if(i!==e){if(y(i)&&y(e)){m(t,i,e,r,p);return}if(Array.isArray(i)&&Array.isArray(e)&&i.length===e.length){for(const[s,o]of i.entries())p(t,o,e[s],[...r,s]);return}JSON.stringify(i)!==JSON.stringify(e)&&c(t,r,e)}},S=(t,i,e)=>{const r=u(t,[],{allowTrailingComma:!0}),s={formattingOptions:e,text:t};return p(s,r,i,[]),s.text},b=t=>typeof t=="number"?{insertSpaces:!0,tabSize:t}:typeof t=="string"?t===" "||t.includes(" ")?{insertSpaces:!1,tabSize:t.length||1}:{insertSpaces:!0,tabSize:t.length||2}:{insertSpaces:!0,tabSize:2},d=(t,i,e,r,s,o,n)=>{if(e&&t!==void 0){const a={...b(r),...o};let f=S(t,i,a);return s&&!f.endsWith(`
2
- `)&&(f+=s),f}return`${JSON.stringify(i,n,r)}${s}`};export{d as b};
@@ -1 +0,0 @@
1
- import n from"./NotFoundError-CnRY6lVp.js";import t from"./PermissionError-DJ_2VWEj.js";const c=(o,r)=>{const e=o?.code;return e==="ENOENT"?new n(`no such file or directory, open '${r}'`):e==="EACCES"||e==="EPERM"?new t(`unable to read the non-readable file: ${r}`):o};export{c as i};
@@ -1 +0,0 @@
1
- import{createRequire as p}from"node:module";import{toPath as d}from"@visulima/path/utils";import{dirname as c,resolve as s}from"@visulima/path";import $ from"./isAccessible-B7guOm3k.js";import T from"./isAccessibleSync-XH4YleJW.js";let v;const h=t=>(v??=p(import.meta.url))(t),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=t=>{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(t)}return h(t)},{cwd:a}=i,{mkdir:_,rename:S,copyFile:D,unlink:E}=u("node:fs/promises"),{mkdirSync:g,renameSync:j,copyFileSync:b,unlinkSync:k}=u("node:fs");class q extends Error{constructor(e,r){super(`Source directory "${c(e)}" does not match destination directory "${c(r)}"`),this.name="SameDirectoryError"}}const l=(t,e)=>{if(!t||!e)throw new Error("Source and destination paths must not be empty");if(c(t)!==c(e))throw new q(t,e)},y=async(t,e,{cwd:r,directoryMode:o,overwrite:w,validateDirectory:m})=>{if(r&&(t=s(r,t),e=s(r,e)),m&&l(t,e),!w&&await $(e))throw new Error(`The destination file exists: ${e}`);await _(c(e),{mode:o,recursive:!0});try{await S(t,e)}catch(n){if(n.code==="EXDEV")await D(t,e),await E(t);else throw n}},f=(t,e,{cwd:r,directoryMode:o,overwrite:w,validateDirectory:m})=>{if(r&&(t=s(r,t),e=s(r,e)),m&&l(t,e),!w&&T(e))throw new Error(`The destination file exists: ${e}`);g(c(e),{mode:o,recursive:!0});try{j(t,e)}catch(n){if(n.code==="EXDEV")b(t,e),k(t);else throw n}},P=async(t,e,r={})=>{const o={overwrite:!0,validateDirectory:!1,...r,cwd:r.cwd?d(r.cwd):a()};await y(t,e,o)},V=(t,e,r)=>{const o={overwrite:!0,validateDirectory:!1,...r};o.cwd=o.cwd?d(o.cwd):a(),f(t,e,o)},X=async(t,e,r)=>{const o={overwrite:!0,...r,validateDirectory:!0};o.cwd=o.cwd?d(o.cwd):a(),await y(t,e,o)},N=(t,e,r)=>{const o={overwrite:!0,...r,validateDirectory:!0};o.cwd=o.cwd?d(o.cwd):a(),f(t,e,o)};export{P as move,V as moveSync,X as rename,N as renameSync};
@@ -1 +0,0 @@
1
- import{a as s,W as l}from"./indexToLineColumn-BfkIsWHQ-DQJmePiQ.js";import u from"./JSONError-Cvp9ycba.js";const m=t=>String.raw`\u{${t.codePointAt(0).toString(16)}}`,p=(t,o,e)=>l(t,{start:o},{tabWidth:!1,...e}),f=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,d=(t,o)=>{const e=f.exec(o);if(!e)return;const[,n,r,a]=e;if(r&&a)return{column:Number(a),line:Number(r)};let i=Number(n);return i===t.length&&(i=t.length-1),s(t,i)},g=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,h=t=>t.replace(g,(o,e,n)=>`"${n}"(${m(n)})`);function w(t,o,e,n){typeof o=="string"&&(typeof e=="object"&&(n=e),e=o,o=void 0);let r;try{return JSON.parse(t,o)}catch(c){r=c.message}let a;t?(a=d(t,r),r=h(r)):r+=" while parsing empty string";const i=new u(r);throw i.fileName=e,a&&(i.codeFrame=p(t,a,n)),i}export{w as default};
@@ -1 +0,0 @@
1
- import{createRequire as m}from"node:module";import{toPath as j}from"@visulima/path/utils";import y from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{i as q}from"./map-read-error-CR3rQUxx.js";let d;const _=e=>(d??=m(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,l=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[o,t]=r.versions.node.split(".").map(Number);if(o>22||o===22&&t>=3||o===20&&t>=16)return r.getBuiltinModule(e)}return _(e)},{readFile:g}=l("node:fs/promises"),{unzip:b,brotliDecompress:h}=l("node:zlib"),w={brotli:h,gzip:b,none:(e,o)=>{o(null,e)}},T=async(e,o)=>{y(e),e=j(e);const{buffer:t,compression:u,encoding:f,flag:s}=o??{};let i;try{i=await g(e,s?{flag:s}:{})}catch(n){throw q(n,e)}return await new Promise((n,p)=>{w[u??"none"](i,(c,a)=>{c?p(c):n(t?a:a.toString(f??"utf8"))})})};export{T as default};
@@ -1 +0,0 @@
1
- import{createRequire as a}from"node:module";import{toPath as h}from"@visulima/path/utils";import y from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{i as j}from"./map-read-error-CR3rQUxx.js";let d;const m=e=>(d??=a(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[o,t]=r.versions.node.split(".").map(Number);if(o>22||o===22&&t>=3||o===20&&t>=16)return r.getBuiltinModule(e)}return m(e)},{readFileSync:_}=c("node:fs"),{unzipSync:g,brotliDecompressSync:b}=c("node:zlib"),q={brotli:b,gzip:g,none:e=>e},T=(e,o)=>{y(e),e=h(e);const{buffer:t,compression:f,encoding:l,flag:n}=o??{};let s;try{s=_(e,n?{flag:n}:{})}catch(p){throw j(p,e)}const u=q[f??"none"],i=u(s);return t?i:i.toString(l??"utf8")};export{T as default};
@@ -1 +0,0 @@
1
- import{parse as n}from"ini";import c from"./readFile-VgxUDrNH.js";const d=async(r,t)=>{const{bracketedArray:a=!0,...e}=t??{},o=await c(r,{encoding:"utf8",...e});return n(o,{bracketedArray:a})};export{d as default};
@@ -1 +0,0 @@
1
- import{parse as c}from"ini";import n from"./readFileSync-CloFeQw8.js";const f=(r,t)=>{const{bracketedArray:e=!0,...o}=t??{},a=n(r,{encoding:"utf8",...o});return c(a,{bracketedArray:e})};export{f as default};
@@ -1 +0,0 @@
1
- import{toPath as n}from"@visulima/path/utils";import a from"./parseJson-lm3MUNdf.js";import d from"./readFile-VgxUDrNH.js";async function u(r,o,e){typeof o=="object"&&(e=o,o=void 0);const f=await d(r,{buffer:!0,encoding:void 0});let t=new TextDecoder().decode(f);const{beforeParse:c,color:i}=e??{};return typeof c=="function"&&(t=c(t)),a(t,o,n(r),{color:i})}export{u as default};
@@ -1 +0,0 @@
1
- import p from"json5";import u from"./readFile-VgxUDrNH.js";async function d(t,o,e){o&&typeof o=="object"&&(e=o,o=void 0);const{beforeParse:f,buffer:i,compression:a,encoding:c="utf8",flag:s}=e??{},r=await u(t,{buffer:i,compression:a,encoding:c,flag:s}),n=typeof f=="function"?f(r):r;return p.parse(n,o)}export{d as default};
@@ -1 +0,0 @@
1
- import n from"json5";import a from"./readFileSync-CloFeQw8.js";function d(t,o,e){o&&typeof o=="object"&&(e=o,o=void 0);const{beforeParse:f,buffer:i,compression:p,encoding:s="utf8",flag:u}=e??{},r=a(t,{buffer:i,compression:p,encoding:s,flag:u}),c=typeof f=="function"?f(r):r;return n.parse(c,o)}export{d as default};
@@ -1 +0,0 @@
1
- import{toPath as i}from"@visulima/path/utils";import d from"./parseJson-lm3MUNdf.js";import p from"./readFileSync-CloFeQw8.js";function a(r,o,t){typeof o=="object"&&(t=o,o=void 0);const n=p(r,{buffer:!0,encoding:void 0});let e=new TextDecoder().decode(n);const{beforeParse:f,color:c}=t??{};return typeof f=="function"&&(e=f(e)),d(e,o,i(r),{color:c})}export{a as default};
@@ -1 +0,0 @@
1
- import{a as u,W as C}from"./indexToLineColumn-BfkIsWHQ-DQJmePiQ.js";import{toPath as g}from"@visulima/path/utils";import{parse as h,printParseErrorCode as b}from"jsonc-parser";import y from"./JSONError-Cvp9ycba.js";import E from"./readFile-VgxUDrNH.js";const P=(r,e,a,f)=>{if(r.length===0)return;const o=r[0],n=u(e,o.offset),t=new y(`${b(o.error)} at offset ${o.offset}`);throw t.fileName=a,t.codeFrame=C(e,{start:n},{tabWidth:!1,...f}),t},J=async(r,e)=>{const{allowEmptyContent:a,allowTrailingComma:f=!0,beforeParse:o,buffer:n,color:t,compression:l,disallowComments:c,encoding:p="utf8",flag:w}=e??{},m=await E(r,{buffer:n,compression:l,encoding:p,flag:w}),s=typeof o=="function"?o(m):m,i=[],d=h(s,i,{allowEmptyContent:a,allowTrailingComma:f,disallowComments:c});return P(i,s,g(r),{color:t}),d};export{J as default,P as throwIfJsoncErrors};
@@ -1 +0,0 @@
1
- import{toPath as g}from"@visulima/path/utils";import{parse as C}from"jsonc-parser";import d from"./readFileSync-CloFeQw8.js";import{throwIfJsoncErrors as y}from"./readJsonc-Dqh-elUt.js";const T=(o,e)=>{const{allowEmptyContent:l,allowTrailingComma:a=!0,beforeParse:r,buffer:f,color:i,compression:s,disallowComments:p,encoding:c="utf8",flag:u}=e??{},t=d(o,{buffer:f,compression:s,encoding:c,flag:u}),m=typeof r=="function"?r(t):t,n=[],w=C(m,n,{allowEmptyContent:l,allowTrailingComma:a,disallowComments:p});return y(n,m,g(o),{color:i}),w};export{T as default};
@@ -1 +0,0 @@
1
- import{parse as a}from"smol-toml";import n from"./readFile-VgxUDrNH.js";const c=async(r,t)=>{const o=await n(r,{encoding:"utf8",...t});return a(o)};export{c as default};
@@ -1 +0,0 @@
1
- import{parse as n}from"smol-toml";import e from"./readFileSync-CloFeQw8.js";const m=(o,r)=>{const t=e(o,{encoding:"utf8",...r});return n(t)};export{m as default};
@@ -1 +0,0 @@
1
- import{parse as t}from"@visulima/yaml";import u from"./readFile-VgxUDrNH.js";async function g(n,o,f){const i=(typeof o=="function"?f:o??f)??{},{buffer:a,compression:c,encoding:p="utf8",flag:s,...e}=i,r=await u(n,{buffer:a,compression:c,encoding:p,flag:s});return typeof o=="function"?t(r,o,e):t(r,e)}export{g as default};
@@ -1 +0,0 @@
1
- import{parse as t}from"@visulima/yaml";import s from"./readFileSync-CloFeQw8.js";function g(n,o,f){const c=(typeof o=="function"?f:o??f)??{},{buffer:i,compression:p,encoding:u="utf8",flag:m,...e}=c,r=s(n,{buffer:i,compression:p,encoding:u,flag:m});return typeof o=="function"?t(r,o,e):t(r,e)}export{g as default};
@@ -1 +0,0 @@
1
- import{createRequire as t}from"node:module";import a from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{t as _}from"./build-rm-options-avnusYx-.js";let i;const n=e=>(i??=t(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[s,r]=o.versions.node.split(".").map(Number);if(s>22||s===22&&r>=3||s===20&&r>=16)return o.getBuiltinModule(e)}return n(e)},{rm:u}=c("node:fs/promises"),l=async(e,s={})=>{a(e),await u(e,_(s))};export{l as default};
@@ -1 +0,0 @@
1
- import{createRequire as t}from"node:module";import _ from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{t as f}from"./build-rm-options-avnusYx-.js";let n;const i=e=>(n??=t(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=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 i(e)},{rmSync:u}=c("node:fs"),a=(e,o={})=>{_(e),u(e,f(o))};export{a as default};
@@ -1 +0,0 @@
1
- import{resolve as o,dirname as s}from"@visulima/path";const p=(t,e)=>typeof t!="string"?t:t.startsWith("./")?o(t):typeof e=="string"?o(s(e),t):new URL(t,e);export{p as t};
@@ -1 +0,0 @@
1
- import{createRequire as j}from"node:module";const g=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,{platform:d}=g,l="unnamed",p=128,u={'"':"ˮ","*":"⁎","/":"⁄",":":"꞉","<":"‹",">":"›","?":"ʔ","\\":"∖","|":"ǀ"},x=/[\u0000-\u001F\u0080-\u009F]/g,_=/^(?:\.+[/\\]+)+|^\.+$/g,a=/^(?:con|prn|aux|nul|com\d|lpt\d)$/i,m=/[<>:"/\\|?*]/g,w=/\//g,o=new Set([" "," ","."]),f=(n,r)=>r>0&&r<n.length-1,b=(n,r)=>{const t=n.lastIndexOf(".");if(!f(n,t))return n.slice(0,r);const e=n.slice(0,t),i=n.slice(t),s=r-i.length;return s>0?`${e.slice(0,s)}${i}`:n.slice(0,r)},h=n=>{let r=0,t=n.length;for(;r<t;){const e=n[r];if(e===void 0||!o.has(e))break;r+=1}for(;t>r;){const e=n[t-1];if(e===void 0||!o.has(e))break;t-=1}return n.slice(r,t)},$=n=>{const r=n.lastIndexOf(".");if(f(n,r)){const e=n.slice(0,r),i=n.slice(r);let s=e;for(;s.length>0;){const c=s.at(-1);if(c===void 0||!o.has(c))break;s=s.slice(0,-1)}return s.length===0?i.slice(1):`${s}${i}`}let t=n;for(;t.length>0;){const e=t.at(-1);if(e===void 0||!o.has(e))break;t=t.slice(0,-1)}return t},v=n=>{const r=n.lastIndexOf(".");if(f(n,r))return!1;if(a.test(n))return!0;let t=n;for(;t.length>0;){const e=t.at(-1);if(e===void 0||!o.has(e))break;t=t.slice(0,-1)}return!!(t.length>0&&a.test(t))},I=n=>{const r=n.lastIndexOf(".");if(f(n,r)){const i=n.slice(0,r),s=n.slice(r),c=h(i);return c.length===0?void 0:`${c}${s}`}const t=n.trim();if(t.length>0&&t[0]==="."&&t.length<=5&&t.indexOf(".",1)===-1)return;const e=h(n);if(e.length!==0)return e},O=n=>{const r=n?.filesystem??"auto";return r==="auto"?d==="win32"?"win32":"unix":r==="darwin"?"unix":r},q=(n,r)=>{if(typeof n!="string"||n.length===0)return l;const t=O(r);let e=n;if(e=e.replace(x,""),e.length===0||(e=e.replace(_,""),e.length===0))return l;if(t==="win32"||t==="fat32"){const s=e.lastIndexOf(".");if(!f(e,s)&&a.test(e))return l}if(e=t==="win32"||t==="fat32"?e.replaceAll(m,s=>u[s]??""):e.replaceAll(w,u["/"]),e=e.trim(),(t==="win32"||t==="fat32")&&(v(e)||t==="win32"&&(e=$(e),e.length===0)))return l;if(t==="fat32"){const s=I(e);if(s===void 0)return l;e=s}if(e.length===0)return l;const i=r?.maxLength??p;return e.length>i&&(e=b(e,i),e.length===0)?l:e};export{q as sanitize};
@@ -1 +0,0 @@
1
- import{INTERNAL_STRIP_JSON_REGEX as a}from"./FIND_UP_STOP-CAwY1qU7.js";const p=(t,{whitespace:s=!0}={})=>t.replace(a,e=>e.startsWith('"')||e[1]==="*"&&!e.endsWith("*/")?e:s?e.replaceAll(/\S/g," "):"");export{p as default};
@@ -1 +0,0 @@
1
- import{createRequire as o}from"node:module";let s;const i=e=>(s??=o(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[t,n]=r.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return r.getBuiltinModule(e)}return i(e)},{randomBytes:f}=c("node:crypto"),p=e=>`${e}.${process.pid.toString(36)}.${f(6).toString("hex")}.tmp`,u=new TextEncoder,d=e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return u.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e)){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")};export{d as i,p as o};
@@ -1 +0,0 @@
1
- import{createRequire as q}from"node:module";import{resolve as E,join as M,normalize as x,basename as I}from"@visulima/path";import{toPath as V}from"@visulima/path/utils";import D from"./WalkError-B8qTd-v-.js";import z from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{g as F,s as d,l as y}from"./walk-include-2NQzWTCI.js";let N;const P=e=>(N??=q(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,R=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[s,o]=c.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return c.getBuiltinModule(e)}return P(e)},{readdir:$,realpath:B,stat:T}=R("node:fs/promises"),L=async e=>{const s=x(e),o=I(s),r=await T(s);return y(r,o,s)};async function*O(e,s={}){const{extensions:o,followSymlinks:r=!1,includeDirs:_=!0,includeFiles:h=!0,includeSymlinks:w=!0,match:g,maxDepth:u=Number.POSITIVE_INFINITY,skip:v}=s;if(z(e),u<0)return;const f=s.visited??new Set,l=g?g.map(i=>typeof i=="string"?F(i):i):void 0,a=v?v.map(i=>typeof i=="string"?F(i):i):void 0;if(e=E(V(e)),_&&d(e,o,l,a)&&(yield await L(e)),!(u<1||!d(e,void 0,void 0,a)))try{const i=await $(e,{withFileTypes:!0});for(const n of i){let t=M(e,n.name),b=n,{name:k}=n,S=n.isDirectory(),j=n.isFile();if(n.isSymbolicLink())if(r){const m=x(await B(t));if(f.has(m))continue;t=m;const p=await T(m);S=p.isDirectory(),j=p.isFile(),b=p,k=I(m)}else if(w&&d(t,o,l,a)){yield y(n,n.name,t);continue}else continue;S?(r&&f.add(t),yield*O(t,{extensions:o,followSymlinks:r,includeDirs:_,includeFiles:h,includeSymlinks:w,match:l,maxDepth:u-1,skip:a,visited:f})):j&&h&&d(t,o,l,a)&&(yield y(b,k,t))}}catch(i){throw i instanceof D?i:new D(i,e)}}export{O as default};
@@ -1 +0,0 @@
1
- const l=e=>{const r=[],t=new Set;let s=0;for(const a of e){if(a==="{")r.push(s);else if(a==="}"){const o=r.pop();o!==void 0&&(t.add(o),t.add(s))}s+=1}let c=0,n=0,i="";for(const a of e)a==="{"?t.has(n)?(i+="(",c+=1):i+=String.raw`\{`:a==="}"?t.has(n)?(i+=")",c-=1):i+=String.raw`\}`:a===","&&c>0?i+="|":i+=a,n+=1;return i},g=e=>{const r=e.replace(/[$()+\\^]/g,String.raw`\$&`).replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`),t=l(r).replace(/\[!(.*?)\]/g,"[^$1]");try{return new RegExp(`^${t}$`)}catch(s){throw new Error(`Invalid glob pattern: ${e}`,{cause:s})}};class p{name;path;#e;constructor(r,t,s){this.#e=r,this.name=t,this.path=s}isDirectory(){return this.#e.isDirectory()}isFile(){return this.#e.isFile()}isSymbolicLink(){return this.#e.isSymbolicLink()}}const h=(e,r,t)=>new p(e,r,t),u=(e,r,t,s)=>{if(Array.isArray(r)&&r.length>0&&!r.some(n=>e.endsWith(n)))return!1;const c=e.includes("\\")?e.replaceAll("\\","/"):e;return t&&!t.some(n=>n.test(c))?!1:!s?.some(n=>n.test(c))};export{g,h as l,u as s};
@@ -1 +0,0 @@
1
- import{createRequire as q}from"node:module";import{resolve as E,join as M,normalize as u,basename as x}from"@visulima/path";import{toPath as O}from"@visulima/path/utils";import F from"./WalkError-B8qTd-v-.js";import V from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{g as I,s as m,l as _}from"./walk-include-2NQzWTCI.js";let N;const $=e=>(N??=q(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,P=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[o,s]=c.versions.node.split(".").map(Number);if(o>22||o===22&&s>=3||o===20&&s>=16)return c.getBuiltinModule(e)}return $(e)},{readdirSync:R,realpathSync:B,statSync:T}=P("node:fs"),z=e=>{const o=u(e),s=T(o);return _(s,x(o),o)};function*L(e,o={}){const{extensions:s,followSymlinks:d=!1,includeDirs:h=!0,includeFiles:S=!0,includeSymlinks:g=!0,match:v,maxDepth:f=Number.POSITIVE_INFINITY,skip:k}=o;if(V(e),f<0)return;const p=o.visited??new Set,l=v?v.map(i=>typeof i=="string"?I(i):i):void 0,r=k?k.map(i=>typeof i=="string"?I(i):i):void 0;if(e=E(O(e)),h&&m(e,s,l,r)&&(yield z(e)),!(f<1||!m(e,void 0,void 0,r)))try{const i=R(e,{withFileTypes:!0});for(const n of i){let t=M(e,n.name),b=n,{name:j}=n,w=n.isDirectory(),D=n.isFile();if(n.isSymbolicLink())if(d){const a=u(B(t));if(p.has(a))continue;t=a;const y=T(a);w=y.isDirectory(),D=y.isFile(),b=y,j=x(a)}else if(g&&m(t,s,l,r)){yield _(n,n.name,u(t));continue}else continue;w?(d&&p.add(t),yield*L(t,{extensions:s,followSymlinks:d,includeDirs:h,includeFiles:S,includeSymlinks:g,match:l,maxDepth:f-1,skip:r,visited:p})):D&&S&&m(t,s,l,r)&&(yield _(b,j,u(t)))}}catch(i){throw i instanceof F?i:new F(i,e)}}export{L as default};
@@ -1 +0,0 @@
1
- import{createRequire as w}from"node:module";import{dirname as x}from"@visulima/path";import{toPath as B}from"@visulima/path/utils";import{F_OK as F}from"./FIND_UP_STOP-CAwY1qU7.js";import R from"./AlreadyExistsError-DEb3UWja.js";import d from"./isAccessible-B7guOm3k.js";import T from"./assertValidFileContents-CbIN7sy7.js";import M from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{o as P,i as E}from"./to-uint-8-array-7sXMoZwU.js";let p;const g=e=>(p??=w(import.meta.url))(e),a=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_=e=>{if(typeof a<"u"&&a.versions&&a.versions.node){const[o,i]=a.versions.node.split(".").map(Number);if(o>22||o===22&&i>=3||o===20&&i>=16)return a.getBuiltinModule(e)}return g(e)},{mkdir:h,readFile:v,writeFile:y,stat:b,rename:u,chown:j,chmod:k,unlink:q}=_("node:fs/promises"),I=async(e,o,i)=>{i={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...i},M(e),T(o),e=B(e);const n=await d(e,F),c=i.flag??"w",m=c.includes("a"),l=c.includes("x");if(n&&(!i.overwrite||l))throw new R(`file already exists, open '${e}'`);const r=P(e);try{!n&&i.recursive&&await h(x(e),{recursive:!0});let t,s=typeof o=="string"?Buffer.from(o,i.encoding??"utf8"):E(o);if(m&&n&&(s=Buffer.concat([await v(e),s])),await y(r,s,{flag:"wx"}),n&&i.backup&&(t=await b(e),i.chown??={gid:t.gid,uid:t.uid},await u(e,`${e}.bak`)),i.chown)try{await j(r,i.chown.uid,i.chown.gid)}catch{}const f=t&&i.mode===void 0?t.mode:i.mode;f!==void 0&&await k(r,f),await u(r,e)}catch(t){throw new Error(`Failed to write file at: ${e} - ${t.message}`,{cause:t})}finally{await d(r)&&await q(r)}};export{I as default};
@@ -1 +0,0 @@
1
- import{createRequire as p}from"node:module";import{dirname as q}from"@visulima/path";import{toPath as x}from"@visulima/path/utils";import{F_OK as B}from"./FIND_UP_STOP-CAwY1qU7.js";import F from"./AlreadyExistsError-DEb3UWja.js";import f from"./isAccessibleSync-XH4YleJW.js";import R from"./assertValidFileContents-CbIN7sy7.js";import T from"./assertValidFileOrDirectoryPath-BTlt945W.js";import{o as M,i as P}from"./to-uint-8-array-7sXMoZwU.js";let g;const w=e=>(g??=p(import.meta.url))(e),n=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,y=e=>{if(typeof n<"u"&&n.versions&&n.versions.node){const[i,o]=n.versions.node.split(".").map(Number);if(i>22||i===22&&o>=3||i===20&&o>=16)return n.getBuiltinModule(e)}return w(e)},{mkdirSync:_,readFileSync:h,writeFileSync:v,statSync:S,renameSync:d,chownSync:b,chmodSync:j,unlinkSync:k}=y("node:fs"),H=(e,i,o)=>{o={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...o},T(e),R(i),e=x(e);const c=f(e,B),a=o.flag??"w",m=a.includes("a"),l=a.includes("x");if(c&&(!o.overwrite||l))throw new F(`file already exists, open '${e}'`);const r=M(e);try{!c&&o.recursive&&_(q(e),{recursive:!0});let t,s=typeof i=="string"?Buffer.from(i,o.encoding??"utf8"):P(i);if(m&&c&&(s=Buffer.concat([h(e),s])),v(r,s,{flag:"wx"}),c&&o.backup&&(t=S(e),o.chown??={gid:t.gid,uid:t.uid},d(e,`${e}.bak`)),o.chown)try{b(r,o.chown.uid,o.chown.gid)}catch{}const u=t&&o.mode===void 0?t.mode:o.mode;u!==void 0&&j(r,u),d(r,e)}catch(t){throw new Error(`Failed to write file at: ${e} - ${t.message}`,{cause:t})}finally{f(r)&&k(r)}};export{H as default};
@@ -1,4 +0,0 @@
1
- import{createRequire as q}from"node:module";import{parse as I,stringify as N}from"ini";import{R_OK as O}from"./FIND_UP_STOP-CAwY1qU7.js";import B from"./isAccessible-B7guOm3k.js";import{d as L,m as M}from"./ini-preserve-D1DopDLd.js";import P from"./writeFile-Dnba9aVe.js";let A;const R=e=>(A??=q(import.meta.url))(e),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=e=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[t,n]=i.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return i.getBuiltinModule(e)}return R(e)},{readFile:E}=T("node:fs/promises"),D=async(e,t,n={})=>{const{eol:_,preserveStyle:g=!0,whitespace:y,...h}=n,{align:w,bracketedArray:l,newline:b,platform:v,section:p,sort:j,...k}=h;let a=_,d=y,o,c;if(g&&await B(e,O))try{o=await E(e,"utf8"),c=I(o,{bracketedArray:l??!0});const r=L(o);a??=r.eol,d??=r.whitespace}catch(r){if(r.code!=="ENOENT")throw r}const f={align:w,bracketedArray:l,newline:b,platform:v,section:p,sort:j,whitespace:d},m=(r,u)=>N(r,u===void 0?f:{...f,section:u});let s;o!==void 0&&c?s=M(o,c,t,m,{eol:a??`
2
- `}):(s=m(t,p),a===`\r
3
- `&&(s=s.replaceAll(/\r?\n/g,`\r
4
- `))),await P(e,s,k)};export{D as default};
@@ -1,4 +0,0 @@
1
- import{createRequire as A}from"node:module";import{parse as E,stringify as I}from"ini";import{R_OK as N}from"./FIND_UP_STOP-CAwY1qU7.js";import O from"./isAccessibleSync-XH4YleJW.js";import{d as B,m as L}from"./ini-preserve-D1DopDLd.js";import M from"./writeFileSync-pW8o2DG1.js";let R;const S=e=>(R??=A(import.meta.url))(e),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=e=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[t,n]=i.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return i.getBuiltinModule(e)}return S(e)},{readFileSync:k}=T("node:fs"),D=(e,t,n={})=>{const{eol:_,preserveStyle:g=!0,whitespace:y,...h}=n,{align:b,bracketedArray:a,newline:v,platform:w,section:p,sort:j,...q}=h;let c=_,f=y,o,l;if(g&&O(e,N))try{o=k(e,"utf8"),l=E(o,{bracketedArray:a??!0});const r=B(o);c??=r.eol,f??=r.whitespace}catch(r){if(r.code!=="ENOENT")throw r}const d={align:b,bracketedArray:a,newline:v,platform:w,section:p,sort:j,whitespace:f},m=(r,u)=>I(r,u===void 0?d:{...d,section:u});let s;o!==void 0&&l?s=L(o,l,t,m,{eol:c??`
2
- `}):(s=m(t,p),c===`\r
3
- `&&(s=s.replaceAll(/\r?\n/g,`\r
4
- `))),M(e,s,q)};export{D as default};
@@ -1,4 +0,0 @@
1
- import{createRequire as l}from"node:module";import{k as j}from"./index-B2MhYg3r.js";import{R_OK as N}from"./FIND_UP_STOP-CAwY1qU7.js";import b from"./isAccessible-B7guOm3k.js";import q from"./writeFile-Dnba9aVe.js";let _;const g=e=>(_??=l(import.meta.url))(e),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[t,r]=o.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return o.getBuiltinModule(e)}return g(e)},{readFile:y}=h("node:fs/promises"),B=async(e,t,r={})=>{const{detectIndent:c,indent:a,replacer:f,stringify:d=JSON.stringify,...p}={indent:" ",...r};let s=a,n=`
2
- `;if(await b(e,N))try{const i=await y(e,"utf8");if(c){const{indent:u}=j(i);s=u}n=i.endsWith(`
3
- `)?`
4
- `:""}catch(i){if(i.code!=="ENOENT")throw i}const m=d(t,f,s);await q(e,`${m}${n}`,p)};export{B as default};
@@ -1,4 +0,0 @@
1
- import{createRequire as l}from"node:module";import{k as q}from"./index-B2MhYg3r.js";import y from"json5";import{R_OK as b}from"./FIND_UP_STOP-CAwY1qU7.js";import w from"./isAccessible-B7guOm3k.js";import N from"./writeFile-Dnba9aVe.js";let _;const g=e=>(_??=l(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[t,i]=r.versions.node.split(".").map(Number);if(t>22||t===22&&i>=3||t===20&&i>=16)return r.getBuiltinModule(e)}return g(e)},{readFile:j}=h("node:fs/promises"),O=async(e,t,i={})=>{const{detectIndent:a,indent:f,quote:p,replacer:d,...u}={indent:" ",...i};let s=f,n=`
2
- `;if(await w(e,b))try{const o=await j(e,"utf8");if(a){const{indent:c}=q(o);c&&(s=c)}n=o.endsWith(`
3
- `)?`
4
- `:""}catch(o){if(o.code!=="ENOENT")throw o}const m=y.stringify(t,{quote:p,replacer:d,space:s});await N(e,`${m}${n}`,u)};export{O as default};
@@ -1,4 +0,0 @@
1
- import{createRequire as a}from"node:module";import{k as q}from"./index-B2MhYg3r.js";import y from"json5";import{R_OK as b}from"./FIND_UP_STOP-CAwY1qU7.js";import R from"./isAccessibleSync-XH4YleJW.js";import T from"./writeFileSync-pW8o2DG1.js";let _;const g=e=>(_??=a(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[t,s]=r.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return r.getBuiltinModule(e)}return g(e)},{readFileSync:j}=h("node:fs"),O=(e,t,s={})=>{const{detectIndent:f,indent:d,quote:p,replacer:u,...l}={indent:" ",...s};let i=d,n=`
2
- `;if(R(e,b))try{const o=j(e,"utf8");if(f){const{indent:c}=q(o);c&&(i=c)}n=o.endsWith(`
3
- `)?`
4
- `:""}catch(o){if(o.code!=="ENOENT")throw o}const m=y.stringify(t,{quote:p,replacer:u,space:i});T(e,`${m}${n}`,l)};export{O as default};
@@ -1,4 +0,0 @@
1
- import{createRequire as _}from"node:module";import{k as j}from"./index-B2MhYg3r.js";import{R_OK as N}from"./FIND_UP_STOP-CAwY1qU7.js";import b from"./isAccessibleSync-XH4YleJW.js";import q from"./writeFileSync-pW8o2DG1.js";let a;const g=e=>(a??=_(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[t,n]=r.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return r.getBuiltinModule(e)}return g(e)},{readFileSync:y}=h("node:fs"),B=(e,t,n={})=>{const{detectIndent:c,indent:f,replacer:d,stringify:p=JSON.stringify,...l}={indent:" ",...n};let i=f,s=`
2
- `;if(b(e,N))try{const o=y(e,"utf8");if(c){const{indent:m}=j(o);i=m}s=o.endsWith(`
3
- `)?`
4
- `:""}catch(o){if(o.code!=="ENOENT")throw o}const u=p(t,d,i);q(e,`${u}${s}`,l)};export{B as default};
@@ -1,4 +0,0 @@
1
- import{createRequire as f}from"node:module";import{k as h}from"./index-B2MhYg3r.js";import{R_OK as N}from"./FIND_UP_STOP-CAwY1qU7.js";import j from"./isAccessible-B7guOm3k.js";import{b as y}from"./jsonc-merge-Bkw73TLW.js";import T from"./writeFile-Dnba9aVe.js";let _;const g=e=>(_??=f(import.meta.url))(e),a=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,w=e=>{if(typeof a<"u"&&a.versions&&a.versions.node){const[t,n]=a.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return a.getBuiltinModule(e)}return g(e)},{readFile:b}=w("node:fs/promises"),x=async(e,t,n)=>{let r,o=n,s=`
2
- `;if(!await j(e,N))return{indent:o,trailingNewline:s};try{if(r=await b(e,"utf8"),t){const{indent:i}=h(r);i&&(o=i)}s=r.endsWith(`
3
- `)?`
4
- `:""}catch(i){if(i.code!=="ENOENT")throw i}return{existingText:r,indent:o,trailingNewline:s}},M=async(e,t,n={})=>{const{detectIndent:r,formattingOptions:o,indent:s,preserveComments:i=!0,replacer:c,...d}={indent:" ",...n},{existingText:l,indent:p,trailingNewline:u}=await x(e,r,s),m=y(l,t,i,p,u,o,c);await T(e,m,d)};export{M as default};
@@ -1,4 +0,0 @@
1
- import{createRequire as a}from"node:module";import{k as b}from"./index-B2MhYg3r.js";import{R_OK as j}from"./FIND_UP_STOP-CAwY1qU7.js";import T from"./isAccessibleSync-XH4YleJW.js";import{b as x}from"./jsonc-merge-Bkw73TLW.js";import y from"./writeFileSync-pW8o2DG1.js";let _;const g=e=>(_??=a(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[t,i]=c.versions.node.split(".").map(Number);if(t>22||t===22&&i>=3||t===20&&i>=16)return c.getBuiltinModule(e)}return g(e)},{readFileSync:N}=h("node:fs"),O=(e,t,i)=>{let r,o=i,s=`
2
- `;if(!T(e,j))return{indent:o,trailingNewline:s};try{if(r=N(e,"utf8"),t){const{indent:n}=b(r);n&&(o=n)}s=r.endsWith(`
3
- `)?`
4
- `:""}catch(n){if(n.code!=="ENOENT")throw n}return{existingText:r,indent:o,trailingNewline:s}},M=(e,t,i={})=>{const{detectIndent:r,formattingOptions:o,indent:s,preserveComments:n=!0,replacer:d,...l}={indent:" ",...i},{existingText:u,indent:f,trailingNewline:p}=O(e,r,s),m=x(u,t,n,f,p,o,d);y(e,m,l)};export{M as default};
@@ -1 +0,0 @@
1
- import{stringify as a}from"smol-toml";import i from"./writeFile-Dnba9aVe.js";const p=async(t,o,r)=>{await i(t,a(o),r)};export{p as default};
@@ -1 +0,0 @@
1
- import{stringify as f}from"smol-toml";import i from"./writeFileSync-pW8o2DG1.js";const e=(o,r,t)=>{i(o,f(r),t)};export{e as default};
@@ -1 +0,0 @@
1
- import{stringify as n}from"@visulima/yaml";import t from"./writeFile-Dnba9aVe.js";async function l(p,c,e,f){let r,a,o;typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e!="function"?(r=e,a=r.replacer,o=r.space):typeof f=="object"?(r=f,a=e,o=r.space):(a=e,o=f);const i=n(c,a,o??r);await t(p,i,r)}export{l as default};
@@ -1 +0,0 @@
1
- import{stringify as n}from"@visulima/yaml";import t from"./writeFileSync-pW8o2DG1.js";function y(a,c,e,f){let r,o,p;typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e!="function"?(r=e,o=r.replacer,p=r.space):typeof f=="object"?(r=f,o=e,p=r.space):(o=e,p=f);const i=n(c,o,p??r);t(a,i,r)}export{y as default};