@modern-js/module-tools 2.45.0 → 2.46.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/compiled/@rollup/plugin-json/index.js +1 -1
- package/compiled/@rollup/plugin-json/rollup/dist/rollup.d.ts +63 -16
- package/compiled/@svgr/core/dist/index.d.ts +78 -0
- package/compiled/@svgr/core/index.js +1 -0
- package/compiled/@svgr/core/license +7 -0
- package/compiled/@svgr/core/package.json +1 -0
- package/compiled/@svgr/core/prettier/index.d.ts +920 -0
- package/compiled/@svgr/core/svgo/lib/svgo.d.ts +66 -0
- package/compiled/@svgr/plugin-jsx/@svgr/core/dist/index.d.ts +78 -0
- package/compiled/@svgr/plugin-jsx/dist/index.d.ts +5 -0
- package/compiled/@svgr/plugin-jsx/index.js +11 -0
- package/compiled/@svgr/plugin-jsx/license +7 -0
- package/compiled/@svgr/plugin-jsx/package.json +1 -0
- package/compiled/@svgr/plugin-jsx/prettier/index.d.ts +920 -0
- package/compiled/@svgr/plugin-jsx/svgo/lib/svgo.d.ts +66 -0
- package/compiled/@svgr/plugin-svgo/@svgr/core/dist/index.d.ts +78 -0
- package/compiled/@svgr/plugin-svgo/dist/index.d.ts +5 -0
- package/compiled/@svgr/plugin-svgo/index.js +1 -0
- package/compiled/@svgr/plugin-svgo/license +7 -0
- package/compiled/@svgr/plugin-svgo/package.json +1 -0
- package/compiled/@svgr/plugin-svgo/prettier/index.d.ts +920 -0
- package/compiled/@svgr/plugin-svgo/svgo/lib/svgo.d.ts +66 -0
- package/compiled/rollup/{249.index.js → 846.index.js} +6 -5
- package/compiled/rollup/fsevents.node +0 -0
- package/compiled/rollup/index.js +20 -20
- package/compiled/rollup/package.json +1 -1
- package/compiled/rollup/types/rollup.d.ts +63 -16
- package/compiled/rollup-plugin-dts/{dist/rollup-plugin-dts.d.ts → index.d.ts} +1 -1
- package/compiled/rollup-plugin-dts/index.js +1 -1
- package/compiled/rollup-plugin-dts/package.json +1 -1
- package/compiled/rollup-plugin-dts/{rollup/dist/rollup.d.ts → rollup.d.ts} +63 -16
- package/dist/builder/build.js +4 -0
- package/dist/builder/esbuild/index.js +8 -0
- package/dist/builder/feature/asset.d.ts +1 -1
- package/dist/builder/feature/asset.js +3 -3
- package/dist/constants/preset.d.ts +4 -4
- package/dist/error.d.ts +0 -1
- package/dist/error.js +4 -9
- package/dist/types/config/index.d.ts +2 -2
- package/dist/types/config/transform-import.d.ts +13 -0
- package/dist/types/config/transform-import.js +16 -0
- package/package.json +18 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var t={592:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});var s=n(77);function json(t){if(t===void 0)t={};var e=s.createFilter(t.include,t.exclude);var n="indent"in t?t.indent:"\t";return{name:"json",transform:function transform(r,o){if(o.slice(-5)!==".json"||!e(o)){return null}try{var i=JSON.parse(r);return{code:s.dataToEsm(i,{preferConst:t.preferConst,compact:t.compact,namedExports:t.namedExports,indent:n}),map:{mappings:""}}}catch(t){var u="Could not parse JSON file";this.error({message:u,id:o,cause:t});return null}}}}e["default"]=json;t.exports=Object.assign(e.default,e)},376:(t,e,n)=>{"use strict";t.exports=n(631)},820:(t,e,n)=>{"use strict";const s=n(17);const r="\\\\/";const o=`[^${r}]`;const i="\\.";const u="\\+";const a="\\?";const c="\\/";const l="(?=.)";const p="[^/]";const f=`(?:${c}|$)`;const h=`(?:^|${c})`;const _=`${i}{1,2}${f}`;const A=`(?!${i})`;const y=`(?!${h}${_})`;const d=`(?!${i}{0,1}${f})`;const R=`(?!${_})`;const g=`[^.${c}]`;const E=`${p}*?`;const $={DOT_LITERAL:i,PLUS_LITERAL:u,QMARK_LITERAL:a,SLASH_LITERAL:c,ONE_CHAR:l,QMARK:p,END_ANCHOR:f,DOTS_SLASH:_,NO_DOT:A,NO_DOTS:y,NO_DOT_SLASH:d,NO_DOTS_SLASH:R,QMARK_NO_DOT:g,STAR:E,START_ANCHOR:h};const b={...$,SLASH_LITERAL:`[${r}]`,QMARK:o,STAR:`${o}*?`,DOTS_SLASH:`${i}{1,2}(?:[${r}]|$)`,NO_DOT:`(?!${i})`,NO_DOTS:`(?!(?:^|[${r}])${i}{1,2}(?:[${r}]|$))`,NO_DOT_SLASH:`(?!${i}{0,1}(?:[${r}]|$))`,NO_DOTS_SLASH:`(?!${i}{1,2}(?:[${r}]|$))`,QMARK_NO_DOT:`[^.${r}]`,START_ANCHOR:`(?:^|[${r}])`,END_ANCHOR:`(?:[${r}]|$)`};const m={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"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:m,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:{"***":"*","**/**":"**","**/**/**":"**"},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,SEP:s.sep,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===true?b:$}}},986:(t,e,n)=>{"use strict";const s=n(820);const r=n(658);const{MAX_LENGTH:o,POSIX_REGEX_SOURCE:i,REGEX_NON_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_BACKREF:a,REPLACEMENTS:c}=s;const expandRange=(t,e)=>{if(typeof e.expandRange==="function"){return e.expandRange(...t,e)}t.sort();const n=`[${t.join("-")}]`;try{new RegExp(n)}catch(e){return t.map((t=>r.escapeRegex(t))).join("..")}return n};const syntaxError=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`;const parse=(t,e)=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}t=c[t]||t;const n={...e};const l=typeof n.maxLength==="number"?Math.min(o,n.maxLength):o;let p=t.length;if(p>l){throw new SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${l}`)}const f={type:"bos",value:"",output:n.prepend||""};const h=[f];const _=n.capture?"":"?:";const A=r.isWindows(e);const y=s.globChars(A);const d=s.extglobChars(y);const{DOT_LITERAL:R,PLUS_LITERAL:g,SLASH_LITERAL:E,ONE_CHAR:$,DOTS_SLASH:b,NO_DOT:m,NO_DOT_SLASH:v,NO_DOTS_SLASH:x,QMARK:S,QMARK_NO_DOT:C,STAR:k,START_ANCHOR:H}=y;const globstar=t=>`(${_}(?:(?!${H}${t.dot?b:R}).)*?)`;const O=n.dot?"":m;const T=n.dot?S:C;let L=n.bash===true?globstar(n):k;if(n.capture){L=`(${L})`}if(typeof n.noext==="boolean"){n.noextglob=n.noext}const w={input:t,index:-1,start:0,dot:n.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:h};t=r.removePrefix(t,w);p=t.length;const N=[];const I=[];const D=[];let B=f;let M;const eos=()=>w.index===p-1;const P=w.peek=(e=1)=>t[w.index+e];const G=w.advance=()=>t[++w.index]||"";const remaining=()=>t.slice(w.index+1);const consume=(t="",e=0)=>{w.consumed+=t;w.index+=e};const append=t=>{w.output+=t.output!=null?t.output:t.value;consume(t.value)};const negate=()=>{let t=1;while(P()==="!"&&(P(2)!=="("||P(3)==="?")){G();w.start++;t++}if(t%2===0){return false}w.negated=true;w.start++;return true};const increment=t=>{w[t]++;D.push(t)};const decrement=t=>{w[t]--;D.pop()};const push=t=>{if(B.type==="globstar"){const e=w.braces>0&&(t.type==="comma"||t.type==="brace");const n=t.extglob===true||N.length&&(t.type==="pipe"||t.type==="paren");if(t.type!=="slash"&&t.type!=="paren"&&!e&&!n){w.output=w.output.slice(0,-B.output.length);B.type="star";B.value="*";B.output=L;w.output+=B.output}}if(N.length&&t.type!=="paren"){N[N.length-1].inner+=t.value}if(t.value||t.output)append(t);if(B&&B.type==="text"&&t.type==="text"){B.value+=t.value;B.output=(B.output||"")+t.value;return}t.prev=B;h.push(t);B=t};const extglobOpen=(t,e)=>{const s={...d[e],conditions:1,inner:""};s.prev=B;s.parens=w.parens;s.output=w.output;const r=(n.capture?"(":"")+s.open;increment("parens");push({type:t,value:e,output:w.output?"":$});push({type:"paren",extglob:true,value:G(),output:r});N.push(s)};const extglobClose=t=>{let s=t.close+(n.capture?")":"");let r;if(t.type==="negate"){let o=L;if(t.inner&&t.inner.length>1&&t.inner.includes("/")){o=globstar(n)}if(o!==L||eos()||/^\)+$/.test(remaining())){s=t.close=`)$))${o}`}if(t.inner.includes("*")&&(r=remaining())&&/^\.[^\\/.]+$/.test(r)){const n=parse(r,{...e,fastpaths:false}).output;s=t.close=`)${n})${o})`}if(t.prev.type==="bos"){w.negatedExtglob=true}}push({type:"paren",extglob:true,value:M,output:s});decrement("parens")};if(n.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let s=false;let o=t.replace(a,((t,e,n,r,o,i)=>{if(r==="\\"){s=true;return t}if(r==="?"){if(e){return e+r+(o?S.repeat(o.length):"")}if(i===0){return T+(o?S.repeat(o.length):"")}return S.repeat(n.length)}if(r==="."){return R.repeat(n.length)}if(r==="*"){if(e){return e+r+(o?L:"")}return L}return e?t:`\\${t}`}));if(s===true){if(n.unescape===true){o=o.replace(/\\/g,"")}else{o=o.replace(/\\+/g,(t=>t.length%2===0?"\\\\":t?"\\":""))}}if(o===t&&n.contains===true){w.output=t;return w}w.output=r.wrapOutput(o,w,e);return w}while(!eos()){M=G();if(M==="\0"){continue}if(M==="\\"){const t=P();if(t==="/"&&n.bash!==true){continue}if(t==="."||t===";"){continue}if(!t){M+="\\";push({type:"text",value:M});continue}const e=/^\\+/.exec(remaining());let s=0;if(e&&e[0].length>2){s=e[0].length;w.index+=s;if(s%2!==0){M+="\\"}}if(n.unescape===true){M=G()}else{M+=G()}if(w.brackets===0){push({type:"text",value:M});continue}}if(w.brackets>0&&(M!=="]"||B.value==="["||B.value==="[^")){if(n.posix!==false&&M===":"){const t=B.value.slice(1);if(t.includes("[")){B.posix=true;if(t.includes(":")){const t=B.value.lastIndexOf("[");const e=B.value.slice(0,t);const n=B.value.slice(t+2);const s=i[n];if(s){B.value=e+s;w.backtrack=true;G();if(!f.output&&h.indexOf(B)===1){f.output=$}continue}}}}if(M==="["&&P()!==":"||M==="-"&&P()==="]"){M=`\\${M}`}if(M==="]"&&(B.value==="["||B.value==="[^")){M=`\\${M}`}if(n.posix===true&&M==="!"&&B.value==="["){M="^"}B.value+=M;append({value:M});continue}if(w.quotes===1&&M!=='"'){M=r.escapeRegex(M);B.value+=M;append({value:M});continue}if(M==='"'){w.quotes=w.quotes===1?0:1;if(n.keepQuotes===true){push({type:"text",value:M})}continue}if(M==="("){increment("parens");push({type:"paren",value:M});continue}if(M===")"){if(w.parens===0&&n.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const t=N[N.length-1];if(t&&w.parens===t.parens+1){extglobClose(N.pop());continue}push({type:"paren",value:M,output:w.parens?")":"\\)"});decrement("parens");continue}if(M==="["){if(n.nobracket===true||!remaining().includes("]")){if(n.nobracket!==true&&n.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}M=`\\${M}`}else{increment("brackets")}push({type:"bracket",value:M});continue}if(M==="]"){if(n.nobracket===true||B&&B.type==="bracket"&&B.value.length===1){push({type:"text",value:M,output:`\\${M}`});continue}if(w.brackets===0){if(n.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:M,output:`\\${M}`});continue}decrement("brackets");const t=B.value.slice(1);if(B.posix!==true&&t[0]==="^"&&!t.includes("/")){M=`/${M}`}B.value+=M;append({value:M});if(n.literalBrackets===false||r.hasRegexChars(t)){continue}const e=r.escapeRegex(B.value);w.output=w.output.slice(0,-B.value.length);if(n.literalBrackets===true){w.output+=e;B.value=e;continue}B.value=`(${_}${e}|${B.value})`;w.output+=B.value;continue}if(M==="{"&&n.nobrace!==true){increment("braces");const t={type:"brace",value:M,output:"(",outputIndex:w.output.length,tokensIndex:w.tokens.length};I.push(t);push(t);continue}if(M==="}"){const t=I[I.length-1];if(n.nobrace===true||!t){push({type:"text",value:M,output:M});continue}let e=")";if(t.dots===true){const t=h.slice();const s=[];for(let e=t.length-1;e>=0;e--){h.pop();if(t[e].type==="brace"){break}if(t[e].type!=="dots"){s.unshift(t[e].value)}}e=expandRange(s,n);w.backtrack=true}if(t.comma!==true&&t.dots!==true){const n=w.output.slice(0,t.outputIndex);const s=w.tokens.slice(t.tokensIndex);t.value=t.output="\\{";M=e="\\}";w.output=n;for(const t of s){w.output+=t.output||t.value}}push({type:"brace",value:M,output:e});decrement("braces");I.pop();continue}if(M==="|"){if(N.length>0){N[N.length-1].conditions++}push({type:"text",value:M});continue}if(M===","){let t=M;const e=I[I.length-1];if(e&&D[D.length-1]==="braces"){e.comma=true;t="|"}push({type:"comma",value:M,output:t});continue}if(M==="/"){if(B.type==="dot"&&w.index===w.start+1){w.start=w.index+1;w.consumed="";w.output="";h.pop();B=f;continue}push({type:"slash",value:M,output:E});continue}if(M==="."){if(w.braces>0&&B.type==="dot"){if(B.value===".")B.output=R;const t=I[I.length-1];B.type="dots";B.output+=M;B.value+=M;t.dots=true;continue}if(w.braces+w.parens===0&&B.type!=="bos"&&B.type!=="slash"){push({type:"text",value:M,output:R});continue}push({type:"dot",value:M,output:R});continue}if(M==="?"){const t=B&&B.value==="(";if(!t&&n.noextglob!==true&&P()==="("&&P(2)!=="?"){extglobOpen("qmark",M);continue}if(B&&B.type==="paren"){const t=P();let e=M;if(t==="<"&&!r.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(B.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(remaining())){e=`\\${M}`}push({type:"text",value:M,output:e});continue}if(n.dot!==true&&(B.type==="slash"||B.type==="bos")){push({type:"qmark",value:M,output:C});continue}push({type:"qmark",value:M,output:S});continue}if(M==="!"){if(n.noextglob!==true&&P()==="("){if(P(2)!=="?"||!/[!=<:]/.test(P(3))){extglobOpen("negate",M);continue}}if(n.nonegate!==true&&w.index===0){negate();continue}}if(M==="+"){if(n.noextglob!==true&&P()==="("&&P(2)!=="?"){extglobOpen("plus",M);continue}if(B&&B.value==="("||n.regex===false){push({type:"plus",value:M,output:g});continue}if(B&&(B.type==="bracket"||B.type==="paren"||B.type==="brace")||w.parens>0){push({type:"plus",value:M});continue}push({type:"plus",value:g});continue}if(M==="@"){if(n.noextglob!==true&&P()==="("&&P(2)!=="?"){push({type:"at",extglob:true,value:M,output:""});continue}push({type:"text",value:M});continue}if(M!=="*"){if(M==="$"||M==="^"){M=`\\${M}`}const t=u.exec(remaining());if(t){M+=t[0];w.index+=t[0].length}push({type:"text",value:M});continue}if(B&&(B.type==="globstar"||B.star===true)){B.type="star";B.star=true;B.value+=M;B.output=L;w.backtrack=true;w.globstar=true;consume(M);continue}let e=remaining();if(n.noextglob!==true&&/^\([^?]/.test(e)){extglobOpen("star",M);continue}if(B.type==="star"){if(n.noglobstar===true){consume(M);continue}const s=B.prev;const r=s.prev;const o=s.type==="slash"||s.type==="bos";const i=r&&(r.type==="star"||r.type==="globstar");if(n.bash===true&&(!o||e[0]&&e[0]!=="/")){push({type:"star",value:M,output:""});continue}const u=w.braces>0&&(s.type==="comma"||s.type==="brace");const a=N.length&&(s.type==="pipe"||s.type==="paren");if(!o&&s.type!=="paren"&&!u&&!a){push({type:"star",value:M,output:""});continue}while(e.slice(0,3)==="/**"){const n=t[w.index+4];if(n&&n!=="/"){break}e=e.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){B.type="globstar";B.value+=M;B.output=globstar(n);w.output=B.output;w.globstar=true;consume(M);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!i&&eos()){w.output=w.output.slice(0,-(s.output+B.output).length);s.output=`(?:${s.output}`;B.type="globstar";B.output=globstar(n)+(n.strictSlashes?")":"|$)");B.value+=M;w.globstar=true;w.output+=s.output+B.output;consume(M);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&e[0]==="/"){const t=e[1]!==void 0?"|$":"";w.output=w.output.slice(0,-(s.output+B.output).length);s.output=`(?:${s.output}`;B.type="globstar";B.output=`${globstar(n)}${E}|${E}${t})`;B.value+=M;w.output+=s.output+B.output;w.globstar=true;consume(M+G());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&e[0]==="/"){B.type="globstar";B.value+=M;B.output=`(?:^|${E}|${globstar(n)}${E})`;w.output=B.output;w.globstar=true;consume(M+G());push({type:"slash",value:"/",output:""});continue}w.output=w.output.slice(0,-B.output.length);B.type="globstar";B.output=globstar(n);B.value+=M;w.output+=B.output;w.globstar=true;consume(M);continue}const s={type:"star",value:M,output:L};if(n.bash===true){s.output=".*?";if(B.type==="bos"||B.type==="slash"){s.output=O+s.output}push(s);continue}if(B&&(B.type==="bracket"||B.type==="paren")&&n.regex===true){s.output=M;push(s);continue}if(w.index===w.start||B.type==="slash"||B.type==="dot"){if(B.type==="dot"){w.output+=v;B.output+=v}else if(n.dot===true){w.output+=x;B.output+=x}else{w.output+=O;B.output+=O}if(P()!=="*"){w.output+=$;B.output+=$}}push(s)}while(w.brackets>0){if(n.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));w.output=r.escapeLast(w.output,"[");decrement("brackets")}while(w.parens>0){if(n.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));w.output=r.escapeLast(w.output,"(");decrement("parens")}while(w.braces>0){if(n.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));w.output=r.escapeLast(w.output,"{");decrement("braces")}if(n.strictSlashes!==true&&(B.type==="star"||B.type==="bracket")){push({type:"maybe_slash",value:"",output:`${E}?`})}if(w.backtrack===true){w.output="";for(const t of w.tokens){w.output+=t.output!=null?t.output:t.value;if(t.suffix){w.output+=t.suffix}}}return w};parse.fastpaths=(t,e)=>{const n={...e};const i=typeof n.maxLength==="number"?Math.min(o,n.maxLength):o;const u=t.length;if(u>i){throw new SyntaxError(`Input length: ${u}, exceeds maximum allowed length: ${i}`)}t=c[t]||t;const a=r.isWindows(e);const{DOT_LITERAL:l,SLASH_LITERAL:p,ONE_CHAR:f,DOTS_SLASH:h,NO_DOT:_,NO_DOTS:A,NO_DOTS_SLASH:y,STAR:d,START_ANCHOR:R}=s.globChars(a);const g=n.dot?A:_;const E=n.dot?y:_;const $=n.capture?"":"?:";const b={negated:false,prefix:""};let m=n.bash===true?".*?":d;if(n.capture){m=`(${m})`}const globstar=t=>{if(t.noglobstar===true)return m;return`(${$}(?:(?!${R}${t.dot?h:l}).)*?)`};const create=t=>{switch(t){case"*":return`${g}${f}${m}`;case".*":return`${l}${f}${m}`;case"*.*":return`${g}${m}${l}${f}${m}`;case"*/*":return`${g}${m}${p}${f}${E}${m}`;case"**":return g+globstar(n);case"**/*":return`(?:${g}${globstar(n)}${p})?${E}${f}${m}`;case"**/*.*":return`(?:${g}${globstar(n)}${p})?${E}${m}${l}${f}${m}`;case"**/.*":return`(?:${g}${globstar(n)}${p})?${l}${f}${m}`;default:{const e=/^(.*?)\.(\w+)$/.exec(t);if(!e)return;const n=create(e[1]);if(!n)return;return n+l+e[2]}}};const v=r.removePrefix(t,b);let x=create(v);if(x&&n.strictSlashes!==true){x+=`${p}?`}return x};t.exports=parse},631:(t,e,n)=>{"use strict";const s=n(17);const r=n(640);const o=n(986);const i=n(658);const u=n(820);const isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);const picomatch=(t,e,n=false)=>{if(Array.isArray(t)){const s=t.map((t=>picomatch(t,e,n)));const arrayMatcher=t=>{for(const e of s){const n=e(t);if(n)return n}return false};return arrayMatcher}const s=isObject(t)&&t.tokens&&t.input;if(t===""||typeof t!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const r=e||{};const o=i.isWindows(e);const u=s?picomatch.compileRe(t,e):picomatch.makeRe(t,e,false,true);const a=u.state;delete u.state;let isIgnored=()=>false;if(r.ignore){const t={...e,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(r.ignore,t,n)}const matcher=(n,s=false)=>{const{isMatch:i,match:c,output:l}=picomatch.test(n,u,e,{glob:t,posix:o});const p={glob:t,state:a,regex:u,posix:o,input:n,output:l,match:c,isMatch:i};if(typeof r.onResult==="function"){r.onResult(p)}if(i===false){p.isMatch=false;return s?p:false}if(isIgnored(n)){if(typeof r.onIgnore==="function"){r.onIgnore(p)}p.isMatch=false;return s?p:false}if(typeof r.onMatch==="function"){r.onMatch(p)}return s?p:true};if(n){matcher.state=a}return matcher};picomatch.test=(t,e,n,{glob:s,posix:r}={})=>{if(typeof t!=="string"){throw new TypeError("Expected input to be a string")}if(t===""){return{isMatch:false,output:""}}const o=n||{};const u=o.format||(r?i.toPosixSlashes:null);let a=t===s;let c=a&&u?u(t):t;if(a===false){c=u?u(t):t;a=c===s}if(a===false||o.capture===true){if(o.matchBase===true||o.basename===true){a=picomatch.matchBase(t,e,n,r)}else{a=e.exec(c)}}return{isMatch:Boolean(a),match:a,output:c}};picomatch.matchBase=(t,e,n,r=i.isWindows(n))=>{const o=e instanceof RegExp?e:picomatch.makeRe(e,n);return o.test(s.basename(t))};picomatch.isMatch=(t,e,n)=>picomatch(e,n)(t);picomatch.parse=(t,e)=>{if(Array.isArray(t))return t.map((t=>picomatch.parse(t,e)));return o(t,{...e,fastpaths:false})};picomatch.scan=(t,e)=>r(t,e);picomatch.compileRe=(t,e,n=false,s=false)=>{if(n===true){return t.output}const r=e||{};const o=r.contains?"":"^";const i=r.contains?"":"$";let u=`${o}(?:${t.output})${i}`;if(t&&t.negated===true){u=`^(?!${u}).*$`}const a=picomatch.toRegex(u,e);if(s===true){a.state=t}return a};picomatch.makeRe=(t,e={},n=false,s=false)=>{if(!t||typeof t!=="string"){throw new TypeError("Expected a non-empty string")}let r={negated:false,fastpaths:true};if(e.fastpaths!==false&&(t[0]==="."||t[0]==="*")){r.output=o.fastpaths(t,e)}if(!r.output){r=o(t,e)}return picomatch.compileRe(r,e,n,s)};picomatch.toRegex=(t,e)=>{try{const n=e||{};return new RegExp(t,n.flags||(n.nocase?"i":""))}catch(t){if(e&&e.debug===true)throw t;return/$^/}};picomatch.constants=u;t.exports=picomatch},640:(t,e,n)=>{"use strict";const s=n(658);const{CHAR_ASTERISK:r,CHAR_AT:o,CHAR_BACKWARD_SLASH:i,CHAR_COMMA:u,CHAR_DOT:a,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:p,CHAR_LEFT_PARENTHESES:f,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_PLUS:_,CHAR_QUESTION_MARK:A,CHAR_RIGHT_CURLY_BRACE:y,CHAR_RIGHT_PARENTHESES:d,CHAR_RIGHT_SQUARE_BRACKET:R}=n(820);const isPathSeparator=t=>t===l||t===i;const depth=t=>{if(t.isPrefix!==true){t.depth=t.isGlobstar?Infinity:1}};const scan=(t,e)=>{const n=e||{};const g=t.length-1;const E=n.parts===true||n.scanToEnd===true;const $=[];const b=[];const m=[];let v=t;let x=-1;let S=0;let C=0;let k=false;let H=false;let O=false;let T=false;let L=false;let w=false;let N=false;let I=false;let D=false;let B=false;let M=0;let P;let G;let U={value:"",depth:0,isGlob:false};const eos=()=>x>=g;const peek=()=>v.charCodeAt(x+1);const advance=()=>{P=G;return v.charCodeAt(++x)};while(x<g){G=advance();let t;if(G===i){N=U.backslashes=true;G=advance();if(G===p){w=true}continue}if(w===true||G===p){M++;while(eos()!==true&&(G=advance())){if(G===i){N=U.backslashes=true;advance();continue}if(G===p){M++;continue}if(w!==true&&G===a&&(G=advance())===a){k=U.isBrace=true;O=U.isGlob=true;B=true;if(E===true){continue}break}if(w!==true&&G===u){k=U.isBrace=true;O=U.isGlob=true;B=true;if(E===true){continue}break}if(G===y){M--;if(M===0){w=false;k=U.isBrace=true;B=true;break}}}if(E===true){continue}break}if(G===l){$.push(x);b.push(U);U={value:"",depth:0,isGlob:false};if(B===true)continue;if(P===a&&x===S+1){S+=2;continue}C=x+1;continue}if(n.noext!==true){const t=G===_||G===o||G===r||G===A||G===c;if(t===true&&peek()===f){O=U.isGlob=true;T=U.isExtglob=true;B=true;if(G===c&&x===S){D=true}if(E===true){while(eos()!==true&&(G=advance())){if(G===i){N=U.backslashes=true;G=advance();continue}if(G===d){O=U.isGlob=true;B=true;break}}continue}break}}if(G===r){if(P===r)L=U.isGlobstar=true;O=U.isGlob=true;B=true;if(E===true){continue}break}if(G===A){O=U.isGlob=true;B=true;if(E===true){continue}break}if(G===h){while(eos()!==true&&(t=advance())){if(t===i){N=U.backslashes=true;advance();continue}if(t===R){H=U.isBracket=true;O=U.isGlob=true;B=true;break}}if(E===true){continue}break}if(n.nonegate!==true&&G===c&&x===S){I=U.negated=true;S++;continue}if(n.noparen!==true&&G===f){O=U.isGlob=true;if(E===true){while(eos()!==true&&(G=advance())){if(G===f){N=U.backslashes=true;G=advance();continue}if(G===d){B=true;break}}continue}break}if(O===true){B=true;if(E===true){continue}break}}if(n.noext===true){T=false;O=false}let F=v;let j="";let K="";if(S>0){j=v.slice(0,S);v=v.slice(S);C-=S}if(F&&O===true&&C>0){F=v.slice(0,C);K=v.slice(C)}else if(O===true){F="";K=v}else{F=v}if(F&&F!==""&&F!=="/"&&F!==v){if(isPathSeparator(F.charCodeAt(F.length-1))){F=F.slice(0,-1)}}if(n.unescape===true){if(K)K=s.removeBackslashes(K);if(F&&N===true){F=s.removeBackslashes(F)}}const W={prefix:j,input:t,start:S,base:F,glob:K,isBrace:k,isBracket:H,isGlob:O,isExtglob:T,isGlobstar:L,negated:I,negatedExtglob:D};if(n.tokens===true){W.maxDepth=0;if(!isPathSeparator(G)){b.push(U)}W.tokens=b}if(n.parts===true||n.tokens===true){let e;for(let s=0;s<$.length;s++){const r=e?e+1:S;const o=$[s];const i=t.slice(r,o);if(n.tokens){if(s===0&&S!==0){b[s].isPrefix=true;b[s].value=j}else{b[s].value=i}depth(b[s]);W.maxDepth+=b[s].depth}if(s!==0||i!==""){m.push(i)}e=o}if(e&&e+1<t.length){const s=t.slice(e+1);m.push(s);if(n.tokens){b[b.length-1].value=s;depth(b[b.length-1]);W.maxDepth+=b[b.length-1].depth}}W.slashes=$;W.parts=m}return W};t.exports=scan},658:(t,e,n)=>{"use strict";const s=n(17);const r=process.platform==="win32";const{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:a}=n(820);e.isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);e.hasRegexChars=t=>u.test(t);e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t);e.escapeRegex=t=>t.replace(a,"\\$1");e.toPosixSlashes=t=>t.replace(o,"/");e.removeBackslashes=t=>t.replace(i,(t=>t==="\\"?"":t));e.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);if(t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10){return true}return false};e.isWindows=t=>{if(t&&typeof t.windows==="boolean"){return t.windows}return r===true||s.sep==="\\"};e.escapeLast=(t,n,s)=>{const r=t.lastIndexOf(n,s);if(r===-1)return t;if(t[r-1]==="\\")return e.escapeLast(t,n,r-1);return`${t.slice(0,r)}\\${t.slice(r)}`};e.removePrefix=(t,e={})=>{let n=t;if(n.startsWith("./")){n=n.slice(2);e.prefix="./"}return n};e.wrapOutput=(t,e={},n={})=>{const s=n.contains?"":"^";const r=n.contains?"":"$";let o=`${s}(?:${t})${r}`;if(e.negated===true){o=`(?:^(?!${o}).*$)`}return o}},17:t=>{"use strict";t.exports=require("path")},77:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});var s=n(17);var r=n(808);var o=n(376);const i=function addExtension(t,e=".js"){let n=`${t}`;if(!s.extname(t))n+=e;return n};const u={ArrayPattern(t,e){for(const n of e.elements){if(n)u[n.type](t,n)}},AssignmentPattern(t,e){u[e.left.type](t,e.left)},Identifier(t,e){t.push(e.name)},MemberExpression(){},ObjectPattern(t,e){for(const n of e.properties){if(n.type==="RestElement"){u.RestElement(t,n)}else{u[n.value.type](t,n.value)}}},RestElement(t,e){u[e.argument.type](t,e.argument)}};const a=function extractAssignedNames(t){const e=[];u[t.type](e,t);return e};const c={const:true,let:true};class Scope{constructor(t={}){this.parent=t.parent;this.isBlockScope=!!t.block;this.declarations=Object.create(null);if(t.params){t.params.forEach((t=>{a(t).forEach((t=>{this.declarations[t]=true}))}))}}addDeclaration(t,e,n){if(!e&&this.isBlockScope){this.parent.addDeclaration(t,e,n)}else if(t.id){a(t.id).forEach((t=>{this.declarations[t]=true}))}}contains(t){return this.declarations[t]||(this.parent?this.parent.contains(t):false)}}const l=function attachScopes(t,e="scope"){let n=new Scope;r.walk(t,{enter(t,s){const r=t;if(/(Function|Class)Declaration/.test(r.type)){n.addDeclaration(r,false,false)}if(r.type==="VariableDeclaration"){const{kind:t}=r;const e=c[t];r.declarations.forEach((t=>{n.addDeclaration(t,e,true)}))}let o;if(/Function/.test(r.type)){const t=r;o=new Scope({parent:n,block:false,params:t.params});if(t.type==="FunctionExpression"&&t.id){o.addDeclaration(t,false,false)}}if(/For(In|Of)?Statement/.test(r.type)){o=new Scope({parent:n,block:true})}if(r.type==="BlockStatement"&&!/Function/.test(s.type)){o=new Scope({parent:n,block:true})}if(r.type==="CatchClause"){o=new Scope({parent:n,params:r.param?[r.param]:[],block:true})}if(o){Object.defineProperty(r,e,{value:o,configurable:true});n=o}},leave(t){const s=t;if(s[e])n=n.parent}});return n};function isArray(t){return Array.isArray(t)}function ensureArray(t){if(isArray(t))return t;if(t==null)return[];return[t]}const p=function normalizePath(t){return t.split(s.win32.sep).join(s.posix.sep)};function getMatcherString(t,e){if(e===false||s.isAbsolute(t)||t.startsWith("*")){return p(t)}const n=p(s.resolve(e||"")).replace(/[-^$*+?.()|[\]{}]/g,"\\$&");return s.posix.join(n,p(t))}const f=function createFilter(t,e,n){const s=n&&n.resolve;const getMatcher=t=>t instanceof RegExp?t:{test:e=>{const n=getMatcherString(t,s);const r=o(n,{dot:true});const i=r(e);return i}};const r=ensureArray(t).map(getMatcher);const i=ensureArray(e).map(getMatcher);return function result(t){if(typeof t!=="string")return false;if(/\0/.test(t))return false;const e=p(t);for(let t=0;t<i.length;++t){const n=i[t];if(n.test(e))return false}for(let t=0;t<r.length;++t){const n=r[t];if(n.test(e))return true}return!r.length}};const h="break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public";const _="arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl";const A=new Set(`${h} ${_}`.split(" "));A.add("");const y=function makeLegalIdentifier(t){let e=t.replace(/-(\w)/g,((t,e)=>e.toUpperCase())).replace(/[^$_a-zA-Z0-9]/g,"_");if(/\d/.test(e[0])||A.has(e)){e=`_${e}`}return e||"_"};function stringify(t){return(JSON.stringify(t)||"undefined").replace(/[\u2028\u2029]/g,(t=>`\\u${`000${t.charCodeAt(0).toString(16)}`.slice(-4)}`))}function serializeArray(t,e,n){let s="[";const r=e?`\n${n}${e}`:"";for(let o=0;o<t.length;o++){const i=t[o];s+=`${o>0?",":""}${r}${serialize(i,e,n+e)}`}return`${s}${e?`\n${n}`:""}]`}function serializeObject(t,e,n){let s="{";const r=e?`\n${n}${e}`:"";const o=Object.entries(t);for(let t=0;t<o.length;t++){const[i,u]=o[t];const a=y(i)===i?i:stringify(i);s+=`${t>0?",":""}${r}${a}:${e?" ":""}${serialize(u,e,n+e)}`}return`${s}${e?`\n${n}`:""}}`}function serialize(t,e,n){if(typeof t==="object"&&t!==null){if(Array.isArray(t))return serializeArray(t,e,n);if(t instanceof Date)return`new Date(${t.getTime()})`;if(t instanceof RegExp)return t.toString();return serializeObject(t,e,n)}if(typeof t==="number"){if(t===Infinity)return"Infinity";if(t===-Infinity)return"-Infinity";if(t===0)return 1/t===Infinity?"0":"-0";if(t!==t)return"NaN"}if(typeof t==="symbol"){const e=Symbol.keyFor(t);if(e!==undefined)return`Symbol.for(${stringify(e)})`}if(typeof t==="bigint")return`${t}n`;return stringify(t)}const d=function dataToEsm(t,e={}){const n=e.compact?"":"indent"in e?e.indent:"\t";const s=e.compact?"":" ";const r=e.compact?"":"\n";const o=e.preferConst?"const":"var";if(e.namedExports===false||typeof t!=="object"||Array.isArray(t)||t instanceof Date||t instanceof RegExp||t===null){const r=serialize(t,e.compact?null:n,"");const o=s||(/^[{[\-\/]/.test(r)?"":" ");return`export default${o}${r};`}let i="";const u=[];for(const[a,c]of Object.entries(t)){if(a===y(a)){if(e.objectShorthand)u.push(a);else u.push(`${a}:${s}${a}`);i+=`export ${o} ${a}${s}=${s}${serialize(c,e.compact?null:n,"")};${r}`}else{u.push(`${stringify(a)}:${s}${serialize(c,e.compact?null:n,"")}`)}}return`${i}export default${s}{${r}${n}${u.join(`,${r}${n}`)}${r}};${r}`};var R={addExtension:i,attachScopes:l,createFilter:f,dataToEsm:d,extractAssignedNames:a,makeLegalIdentifier:y,normalizePath:p};e.addExtension=i;e.attachScopes=l;e.createFilter=f;e.dataToEsm=d;e["default"]=R;e.extractAssignedNames=a;e.makeLegalIdentifier=y;e.normalizePath=p;t.exports=Object.assign(e.default,e)},808:function(t,e){(function(t,n){true?n(e):0})(this,(function(t){"use strict";class WalkerBase{constructor(){this.should_skip=false;this.should_remove=false;this.replacement=null;this.context={skip:()=>this.should_skip=true,remove:()=>this.should_remove=true,replace:t=>this.replacement=t}}replace(t,e,n,s){if(t){if(n!==null){t[e][n]=s}else{t[e]=s}}}remove(t,e,n){if(t){if(n!==null){t[e].splice(n,1)}else{delete t[e]}}}}class SyncWalker extends WalkerBase{constructor(t,e){super();this.enter=t;this.leave=e}visit(t,e,n,s){if(t){if(this.enter){const r=this.should_skip;const o=this.should_remove;const i=this.replacement;this.should_skip=false;this.should_remove=false;this.replacement=null;this.enter.call(this.context,t,e,n,s);if(this.replacement){t=this.replacement;this.replace(e,n,s,t)}if(this.should_remove){this.remove(e,n,s)}const u=this.should_skip;const a=this.should_remove;this.should_skip=r;this.should_remove=o;this.replacement=i;if(u)return t;if(a)return null}for(const e in t){const n=t[e];if(typeof n!=="object"){continue}else if(Array.isArray(n)){for(let s=0;s<n.length;s+=1){if(n[s]!==null&&typeof n[s].type==="string"){if(!this.visit(n[s],t,e,s)){s--}}}}else if(n!==null&&typeof n.type==="string"){this.visit(n,t,e,null)}}if(this.leave){const r=this.replacement;const o=this.should_remove;this.replacement=null;this.should_remove=false;this.leave.call(this.context,t,e,n,s);if(this.replacement){t=this.replacement;this.replace(e,n,s,t)}if(this.should_remove){this.remove(e,n,s)}const i=this.should_remove;this.replacement=r;this.should_remove=o;if(i)return null}}return t}}class AsyncWalker extends WalkerBase{constructor(t,e){super();this.enter=t;this.leave=e}async visit(t,e,n,s){if(t){if(this.enter){const r=this.should_skip;const o=this.should_remove;const i=this.replacement;this.should_skip=false;this.should_remove=false;this.replacement=null;await this.enter.call(this.context,t,e,n,s);if(this.replacement){t=this.replacement;this.replace(e,n,s,t)}if(this.should_remove){this.remove(e,n,s)}const u=this.should_skip;const a=this.should_remove;this.should_skip=r;this.should_remove=o;this.replacement=i;if(u)return t;if(a)return null}for(const e in t){const n=t[e];if(typeof n!=="object"){continue}else if(Array.isArray(n)){for(let s=0;s<n.length;s+=1){if(n[s]!==null&&typeof n[s].type==="string"){if(!await this.visit(n[s],t,e,s)){s--}}}}else if(n!==null&&typeof n.type==="string"){await this.visit(n,t,e,null)}}if(this.leave){const r=this.replacement;const o=this.should_remove;this.replacement=null;this.should_remove=false;await this.leave.call(this.context,t,e,n,s);if(this.replacement){t=this.replacement;this.replace(e,n,s,t)}if(this.should_remove){this.remove(e,n,s)}const i=this.should_remove;this.replacement=r;this.should_remove=o;if(i)return null}}return t}}function walk(t,{enter:e,leave:n}){const s=new SyncWalker(e,n);return s.visit(t,null)}async function asyncWalk(t,{enter:e,leave:n}){const s=new AsyncWalker(e,n);return await s.visit(t,null)}t.asyncWalk=asyncWalk;t.walk=walk;Object.defineProperty(t,"__esModule",{value:true})}))}};var e={};function __nccwpck_require__(n){var s=e[n];if(s!==undefined){return s.exports}var r=e[n]={exports:{}};var o=true;try{t[n].call(r.exports,r,r.exports,__nccwpck_require__);o=false}finally{if(o)delete e[n]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n=__nccwpck_require__(592);module.exports=n})();
|
|
1
|
+
(()=>{var t={982:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});var s=n(574);function json(t){if(t===void 0)t={};var e=s.createFilter(t.include,t.exclude);var n="indent"in t?t.indent:"\t";return{name:"json",transform:function transform(r,o){if(o.slice(-5)!==".json"||!e(o)){return null}try{var i=JSON.parse(r);return{code:s.dataToEsm(i,{preferConst:t.preferConst,compact:t.compact,namedExports:t.namedExports,indent:n}),map:{mappings:""}}}catch(t){var u="Could not parse JSON file";this.error({message:u,id:o,cause:t});return null}}}}e["default"]=json;t.exports=Object.assign(e.default,e)},376:(t,e,n)=>{"use strict";t.exports=n(631)},820:(t,e,n)=>{"use strict";const s=n(17);const r="\\\\/";const o=`[^${r}]`;const i="\\.";const u="\\+";const a="\\?";const c="\\/";const l="(?=.)";const p="[^/]";const f=`(?:${c}|$)`;const h=`(?:^|${c})`;const _=`${i}{1,2}${f}`;const A=`(?!${i})`;const y=`(?!${h}${_})`;const d=`(?!${i}{0,1}${f})`;const R=`(?!${_})`;const g=`[^.${c}]`;const E=`${p}*?`;const $={DOT_LITERAL:i,PLUS_LITERAL:u,QMARK_LITERAL:a,SLASH_LITERAL:c,ONE_CHAR:l,QMARK:p,END_ANCHOR:f,DOTS_SLASH:_,NO_DOT:A,NO_DOTS:y,NO_DOT_SLASH:d,NO_DOTS_SLASH:R,QMARK_NO_DOT:g,STAR:E,START_ANCHOR:h};const b={...$,SLASH_LITERAL:`[${r}]`,QMARK:o,STAR:`${o}*?`,DOTS_SLASH:`${i}{1,2}(?:[${r}]|$)`,NO_DOT:`(?!${i})`,NO_DOTS:`(?!(?:^|[${r}])${i}{1,2}(?:[${r}]|$))`,NO_DOT_SLASH:`(?!${i}{0,1}(?:[${r}]|$))`,NO_DOTS_SLASH:`(?!${i}{1,2}(?:[${r}]|$))`,QMARK_NO_DOT:`[^.${r}]`,START_ANCHOR:`(?:^|[${r}])`,END_ANCHOR:`(?:[${r}]|$)`};const m={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"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:m,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:{"***":"*","**/**":"**","**/**/**":"**"},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,SEP:s.sep,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===true?b:$}}},986:(t,e,n)=>{"use strict";const s=n(820);const r=n(658);const{MAX_LENGTH:o,POSIX_REGEX_SOURCE:i,REGEX_NON_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_BACKREF:a,REPLACEMENTS:c}=s;const expandRange=(t,e)=>{if(typeof e.expandRange==="function"){return e.expandRange(...t,e)}t.sort();const n=`[${t.join("-")}]`;try{new RegExp(n)}catch(e){return t.map((t=>r.escapeRegex(t))).join("..")}return n};const syntaxError=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`;const parse=(t,e)=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}t=c[t]||t;const n={...e};const l=typeof n.maxLength==="number"?Math.min(o,n.maxLength):o;let p=t.length;if(p>l){throw new SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${l}`)}const f={type:"bos",value:"",output:n.prepend||""};const h=[f];const _=n.capture?"":"?:";const A=r.isWindows(e);const y=s.globChars(A);const d=s.extglobChars(y);const{DOT_LITERAL:R,PLUS_LITERAL:g,SLASH_LITERAL:E,ONE_CHAR:$,DOTS_SLASH:b,NO_DOT:m,NO_DOT_SLASH:v,NO_DOTS_SLASH:x,QMARK:S,QMARK_NO_DOT:C,STAR:k,START_ANCHOR:H}=y;const globstar=t=>`(${_}(?:(?!${H}${t.dot?b:R}).)*?)`;const O=n.dot?"":m;const T=n.dot?S:C;let L=n.bash===true?globstar(n):k;if(n.capture){L=`(${L})`}if(typeof n.noext==="boolean"){n.noextglob=n.noext}const w={input:t,index:-1,start:0,dot:n.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:h};t=r.removePrefix(t,w);p=t.length;const N=[];const I=[];const D=[];let B=f;let M;const eos=()=>w.index===p-1;const P=w.peek=(e=1)=>t[w.index+e];const G=w.advance=()=>t[++w.index]||"";const remaining=()=>t.slice(w.index+1);const consume=(t="",e=0)=>{w.consumed+=t;w.index+=e};const append=t=>{w.output+=t.output!=null?t.output:t.value;consume(t.value)};const negate=()=>{let t=1;while(P()==="!"&&(P(2)!=="("||P(3)==="?")){G();w.start++;t++}if(t%2===0){return false}w.negated=true;w.start++;return true};const increment=t=>{w[t]++;D.push(t)};const decrement=t=>{w[t]--;D.pop()};const push=t=>{if(B.type==="globstar"){const e=w.braces>0&&(t.type==="comma"||t.type==="brace");const n=t.extglob===true||N.length&&(t.type==="pipe"||t.type==="paren");if(t.type!=="slash"&&t.type!=="paren"&&!e&&!n){w.output=w.output.slice(0,-B.output.length);B.type="star";B.value="*";B.output=L;w.output+=B.output}}if(N.length&&t.type!=="paren"){N[N.length-1].inner+=t.value}if(t.value||t.output)append(t);if(B&&B.type==="text"&&t.type==="text"){B.value+=t.value;B.output=(B.output||"")+t.value;return}t.prev=B;h.push(t);B=t};const extglobOpen=(t,e)=>{const s={...d[e],conditions:1,inner:""};s.prev=B;s.parens=w.parens;s.output=w.output;const r=(n.capture?"(":"")+s.open;increment("parens");push({type:t,value:e,output:w.output?"":$});push({type:"paren",extglob:true,value:G(),output:r});N.push(s)};const extglobClose=t=>{let s=t.close+(n.capture?")":"");let r;if(t.type==="negate"){let o=L;if(t.inner&&t.inner.length>1&&t.inner.includes("/")){o=globstar(n)}if(o!==L||eos()||/^\)+$/.test(remaining())){s=t.close=`)$))${o}`}if(t.inner.includes("*")&&(r=remaining())&&/^\.[^\\/.]+$/.test(r)){const n=parse(r,{...e,fastpaths:false}).output;s=t.close=`)${n})${o})`}if(t.prev.type==="bos"){w.negatedExtglob=true}}push({type:"paren",extglob:true,value:M,output:s});decrement("parens")};if(n.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let s=false;let o=t.replace(a,((t,e,n,r,o,i)=>{if(r==="\\"){s=true;return t}if(r==="?"){if(e){return e+r+(o?S.repeat(o.length):"")}if(i===0){return T+(o?S.repeat(o.length):"")}return S.repeat(n.length)}if(r==="."){return R.repeat(n.length)}if(r==="*"){if(e){return e+r+(o?L:"")}return L}return e?t:`\\${t}`}));if(s===true){if(n.unescape===true){o=o.replace(/\\/g,"")}else{o=o.replace(/\\+/g,(t=>t.length%2===0?"\\\\":t?"\\":""))}}if(o===t&&n.contains===true){w.output=t;return w}w.output=r.wrapOutput(o,w,e);return w}while(!eos()){M=G();if(M==="\0"){continue}if(M==="\\"){const t=P();if(t==="/"&&n.bash!==true){continue}if(t==="."||t===";"){continue}if(!t){M+="\\";push({type:"text",value:M});continue}const e=/^\\+/.exec(remaining());let s=0;if(e&&e[0].length>2){s=e[0].length;w.index+=s;if(s%2!==0){M+="\\"}}if(n.unescape===true){M=G()}else{M+=G()}if(w.brackets===0){push({type:"text",value:M});continue}}if(w.brackets>0&&(M!=="]"||B.value==="["||B.value==="[^")){if(n.posix!==false&&M===":"){const t=B.value.slice(1);if(t.includes("[")){B.posix=true;if(t.includes(":")){const t=B.value.lastIndexOf("[");const e=B.value.slice(0,t);const n=B.value.slice(t+2);const s=i[n];if(s){B.value=e+s;w.backtrack=true;G();if(!f.output&&h.indexOf(B)===1){f.output=$}continue}}}}if(M==="["&&P()!==":"||M==="-"&&P()==="]"){M=`\\${M}`}if(M==="]"&&(B.value==="["||B.value==="[^")){M=`\\${M}`}if(n.posix===true&&M==="!"&&B.value==="["){M="^"}B.value+=M;append({value:M});continue}if(w.quotes===1&&M!=='"'){M=r.escapeRegex(M);B.value+=M;append({value:M});continue}if(M==='"'){w.quotes=w.quotes===1?0:1;if(n.keepQuotes===true){push({type:"text",value:M})}continue}if(M==="("){increment("parens");push({type:"paren",value:M});continue}if(M===")"){if(w.parens===0&&n.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const t=N[N.length-1];if(t&&w.parens===t.parens+1){extglobClose(N.pop());continue}push({type:"paren",value:M,output:w.parens?")":"\\)"});decrement("parens");continue}if(M==="["){if(n.nobracket===true||!remaining().includes("]")){if(n.nobracket!==true&&n.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}M=`\\${M}`}else{increment("brackets")}push({type:"bracket",value:M});continue}if(M==="]"){if(n.nobracket===true||B&&B.type==="bracket"&&B.value.length===1){push({type:"text",value:M,output:`\\${M}`});continue}if(w.brackets===0){if(n.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:M,output:`\\${M}`});continue}decrement("brackets");const t=B.value.slice(1);if(B.posix!==true&&t[0]==="^"&&!t.includes("/")){M=`/${M}`}B.value+=M;append({value:M});if(n.literalBrackets===false||r.hasRegexChars(t)){continue}const e=r.escapeRegex(B.value);w.output=w.output.slice(0,-B.value.length);if(n.literalBrackets===true){w.output+=e;B.value=e;continue}B.value=`(${_}${e}|${B.value})`;w.output+=B.value;continue}if(M==="{"&&n.nobrace!==true){increment("braces");const t={type:"brace",value:M,output:"(",outputIndex:w.output.length,tokensIndex:w.tokens.length};I.push(t);push(t);continue}if(M==="}"){const t=I[I.length-1];if(n.nobrace===true||!t){push({type:"text",value:M,output:M});continue}let e=")";if(t.dots===true){const t=h.slice();const s=[];for(let e=t.length-1;e>=0;e--){h.pop();if(t[e].type==="brace"){break}if(t[e].type!=="dots"){s.unshift(t[e].value)}}e=expandRange(s,n);w.backtrack=true}if(t.comma!==true&&t.dots!==true){const n=w.output.slice(0,t.outputIndex);const s=w.tokens.slice(t.tokensIndex);t.value=t.output="\\{";M=e="\\}";w.output=n;for(const t of s){w.output+=t.output||t.value}}push({type:"brace",value:M,output:e});decrement("braces");I.pop();continue}if(M==="|"){if(N.length>0){N[N.length-1].conditions++}push({type:"text",value:M});continue}if(M===","){let t=M;const e=I[I.length-1];if(e&&D[D.length-1]==="braces"){e.comma=true;t="|"}push({type:"comma",value:M,output:t});continue}if(M==="/"){if(B.type==="dot"&&w.index===w.start+1){w.start=w.index+1;w.consumed="";w.output="";h.pop();B=f;continue}push({type:"slash",value:M,output:E});continue}if(M==="."){if(w.braces>0&&B.type==="dot"){if(B.value===".")B.output=R;const t=I[I.length-1];B.type="dots";B.output+=M;B.value+=M;t.dots=true;continue}if(w.braces+w.parens===0&&B.type!=="bos"&&B.type!=="slash"){push({type:"text",value:M,output:R});continue}push({type:"dot",value:M,output:R});continue}if(M==="?"){const t=B&&B.value==="(";if(!t&&n.noextglob!==true&&P()==="("&&P(2)!=="?"){extglobOpen("qmark",M);continue}if(B&&B.type==="paren"){const t=P();let e=M;if(t==="<"&&!r.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(B.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(remaining())){e=`\\${M}`}push({type:"text",value:M,output:e});continue}if(n.dot!==true&&(B.type==="slash"||B.type==="bos")){push({type:"qmark",value:M,output:C});continue}push({type:"qmark",value:M,output:S});continue}if(M==="!"){if(n.noextglob!==true&&P()==="("){if(P(2)!=="?"||!/[!=<:]/.test(P(3))){extglobOpen("negate",M);continue}}if(n.nonegate!==true&&w.index===0){negate();continue}}if(M==="+"){if(n.noextglob!==true&&P()==="("&&P(2)!=="?"){extglobOpen("plus",M);continue}if(B&&B.value==="("||n.regex===false){push({type:"plus",value:M,output:g});continue}if(B&&(B.type==="bracket"||B.type==="paren"||B.type==="brace")||w.parens>0){push({type:"plus",value:M});continue}push({type:"plus",value:g});continue}if(M==="@"){if(n.noextglob!==true&&P()==="("&&P(2)!=="?"){push({type:"at",extglob:true,value:M,output:""});continue}push({type:"text",value:M});continue}if(M!=="*"){if(M==="$"||M==="^"){M=`\\${M}`}const t=u.exec(remaining());if(t){M+=t[0];w.index+=t[0].length}push({type:"text",value:M});continue}if(B&&(B.type==="globstar"||B.star===true)){B.type="star";B.star=true;B.value+=M;B.output=L;w.backtrack=true;w.globstar=true;consume(M);continue}let e=remaining();if(n.noextglob!==true&&/^\([^?]/.test(e)){extglobOpen("star",M);continue}if(B.type==="star"){if(n.noglobstar===true){consume(M);continue}const s=B.prev;const r=s.prev;const o=s.type==="slash"||s.type==="bos";const i=r&&(r.type==="star"||r.type==="globstar");if(n.bash===true&&(!o||e[0]&&e[0]!=="/")){push({type:"star",value:M,output:""});continue}const u=w.braces>0&&(s.type==="comma"||s.type==="brace");const a=N.length&&(s.type==="pipe"||s.type==="paren");if(!o&&s.type!=="paren"&&!u&&!a){push({type:"star",value:M,output:""});continue}while(e.slice(0,3)==="/**"){const n=t[w.index+4];if(n&&n!=="/"){break}e=e.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){B.type="globstar";B.value+=M;B.output=globstar(n);w.output=B.output;w.globstar=true;consume(M);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!i&&eos()){w.output=w.output.slice(0,-(s.output+B.output).length);s.output=`(?:${s.output}`;B.type="globstar";B.output=globstar(n)+(n.strictSlashes?")":"|$)");B.value+=M;w.globstar=true;w.output+=s.output+B.output;consume(M);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&e[0]==="/"){const t=e[1]!==void 0?"|$":"";w.output=w.output.slice(0,-(s.output+B.output).length);s.output=`(?:${s.output}`;B.type="globstar";B.output=`${globstar(n)}${E}|${E}${t})`;B.value+=M;w.output+=s.output+B.output;w.globstar=true;consume(M+G());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&e[0]==="/"){B.type="globstar";B.value+=M;B.output=`(?:^|${E}|${globstar(n)}${E})`;w.output=B.output;w.globstar=true;consume(M+G());push({type:"slash",value:"/",output:""});continue}w.output=w.output.slice(0,-B.output.length);B.type="globstar";B.output=globstar(n);B.value+=M;w.output+=B.output;w.globstar=true;consume(M);continue}const s={type:"star",value:M,output:L};if(n.bash===true){s.output=".*?";if(B.type==="bos"||B.type==="slash"){s.output=O+s.output}push(s);continue}if(B&&(B.type==="bracket"||B.type==="paren")&&n.regex===true){s.output=M;push(s);continue}if(w.index===w.start||B.type==="slash"||B.type==="dot"){if(B.type==="dot"){w.output+=v;B.output+=v}else if(n.dot===true){w.output+=x;B.output+=x}else{w.output+=O;B.output+=O}if(P()!=="*"){w.output+=$;B.output+=$}}push(s)}while(w.brackets>0){if(n.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));w.output=r.escapeLast(w.output,"[");decrement("brackets")}while(w.parens>0){if(n.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));w.output=r.escapeLast(w.output,"(");decrement("parens")}while(w.braces>0){if(n.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));w.output=r.escapeLast(w.output,"{");decrement("braces")}if(n.strictSlashes!==true&&(B.type==="star"||B.type==="bracket")){push({type:"maybe_slash",value:"",output:`${E}?`})}if(w.backtrack===true){w.output="";for(const t of w.tokens){w.output+=t.output!=null?t.output:t.value;if(t.suffix){w.output+=t.suffix}}}return w};parse.fastpaths=(t,e)=>{const n={...e};const i=typeof n.maxLength==="number"?Math.min(o,n.maxLength):o;const u=t.length;if(u>i){throw new SyntaxError(`Input length: ${u}, exceeds maximum allowed length: ${i}`)}t=c[t]||t;const a=r.isWindows(e);const{DOT_LITERAL:l,SLASH_LITERAL:p,ONE_CHAR:f,DOTS_SLASH:h,NO_DOT:_,NO_DOTS:A,NO_DOTS_SLASH:y,STAR:d,START_ANCHOR:R}=s.globChars(a);const g=n.dot?A:_;const E=n.dot?y:_;const $=n.capture?"":"?:";const b={negated:false,prefix:""};let m=n.bash===true?".*?":d;if(n.capture){m=`(${m})`}const globstar=t=>{if(t.noglobstar===true)return m;return`(${$}(?:(?!${R}${t.dot?h:l}).)*?)`};const create=t=>{switch(t){case"*":return`${g}${f}${m}`;case".*":return`${l}${f}${m}`;case"*.*":return`${g}${m}${l}${f}${m}`;case"*/*":return`${g}${m}${p}${f}${E}${m}`;case"**":return g+globstar(n);case"**/*":return`(?:${g}${globstar(n)}${p})?${E}${f}${m}`;case"**/*.*":return`(?:${g}${globstar(n)}${p})?${E}${m}${l}${f}${m}`;case"**/.*":return`(?:${g}${globstar(n)}${p})?${l}${f}${m}`;default:{const e=/^(.*?)\.(\w+)$/.exec(t);if(!e)return;const n=create(e[1]);if(!n)return;return n+l+e[2]}}};const v=r.removePrefix(t,b);let x=create(v);if(x&&n.strictSlashes!==true){x+=`${p}?`}return x};t.exports=parse},631:(t,e,n)=>{"use strict";const s=n(17);const r=n(640);const o=n(986);const i=n(658);const u=n(820);const isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);const picomatch=(t,e,n=false)=>{if(Array.isArray(t)){const s=t.map((t=>picomatch(t,e,n)));const arrayMatcher=t=>{for(const e of s){const n=e(t);if(n)return n}return false};return arrayMatcher}const s=isObject(t)&&t.tokens&&t.input;if(t===""||typeof t!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const r=e||{};const o=i.isWindows(e);const u=s?picomatch.compileRe(t,e):picomatch.makeRe(t,e,false,true);const a=u.state;delete u.state;let isIgnored=()=>false;if(r.ignore){const t={...e,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(r.ignore,t,n)}const matcher=(n,s=false)=>{const{isMatch:i,match:c,output:l}=picomatch.test(n,u,e,{glob:t,posix:o});const p={glob:t,state:a,regex:u,posix:o,input:n,output:l,match:c,isMatch:i};if(typeof r.onResult==="function"){r.onResult(p)}if(i===false){p.isMatch=false;return s?p:false}if(isIgnored(n)){if(typeof r.onIgnore==="function"){r.onIgnore(p)}p.isMatch=false;return s?p:false}if(typeof r.onMatch==="function"){r.onMatch(p)}return s?p:true};if(n){matcher.state=a}return matcher};picomatch.test=(t,e,n,{glob:s,posix:r}={})=>{if(typeof t!=="string"){throw new TypeError("Expected input to be a string")}if(t===""){return{isMatch:false,output:""}}const o=n||{};const u=o.format||(r?i.toPosixSlashes:null);let a=t===s;let c=a&&u?u(t):t;if(a===false){c=u?u(t):t;a=c===s}if(a===false||o.capture===true){if(o.matchBase===true||o.basename===true){a=picomatch.matchBase(t,e,n,r)}else{a=e.exec(c)}}return{isMatch:Boolean(a),match:a,output:c}};picomatch.matchBase=(t,e,n,r=i.isWindows(n))=>{const o=e instanceof RegExp?e:picomatch.makeRe(e,n);return o.test(s.basename(t))};picomatch.isMatch=(t,e,n)=>picomatch(e,n)(t);picomatch.parse=(t,e)=>{if(Array.isArray(t))return t.map((t=>picomatch.parse(t,e)));return o(t,{...e,fastpaths:false})};picomatch.scan=(t,e)=>r(t,e);picomatch.compileRe=(t,e,n=false,s=false)=>{if(n===true){return t.output}const r=e||{};const o=r.contains?"":"^";const i=r.contains?"":"$";let u=`${o}(?:${t.output})${i}`;if(t&&t.negated===true){u=`^(?!${u}).*$`}const a=picomatch.toRegex(u,e);if(s===true){a.state=t}return a};picomatch.makeRe=(t,e={},n=false,s=false)=>{if(!t||typeof t!=="string"){throw new TypeError("Expected a non-empty string")}let r={negated:false,fastpaths:true};if(e.fastpaths!==false&&(t[0]==="."||t[0]==="*")){r.output=o.fastpaths(t,e)}if(!r.output){r=o(t,e)}return picomatch.compileRe(r,e,n,s)};picomatch.toRegex=(t,e)=>{try{const n=e||{};return new RegExp(t,n.flags||(n.nocase?"i":""))}catch(t){if(e&&e.debug===true)throw t;return/$^/}};picomatch.constants=u;t.exports=picomatch},640:(t,e,n)=>{"use strict";const s=n(658);const{CHAR_ASTERISK:r,CHAR_AT:o,CHAR_BACKWARD_SLASH:i,CHAR_COMMA:u,CHAR_DOT:a,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:p,CHAR_LEFT_PARENTHESES:f,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_PLUS:_,CHAR_QUESTION_MARK:A,CHAR_RIGHT_CURLY_BRACE:y,CHAR_RIGHT_PARENTHESES:d,CHAR_RIGHT_SQUARE_BRACKET:R}=n(820);const isPathSeparator=t=>t===l||t===i;const depth=t=>{if(t.isPrefix!==true){t.depth=t.isGlobstar?Infinity:1}};const scan=(t,e)=>{const n=e||{};const g=t.length-1;const E=n.parts===true||n.scanToEnd===true;const $=[];const b=[];const m=[];let v=t;let x=-1;let S=0;let C=0;let k=false;let H=false;let O=false;let T=false;let L=false;let w=false;let N=false;let I=false;let D=false;let B=false;let M=0;let P;let G;let U={value:"",depth:0,isGlob:false};const eos=()=>x>=g;const peek=()=>v.charCodeAt(x+1);const advance=()=>{P=G;return v.charCodeAt(++x)};while(x<g){G=advance();let t;if(G===i){N=U.backslashes=true;G=advance();if(G===p){w=true}continue}if(w===true||G===p){M++;while(eos()!==true&&(G=advance())){if(G===i){N=U.backslashes=true;advance();continue}if(G===p){M++;continue}if(w!==true&&G===a&&(G=advance())===a){k=U.isBrace=true;O=U.isGlob=true;B=true;if(E===true){continue}break}if(w!==true&&G===u){k=U.isBrace=true;O=U.isGlob=true;B=true;if(E===true){continue}break}if(G===y){M--;if(M===0){w=false;k=U.isBrace=true;B=true;break}}}if(E===true){continue}break}if(G===l){$.push(x);b.push(U);U={value:"",depth:0,isGlob:false};if(B===true)continue;if(P===a&&x===S+1){S+=2;continue}C=x+1;continue}if(n.noext!==true){const t=G===_||G===o||G===r||G===A||G===c;if(t===true&&peek()===f){O=U.isGlob=true;T=U.isExtglob=true;B=true;if(G===c&&x===S){D=true}if(E===true){while(eos()!==true&&(G=advance())){if(G===i){N=U.backslashes=true;G=advance();continue}if(G===d){O=U.isGlob=true;B=true;break}}continue}break}}if(G===r){if(P===r)L=U.isGlobstar=true;O=U.isGlob=true;B=true;if(E===true){continue}break}if(G===A){O=U.isGlob=true;B=true;if(E===true){continue}break}if(G===h){while(eos()!==true&&(t=advance())){if(t===i){N=U.backslashes=true;advance();continue}if(t===R){H=U.isBracket=true;O=U.isGlob=true;B=true;break}}if(E===true){continue}break}if(n.nonegate!==true&&G===c&&x===S){I=U.negated=true;S++;continue}if(n.noparen!==true&&G===f){O=U.isGlob=true;if(E===true){while(eos()!==true&&(G=advance())){if(G===f){N=U.backslashes=true;G=advance();continue}if(G===d){B=true;break}}continue}break}if(O===true){B=true;if(E===true){continue}break}}if(n.noext===true){T=false;O=false}let F=v;let j="";let K="";if(S>0){j=v.slice(0,S);v=v.slice(S);C-=S}if(F&&O===true&&C>0){F=v.slice(0,C);K=v.slice(C)}else if(O===true){F="";K=v}else{F=v}if(F&&F!==""&&F!=="/"&&F!==v){if(isPathSeparator(F.charCodeAt(F.length-1))){F=F.slice(0,-1)}}if(n.unescape===true){if(K)K=s.removeBackslashes(K);if(F&&N===true){F=s.removeBackslashes(F)}}const W={prefix:j,input:t,start:S,base:F,glob:K,isBrace:k,isBracket:H,isGlob:O,isExtglob:T,isGlobstar:L,negated:I,negatedExtglob:D};if(n.tokens===true){W.maxDepth=0;if(!isPathSeparator(G)){b.push(U)}W.tokens=b}if(n.parts===true||n.tokens===true){let e;for(let s=0;s<$.length;s++){const r=e?e+1:S;const o=$[s];const i=t.slice(r,o);if(n.tokens){if(s===0&&S!==0){b[s].isPrefix=true;b[s].value=j}else{b[s].value=i}depth(b[s]);W.maxDepth+=b[s].depth}if(s!==0||i!==""){m.push(i)}e=o}if(e&&e+1<t.length){const s=t.slice(e+1);m.push(s);if(n.tokens){b[b.length-1].value=s;depth(b[b.length-1]);W.maxDepth+=b[b.length-1].depth}}W.slashes=$;W.parts=m}return W};t.exports=scan},658:(t,e,n)=>{"use strict";const s=n(17);const r=process.platform==="win32";const{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:a}=n(820);e.isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);e.hasRegexChars=t=>u.test(t);e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t);e.escapeRegex=t=>t.replace(a,"\\$1");e.toPosixSlashes=t=>t.replace(o,"/");e.removeBackslashes=t=>t.replace(i,(t=>t==="\\"?"":t));e.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);if(t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10){return true}return false};e.isWindows=t=>{if(t&&typeof t.windows==="boolean"){return t.windows}return r===true||s.sep==="\\"};e.escapeLast=(t,n,s)=>{const r=t.lastIndexOf(n,s);if(r===-1)return t;if(t[r-1]==="\\")return e.escapeLast(t,n,r-1);return`${t.slice(0,r)}\\${t.slice(r)}`};e.removePrefix=(t,e={})=>{let n=t;if(n.startsWith("./")){n=n.slice(2);e.prefix="./"}return n};e.wrapOutput=(t,e={},n={})=>{const s=n.contains?"":"^";const r=n.contains?"":"$";let o=`${s}(?:${t})${r}`;if(e.negated===true){o=`(?:^(?!${o}).*$)`}return o}},17:t=>{"use strict";t.exports=require("path")},574:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});var s=n(17);var r=n(808);var o=n(376);const i=function addExtension(t,e=".js"){let n=`${t}`;if(!s.extname(t))n+=e;return n};const u={ArrayPattern(t,e){for(const n of e.elements){if(n)u[n.type](t,n)}},AssignmentPattern(t,e){u[e.left.type](t,e.left)},Identifier(t,e){t.push(e.name)},MemberExpression(){},ObjectPattern(t,e){for(const n of e.properties){if(n.type==="RestElement"){u.RestElement(t,n)}else{u[n.value.type](t,n.value)}}},RestElement(t,e){u[e.argument.type](t,e.argument)}};const a=function extractAssignedNames(t){const e=[];u[t.type](e,t);return e};const c={const:true,let:true};class Scope{constructor(t={}){this.parent=t.parent;this.isBlockScope=!!t.block;this.declarations=Object.create(null);if(t.params){t.params.forEach((t=>{a(t).forEach((t=>{this.declarations[t]=true}))}))}}addDeclaration(t,e,n){if(!e&&this.isBlockScope){this.parent.addDeclaration(t,e,n)}else if(t.id){a(t.id).forEach((t=>{this.declarations[t]=true}))}}contains(t){return this.declarations[t]||(this.parent?this.parent.contains(t):false)}}const l=function attachScopes(t,e="scope"){let n=new Scope;r.walk(t,{enter(t,s){const r=t;if(/(Function|Class)Declaration/.test(r.type)){n.addDeclaration(r,false,false)}if(r.type==="VariableDeclaration"){const{kind:t}=r;const e=c[t];r.declarations.forEach((t=>{n.addDeclaration(t,e,true)}))}let o;if(/Function/.test(r.type)){const t=r;o=new Scope({parent:n,block:false,params:t.params});if(t.type==="FunctionExpression"&&t.id){o.addDeclaration(t,false,false)}}if(/For(In|Of)?Statement/.test(r.type)){o=new Scope({parent:n,block:true})}if(r.type==="BlockStatement"&&!/Function/.test(s.type)){o=new Scope({parent:n,block:true})}if(r.type==="CatchClause"){o=new Scope({parent:n,params:r.param?[r.param]:[],block:true})}if(o){Object.defineProperty(r,e,{value:o,configurable:true});n=o}},leave(t){const s=t;if(s[e])n=n.parent}});return n};function isArray(t){return Array.isArray(t)}function ensureArray(t){if(isArray(t))return t;if(t==null)return[];return[t]}const p=function normalizePath(t){return t.split(s.win32.sep).join(s.posix.sep)};function getMatcherString(t,e){if(e===false||s.isAbsolute(t)||t.startsWith("*")){return p(t)}const n=p(s.resolve(e||"")).replace(/[-^$*+?.()|[\]{}]/g,"\\$&");return s.posix.join(n,p(t))}const f=function createFilter(t,e,n){const s=n&&n.resolve;const getMatcher=t=>t instanceof RegExp?t:{test:e=>{const n=getMatcherString(t,s);const r=o(n,{dot:true});const i=r(e);return i}};const r=ensureArray(t).map(getMatcher);const i=ensureArray(e).map(getMatcher);return function result(t){if(typeof t!=="string")return false;if(/\0/.test(t))return false;const e=p(t);for(let t=0;t<i.length;++t){const n=i[t];if(n.test(e))return false}for(let t=0;t<r.length;++t){const n=r[t];if(n.test(e))return true}return!r.length}};const h="break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public";const _="arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl";const A=new Set(`${h} ${_}`.split(" "));A.add("");const y=function makeLegalIdentifier(t){let e=t.replace(/-(\w)/g,((t,e)=>e.toUpperCase())).replace(/[^$_a-zA-Z0-9]/g,"_");if(/\d/.test(e[0])||A.has(e)){e=`_${e}`}return e||"_"};function stringify(t){return(JSON.stringify(t)||"undefined").replace(/[\u2028\u2029]/g,(t=>`\\u${`000${t.charCodeAt(0).toString(16)}`.slice(-4)}`))}function serializeArray(t,e,n){let s="[";const r=e?`\n${n}${e}`:"";for(let o=0;o<t.length;o++){const i=t[o];s+=`${o>0?",":""}${r}${serialize(i,e,n+e)}`}return`${s}${e?`\n${n}`:""}]`}function serializeObject(t,e,n){let s="{";const r=e?`\n${n}${e}`:"";const o=Object.entries(t);for(let t=0;t<o.length;t++){const[i,u]=o[t];const a=y(i)===i?i:stringify(i);s+=`${t>0?",":""}${r}${a}:${e?" ":""}${serialize(u,e,n+e)}`}return`${s}${e?`\n${n}`:""}}`}function serialize(t,e,n){if(typeof t==="object"&&t!==null){if(Array.isArray(t))return serializeArray(t,e,n);if(t instanceof Date)return`new Date(${t.getTime()})`;if(t instanceof RegExp)return t.toString();return serializeObject(t,e,n)}if(typeof t==="number"){if(t===Infinity)return"Infinity";if(t===-Infinity)return"-Infinity";if(t===0)return 1/t===Infinity?"0":"-0";if(t!==t)return"NaN"}if(typeof t==="symbol"){const e=Symbol.keyFor(t);if(e!==undefined)return`Symbol.for(${stringify(e)})`}if(typeof t==="bigint")return`${t}n`;return stringify(t)}const d=function dataToEsm(t,e={}){const n=e.compact?"":"indent"in e?e.indent:"\t";const s=e.compact?"":" ";const r=e.compact?"":"\n";const o=e.preferConst?"const":"var";if(e.namedExports===false||typeof t!=="object"||Array.isArray(t)||t instanceof Date||t instanceof RegExp||t===null){const r=serialize(t,e.compact?null:n,"");const o=s||(/^[{[\-\/]/.test(r)?"":" ");return`export default${o}${r};`}let i="";const u=[];for(const[a,c]of Object.entries(t)){if(a===y(a)){if(e.objectShorthand)u.push(a);else u.push(`${a}:${s}${a}`);i+=`export ${o} ${a}${s}=${s}${serialize(c,e.compact?null:n,"")};${r}`}else{u.push(`${stringify(a)}:${s}${serialize(c,e.compact?null:n,"")}`)}}return`${i}export default${s}{${r}${n}${u.join(`,${r}${n}`)}${r}};${r}`};var R={addExtension:i,attachScopes:l,createFilter:f,dataToEsm:d,extractAssignedNames:a,makeLegalIdentifier:y,normalizePath:p};e.addExtension=i;e.attachScopes=l;e.createFilter=f;e.dataToEsm=d;e["default"]=R;e.extractAssignedNames=a;e.makeLegalIdentifier=y;e.normalizePath=p;t.exports=Object.assign(e.default,e)},808:function(t,e){(function(t,n){true?n(e):0})(this,(function(t){"use strict";class WalkerBase{constructor(){this.should_skip=false;this.should_remove=false;this.replacement=null;this.context={skip:()=>this.should_skip=true,remove:()=>this.should_remove=true,replace:t=>this.replacement=t}}replace(t,e,n,s){if(t){if(n!==null){t[e][n]=s}else{t[e]=s}}}remove(t,e,n){if(t){if(n!==null){t[e].splice(n,1)}else{delete t[e]}}}}class SyncWalker extends WalkerBase{constructor(t,e){super();this.enter=t;this.leave=e}visit(t,e,n,s){if(t){if(this.enter){const r=this.should_skip;const o=this.should_remove;const i=this.replacement;this.should_skip=false;this.should_remove=false;this.replacement=null;this.enter.call(this.context,t,e,n,s);if(this.replacement){t=this.replacement;this.replace(e,n,s,t)}if(this.should_remove){this.remove(e,n,s)}const u=this.should_skip;const a=this.should_remove;this.should_skip=r;this.should_remove=o;this.replacement=i;if(u)return t;if(a)return null}for(const e in t){const n=t[e];if(typeof n!=="object"){continue}else if(Array.isArray(n)){for(let s=0;s<n.length;s+=1){if(n[s]!==null&&typeof n[s].type==="string"){if(!this.visit(n[s],t,e,s)){s--}}}}else if(n!==null&&typeof n.type==="string"){this.visit(n,t,e,null)}}if(this.leave){const r=this.replacement;const o=this.should_remove;this.replacement=null;this.should_remove=false;this.leave.call(this.context,t,e,n,s);if(this.replacement){t=this.replacement;this.replace(e,n,s,t)}if(this.should_remove){this.remove(e,n,s)}const i=this.should_remove;this.replacement=r;this.should_remove=o;if(i)return null}}return t}}class AsyncWalker extends WalkerBase{constructor(t,e){super();this.enter=t;this.leave=e}async visit(t,e,n,s){if(t){if(this.enter){const r=this.should_skip;const o=this.should_remove;const i=this.replacement;this.should_skip=false;this.should_remove=false;this.replacement=null;await this.enter.call(this.context,t,e,n,s);if(this.replacement){t=this.replacement;this.replace(e,n,s,t)}if(this.should_remove){this.remove(e,n,s)}const u=this.should_skip;const a=this.should_remove;this.should_skip=r;this.should_remove=o;this.replacement=i;if(u)return t;if(a)return null}for(const e in t){const n=t[e];if(typeof n!=="object"){continue}else if(Array.isArray(n)){for(let s=0;s<n.length;s+=1){if(n[s]!==null&&typeof n[s].type==="string"){if(!await this.visit(n[s],t,e,s)){s--}}}}else if(n!==null&&typeof n.type==="string"){await this.visit(n,t,e,null)}}if(this.leave){const r=this.replacement;const o=this.should_remove;this.replacement=null;this.should_remove=false;await this.leave.call(this.context,t,e,n,s);if(this.replacement){t=this.replacement;this.replace(e,n,s,t)}if(this.should_remove){this.remove(e,n,s)}const i=this.should_remove;this.replacement=r;this.should_remove=o;if(i)return null}}return t}}function walk(t,{enter:e,leave:n}){const s=new SyncWalker(e,n);return s.visit(t,null)}async function asyncWalk(t,{enter:e,leave:n}){const s=new AsyncWalker(e,n);return await s.visit(t,null)}t.asyncWalk=asyncWalk;t.walk=walk;Object.defineProperty(t,"__esModule",{value:true})}))}};var e={};function __nccwpck_require__(n){var s=e[n];if(s!==undefined){return s.exports}var r=e[n]={exports:{}};var o=true;try{t[n].call(r.exports,r,r.exports,__nccwpck_require__);o=false}finally{if(o)delete e[n]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n=__nccwpck_require__(982);module.exports=n})();
|
|
@@ -32,15 +32,19 @@ export interface RollupLog {
|
|
|
32
32
|
line: number;
|
|
33
33
|
};
|
|
34
34
|
message: string;
|
|
35
|
+
meta?: any;
|
|
35
36
|
names?: string[];
|
|
36
37
|
plugin?: string;
|
|
37
|
-
pluginCode?:
|
|
38
|
+
pluginCode?: unknown;
|
|
38
39
|
pos?: number;
|
|
39
40
|
reexporter?: string;
|
|
40
41
|
stack?: string;
|
|
41
42
|
url?: string;
|
|
42
43
|
}
|
|
43
44
|
|
|
45
|
+
export type LogLevel = 'warn' | 'info' | 'debug';
|
|
46
|
+
export type LogLevelOption = LogLevel | 'silent';
|
|
47
|
+
|
|
44
48
|
export type SourceMapSegment =
|
|
45
49
|
| [number]
|
|
46
50
|
| [number, number, number, number]
|
|
@@ -48,7 +52,7 @@ export type SourceMapSegment =
|
|
|
48
52
|
|
|
49
53
|
export interface ExistingDecodedSourceMap {
|
|
50
54
|
file?: string;
|
|
51
|
-
mappings: SourceMapSegment[][];
|
|
55
|
+
readonly mappings: SourceMapSegment[][];
|
|
52
56
|
names: string[];
|
|
53
57
|
sourceRoot?: string;
|
|
54
58
|
sources: string[];
|
|
@@ -70,11 +74,10 @@ export interface ExistingRawSourceMap {
|
|
|
70
74
|
|
|
71
75
|
export type DecodedSourceMapOrMissing =
|
|
72
76
|
| {
|
|
73
|
-
mappings?: never;
|
|
74
77
|
missing: true;
|
|
75
78
|
plugin: string;
|
|
76
79
|
}
|
|
77
|
-
| ExistingDecodedSourceMap;
|
|
80
|
+
| (ExistingDecodedSourceMap & { missing?: false });
|
|
78
81
|
|
|
79
82
|
export interface SourceMap {
|
|
80
83
|
file: string;
|
|
@@ -128,8 +131,14 @@ export interface PluginCache {
|
|
|
128
131
|
set<T = any>(id: string, value: T): void;
|
|
129
132
|
}
|
|
130
133
|
|
|
134
|
+
export type LoggingFunction = (log: RollupLog | string | (() => RollupLog | string)) => void;
|
|
135
|
+
|
|
131
136
|
export interface MinimalPluginContext {
|
|
137
|
+
debug: LoggingFunction;
|
|
138
|
+
error: (error: RollupError | string) => never;
|
|
139
|
+
info: LoggingFunction;
|
|
132
140
|
meta: PluginContextMeta;
|
|
141
|
+
warn: LoggingFunction;
|
|
133
142
|
}
|
|
134
143
|
|
|
135
144
|
export interface EmittedAsset {
|
|
@@ -155,6 +164,7 @@ export interface EmittedPrebuiltChunk {
|
|
|
155
164
|
exports?: string[];
|
|
156
165
|
fileName: string;
|
|
157
166
|
map?: SourceMap;
|
|
167
|
+
sourcemapFileName?: string;
|
|
158
168
|
type: 'prebuilt-chunk';
|
|
159
169
|
}
|
|
160
170
|
|
|
@@ -190,15 +200,22 @@ export interface CustomPluginOptions {
|
|
|
190
200
|
[plugin: string]: any;
|
|
191
201
|
}
|
|
192
202
|
|
|
203
|
+
type LoggingFunctionWithPosition = (
|
|
204
|
+
log: RollupLog | string | (() => RollupLog | string),
|
|
205
|
+
pos?: number | { column: number; line: number }
|
|
206
|
+
) => void;
|
|
207
|
+
|
|
193
208
|
export interface PluginContext extends MinimalPluginContext {
|
|
194
209
|
addWatchFile: (id: string) => void;
|
|
195
210
|
cache: PluginCache;
|
|
211
|
+
debug: LoggingFunction;
|
|
196
212
|
emitFile: EmitFile;
|
|
197
|
-
error: (error: RollupError | string
|
|
213
|
+
error: (error: RollupError | string) => never;
|
|
198
214
|
getFileName: (fileReferenceId: string) => string;
|
|
199
215
|
getModuleIds: () => IterableIterator<string>;
|
|
200
216
|
getModuleInfo: GetModuleInfo;
|
|
201
217
|
getWatchFiles: () => string[];
|
|
218
|
+
info: LoggingFunction;
|
|
202
219
|
load: (
|
|
203
220
|
options: { id: string; resolveDependencies?: boolean } & Partial<PartialNull<ModuleOptions>>
|
|
204
221
|
) => Promise<ModuleInfo>;
|
|
@@ -216,7 +233,7 @@ export interface PluginContext extends MinimalPluginContext {
|
|
|
216
233
|
}
|
|
217
234
|
) => Promise<ResolvedId | null>;
|
|
218
235
|
setAssetSource: (assetReferenceId: string, source: string | Uint8Array) => void;
|
|
219
|
-
warn:
|
|
236
|
+
warn: LoggingFunction;
|
|
220
237
|
}
|
|
221
238
|
|
|
222
239
|
export interface PluginContextMeta {
|
|
@@ -279,7 +296,11 @@ export type LoadResult = SourceDescription | string | NullValue;
|
|
|
279
296
|
export type LoadHook = (this: PluginContext, id: string) => LoadResult;
|
|
280
297
|
|
|
281
298
|
export interface TransformPluginContext extends PluginContext {
|
|
299
|
+
debug: LoggingFunctionWithPosition;
|
|
300
|
+
error: (error: RollupError | string, pos?: number | { column: number; line: number }) => never;
|
|
282
301
|
getCombinedSourcemap: () => SourceMap;
|
|
302
|
+
info: LoggingFunctionWithPosition;
|
|
303
|
+
warn: LoggingFunctionWithPosition;
|
|
283
304
|
}
|
|
284
305
|
|
|
285
306
|
export type TransformResult = string | NullValue | Partial<SourceDescription>;
|
|
@@ -349,7 +370,7 @@ export type WatchChangeHook = (
|
|
|
349
370
|
* ```
|
|
350
371
|
*/
|
|
351
372
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
352
|
-
export type PluginImpl<O extends object = object> = (options?: O) => Plugin
|
|
373
|
+
export type PluginImpl<O extends object = object, A = any> = (options?: O) => Plugin<A>;
|
|
353
374
|
|
|
354
375
|
export interface OutputBundle {
|
|
355
376
|
[fileName: string]: OutputAsset | OutputChunk;
|
|
@@ -369,6 +390,7 @@ export interface FunctionPluginHooks {
|
|
|
369
390
|
) => void;
|
|
370
391
|
load: LoadHook;
|
|
371
392
|
moduleParsed: ModuleParsedHook;
|
|
393
|
+
onLog: (this: MinimalPluginContext, level: LogLevel, log: RollupLog) => boolean | NullValue;
|
|
372
394
|
options: (this: MinimalPluginContext, options: InputOptions) => InputOptions | NullValue;
|
|
373
395
|
outputOptions: (this: PluginContext, options: OutputOptions) => OutputOptions | NullValue;
|
|
374
396
|
renderChunk: RenderChunkHook;
|
|
@@ -417,6 +439,7 @@ export type InputPluginHooks = Exclude<keyof FunctionPluginHooks, OutputPluginHo
|
|
|
417
439
|
|
|
418
440
|
export type SyncPluginHooks =
|
|
419
441
|
| 'augmentChunkHash'
|
|
442
|
+
| 'onLog'
|
|
420
443
|
| 'outputOptions'
|
|
421
444
|
| 'renderDynamicImport'
|
|
422
445
|
| 'resolveFileUrl'
|
|
@@ -436,6 +459,7 @@ export type FirstPluginHooks =
|
|
|
436
459
|
export type SequentialPluginHooks =
|
|
437
460
|
| 'augmentChunkHash'
|
|
438
461
|
| 'generateBundle'
|
|
462
|
+
| 'onLog'
|
|
439
463
|
| 'options'
|
|
440
464
|
| 'outputOptions'
|
|
441
465
|
| 'renderChunk'
|
|
@@ -474,12 +498,12 @@ export interface OutputPlugin
|
|
|
474
498
|
version?: string;
|
|
475
499
|
}
|
|
476
500
|
|
|
477
|
-
export interface Plugin extends OutputPlugin, Partial<PluginHooks> {
|
|
501
|
+
export interface Plugin<A = any> extends OutputPlugin, Partial<PluginHooks> {
|
|
478
502
|
// for inter-plugin communication
|
|
479
|
-
api?:
|
|
503
|
+
api?: A;
|
|
480
504
|
}
|
|
481
505
|
|
|
482
|
-
type TreeshakingPreset = 'smallest' | 'safest' | 'recommended';
|
|
506
|
+
export type TreeshakingPreset = 'smallest' | 'safest' | 'recommended';
|
|
483
507
|
|
|
484
508
|
export interface NormalizedTreeshakingOptions {
|
|
485
509
|
annotations: boolean;
|
|
@@ -508,16 +532,32 @@ export type ExternalOption =
|
|
|
508
532
|
| string
|
|
509
533
|
| RegExp
|
|
510
534
|
| ((source: string, importer: string | undefined, isResolved: boolean) => boolean | NullValue);
|
|
511
|
-
|
|
535
|
+
|
|
512
536
|
export type GlobalsOption = { [name: string]: string } | ((name: string) => string);
|
|
537
|
+
|
|
513
538
|
export type InputOption = string | string[] | { [entryAlias: string]: string };
|
|
539
|
+
|
|
514
540
|
export type ManualChunksOption = { [chunkAlias: string]: string[] } | GetManualChunk;
|
|
541
|
+
|
|
542
|
+
export type LogHandlerWithDefault = (
|
|
543
|
+
level: LogLevel,
|
|
544
|
+
log: RollupLog,
|
|
545
|
+
defaultHandler: LogOrStringHandler
|
|
546
|
+
) => void;
|
|
547
|
+
|
|
548
|
+
export type LogOrStringHandler = (level: LogLevel | 'error', log: RollupLog | string) => void;
|
|
549
|
+
|
|
550
|
+
export type LogHandler = (level: LogLevel, log: RollupLog) => void;
|
|
551
|
+
|
|
515
552
|
export type ModuleSideEffectsOption = boolean | 'no-external' | string[] | HasModuleSideEffects;
|
|
553
|
+
|
|
516
554
|
export type PreserveEntrySignaturesOption = false | 'strict' | 'allow-extension' | 'exports-only';
|
|
555
|
+
|
|
517
556
|
export type SourcemapPathTransformOption = (
|
|
518
557
|
relativeSourcePath: string,
|
|
519
558
|
sourcemapPath: string
|
|
520
559
|
) => string;
|
|
560
|
+
|
|
521
561
|
export type SourcemapIgnoreListOption = (
|
|
522
562
|
relativeSourcePath: string,
|
|
523
563
|
sourcemapPath: string
|
|
@@ -536,6 +576,7 @@ export interface InputOptions {
|
|
|
536
576
|
/** @deprecated Use the "inlineDynamicImports" output option instead. */
|
|
537
577
|
inlineDynamicImports?: boolean;
|
|
538
578
|
input?: InputOption;
|
|
579
|
+
logLevel?: LogLevelOption;
|
|
539
580
|
makeAbsoluteExternalsRelative?: boolean | 'ifRelativeSource';
|
|
540
581
|
/** @deprecated Use the "manualChunks" output option instead. */
|
|
541
582
|
manualChunks?: ManualChunksOption;
|
|
@@ -543,6 +584,7 @@ export interface InputOptions {
|
|
|
543
584
|
/** @deprecated Use the "maxParallelFileOps" option instead. */
|
|
544
585
|
maxParallelFileReads?: number;
|
|
545
586
|
moduleContext?: ((id: string) => string | NullValue) | { [id: string]: string };
|
|
587
|
+
onLog?: LogHandlerWithDefault;
|
|
546
588
|
onwarn?: WarningHandlerWithDefault;
|
|
547
589
|
perf?: boolean;
|
|
548
590
|
plugins?: InputPluginOption;
|
|
@@ -571,6 +613,7 @@ export interface NormalizedInputOptions {
|
|
|
571
613
|
/** @deprecated Use the "inlineDynamicImports" output option instead. */
|
|
572
614
|
inlineDynamicImports: boolean | undefined;
|
|
573
615
|
input: string[] | { [entryAlias: string]: string };
|
|
616
|
+
logLevel: LogLevelOption;
|
|
574
617
|
makeAbsoluteExternalsRelative: boolean | 'ifRelativeSource';
|
|
575
618
|
/** @deprecated Use the "manualChunks" output option instead. */
|
|
576
619
|
manualChunks: ManualChunksOption | undefined;
|
|
@@ -578,7 +621,8 @@ export interface NormalizedInputOptions {
|
|
|
578
621
|
/** @deprecated Use the "maxParallelFileOps" option instead. */
|
|
579
622
|
maxParallelFileReads: number;
|
|
580
623
|
moduleContext: (id: string) => string;
|
|
581
|
-
|
|
624
|
+
onLog: LogHandler;
|
|
625
|
+
onwarn: (warning: RollupLog) => void;
|
|
582
626
|
perf: boolean;
|
|
583
627
|
plugins: Plugin[];
|
|
584
628
|
preserveEntrySignatures: PreserveEntrySignaturesOption;
|
|
@@ -701,6 +745,7 @@ export interface OutputOptions {
|
|
|
701
745
|
sourcemapBaseUrl?: string;
|
|
702
746
|
sourcemapExcludeSources?: boolean;
|
|
703
747
|
sourcemapFile?: string;
|
|
748
|
+
sourcemapFileNames?: string | ((chunkInfo: PreRenderedChunk) => string);
|
|
704
749
|
sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption;
|
|
705
750
|
sourcemapPathTransform?: SourcemapPathTransformOption;
|
|
706
751
|
strict?: boolean;
|
|
@@ -756,6 +801,7 @@ export interface NormalizedOutputOptions {
|
|
|
756
801
|
sourcemapBaseUrl: string | undefined;
|
|
757
802
|
sourcemapExcludeSources: boolean;
|
|
758
803
|
sourcemapFile: string | undefined;
|
|
804
|
+
sourcemapFileNames: string | ((chunkInfo: PreRenderedChunk) => string) | undefined;
|
|
759
805
|
sourcemapIgnoreList: SourcemapIgnoreListOption;
|
|
760
806
|
sourcemapPathTransform: SourcemapPathTransformOption | undefined;
|
|
761
807
|
strict: boolean;
|
|
@@ -764,10 +810,9 @@ export interface NormalizedOutputOptions {
|
|
|
764
810
|
}
|
|
765
811
|
|
|
766
812
|
export type WarningHandlerWithDefault = (
|
|
767
|
-
warning:
|
|
768
|
-
defaultHandler:
|
|
813
|
+
warning: RollupLog,
|
|
814
|
+
defaultHandler: LoggingFunction
|
|
769
815
|
) => void;
|
|
770
|
-
export type WarningHandler = (warning: RollupWarning) => void;
|
|
771
816
|
|
|
772
817
|
export interface SerializedTimings {
|
|
773
818
|
[label: string]: [number, number, number];
|
|
@@ -785,7 +830,7 @@ export interface OutputAsset extends PreRenderedAsset {
|
|
|
785
830
|
}
|
|
786
831
|
|
|
787
832
|
export interface RenderedModule {
|
|
788
|
-
code: string | null;
|
|
833
|
+
readonly code: string | null;
|
|
789
834
|
originalLength: number;
|
|
790
835
|
removedExports: string[];
|
|
791
836
|
renderedExports: string[];
|
|
@@ -820,6 +865,8 @@ export interface RenderedChunk extends PreRenderedChunk {
|
|
|
820
865
|
export interface OutputChunk extends RenderedChunk {
|
|
821
866
|
code: string;
|
|
822
867
|
map: SourceMap | null;
|
|
868
|
+
sourcemapFileName: string | null;
|
|
869
|
+
preliminaryFileName: string;
|
|
823
870
|
}
|
|
824
871
|
|
|
825
872
|
export interface SerializablePluginCache {
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Options } from '../prettier';
|
|
2
|
+
import { Config as Config$1 } from '../svgo';
|
|
3
|
+
import { Options as Options$1 } from '../@svgr/babel-preset';
|
|
4
|
+
import { TransformOptions } from '../../../@babel/core';
|
|
5
|
+
|
|
6
|
+
interface State {
|
|
7
|
+
filePath?: string;
|
|
8
|
+
componentName: string;
|
|
9
|
+
caller?: {
|
|
10
|
+
name?: string;
|
|
11
|
+
previousExport?: string | null;
|
|
12
|
+
defaultPlugins?: ConfigPlugin[];
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface Plugin {
|
|
17
|
+
(code: string, config: Config, state: State): string;
|
|
18
|
+
}
|
|
19
|
+
type ConfigPlugin = string | Plugin;
|
|
20
|
+
|
|
21
|
+
interface Config {
|
|
22
|
+
ref?: boolean;
|
|
23
|
+
titleProp?: boolean;
|
|
24
|
+
descProp?: boolean;
|
|
25
|
+
expandProps?: boolean | 'start' | 'end';
|
|
26
|
+
dimensions?: boolean;
|
|
27
|
+
icon?: boolean | string | number;
|
|
28
|
+
native?: boolean;
|
|
29
|
+
svgProps?: {
|
|
30
|
+
[key: string]: string;
|
|
31
|
+
};
|
|
32
|
+
replaceAttrValues?: {
|
|
33
|
+
[key: string]: string;
|
|
34
|
+
};
|
|
35
|
+
runtimeConfig?: boolean;
|
|
36
|
+
typescript?: boolean;
|
|
37
|
+
prettier?: boolean;
|
|
38
|
+
prettierConfig?: Options;
|
|
39
|
+
svgo?: boolean;
|
|
40
|
+
svgoConfig?: Config$1;
|
|
41
|
+
configFile?: string;
|
|
42
|
+
template?: Options$1['template'];
|
|
43
|
+
memo?: boolean;
|
|
44
|
+
exportType?: 'named' | 'default';
|
|
45
|
+
namedExport?: string;
|
|
46
|
+
jsxRuntime?: 'classic' | 'classic-preact' | 'automatic';
|
|
47
|
+
jsxRuntimeImport?: {
|
|
48
|
+
source: string;
|
|
49
|
+
namespace?: string;
|
|
50
|
+
specifiers?: string[];
|
|
51
|
+
defaultSpecifier?: string;
|
|
52
|
+
};
|
|
53
|
+
index?: boolean;
|
|
54
|
+
plugins?: ConfigPlugin[];
|
|
55
|
+
jsx?: {
|
|
56
|
+
babelConfig?: TransformOptions;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
declare const DEFAULT_CONFIG: Config;
|
|
60
|
+
declare const resolveConfig: {
|
|
61
|
+
(searchFrom?: string, configFile?: string): Promise<Config | null>;
|
|
62
|
+
sync(searchFrom?: string, configFile?: string): Config | null;
|
|
63
|
+
};
|
|
64
|
+
declare const resolveConfigFile: {
|
|
65
|
+
(filePath: string): Promise<string | null>;
|
|
66
|
+
sync(filePath: string): string | null;
|
|
67
|
+
};
|
|
68
|
+
declare const loadConfig: {
|
|
69
|
+
({ configFile, ...baseConfig }: Config, state?: Pick<State, 'filePath'>): Promise<Config>;
|
|
70
|
+
sync({ configFile, ...baseConfig }: Config, state?: Pick<State, 'filePath'>): Config;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
declare const transform: {
|
|
74
|
+
(code: string, config?: Config, state?: Partial<State>): Promise<string>;
|
|
75
|
+
sync(code: string, config?: Config, state?: Partial<State>): string;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export { Config, ConfigPlugin, DEFAULT_CONFIG, Plugin, State, loadConfig, resolveConfig, resolveConfigFile, transform };
|