@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{g as wt}from"./_commonjsHelpers-CqkleIqs.js";var gt={},bt,Ct;function _t(){if(Ct)return bt;Ct=1;const g="\\\\/",d=`[^${g}]`,q=0,F=Symbol("unignore"),O="\\.",c="\\+",a="\\?",i="\\/",f="(?=.)",v="[^/]",y=`(?:${i}|$)`,M=`(?:^|${i})`,I=`${O}{1,2}${y}`,w=`(?!${O})`,K=`(?!${M}${I})`,it=`(?!${O}{0,1}${y})`,j=`(?!${I})`,tt=`[^.${i}]`,z=`${v}*?`,l={DOT_LITERAL:O,PLUS_LITERAL:c,QMARK_LITERAL:a,SLASH_LITERAL:i,ONE_CHAR:f,QMARK:v,END_ANCHOR:y,DOTS_SLASH:I,NO_DOT:w,NO_DOTS:K,NO_DOT_SLASH:it,NO_DOTS_SLASH:j,QMARK_NO_DOT:tt,STAR:z,START_ANCHOR:M,SEP:"/"},t={...l,SLASH_LITERAL:`[${g}]`,QMARK:d,STAR:`${d}*?`,DOTS_SLASH:`${O}{1,2}(?:[${g}]|$)`,NO_DOT:`(?!${O})`,NO_DOTS:`(?!(?:^|[${g}])${O}{1,2}(?:[${g}]|$))`,NO_DOT_SLASH:`(?!${O}{0,1}(?:[${g}]|$))`,NO_DOTS_SLASH:`(?!${O}{1,2}(?:[${g}]|$))`,QMARK_NO_DOT:`[^.${g}]`,START_ANCHOR:`(?:^|[${g}])`,END_ANCHOR:`(?:[${g}]|$)`,SEP:"\\"},E={__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:q,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:E,UNIGNORE:F,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(h){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${h.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(h){return h===!0?t:l}},bt}var $t;function Et(){return $t||($t=1,(function(g){const{REGEX_BACKSLASH:d,REGEX_REMOVE_BACKSLASH:q,REGEX_SPECIAL_CHARS:F,REGEX_SPECIAL_CHARS_GLOBAL:O}=_t();g.isObject=c=>c!==null&&typeof c=="object"&&!Array.isArray(c),g.hasRegexChars=c=>F.test(c),g.isRegexChar=c=>c.length===1&&g.hasRegexChars(c),g.escapeRegex=c=>c.replace(O,"\\$1"),g.toPosixSlashes=c=>c.replace(d,"/"),g.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const c=navigator.platform.toLowerCase();return c==="win32"||c==="windows"}return process.platform?process.platform==="win32":!1},g.removeBackslashes=c=>c.replace(q,a=>a==="\\"?"":a),g.escapeLast=(c,a,i)=>{const f=c.lastIndexOf(a,i);return f===-1?c:c[f-1]==="\\"?g.escapeLast(c,a,f-1):`${c.slice(0,f)}\\${c.slice(f)}`},g.removePrefix=(c,a={})=>{let i=c;return i.startsWith("./")&&(i=i.slice(2),a.prefix="./"),i},g.wrapOutput=(c,a={},i={})=>{const f=i.contains?"":"^",v=i.contains?"":"$";let y=`${f}(?:${c})${v}`;return a.negated===!0&&(y=`(?:^(?!${y}).*$)`),y},g.basename=(c,{windows:a}={})=>{const i=c.split(a?/[\\/]/:"/"),f=i[i.length-1];return f===""?i[i.length-2]:f}})(gt)),gt}var xt,Ht;function Nt(){if(Ht)return xt;Ht=1;const g=Et(),{CHAR_ASTERISK:d,CHAR_AT:q,CHAR_BACKWARD_SLASH:F,CHAR_COMMA:O,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:a,CHAR_FORWARD_SLASH:i,CHAR_LEFT_CURLY_BRACE:f,CHAR_LEFT_PARENTHESES:v,CHAR_LEFT_SQUARE_BRACKET:y,CHAR_PLUS:M,CHAR_QUESTION_MARK:I,CHAR_RIGHT_CURLY_BRACE:w,CHAR_RIGHT_PARENTHESES:K,CHAR_RIGHT_SQUARE_BRACKET:it}=_t(),j=s=>s===i||s===F,tt=s=>{s.isPrefix!==!0&&(s.depth=s.isGlobstar?1/0:1)};return xt=(s,l)=>{const t=l||{},E=s.length-1,h=t.parts===!0||t.scanToEnd===!0,A=[],p=[],R=[];let P=s,U=-1,B=0,et=0,Q=!1,rt=!1,N=!1,at=!1,ft=!1,nt=!1,H=!1,st=!1,ht=!1,W=!1,X=0,V,_,S={value:"",depth:0,isGlob:!1};const n=()=>U>=E,Z=()=>P.charCodeAt(U+1),G=()=>(V=_,P.charCodeAt(++U));for(;U<E;){_=G();let C;if(_===F){H=S.backslashes=!0,_=G(),_===f&&(nt=!0);continue}if(nt===!0||_===f){for(X++;n()!==!0&&(_=G());){if(_===F){H=S.backslashes=!0,G();continue}if(_===f){X++;continue}if(nt!==!0&&_===c&&(_=G())===c){if(Q=S.isBrace=!0,N=S.isGlob=!0,W=!0,h===!0)continue;break}if(nt!==!0&&_===O){if(Q=S.isBrace=!0,N=S.isGlob=!0,W=!0,h===!0)continue;break}if(_===w&&(X--,X===0)){nt=!1,Q=S.isBrace=!0,W=!0;break}}if(h===!0)continue;break}if(_===i){if(A.push(U),p.push(S),S={value:"",depth:0,isGlob:!1},W===!0)continue;if(V===c&&U===B+1){B+=2;continue}et=U+1;continue}if(t.noext!==!0&&(_===M||_===q||_===d||_===I||_===a)===!0&&Z()===v){if(N=S.isGlob=!0,at=S.isExtglob=!0,W=!0,_===a&&U===B&&(ht=!0),h===!0){for(;n()!==!0&&(_=G());){if(_===F){H=S.backslashes=!0,_=G();continue}if(_===K){N=S.isGlob=!0,W=!0;break}}continue}break}if(_===d){if(V===d&&(ft=S.isGlobstar=!0),N=S.isGlob=!0,W=!0,h===!0)continue;break}if(_===I){if(N=S.isGlob=!0,W=!0,h===!0)continue;break}if(_===y){for(;n()!==!0&&(C=G());){if(C===F){H=S.backslashes=!0,G();continue}if(C===it){rt=S.isBracket=!0,N=S.isGlob=!0,W=!0;break}}if(h===!0)continue;break}if(t.nonegate!==!0&&_===a&&U===B){st=S.negated=!0,B++;continue}if(t.noparen!==!0&&_===v){if(N=S.isGlob=!0,h===!0){for(;n()!==!0&&(_=G());){if(_===v){H=S.backslashes=!0,_=G();continue}if(_===K){W=!0;break}}continue}break}if(N===!0){if(W=!0,h===!0)continue;break}}t.noext===!0&&(at=!1,N=!1);let k=P,e="",r="";B>0&&(e=P.slice(0,B),P=P.slice(B),et-=B),k&&N===!0&&et>0?(k=P.slice(0,et),r=P.slice(et)):N===!0?(k="",r=P):k=P,k&&k!==""&&k!=="/"&&k!==P&&j(k.charCodeAt(k.length-1))&&(k=k.slice(0,-1)),t.unescape===!0&&(r&&(r=g.removeBackslashes(r)),k&&H===!0&&(k=g.removeBackslashes(k)));const J={prefix:e,input:s,start:B,base:k,glob:r,isBrace:Q,isBracket:rt,isGlob:N,isExtglob:at,isGlobstar:ft,negated:st,negatedExtglob:ht};if(t.tokens===!0&&(J.maxDepth=0,j(_)||p.push(S),J.tokens=p),t.parts===!0||t.tokens===!0){let C;for(let L=0;L<A.length;L++){const ct=C?C+1:B,Y=A[L],lt=s.slice(ct,Y);t.tokens&&(L===0&&B!==0?(p[L].isPrefix=!0,p[L].value=e):p[L].value=lt,tt(p[L]),J.maxDepth+=p[L].depth),(L!==0||lt!=="")&&R.push(lt),C=Y}if(C&&C+1<s.length){const L=s.slice(C+1);R.push(L),t.tokens&&(p[p.length-1].value=L,tt(p[p.length-1]),J.maxDepth+=p[p.length-1].depth)}J.slashes=A,J.parts=R}return J},xt}var St,mt;function kt(){if(mt)return St;mt=1;const g=_t(),d=Et(),{MAX_LENGTH:q,POSIX_REGEX_SOURCE:F,REGEX_NON_SPECIAL_CHARS:O,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:a}=g,i=(s,l)=>{if(typeof l.expandRange=="function")return l.expandRange(...s,l);s.sort();const t=`[${s.join("-")}]`;try{new RegExp(t)}catch{return s.map(h=>d.escapeRegex(h)).join("..")}return t},f=(s,l)=>`Missing ${s}: "${l}" - use "\\\\${l}" to match literal characters`,v=s=>{const l=[];let t=0,E=0,h=0,A="",p=!1;for(const R of s){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==="(")E++;else if(R===")"&&E>0)E--;else if(R==="|"&&E===0){l.push(A),A="";continue}}}A+=R}return l.push(A),l},y=s=>{let l=!1;for(const t of s){if(l===!0){l=!1;continue}if(t==="\\"){l=!0;continue}if(/[?*+@!()[\]{}]/.test(t))return!1}return!0},M=s=>{let l=s.trim(),t=!0;for(;t===!0;)t=!1,/^@\([^\\()[\]{}|]+\)$/.test(l)&&(l=l.slice(2,-1),t=!0);if(y(l))return l.replace(/\\(.)/g,"$1")},I=s=>{const l=s.map(M).filter(Boolean);for(let t=0;t<l.length;t++)for(let E=t+1;E<l.length;E++){const h=l[t],A=l[E],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},w=(s,l=!0)=>{if(s[0]!=="+"&&s[0]!=="*"||s[1]!=="(")return;let t=0,E=0,h=0,A=!1;for(let p=1;p<s.length;p++){const R=s[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==="("){E++;continue}if(R===")"&&(E--,E===0))return l===!0&&p!==s.length-1?void 0:{type:s[0],body:s.slice(2,p),end:p}}}}},K=s=>`${s.length===1?d.escapeRegex(s[0]):`[${s.map(t=>d.escapeRegex(t)).join("")}]`}*`,it=s=>{let l=0;const t=[];for(;l<s.length;){const E=w(s.slice(l),!1);if(!E||E.type!=="*")return;const h=v(E.body).map(p=>p.trim());if(h.length!==1)return;const A=M(h[0]);if(!A||A.length!==1)return;t.push(A),l+=E.end+1}if(!(t.length<1))return t},j=s=>{let l=0,t=s.trim(),E=w(t);for(;E;)l++,t=E.body.trim(),E=w(t);return l},tt=(s,l)=>{if(l.maxExtglobRecursion===!1)return{risky:!1};const t=typeof l.maxExtglobRecursion=="number"?l.maxExtglobRecursion:g.DEFAULT_MAX_EXTGLOB_RECURSION,E=v(s).map(R=>R.trim());if(E.length>1&&(E.some(R=>R==="")||E.some(R=>/^[*?]+$/.test(R))||I(E)))return{risky:!0};const h=[];let A=!1,p=!0;for(const R of E){const P=it(R);if(P){A=!0,h.push(...P);continue}const U=M(R);if(U&&U.length===1){h.push(U);continue}if(p=!1,j(R)>t)return{risky:!0}}return A?p?{risky:!0,safeOutput:K([...new Set(h)])}:{risky:!0}:{risky:!1}},z=(s,l)=>{if(typeof s!="string")throw new TypeError("Expected a string");s=a[s]||s;const t={...l},E=typeof t.maxLength=="number"?Math.min(q,t.maxLength):q;let h=s.length;if(h>E)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${E}`);const A={type:"bos",value:"",output:t.prepend||""},p=[A],R=t.capture?"":"?:",P=g.globChars(t.windows),U=g.extglobChars(P),{DOT_LITERAL:B,PLUS_LITERAL:et,SLASH_LITERAL:Q,ONE_CHAR:rt,DOTS_SLASH:N,NO_DOT:at,NO_DOT_SLASH:ft,NO_DOTS_SLASH:nt,QMARK:H,QMARK_NO_DOT:st,STAR:ht,START_ANCHOR:W}=P,X=o=>`(${R}(?:(?!${W}${o.dot?N:B}).)*?)`,V=t.dot?"":at,_=t.dot?H:st;let S=t.bash===!0?X(t):ht;t.capture&&(S=`(${S})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);const n={input:s,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};s=d.removePrefix(s,n),h=s.length;const Z=[],G=[],k=[];let e=A,r;const J=()=>n.index===h-1,C=n.peek=(o=1)=>s[n.index+o],L=n.advance=()=>s[++n.index]||"",ct=()=>s.slice(n.index+1),Y=(o="",T=0)=>{n.consumed+=o,n.index+=T},lt=o=>{n.output+=o.output!=null?o.output:o.value,Y(o.value)},Tt=()=>{let o=1;for(;C()==="!"&&(C(2)!=="("||C(3)==="?");)L(),n.start++,o++;return o%2===0?!1:(n.negated=!0,n.start++,!0)},Rt=o=>{n[o]++,k.push(o)},pt=o=>{n[o]--,k.pop()},b=o=>{if(e.type==="globstar"){const T=n.braces>0&&(o.type==="comma"||o.type==="brace"),u=o.extglob===!0||Z.length&&(o.type==="pipe"||o.type==="paren");o.type!=="slash"&&o.type!=="paren"&&!T&&!u&&(n.output=n.output.slice(0,-e.output.length),e.type="star",e.value="*",e.output=S,n.output+=e.output)}if(Z.length&&o.type!=="paren"&&(Z[Z.length-1].inner+=o.value),(o.value||o.output)&<(o),e&&e.type==="text"&&o.type==="text"){e.output=(e.output||e.value)+o.value,e.value+=o.value;return}o.prev=e,p.push(o),e=o},At=(o,T)=>{const u={...U[T],conditions:1,inner:""};u.prev=e,u.parens=n.parens,u.output=n.output,u.startIndex=n.index,u.tokensIndex=p.length;const x=(t.capture?"(":"")+u.open;Rt("parens"),b({type:o,value:T,output:n.output?"":rt}),b({type:"paren",extglob:!0,value:L(),output:x}),Z.push(u)},vt=o=>{const T=s.slice(o.startIndex,n.index+1),u=s.slice(o.startIndex+2,n.index),x=tt(u,t);if((o.type==="plus"||o.type==="star")&&x.risky){const $=x.safeOutput?(o.output?"":rt)+(t.capture?`(${x.safeOutput})`:x.safeOutput):void 0,ut=p[o.tokensIndex];ut.type="text",ut.value=T,ut.output=$||d.escapeRegex(T);for(let ot=o.tokensIndex+1;ot<p.length;ot++)p[ot].value="",p[ot].output="",delete p[ot].suffix;n.output=o.output+ut.output,n.backtrack=!0,b({type:"paren",extglob:!0,value:r,output:""}),pt("parens");return}let m=o.close+(t.capture?")":""),D;if(o.type==="negate"){let $=S;if(o.inner&&o.inner.length>1&&o.inner.includes("/")&&($=X(t)),($!==S||J()||/^\)+$/.test(ct()))&&(m=o.close=`)$))${$}`),o.inner.includes("*")&&(D=ct())&&/^\.[^\\/.]+$/.test(D)){const ut=z(D,{...l,fastpaths:!1}).output;m=o.close=`)${ut})${$})`}o.prev.type==="bos"&&(n.negatedExtglob=!0)}b({type:"paren",extglob:!0,value:r,output:m}),pt("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(s)){let o=!1,T=s.replace(c,(u,x,m,D,$,ut)=>D==="\\"?(o=!0,u):D==="?"?x?x+D+($?H.repeat($.length):""):ut===0?_+($?H.repeat($.length):""):H.repeat(m.length):D==="."?B.repeat(m.length):D==="*"?x?x+D+($?S:""):S:x?u:`\\${u}`);return o===!0&&(t.unescape===!0?T=T.replace(/\\/g,""):T=T.replace(/\\+/g,u=>u.length%2===0?"\\\\":u?"\\":"")),T===s&&t.contains===!0?(n.output=s,n):(n.output=d.wrapOutput(T,n,l),n)}for(;!J();){if(r=L(),r==="\0")continue;if(r==="\\"){const u=C();if(u==="/"&&t.bash!==!0||u==="."||u===";")continue;if(!u){r+="\\",b({type:"text",value:r});continue}const x=/^\\+/.exec(ct());let m=0;if(x&&x[0].length>2&&(m=x[0].length,n.index+=m,m%2!==0&&(r+="\\")),t.unescape===!0?r=L():r+=L(),n.brackets===0){b({type:"text",value:r});continue}}if(n.brackets>0&&(r!=="]"||e.value==="["||e.value==="[^")){if(t.posix!==!1&&r===":"){const u=e.value.slice(1);if(u.includes("[")&&(e.posix=!0,u.includes(":"))){const x=e.value.lastIndexOf("["),m=e.value.slice(0,x),D=e.value.slice(x+2),$=F[D];if($){e.value=m+$,n.backtrack=!0,L(),!A.output&&p.indexOf(e)===1&&(A.output=rt);continue}}}(r==="["&&C()!==":"||r==="-"&&C()==="]")&&(r=`\\${r}`),r==="]"&&(e.value==="["||e.value==="[^")&&(r=`\\${r}`),t.posix===!0&&r==="!"&&e.value==="["&&(r="^"),e.value+=r,lt({value:r});continue}if(n.quotes===1&&r!=='"'){r=d.escapeRegex(r),e.value+=r,lt({value:r});continue}if(r==='"'){n.quotes=n.quotes===1?0:1,t.keepQuotes===!0&&b({type:"text",value:r});continue}if(r==="("){Rt("parens"),b({type:"paren",value:r});continue}if(r===")"){if(n.parens===0&&t.strictBrackets===!0)throw new SyntaxError(f("opening","("));const u=Z[Z.length-1];if(u&&n.parens===u.parens+1){vt(Z.pop());continue}b({type:"paren",value:r,output:n.parens?")":"\\)"}),pt("parens");continue}if(r==="["){if(t.nobracket===!0||!ct().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(f("closing","]"));r=`\\${r}`}else Rt("brackets");b({type:"bracket",value:r});continue}if(r==="]"){if(t.nobracket===!0||e&&e.type==="bracket"&&e.value.length===1){b({type:"text",value:r,output:`\\${r}`});continue}if(n.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(f("opening","["));b({type:"text",value:r,output:`\\${r}`});continue}pt("brackets");const u=e.value.slice(1);if(e.posix!==!0&&u[0]==="^"&&!u.includes("/")&&(r=`/${r}`),e.value+=r,lt({value:r}),t.literalBrackets===!1||d.hasRegexChars(u))continue;const x=d.escapeRegex(e.value);if(n.output=n.output.slice(0,-e.value.length),t.literalBrackets===!0){n.output+=x,e.value=x;continue}e.value=`(${R}${x}|${e.value})`,n.output+=e.value;continue}if(r==="{"&&t.nobrace!==!0){Rt("braces");const u={type:"brace",value:r,output:"(",outputIndex:n.output.length,tokensIndex:n.tokens.length};G.push(u),b(u);continue}if(r==="}"){const u=G[G.length-1];if(t.nobrace===!0||!u){b({type:"text",value:r,output:r});continue}let x=")";if(u.dots===!0){const m=p.slice(),D=[];for(let $=m.length-1;$>=0&&(p.pop(),m[$].type!=="brace");$--)m[$].type!=="dots"&&D.unshift(m[$].value);x=i(D,t),n.backtrack=!0}if(u.comma!==!0&&u.dots!==!0){const m=n.output.slice(0,u.outputIndex),D=n.tokens.slice(u.tokensIndex);u.value=u.output="\\{",r=x="\\}",n.output=m;for(const $ of D)n.output+=$.output||$.value}b({type:"brace",value:r,output:x}),pt("braces"),G.pop();continue}if(r==="|"){Z.length>0&&Z[Z.length-1].conditions++,b({type:"text",value:r});continue}if(r===","){let u=r;const x=G[G.length-1];x&&k[k.length-1]==="braces"&&(x.comma=!0,u="|"),b({type:"comma",value:r,output:u});continue}if(r==="/"){if(e.type==="dot"&&n.index===n.start+1){n.start=n.index+1,n.consumed="",n.output="",p.pop(),e=A;continue}b({type:"slash",value:r,output:Q});continue}if(r==="."){if(n.braces>0&&e.type==="dot"){e.value==="."&&(e.output=B);const u=G[G.length-1];e.type="dots",e.output+=r,e.value+=r,u.dots=!0;continue}if(n.braces+n.parens===0&&e.type!=="bos"&&e.type!=="slash"){b({type:"text",value:r,output:B});continue}b({type:"dot",value:r,output:B});continue}if(r==="?"){if(!(e&&e.value==="(")&&t.noextglob!==!0&&C()==="("&&C(2)!=="?"){At("qmark",r);continue}if(e&&e.type==="paren"){const x=C();let m=r;(e.value==="("&&!/[!=<:]/.test(x)||x==="<"&&!/<([!=]|\w+>)/.test(ct()))&&(m=`\\${r}`),b({type:"text",value:r,output:m});continue}if(t.dot!==!0&&(e.type==="slash"||e.type==="bos")){b({type:"qmark",value:r,output:st});continue}b({type:"qmark",value:r,output:H});continue}if(r==="!"){if(t.noextglob!==!0&&C()==="("&&(C(2)!=="?"||!/[!=<:]/.test(C(3)))){At("negate",r);continue}if(t.nonegate!==!0&&n.index===0){Tt();continue}}if(r==="+"){if(t.noextglob!==!0&&C()==="("&&C(2)!=="?"){At("plus",r);continue}if(e&&e.value==="("||t.regex===!1){b({type:"plus",value:r,output:et});continue}if(e&&(e.type==="bracket"||e.type==="paren"||e.type==="brace")||n.parens>0){b({type:"plus",value:r});continue}b({type:"plus",value:et});continue}if(r==="@"){if(t.noextglob!==!0&&C()==="("&&C(2)!=="?"){b({type:"at",extglob:!0,value:r,output:""});continue}b({type:"text",value:r});continue}if(r!=="*"){(r==="$"||r==="^")&&(r=`\\${r}`);const u=O.exec(ct());u&&(r+=u[0],n.index+=u[0].length),b({type:"text",value:r});continue}if(e&&(e.type==="globstar"||e.star===!0)){e.type="star",e.star=!0,e.value+=r,e.output=S,n.backtrack=!0,n.globstar=!0,Y(r);continue}let o=ct();if(t.noextglob!==!0&&/^\([^?]/.test(o)){At("star",r);continue}if(e.type==="star"){if(t.noglobstar===!0){Y(r);continue}const u=e.prev,x=u.prev,m=u.type==="slash"||u.type==="bos",D=x&&(x.type==="star"||x.type==="globstar");if(t.bash===!0&&(!m||o[0]&&o[0]!=="/")){b({type:"star",value:r,output:""});continue}const $=n.braces>0&&(u.type==="comma"||u.type==="brace"),ut=Z.length&&(u.type==="pipe"||u.type==="paren");if(!m&&u.type!=="paren"&&!$&&!ut){b({type:"star",value:r,output:""});continue}for(;o.slice(0,3)==="/**";){const ot=s[n.index+4];if(ot&&ot!=="/")break;o=o.slice(3),Y("/**",3)}if(u.type==="bos"&&J()){e.type="globstar",e.value+=r,e.output=X(t),n.output=e.output,n.globstar=!0,Y(r);continue}if(u.type==="slash"&&u.prev.type!=="bos"&&!D&&J()){n.output=n.output.slice(0,-(u.output+e.output).length),u.output=`(?:${u.output}`,e.type="globstar",e.output=X(t)+(t.strictSlashes?")":"|$)"),e.value+=r,n.globstar=!0,n.output+=u.output+e.output,Y(r);continue}if(u.type==="slash"&&u.prev.type!=="bos"&&o[0]==="/"){const ot=o[1]!==void 0?"|$":"";n.output=n.output.slice(0,-(u.output+e.output).length),u.output=`(?:${u.output}`,e.type="globstar",e.output=`${X(t)}${Q}|${Q}${ot})`,e.value+=r,n.output+=u.output+e.output,n.globstar=!0,Y(r+L()),b({type:"slash",value:"/",output:""});continue}if(u.type==="bos"&&o[0]==="/"){e.type="globstar",e.value+=r,e.output=`(?:^|${Q}|${X(t)}${Q})`,n.output=e.output,n.globstar=!0,Y(r+L()),b({type:"slash",value:"/",output:""});continue}if($&&o[0]==="/"){e.type="globstar",e.value+=r,e.output=`(?:^|${Q}|${X(t)}${Q})`,n.output+=e.output,n.globstar=!0,Y(r+L()),b({type:"slash",value:"/",output:""});continue}n.output=n.output.slice(0,-e.output.length),e.type="globstar",e.output=X(t),e.value+=r,n.output+=e.output,n.globstar=!0,Y(r);continue}const T={type:"star",value:r,output:S};if(t.bash===!0){T.output=".*?",(e.type==="bos"||e.type==="slash")&&(T.output=V+T.output),b(T);continue}if(e&&(e.type==="bracket"||e.type==="paren")&&t.regex===!0){T.output=r,b(T);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),C()!=="*"&&(n.output+=rt,e.output+=rt)),b(T)}for(;n.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(f("closing","]"));n.output=d.escapeLast(n.output,"["),pt("brackets")}for(;n.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(f("closing",")"));n.output=d.escapeLast(n.output,"("),pt("parens")}for(;n.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(f("closing","}"));n.output=d.escapeLast(n.output,"{"),pt("braces")}if(t.strictSlashes!==!0&&(e.type==="star"||e.type==="bracket")&&b({type:"maybe_slash",value:"",output:`${Q}?`}),n.backtrack===!0){n.output="";for(const o of n.tokens)n.output+=o.output!=null?o.output:o.value,o.suffix&&(n.output+=o.suffix)}return n};return z.fastpaths=(s,l)=>{const t={...l},E=typeof t.maxLength=="number"?Math.min(q,t.maxLength):q,h=s.length;if(h>E)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${E}`);s=a[s]||s;const{DOT_LITERAL:A,SLASH_LITERAL:p,ONE_CHAR:R,DOTS_SLASH:P,NO_DOT:U,NO_DOTS:B,NO_DOTS_SLASH:et,STAR:Q,START_ANCHOR:rt}=g.globChars(t.windows),N=t.dot?B:U,at=t.dot?et:U,ft=t.capture?"":"?:",nt={negated:!1,prefix:""};let H=t.bash===!0?".*?":Q;t.capture&&(H=`(${H})`);const st=V=>V.noglobstar===!0?H:`(${ft}(?:(?!${rt}${V.dot?P:A}).)*?)`,ht=V=>{switch(V){case"*":return`${N}${R}${H}`;case".*":return`${A}${R}${H}`;case"*.*":return`${N}${H}${A}${R}${H}`;case"*/*":return`${N}${H}${p}${R}${at}${H}`;case"**":return N+st(t);case"**/*":return`(?:${N}${st(t)}${p})?${at}${R}${H}`;case"**/*.*":return`(?:${N}${st(t)}${p})?${at}${H}${A}${R}${H}`;case"**/.*":return`(?:${N}${st(t)}${p})?${A}${R}${H}`;default:{const _=/^(.*?)\.(\w+)$/.exec(V);if(!_)return;const S=ht(_[1]);return S?S+A+_[2]:void 0}}},W=d.removePrefix(s,nt);let X=ht(W);return X&&t.strictSlashes!==!0&&(X+=`${p}?`),X},St=z,St}var yt,Ot;function It(){if(Ot)return yt;Ot=1;const g=Nt(),d=kt(),q=Et(),F=_t(),O=a=>a&&typeof a=="object"&&!Array.isArray(a),c=(a,i,f=!1)=>{if(Array.isArray(a)){const j=a.map(z=>c(z,i,f));return z=>{for(const s of j){const l=s(z);if(l)return l}return!1}}const v=O(a)&&a.tokens&&a.input;if(a===""||typeof a!="string"&&!v)throw new TypeError("Expected pattern to be a non-empty string");const y=i||{},M=y.windows,I=v?c.compileRe(a,i):c.makeRe(a,i,!1,!0),w=I.state;delete I.state;let K=()=>!1;if(y.ignore){const j={...i,ignore:null,onMatch:null,onResult:null};K=c(y.ignore,j,f)}const it=(j,tt=!1)=>{const{isMatch:z,match:s,output:l}=c.test(j,I,i,{glob:a,posix:M}),t={glob:a,state:w,regex:I,posix:M,input:j,output:l,match:s,isMatch:z};if(typeof y.onResult=="function"&&y.onResult(t),z===!1)return t.isMatch=!1,tt?t:!1;t:if(K(j)){if(typeof y.onIgnore=="function"&&y.onIgnore(t)===F.UNIGNORE){t.isMatch=!0;break t}return t.isMatch=!1,tt?t:!1}return typeof y.onMatch=="function"&&y.onMatch(t),tt?t:!0};return f&&(it.state=w),it};return c.test=(a,i,f,{glob:v,posix:y}={})=>{if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a==="")return{isMatch:!1,output:""};const M=f||{},I=M.format||(y?q.toPosixSlashes:null);let w=a===v,K=w&&I?I(a):a;return w===!1&&(K=I?I(a):a,w=K===v),(w===!1||M.capture===!0)&&(M.matchBase===!0||M.basename===!0?w=c.matchBase(a,i,f,y):w=i.exec(K)),{isMatch:!!w,match:w,output:K}},c.matchBase=(a,i,f,v=f&&f.windows)=>(i instanceof RegExp?i:c.makeRe(i,f)).test(q.basename(a,{windows:v})),c.isMatch=(a,i,f)=>c(i,f)(a),c.parse=(a,i)=>Array.isArray(a)?a.map(f=>c.parse(f,i)):d(a,{...i,fastpaths:!1}),c.scan=(a,i)=>g(a,i),c.compileRe=(a,i,f=!1,v=!1)=>{if(f===!0)return a.output;const y=i||{},M=y.contains?"":"^",I=y.contains?"":"$";let w=`${M}(?:${a.output})${I}`;a&&a.negated===!0&&(w=`^(?!${w}).*$`);const K=c.toRegex(w,i);return v===!0&&(K.state=a),K},c.makeRe=(a,i={},f=!1,v=!1)=>{if(!a||typeof a!="string")throw new TypeError("Expected a non-empty string");let y={negated:!1,fastpaths:!0};return i.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(y.output=d.fastpaths(a,i)),y.output||(y=d(a,i)),c.compileRe(y,i,f,v)},c.toRegex=(a,i)=>{try{const f=i||{};return new RegExp(a,f.flags||(f.nocase?"i":""))}catch(f){if(i&&i.debug===!0)throw f;return/$^/}},c.constants=F,yt=c,yt}var dt,Lt;function Bt(){if(Lt)return dt;Lt=1;const g=It(),d=Et();function q(F,O,c=!1){return O&&(O.windows===null||O.windows===void 0)&&(O={...O,windows:d.isWindows()}),g(F,O,c)}return Object.assign(q,g),dt=q,dt}var Gt=Bt();const Dt=wt(Gt);export{Dt as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as ot}from"node:module";import{p as _}from"./index-DDkv7LRn.js";let ct;const lt=t=>(ct??=ot(import.meta.url))(t),D=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,F=t=>{if(typeof D<"u"&&D.versions&&D.versions.node){const[e,s]=D.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return D.getBuiltinModule(t)}return lt(t)},W=F("fs"),ut={...W,default:W},{statSync:at,stat:ht,realpathSync:ft,realpath:pt,readdirSync:gt,readdir:dt}=F("fs"),{sep:z,basename:yt,dirname:O,resolve:G,normalize:mt,relative:St,posix:P,isAbsolute:bt}=F("path"),{fileURLToPath:vt}=F("url"),{createRequire:wt}=F("module");var I=wt(import.meta.url);function Pt(t){let e=mt(t);return e.length>1&&e[e.length-1]===z&&(e=e.substring(0,e.length-1)),e}const _t=/[\\/]/g;function U(t,e){return t.replace(_t,e)}const kt=/^[a-z]:[\\/]$/i;function Dt(t){return t==="/"||kt.test(t)}function $(t,e){const{resolvePaths:s,normalizePath:n,pathSeparator:r}=e,o=process.platform==="win32"&&t.includes("/")||t.startsWith(".");if(s&&(t=G(t)),(n||o)&&(t=Pt(t)),t===".")return"";const i=t[t.length-1]!==r;return U(i?t+r:t,r)}function Y(t,e){return e+t}function Et(t,e){return function(s,n){return n.startsWith(t)?n.slice(t.length)+s:U(St(t,n),e.pathSeparator)+e.pathSeparator+s}}function Ft(t){return t}function Rt(t,e,s){return e+t+s}function xt(t,e){const{relativePaths:s,includeBasePath:n}=e;return s&&t?Et(t,e):n?Y:Ft}function At(t){return function(e,s){s.push(e.substring(t.length)||".")}}function $t(t){return function(e,s,n){const r=e.substring(t.length)||".";n.every(o=>o(r,!0))&&s.push(r)}}const Ct=(t,e)=>{e.push(t||".")},Ot=(t,e,s)=>{const n=t||".";s.every(r=>r(n,!0))&&e.push(n)},qt=()=>{};function jt(t,e){const{includeDirs:s,filters:n,relativePaths:r}=e;return s?r?n&&n.length?$t(t):At(t):n&&n.length?Ot:Ct:qt}const Wt=(t,e,s,n)=>{n.every(r=>r(t,!1))&&s.files++},It=(t,e,s,n)=>{n.every(r=>r(t,!1))&&e.push(t)},Mt=(t,e,s,n)=>{s.files++},Bt=(t,e)=>{e.push(t)},Lt=()=>{};function Nt(t){const{excludeFiles:e,filters:s,onlyCounts:n}=t;return e?Lt:s&&s.length?n?Wt:It:n?Mt:Bt}const Tt=t=>t,zt=()=>[""].slice(0,0);function Gt(t){return t.group?zt:Tt}const Ut=(t,e,s)=>{t.push({directory:e,files:s,dir:e})},Yt=()=>{};function Qt(t){return t.group?Ut:Yt}const Ht=function(t,e,s){const{queue:n,fs:r,options:{suppressErrors:o}}=e;n.enqueue(),r.realpath(t,(i,c)=>{if(i)return n.dequeue(o?null:i,e);r.stat(c,(g,f)=>{if(g)return n.dequeue(o?null:g,e);if(f.isDirectory()&&Q(t,c,e))return n.dequeue(null,e);s(f,c),n.dequeue(null,e)})})},Xt=function(t,e,s){const{queue:n,fs:r,options:{suppressErrors:o}}=e;n.enqueue();try{const i=r.realpathSync(t),c=r.statSync(i);if(c.isDirectory()&&Q(t,i,e))return;s(c,i)}catch(i){if(!o)throw i}};function Kt(t,e){return!t.resolveSymlinks||t.excludeSymlinks?null:e?Xt:Ht}function Q(t,e,s){if(s.options.useRealPaths)return Vt(e,s);let n=O(t),r=1;for(;n!==s.root&&r<2;){const o=s.symlinks.get(n);!!o&&(o===e||o.startsWith(e)||e.startsWith(o))?r++:n=O(n)}return s.symlinks.set(t,e),r>1}function Vt(t,e){return e.visited.includes(t+e.options.pathSeparator)}const Zt=t=>t.counts,Jt=t=>t.groups,te=t=>t.paths,ee=t=>t.paths.slice(0,t.options.maxFiles),se=(t,e,s)=>(R(e,s,t.counts,t.options.suppressErrors),null),ne=(t,e,s)=>(R(e,s,t.paths,t.options.suppressErrors),null),re=(t,e,s)=>(R(e,s,t.paths.slice(0,t.options.maxFiles),t.options.suppressErrors),null),ie=(t,e,s)=>(R(e,s,t.groups,t.options.suppressErrors),null);function R(t,e,s,n){e(t&&!n?t:null,s)}function oe(t,e){const{onlyCounts:s,group:n,maxFiles:r}=t;return s?e?Zt:se:n?e?Jt:ie:r?e?ee:re:e?te:ne}const H={withFileTypes:!0},ce=(t,e,s,n,r)=>{if(t.queue.enqueue(),n<0)return t.queue.dequeue(null,t);const{fs:o}=t;t.visited.push(e),t.counts.directories++,o.readdir(e||".",H,(i,c=[])=>{r(c,s,n),t.queue.dequeue(t.options.suppressErrors?null:i,t)})},le=(t,e,s,n,r)=>{const{fs:o}=t;if(n<0)return;t.visited.push(e),t.counts.directories++;let i=[];try{i=o.readdirSync(e||".",H)}catch(c){if(!t.options.suppressErrors)throw c}r(i,s,n)};function ue(t){return t?le:ce}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}},fe=class{aborted=!1;abort(){this.aborted=!0}},X=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(t,e,s){this.isSynchronous=!s,this.callbackInvoker=oe(e,this.isSynchronous),this.root=$(t,e),this.state={root:Dt(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new he,options:e,queue:new ae((n,r)=>this.callbackInvoker(r,n,s)),symlinks:new Map,visited:[""].slice(0,0),controller:new fe,fs:e.fs||ut},this.joinPath=xt(this.root,e),this.pushDirectory=jt(this.root,e),this.pushFile=Nt(e),this.getArray=Gt(e),this.groupFiles=Qt(e),this.resolveSymlink=Kt(e,this.isSynchronous),this.walkDirectory=ue(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:n,options:{filters:r,resolveSymlinks:o,excludeSymlinks:i,exclude:c,maxFiles:g,signal:f,useRealPaths:b,pathSeparator:p},controller:h}=this.state;if(h.aborted||f&&f.aborted||g&&n.length>g)return;const d=this.getArray(this.state.paths);for(let a=0;a<t.length;++a){const l=t[a];if(l.isFile()||l.isSymbolicLink()&&!o&&!i){const u=this.joinPath(l.name,e);this.pushFile(u,d,this.state.counts,r)}else if(l.isDirectory()){let u=Rt(l.name,e,this.state.options.pathSeparator);if(c&&c(l.name,u))continue;this.pushDirectory(u,n,r),this.walkDirectory(this.state,u,u,s-1,this.walk)}else if(this.resolveSymlink&&l.isSymbolicLink()){let u=Y(l.name,e);this.resolveSymlink(u,this.state,(m,y)=>{if(m.isDirectory()){if(y=$(y,this.state.options),c&&c(l.name,b?y:u+p))return;this.walkDirectory(this.state,y,b?y:u+p,s-1,this.walk)}else{y=b?y:u;const k=yt(y),x=$(O(y),this.state.options);y=this.joinPath(k,x),this.pushFile(y,d,this.state.counts,r)}})}}this.groupFiles(this.state.groups,e,d)}};function pe(t,e){return new Promise((s,n)=>{K(t,e,(r,o)=>{if(r)return n(r);s(o)})})}function K(t,e,s){new X(t,e,s).start()}function ge(t,e){return new X(t,e).start()}var M=class{constructor(t,e){this.root=t,this.options=e}withPromise(){return pe(this.root,this.options)}withCallback(t){K(this.root,this.options,t)}sync(){return ge(this.root,this.options)}};let V=null;try{I.resolve("picomatch"),V=I("picomatch")}catch{}var de=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:z,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||V;if(!s)throw new Error("Please specify a glob function to use glob matching.");var n=this.globCache[t.join("\0")];return n||(n=s(t,...e),this.globCache[t.join("\0")]=n),this.options.filters.push(r=>n(r)),this}};const ye=Array.isArray,Z=/\\/g,me=/^[A-Za-z]:$/,J=process.platform==="win32",Se=/^(\/?\.\.)+$/;function B(t,e={}){const s=t.length,n=Array(s),r=Array(s);let o,i;for(o=0;o<s;o++){const c=tt(t[o]);n[o]=c;const g=c.length,f=Array(g);for(i=0;i<g;i++)f[i]=_(c[i],e);r[o]=f}return c=>{const g=c.split("/");if(g[0]===".."&&Se.test(c))return!0;for(o=0;o<s;o++){const f=n[o],b=r[o],p=g.length,h=Math.min(p,f.length);for(i=0;i<h;){const d=f[i];if(d.includes("/"))return!0;if(!b[i](g[i]))break;if(!e.noglobstar&&d==="**")return!0;i++}if(i===p)return!0}return!1}}const be=/^[A-Z]:\/$/i,ve=J?t=>be.test(t):t=>t==="/";function L(t,e,s){if(t===e||e.startsWith(`${t}/`)){if(s){const r=t.length+ +!ve(t);return(o,i)=>o.slice(r,i?-1:void 0)||"."}const n=e.slice(t.length+1);return n?(r,o)=>{if(r===".")return n;const i=`${n}/${r}`;return o?i.slice(0,-1):i}:(r,o)=>o&&r!=="."?r.slice(0,-1):r}return s?n=>P.relative(t,n)||".":n=>P.relative(t,`${e}/${n}`)||"."}function we(t,e){if(e.startsWith(`${t}/`)){const s=e.slice(t.length+1);return n=>`${s}/${n}`}return s=>{const n=P.relative(t,`${e}/${s}`);return s[s.length-1]==="/"&&n!==""?`${n}/`:n||"."}}function N(t){return t.replace(me,e=>`${e}/`)}const Pe={parts:!0};function tt(t){var e;const s=_.scan(t,Pe);return!((e=s.parts)===null||e===void 0)&&e.length?s.parts:[t]}const _e=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,ke=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,De=t=>t.replace(_e,"\\$&"),Ee=t=>t.replace(ke,"\\$&"),Fe=J?Ee:De;function Re(t,e){const s=_.scan(t);return s.isGlob||s.negated}function E(...t){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...t)}function et(t){return typeof t=="string"?[t]:t??[]}const xe=/^(\/?\.\.)+/,Ae=/\\(?=[()[\]{}!*+?@|])/g;function C(t,e,s,n){var r;const o=e.cwd;let i=t;t[t.length-1]==="/"&&(i=t.slice(0,-1));const c=i.lastIndexOf("/"),f=(c===-1?i:i.slice(c+1)).startsWith("!(");i[i.length-1]!=="*"&&!f&&e.expandDirectories&&(i+="/**");const b=Fe(o);i=bt(i.replace(Ae,""))?P.relative(b,i):P.normalize(i);const p=(r=xe.exec(i))===null||r===void 0?void 0:r[0],h=tt(i);if(p){const a=(p.length+1)/3;let l=0;const u=b.split("/");for(;l<a&&h[l+a]===u[u.length+l-a];)i=i.slice(0,(a-l-1)*3)+i.slice((a-l)*3+h[l+a].length+1)||".",l++;const m=P.join(o,p.slice(l*3));m[0]!=="."&&s.root.length>m.length&&(s.root=N(m),s.depthOffset=-a+l)}if(!n&&s.depthOffset>=0){var d;(d=s.commonPath)!==null&&d!==void 0||(s.commonPath=h);const a=[],l=Math.min(s.commonPath.length,h.length);for(let u=0;u<l;u++){const m=h[u];if(m==="**"&&!h[u+1]){a.pop();break}if(u===h.length-1||m!==s.commonPath[u]||Re(m))break;a.push(m)}s.depthOffset=a.length,s.commonPath=a,s.root=N(a.length>0?P.join(o,...a):o)}return i}function $e(t,e,s){const n=[],r=[],o=[];for(const i of t.ignore)i&&(i[0]!=="!"||i[1]==="("?r.push(C(i,t,s,!0)):o.push(i.slice(1)));for(const i of e)i&&(i[0]!=="!"||i[1]==="("?n.push(C(i,t,s,!1)):(i[1]!=="!"||i[2]==="(")&&r.push(C(i.slice(1),t,s,!0)));return{match:n,ignore:r,unignore:o}}function Ce(t,e){const s=t.cwd,n={root:s,depthOffset:0},r=$e(t,e,n);t.debug&&E("internal processing patterns:",r);const{absolute:o,caseSensitiveMatch:i,debug:c,dot:g,followSymbolicLinks:f,onlyDirectories:b}=t,p=n.root.replace(Z,""),h={dot:g,nobrace:t.braceExpansion===!1,nocase:!i,noextglob:t.extglob===!1,noglobstar:t.globstar===!1,posix:!0},d=r.unignore.length>0,a=d?_(r.unignore,h):void 0,l=d?B(r.unignore,h):void 0,u=_(r.match,{...h,ignore:r.ignore,onIgnore:a?v=>a(v.output)&&_.constants.UNIGNORE:void 0}),m=_(r.ignore,h),y=B(r.match,h),k=L(s,p,o),x=o?k:L(s,p,!0),rt=r.match.length>0&&r.match.every(v=>v==="**"||v==="**/*"),A=r.ignore.length>0||d||!rt?(v,w)=>{const S=x(w,!0);return S==="."||l&&l(S)?!1:!y(S)||m(S)}:void 0;let q;t.deep!==void 0&&(q=Math.round(t.deep-n.depthOffset));const it=new de({filters:[c?(v,w)=>{const S=k(v,w),j=u(S);return j&&E(`matched ${S}`),j}:(v,w)=>{const S=k(v,w);return u(S)}],exclude:c&&A?(v,w)=>{const S=A(v,w);return E(`${S?"skipped":"crawling"} ${w}`),S}:A,fs:t.fs,pathSeparator:"/",relativePaths:!o,resolvePaths:o,includeBasePath:o,resolveSymlinks:f,excludeSymlinks:!f,excludeFiles:b,includeDirs:b||!t.onlyFiles,maxDepth:q,signal:t.signal}).crawl(p);return t.debug&&E("internal properties:",{...n,root:p}),[it,s!==p&&!o&&we(s,p)]}function st(t,e){if(e)for(let s=t.length-1;s>=0;s--)t[s]=e(t[s]);return t}const T={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function Oe(t){const e=Object.assign({},t);for(const s in T)e[s]===void 0&&Object.assign(e,{[s]:T[s]});return e.cwd=(e.cwd instanceof URL?vt(e.cwd):G(e.cwd||process.cwd())).replace(Z,"/"),e.ignore=et(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||dt,readdirSync:e.fs.readdirSync||gt,realpath:e.fs.realpath||pt,realpathSync:e.fs.realpathSync||ft,stat:e.fs.stat||ht,statSync:e.fs.statSync||at}),e.debug&&E("globbing with options:",e),e}function nt(t,e={}){var s;if(t&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");const n=ye(t)||typeof t=="string",r=et((s=n?t:t.patterns)!==null&&s!==void 0?s:"**/*"),o=Oe(n?e:t);return r.length>0?Ce(o,r):[]}async function Ie(t,e){const[s,n]=nt(t,e);return s?st(await s.withPromise(),n):[]}function Me(t,e){const[s,n]=nt(t,e);return s?st(s.sync(),n):[]}export{Ie as a,Me as g};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var t,h;function I(){if(h)return t;h=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 t=function(u){if(typeof u!="string"||u==="")return!1;for(var x;x=/(\\).|([@?!+*]\(.*\))/g.exec(u);){if(x[2])return!0;u=u.slice(x.index+x[0].length)}return!1},t}var v,g;function q(){if(g)return v;g=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 d=I(),u={"{":"}","(":")","[":"]"},x=function(i){if(i[0]==="!")return!0;for(var e=0,r=-2,n=-2,a=-2,l=-2,f=-2;e<i.length;){if(i[e]==="*"||i[e+1]==="?"&&/[\].+)]/.test(i[e])||n!==-1&&i[e]==="["&&i[e+1]!=="]"&&(n<e&&(n=i.indexOf("]",e)),n>e&&(f===-1||f>n||(f=i.indexOf("\\",e),f===-1||f>n)))||a!==-1&&i[e]==="{"&&i[e+1]!=="}"&&(a=i.indexOf("}",e),a>e&&(f=i.indexOf("\\",e),f===-1||f>a))||l!==-1&&i[e]==="("&&i[e+1]==="?"&&/[:!=]/.test(i[e+2])&&i[e+3]!==")"&&(l=i.indexOf(")",e),l>e&&(f=i.indexOf("\\",e),f===-1||f>l))||r!==-1&&i[e]==="("&&i[e+1]!=="|"&&(r<e&&(r=i.indexOf("|",e)),r!==-1&&i[r+1]!==")"&&(l=i.indexOf(")",r),l>r&&(f=i.indexOf("\\",r),f===-1||f>l))))return!0;if(i[e]==="\\"){var b=i[e+1];e+=2;var c=u[b];if(c){var o=i.indexOf(c,e);o!==-1&&(e=o+1)}if(i[e]==="!")return!0}else e++}return!1},O=function(i){if(i[0]==="!")return!0;for(var e=0;e<i.length;){if(/[*?{}()[\]]/.test(i[e]))return!0;if(i[e]==="\\"){var r=i[e+1];e+=2;var n=u[r];if(n){var a=i.indexOf(n,e);a!==-1&&(e=a+1)}if(i[e]==="!")return!0}else e++}return!1};return v=function(e,r){if(typeof e!="string"||e==="")return!1;if(d(e))return!0;var n=x;return r&&r.strict===!1&&(n=O),n(e)},v}export{q as r};
|
|
@@ -0,0 +1,6 @@
|
|
|
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]}}),L=e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
2
|
+
`),M=(e,t,s,n)=>{const l={column:0,line:-1,...e.start},c={...l,...e.end},a=l.line,o=l.column,f=c.line,p=c.column;let m=Math.max(a-(s+1),0),h=Math.min(t.length,f+n);a===-1&&(m=0),f===-1&&(h=t.length);const y=f-a,i={};if(y)for(let r=0;r<=y;r++){const u=r+a;if(!o)i[u]=!0;else if(r===0){const g=t[u-1]?.length;i[u]=[o,(g??0)-o+1]}else if(r===y)i[u]=[0,p];else{const g=t[u-r]?.length;i[u]=[0,g]}}else o===p?i[a]=o?[o,0]:!0:i[a]=[o,(p??0)-(o??0)];return{end:h,markerLines:i,start:m}},B=x.platform==="win32"&&!x.env?.WT_SESSION?">":"❯",T=(e,t,s)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...s,color:{gutter:r=>r,marker:r=>r,message:r=>r,...s?.color}},l=typeof t.start.column=="number";let c=(e.includes("\r")?L(e):e).split(`
|
|
3
|
+
`);typeof n.tabWidth=="number"&&e.includes(" ")&&(c=c.map(r=>r.replaceAll(" "," ".repeat(n.tabWidth))));const{end:a,markerLines:o,start:f}=M(t,c,n.linesAbove,n.linesBelow),p=String(a).length,{gutter:m,marker:h,message:y}=n.color;let i=c.slice(f,a).map((r,u)=>{const g=f+1+u,A=o[g],S=String(g).padStart(p),k=!o[g+1],$=` ${S}${n.showGutter?" |":""}`;if(A){let b="";if(Array.isArray(A)){const W=r.replaceAll(/[^\t]/g," ").slice(0,Math.max(A[0]-1,0)),j=A[1]||1;b=[`
|
|
4
|
+
`,n.prefix+m($.replaceAll(/\d/g," "))," ",W,h("^").repeat(j)].join(""),k&&n.message&&(b+=` ${y(n.message)}`)}return[n.prefix+h(B),m($),r.length>0?` ${r}`:"",b].join("")}return`${n.prefix} ${m($)}${r.length>0?` ${r}`:""}`}).join(`
|
|
5
|
+
`);return n.message&&!l&&(i=`${n.prefix+" ".repeat(p+1)+n.message}
|
|
6
|
+
${i}`),i},w=(e,t)=>{let s=0,n=t.length-2;for(;s<n;){const l=s+(n-s>>1);if(e<t[l])n=l-1;else if(e>=t[l+1])s=l+1;else{s=l;break}}return s},G=/\n|\r(?!\n)/,O=e=>e.split(G).reduce((t,s)=>(t.push(t.at(-1)+s.length+1),t),[0]),C=(e,t,s)=>{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 l=O(e),c=w(t,l);return{column:t-l[c]+1,line:c+1}}const n=w(t,e);return{column:t-e[n]+1,line:n+1}};export{T as C,C as h};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const w=/^\s*(?:[;#].*)?$/,m=/^\s*\[([^\]]+)\]\s*$/,y=/\r?\n/,v=/\r?\n$/,O=/^[^=]+=/,A=t=>t===" "||t===" ",b=t=>{let e=0;for(;e<t.length&&A(t[e]);)e+=1;return{indent:t.slice(0,e),rest:t.slice(e)}},x=t=>{let e=t.length;for(;e>0&&A(t[e-1]);)e-=1;return{rest:t.slice(0,e),trailing:t.slice(e)}},E=t=>{const e=t.indexOf("=");if(e===-1)return;const n=t.slice(0,e),s=t.slice(e+1),{indent:i,rest:o}=b(n),{rest:c,trailing:r}=x(o);if(c===""||c.startsWith(";")||c.startsWith("#")||c.startsWith("["))return;const{indent:d,rest:f}=b(s),{rest:k,trailing:g}=x(f);return{after:d,before:r,indent:i,key:c,trailing:g,value:k}},$=t=>{let e=0,n=0;for(const s of t.split(y)){if(w.test(s)||m.test(s))continue;const i=E(s);i&&(i.before===" "&&i.after===" "?e+=1:i.before===""&&i.after===""&&(n+=1))}return{spaced:e,unspaced:n}},h=(t,e)=>{if(!t)return;if(e===void 0)return t;let n=t;for(const s of e.split("."))if(n&&typeof n=="object"&&!Array.isArray(n))n=n[s];else return;return n&&typeof n=="object"&&!Array.isArray(n)?n:void 0},_=(t,e)=>{for(const n of t.split(y)){if(!n||n.startsWith("["))continue;const s=O.exec(n);if(!s)continue;const i=n.slice(0,s[0].length-1).trim();if(i===e||i===`${e}[]`)return n.slice(s[0].length).trimStart()}return""},I=(t,e)=>{if(t.trim()==="")return{line:{kind:"blank",raw:t,section:e},nextSection:e};const n=t.trimStart();if(n.startsWith(";")||n.startsWith("#"))return{line:{kind:"comment",raw:t,section:e},nextSection:e};const s=m.exec(t);if(s){const o=s[1];return{line:{kind:"header",raw:t,section:o},nextSection:o}}const i=E(t);return i?{line:{key:i.key,kind:"key",raw:t,section:e},nextSection:e}:{line:{kind:"unknown",raw:t,section:e},nextSection:e}},N=t=>{const n=t.replace(v,"").split(y),s=[];let i;for(const o of n){const{line:c,nextSection:r}=I(o,i);s.push(c),i=r}return s},R=(t,e,n)=>{const s=E(t.raw);if(!s||!t.key)return t.raw;const i=n({[t.key]:e}),o=_(i,t.key);return`${s.indent}${s.key}${s.before}=${s.after}${o}${s.trailing}`},L=(t,e=[])=>{const n=[];for(const[s,i]of Object.entries(t))if(i&&typeof i=="object"&&!Array.isArray(i)){const o=[...e,s];n.push(o.join("."),...L(i,o))}return n},W=(t,e)=>{const n={};for(const[s,i]of Object.entries(t))e.has(s)||i&&typeof i=="object"&&!Array.isArray(i)||(n[s]=i);return n},j=(t,e)=>{const n=[];for(const s of e.split(y))s!==""&&n.push(s);n.length>0&&t.push(...n)},T=t=>{const{line:e,markWritten:n,nextData:s,oldData:i,renderValue:o}=t;if(!e.key)return e.raw;const c=h(s,e.section);if(!c||!(e.key in c))return;n(e.section,e.key);const d=h(i,e.section)?.[e.key],f=c[e.key];return JSON.stringify(d)===JSON.stringify(f)?e.raw:o(e,f)},G=(t,e,n,s,i)=>{const o=h(s,e);if(!o)return;const c=n.get(e)??new Set,r=W(o,c);Object.keys(r).length!==0&&j(t,i(r))},M=(t,e,n,s)=>{const i=new Set(e.filter(o=>o.kind==="header"&&o.section).map(o=>o.section));for(const o of L(n)){if(i.has(o))continue;const c=h(n,o);if(!c||Object.keys(c).length===0)continue;const r=W(c,new Set);Object.keys(r).length!==0&&j(t,s(r,o))}},V=t=>{const e=t.includes(`\r
|
|
2
|
+
`)?`\r
|
|
3
|
+
`:`
|
|
4
|
+
`,{spaced:n,unspaced:s}=$(t);return{eol:e,whitespace:n>0&&n>=s}},K=(t,e,n,s,i)=>{const{eol:o}=i,c=v.test(t),r=N(t),d=new Map,f=new Map;for(const[l,a]of r.entries())a.kind!=="blank"&&f.set(a.section,l);const k=(l,a)=>{let u=d.get(l);u||(u=new Set,d.set(l,u)),u.add(a)},g=(l,a)=>R(l,a,s),p=[];for(const[l,a]of r.entries()){if(a.kind==="key"){const u=T({line:a,markWritten:k,nextData:n,oldData:e,renderValue:g});u!==void 0&&p.push(u);continue}p.push(a.raw),f.get(a.section)===l&&G(p,a.section,d,n,s)}M(p,r,n,s);const S=p.join(o);return c&&!S.endsWith(o)?`${S}${o}`:S};export{V as d,K as m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const d=(c,v)=>!!v.ino&&!!v.dev&&v.ino===c.ino&&v.dev===c.dev;export{d as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as t}from"node:module";import{toPath as a}from"@visulima/path/utils";import{F_OK as l}from"./FIND_UP_STOP-pQqZdUPw.js";import f from"./assertValidFileOrDirectoryPath-CAHgg-jK.js";let i;const n=e=>(i??=t(import.meta.url))(e),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[r,o]=s.versions.node.split(".").map(Number);if(r>22||r===22&&o>=3||r===20&&o>=16)return s.getBuiltinModule(e)}return n(e)},{access:u}=c("node:fs/promises");async function g(e,r=l){f(e),e=a(e);try{return await u(e,r),!0}catch{return!1}}export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as t}from"node:module";import{toPath as l}from"@visulima/path/utils";import{F_OK as a}from"./FIND_UP_STOP-pQqZdUPw.js";import f from"./assertValidFileOrDirectoryPath-CAHgg-jK.js";let i;const n=e=>(i??=t(import.meta.url))(e),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[r,o]=s.versions.node.split(".").map(Number);if(r>22||r===22&&o>=3||r===20&&o>=16)return s.getBuiltinModule(e)}return n(e)},{accessSync:u}=c("node:fs");function y(e,r=a){f(e),e=l(e);try{return u(e,r),!0}catch{return!1}}export{y as default};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Matches a JSON object.
|
|
3
|
+
|
|
4
|
+
This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. Don't use this as a direct return type as the user would have to double-cast it: `jsonObject as unknown as CustomResponse`. Instead, you could extend your CustomResponse type from it to ensure your type only uses JSON-compatible types: `interface CustomResponse extends JsonObject { … }`.
|
|
5
|
+
|
|
6
|
+
@category JSON
|
|
7
|
+
*/
|
|
8
|
+
type JsonObject = { [Key in string]: JsonValue; };
|
|
9
|
+
/**
|
|
10
|
+
Matches a JSON array.
|
|
11
|
+
|
|
12
|
+
@category JSON
|
|
13
|
+
*/
|
|
14
|
+
type JsonArray = JsonValue[] | readonly JsonValue[];
|
|
15
|
+
/**
|
|
16
|
+
Matches any valid JSON primitive value.
|
|
17
|
+
|
|
18
|
+
@category JSON
|
|
19
|
+
*/
|
|
20
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
21
|
+
/**
|
|
22
|
+
Matches any valid JSON value.
|
|
23
|
+
|
|
24
|
+
@see `Jsonify` if you need to transform a type to one that is assignable to `JsonValue`.
|
|
25
|
+
|
|
26
|
+
@category JSON
|
|
27
|
+
*/
|
|
28
|
+
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
29
|
+
export { JsonValue as J };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{parse as g,modify as b,applyEdits as S}from"jsonc-parser";const p=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),y=(t,s,r)=>{const i=b(t.text,s,r,{formattingOptions:t.formattingOptions});t.text=S(t.text,i)},O=(t,s,r,i,e)=>{const f=new Set([...Object.keys(s),...Object.keys(r)]);for(const o of f){const n=[...i,o];o in r?o in s?e(t,s[o],r[o],n):y(t,n,r[o]):y(t,n,void 0)}},m=(t,s,r,i)=>{if(s!==r){if(p(s)&&p(r)){O(t,s,r,i,m);return}if(Array.isArray(s)&&Array.isArray(r)&&s.length===r.length){for(const[e,f]of s.entries())m(t,f,r[e],[...i,e]);return}JSON.stringify(s)!==JSON.stringify(r)&&y(t,i,r)}},k=(t,s,r)=>{const i=g(t,[],{allowTrailingComma:!0}),e={formattingOptions:r,text:t};return m(e,i,s,[]),e.text},A=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},j=(t,s,r,i,e,f,o)=>{if(r&&t!==void 0){const n={...A(i),...f};let c=k(t,s,n);return e&&!c.endsWith(`
|
|
2
|
+
`)&&(c+=e),c}return`${JSON.stringify(s,o,i)}${e}`};export{j as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import n from"./NotFoundError-CnRY6lVp.js";import t from"./PermissionError-DJ_2VWEj.js";const d=(o,e)=>{const r=o?.code;return r==="ENOENT"?new n(`no such file or directory, open '${e}'`):r==="EACCES"||r==="EPERM"?new t(`unable to read the non-readable file: ${e}`):o};export{d as m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as u}from"node:module";import{toPath as m}from"@visulima/path/utils";import{dirname as n,resolve as s}from"@visulima/path";import g from"./isAccessible-CqNOFdZu.js";import q from"./isAccessibleSync-DYKTrrvc.js";let v;const _=r=>(v??=u(import.meta.url))(r),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,y=r=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[e,o]=i.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return i.getBuiltinModule(r)}return _(r)},{cwd:l}=i,{mkdir:S,rename:E,copyFile:D,unlink:b}=y("node:fs/promises"),{mkdirSync:j,renameSync:$,copyFileSync:T,unlinkSync:k}=y("node:fs");class x extends Error{constructor(e,o){super(`Source directory "${n(e)}" does not match destination directory "${n(o)}"`),this.name="SameDirectoryError"}}const a=(r,e)=>{if(!r||!e)throw new Error("Source and destination paths must not be empty");if(n(r)!==n(e))throw new x(r,e)},d=async(r,e,{cwd:o,directoryMode:c,overwrite:w,validateDirectory:f})=>{if(o&&(r=s(o,r),e=s(o,e)),f&&a(r,e),!w&&await g(e))throw new Error(`The destination file exists: ${e}`);await S(n(e),{mode:c,recursive:!0});try{await E(r,e)}catch(t){if(t.code==="EXDEV")await D(r,e),await b(r);else throw t}},p=(r,e,{cwd:o,directoryMode:c,overwrite:w,validateDirectory:f})=>{if(o&&(r=s(o,r),e=s(o,e)),f&&a(r,e),!w&&q(e))throw new Error(`The destination file exists: ${e}`);j(n(e),{mode:c,recursive:!0});try{$(r,e)}catch(t){if(t.code==="EXDEV")T(r,e),k(r);else throw t}},B=async(r,e,o={})=>{const c={overwrite:!0,validateDirectory:!1,...o,cwd:o.cwd?m(o.cwd):l()};await d(r,e,c)},V=(r,e,o)=>{const c={overwrite:!0,validateDirectory:!1,...o};c.cwd=c.cwd?m(c.cwd):l(),p(r,e,c)},X=async(r,e,o)=>{const c={overwrite:!0,...o,validateDirectory:!0};c.cwd=c.cwd?m(c.cwd):l(),await d(r,e,c)},N=(r,e,o)=>{const c={overwrite:!0,...o,validateDirectory:!0};c.cwd=c.cwd?m(c.cwd):l(),p(r,e,c)};export{B as move,V as moveSync,X as rename,N as renameSync};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as s,C as d}from"./indexToLineColumn-BHKDfaPx-DS9KxkE-.js";import l from"./JSONError-Cvp9ycba.js";const m=t=>String.raw`\u{${t.codePointAt(0).toString(16)}}`,u=(t,o,e)=>d(t,{start:o},{tabWidth:!1,...e}),f=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,g=(t,o)=>{const e=f.exec(o);if(!e)return;const[,r,n,c]=e;if(n&&c)return{column:Number(c),line:Number(n)};let i=Number(r);return i===t.length&&(i=t.length-1),s(t,i)},p=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,E=t=>t.replace(p,(o,e,r)=>`"${r}"(${m(r)})`);function N(t,o,e,r){typeof o=="string"&&(typeof e=="object"&&(r=e),e=o,o=void 0);let n;try{return JSON.parse(t,o)}catch(a){n=a.message}let c;t?(c=g(t,n),n=E(n)):n+=" while parsing empty string";const i=new l(n);throw i.fileName=e,c&&(i.codeFrame=u(t,c,r)),i}export{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as f}from"node:module";import{toPath as y}from"@visulima/path/utils";import h from"./assertValidFileOrDirectoryPath-CAHgg-jK.js";import{m as q}from"./map-read-error-8dAe6Qhr.js";let p;const _=e=>(p??=f(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,s]=r.versions.node.split(".").map(Number);if(o>22||o===22&&s>=3||o===20&&s>=16)return r.getBuiltinModule(e)}return _(e)},{readFile:g}=l("node:fs/promises"),{unzip:b,brotliDecompress:j}=l("node:zlib"),w={brotli:j,gzip:b,none:(e,o)=>{o(null,e)}},z=async(e,o)=>{h(e),e=y(e);const{buffer:s,compression:d,encoding:m,flag:i}=o??{};let n;try{n=await g(e,i?{flag:i}:{})}catch(t){throw q(t,e)}return await new Promise((t,u)=>{w[d??"none"](n,(c,a)=>{c?u(c):t(s?a:a.toString(m??"utf8"))})})};export{z as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as u}from"node:module";import{toPath as b}from"@visulima/path/utils";import j from"./assertValidFileOrDirectoryPath-CAHgg-jK.js";import{m as S}from"./map-read-error-8dAe6Qhr.js";let f;const p=e=>(f??=u(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 p(e)},{readFileSync:_}=c("node:fs"),{unzipSync:g,brotliDecompressSync:y}=c("node:zlib"),h={brotli:y,gzip:g,none:e=>e},z=(e,o)=>{j(e),e=b(e);const{buffer:s,compression:d,encoding:l,flag:n}=o??{};let t;try{t=_(e,n?{flag:n}:{})}catch(m){throw S(m,e)}const a=h[d??"none"],i=a(t);return s?i:i.toString(l??"utf8")};export{z as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parse as o}from"ini";import c from"./readFile-DbKGLwIK.js";const d=async(r,t)=>{const{bracketedArray:e=!0,...a}=t??{},n=await c(r,{encoding:"utf8",...a});return o(n,{bracketedArray:e})};export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parse as a}from"ini";import c from"./readFileSync-CTTHkZ_p.js";const s=(r,t)=>{const{bracketedArray:e=!0,...n}=t??{},o=c(r,{encoding:"utf8",...n});return a(o,{bracketedArray:e})};export{s as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{toPath as c}from"@visulima/path/utils";import d from"./parseJson-gfl5PTTo.js";import i from"./readFile-DbKGLwIK.js";async function p(e,o,n){typeof o=="object"&&(n=o,o=void 0);const r=await i(e,{buffer:!0,encoding:void 0});let t=new TextDecoder().decode(r);const{beforeParse:f,color:a}=n??{};return typeof f=="function"&&(t=f(t)),d(t,o,c(e),{color:a})}export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import i from"json5";import r from"./readFile-DbKGLwIK.js";async function b(a,o,t){o&&typeof o=="object"&&(t=o,o=void 0);const{beforeParse:n,buffer:c,compression:e,encoding:s="utf8",flag:p}=t??{},f=await r(a,{buffer:c,compression:e,encoding:s,flag:p}),u=typeof n=="function"?n(f):f;return i.parse(u,o)}export{b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"json5";import d from"./readFileSync-CTTHkZ_p.js";function y(c,o,n){o&&typeof o=="object"&&(n=o,o=void 0);const{beforeParse:t,buffer:e,compression:s,encoding:a="utf8",flag:p}=n??{},f=d(c,{buffer:e,compression:s,encoding:a,flag:p}),u=typeof t=="function"?t(f):f;return r.parse(u,o)}export{y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{toPath as d}from"@visulima/path/utils";import a from"./parseJson-gfl5PTTo.js";import i from"./readFileSync-CTTHkZ_p.js";function p(e,o,n){typeof o=="object"&&(n=o,o=void 0);const c=i(e,{buffer:!0,encoding:void 0});let t=new TextDecoder().decode(c);const{beforeParse:f,color:r}=n??{};return typeof f=="function"&&(t=f(t)),a(t,o,d(e),{color:r})}export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as w,C as h}from"./indexToLineColumn-BHKDfaPx-DS9KxkE-.js";import{toPath as C}from"@visulima/path/utils";import{parse as E,printParseErrorCode as g}from"jsonc-parser";import b from"./JSONError-Cvp9ycba.js";import y from"./readFile-DbKGLwIK.js";const J=(r,e,n,s)=>{if(r.length===0)return;const o=r[0],f=w(e,o.offset),t=new b(`${g(o.error)} at offset ${o.offset}`);throw t.fileName=n,t.codeFrame=h(e,{start:f},{tabWidth:!1,...s}),t},x=async(r,e)=>{const{allowEmptyContent:n,allowTrailingComma:s=!0,beforeParse:o,buffer:f,color:t,compression:m,disallowComments:l,encoding:p="utf8",flag:d}=e??{},a=await y(r,{buffer:f,compression:m,encoding:p,flag:d}),c=typeof o=="function"?o(a):a,i=[],u=E(c,i,{allowEmptyContent:n,allowTrailingComma:s,disallowComments:l});return J(i,c,C(r),{color:t}),u};export{x as default,J as throwIfJsoncErrors};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{toPath as w}from"@visulima/path/utils";import{parse as y}from"jsonc-parser";import g from"./readFileSync-CTTHkZ_p.js";import{throwIfJsoncErrors as C}from"./readJsonc-Cp1KzmVx.js";const S=(o,s)=>{const{allowEmptyContent:c,allowTrailingComma:m=!0,beforeParse:r,buffer:f,color:a,compression:i,disallowComments:l,encoding:p="utf8",flag:u}=s??{},t=g(o,{buffer:f,compression:i,encoding:p,flag:u}),n=typeof r=="function"?r(t):t,e=[],d=y(n,e,{allowEmptyContent:c,allowTrailingComma:m,disallowComments:l});return C(e,n,w(o),{color:a}),d};export{S as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parse as e}from"smol-toml";import a from"./readFile-DbKGLwIK.js";const i=async(t,o)=>{const r=await a(t,{encoding:"utf8",...o});return e(r)};export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parse as e}from"smol-toml";import n from"./readFileSync-CTTHkZ_p.js";const m=(o,r)=>{const t=n(o,{encoding:"utf8",...r});return e(t)};export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parse as a}from"@visulima/yaml";import u from"./readFile-DbKGLwIK.js";async function l(s,o,t){const c=(typeof o=="function"?t:o??t)??{},{buffer:e,compression:p,encoding:r="utf8",flag:i,...n}=c,f=await u(s,{buffer:e,compression:p,encoding:r,flag:i});return typeof o=="function"?a(f,o,n):a(f,n)}export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parse as c}from"@visulima/yaml";import i from"./readFileSync-CTTHkZ_p.js";function l(e,n,o){const s=(typeof n=="function"?o:n??o)??{},{buffer:p,compression:a,encoding:r="utf8",flag:u,...t}=s,f=i(e,{buffer:p,compression:a,encoding:r,flag:u});return typeof n=="function"?c(f,n,t):c(f,t)}export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as i}from"node:module";import u from"./assertValidFileOrDirectoryPath-CAHgg-jK.js";import{b as l}from"./build-rm-options-_U1T9rOz.js";let t;const n=e=>(t??=i(import.meta.url))(e),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[r,o]=s.versions.node.split(".").map(Number);if(r>22||r===22&&o>=3||r===20&&o>=16)return s.getBuiltinModule(e)}return n(e)},{rm:a}=c("node:fs/promises"),p=async(e,r={})=>{u(e),await a(e,l(r))};export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as t}from"node:module";import l from"./assertValidFileOrDirectoryPath-CAHgg-jK.js";import{b as a}from"./build-rm-options-_U1T9rOz.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[r,s]=o.versions.node.split(".").map(Number);if(r>22||r===22&&s>=3||r===20&&s>=16)return o.getBuiltinModule(e)}return n(e)},{rmSync:u}=c("node:fs"),f=(e,r={})=>{l(e),u(e,a(r))};export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resolve as o,dirname as s}from"@visulima/path";const i=(r,n)=>typeof r!="string"?r:r.startsWith("./")?o(r):typeof n=="string"?o(s(n),r):new URL(r,n);export{i as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as O}from"node:module";const h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,{platform:g}=h,c="unnamed",_=128,u={'"':"ˮ","*":"⁎","/":"⁄",":":"꞉","<":"‹",">":"›","?":"ʔ","\\":"∖","|":"ǀ"},E=/[\u0000-\u001F\u0080-\u009F]/g,x=/^(?:\.+[/\\]+)+|^\.+$/g,f=/^(?:con|prn|aux|nul|com\d|lpt\d)$/i,R=/[<>:"/\\|?*]/g,I=/\//g,l=new Set([" "," ","."]),a=(t,s)=>s>0&&s<t.length-1,A=(t,s)=>{const n=t.lastIndexOf(".");if(!a(t,n))return t.slice(0,s);const e=t.slice(0,n),i=t.slice(n),r=s-i.length;return r>0?`${e.slice(0,r)}${i}`:t.slice(0,s)},d=t=>{let s=0,n=t.length;for(;s<n;){const e=t[s];if(e===void 0||!l.has(e))break;s+=1}for(;n>s;){const e=t[n-1];if(e===void 0||!l.has(e))break;n-=1}return t.slice(s,n)},N=t=>{const s=t.lastIndexOf(".");if(a(t,s)){const e=t.slice(0,s),i=t.slice(s);let r=e;for(;r.length>0;){const o=r.at(-1);if(o===void 0||!l.has(o))break;r=r.slice(0,-1)}return r.length===0?i.slice(1):`${r}${i}`}let n=t;for(;n.length>0;){const e=n.at(-1);if(e===void 0||!l.has(e))break;n=n.slice(0,-1)}return n},p=t=>{const s=t.lastIndexOf(".");if(a(t,s))return!1;if(f.test(t))return!0;let n=t;for(;n.length>0;){const e=n.at(-1);if(e===void 0||!l.has(e))break;n=n.slice(0,-1)}return!!(n.length>0&&f.test(n))},w=t=>{const s=t.lastIndexOf(".");if(a(t,s)){const i=t.slice(0,s),r=t.slice(s),o=d(i);return o.length===0?void 0:`${o}${r}`}const n=t.trim();if(n.length>0&&n[0]==="."&&n.length<=5&&n.indexOf(".",1)===-1)return;const e=d(t);if(e.length!==0)return e},S=t=>{const s=t?.filesystem??"auto";return s==="auto"?g==="win32"?"win32":"unix":s==="darwin"?"unix":s},T=(t,s)=>{if(typeof t!="string"||t.length===0)return c;const n=S(s);let e=t;if(e=e.replace(E,""),e.length===0||(e=e.replace(x,""),e.length===0))return c;if(n==="win32"||n==="fat32"){const r=e.lastIndexOf(".");if(!a(e,r)&&f.test(e))return c}if(e=n==="win32"||n==="fat32"?e.replaceAll(R,r=>u[r]??""):e.replaceAll(I,u["/"]),e=e.trim(),(n==="win32"||n==="fat32")&&(p(e)||n==="win32"&&(e=N(e),e.length===0)))return c;if(n==="fat32"){const r=w(e);if(r===void 0)return c;e=r}if(e.length===0)return c;const i=s?.maxLength??_;return e.length>i&&(e=A(e,i),e.length===0)?c:e};export{T as sanitize};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{INTERNAL_STRIP_JSON_REGEX as s}from"./FIND_UP_STOP-pQqZdUPw.js";const o=(e,{whitespace:t=!0}={})=>e.replace(s,r=>r.startsWith('"')||r[1]==="*"&&!r.endsWith("*/")?r:t?r.replaceAll(/\S/g," "):"");export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as o}from"node:module";let s;const n=e=>(s??=o(import.meta.url))(e),t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,f=e=>{if(typeof t<"u"&&t.versions&&t.versions.node){const[r,i]=t.versions.node.split(".").map(Number);if(r>22||r===22&&i>=3||r===20&&i>=16)return t.getBuiltinModule(e)}return n(e)},{randomBytes:a}=f("node:crypto"),p=e=>`${e}.${process.pid.toString(36)}.${a(6).toString("hex")}.tmp`,u=new TextEncoder,y=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 r=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(r)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")};export{y as a,p as t};
|