Archived
0
0
Fork 0
This repository has been archived on 2024-02-06. You can view files and clone it, but cannot push or open issues or pull requests.
library/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

29 lines
50 KiB
JavaScript
Raw Normal View History

2021-07-03 03:01:50 +00:00
/* eslint-disable */
//prettier-ignore
module.exports = {
name: "@yarnpkg/plugin-workspace-tools",
factory: function (require) {
2021-08-07 19:43:31 +00:00
var plugin=(()=>{var Cr=Object.create,ge=Object.defineProperty,wr=Object.defineProperties,Sr=Object.getOwnPropertyDescriptor,vr=Object.getOwnPropertyDescriptors,Hr=Object.getOwnPropertyNames,Je=Object.getOwnPropertySymbols,$r=Object.getPrototypeOf,et=Object.prototype.hasOwnProperty,Tr=Object.prototype.propertyIsEnumerable;var tt=(e,t,r)=>t in e?ge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N=(e,t)=>{for(var r in t||(t={}))et.call(t,r)&&tt(e,r,t[r]);if(Je)for(var r of Je(t))Tr.call(t,r)&&tt(e,r,t[r]);return e},Q=(e,t)=>wr(e,vr(t)),kr=e=>ge(e,"__esModule",{value:!0});var q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Lr=(e,t)=>{for(var r in t)ge(e,r,{get:t[r],enumerable:!0})},Or=(e,t,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Hr(t))!et.call(e,n)&&n!=="default"&&ge(e,n,{get:()=>t[n],enumerable:!(r=Sr(t,n))||r.enumerable});return e},Y=e=>Or(kr(ge(e!=null?Cr($r(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var He=q(J=>{"use strict";J.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;J.find=(e,t)=>e.nodes.find(r=>r.type===t);J.exceedsLimit=(e,t,r=1,n)=>n===!1||!J.isInteger(e)||!J.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;J.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];!n||(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};J.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0==0?(e.invalid=!0,!0):!1;J.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0==0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;J.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;J.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);J.flatten=(...e)=>{let t=[],r=n=>{for(let s=0;s<n.length;s++){let a=n[s];Array.isArray(a)?r(a,t):a!==void 0&&t.push(a)}return t};return r(e),t}});var $e=q((as,st)=>{"use strict";var at=He();st.exports=(e,t={})=>{let r=(n,s={})=>{let a=t.escapeInvalid&&at.isInvalidBrace(s),i=n.invalid===!0&&t.escapeInvalid===!0,o="";if(n.value)return(a||i)&&at.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let h of n.nodes)o+=r(h);return o};return r(e)}});var ot=q((is,it)=>{"use strict";it.exports=function(e){return typeof e=="number"?e-e==0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var At=q((os,ut)=>{"use strict";var ct=ot(),pe=(e,t,r)=>{if(ct(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(ct(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n=N({relaxZeros:!0},r);typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let s=String(n.relaxZeros),a=String(n.shorthand),i=String(n.capture),o=String(n.wrap),h=e+":"+t+"="+s+a+i+o;if(pe.cache.hasOwnProperty(h))return pe.cache[h].result;let A=Math.min(e,t),f=Math.max(e,t);if(Math.abs(A-f)===1){let R=e+"|"+t;return n.capture?`(${R})`:n.wrap===!1?R:`(?:${R})`}let m=pt(e)||pt(t),p={min:e,max:t,a:A,b:f},H=[],_=[];if(m&&(p.isPadded=m,p.maxLen=String(p.max).length),A<0){let R=f<0?Math.abs(f):1;_=lt(R,Math.abs(A),p,n),A=p.a=0}return f>=0&&(H=lt(A,f,p,n)),p.negatives=_,p.positives=H,p.result=Nr(_,H,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&H.length+_.length>1&&(p.result=`(?:${p.result})`),pe.cache[h]=p,p.result};function Nr(e,t,r){let n=Pe(e,t,"-",!1,r)||[],s=Pe(t,e,"",!1,r)||[],a=Pe(e,t,"-?",!0,r)||[];return n.concat(a).concat(s).join("|")}function Br(e,t){let r=1,n=1,s=ft(e,r),a=new Set([t]);for(;e<=s&&s<=t;)a.add(s),r+=1,s=ft(e,r);for(s=ht(t+1,n)-1;e<s&&s<=t;)a.add(s),n+=1,s=ht(t+1,n)-1;return a=[...a],a.sort(Ir),a}function Dr(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=Mr(e,t),s=n.length,a="",i=0;for(let o=0;o<s;o++){let[h,A]=n[o];h===A?a+=h:h!=="0"||A!=="9"?a+=Pr(h,A,r):i++}return i&&(a+=r.shorthand==
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Mt=q((fs,Ot)=>{"use strict";var Jr=$e(),{MAX_LENGTH:Nt,CHAR_BACKSLASH:qe,CHAR_BACKTICK:en,CHAR_COMMA:tn,CHAR_DOT:rn,CHAR_LEFT_PARENTHESES:nn,CHAR_RIGHT_PARENTHESES:sn,CHAR_LEFT_CURLY_BRACE:an,CHAR_RIGHT_CURLY_BRACE:on,CHAR_LEFT_SQUARE_BRACKET:It,CHAR_RIGHT_SQUARE_BRACKET:Bt,CHAR_DOUBLE_QUOTE:un,CHAR_SINGLE_QUOTE:cn,CHAR_NO_BREAK_SPACE:ln,CHAR_ZERO_WIDTH_NOBREAK_SPACE:pn}=Lt(),fn=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(Nt,r.maxLength):Nt;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let s={type:"root",input:e,nodes:[]},a=[s],i=s,o=s,h=0,A=e.length,f=0,m=0,p,H={},_=()=>e[f++],R=b=>{if(b.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&b.type==="text"){o.value+=b.value;return}return i.nodes.push(b),b.parent=i,b.prev=o,o=b,b};for(R({type:"bos"});f<A;)if(i=a[a.length-1],p=_(),!(p===pn||p===ln)){if(p===qe){R({type:"text",value:(t.keepEscaping?p:"")+_()});continue}if(p===Bt){R({type:"text",value:"\\"+p});continue}if(p===It){h++;let b=!0,C;for(;f<A&&(C=_());){if(p+=C,C===It){h++;continue}if(C===qe){p+=_();continue}if(C===Bt&&(h--,h===0))break}R({type:"text",value:p});continue}if(p===nn){i=R({type:"paren",nodes:[]}),a.push(i),R({type:"text",value:p});continue}if(p===sn){if(i.type!=="paren"){R({type:"text",value:p});continue}i=a.pop(),R({type:"text",value:p}),i=a[a.length-1];continue}if(p===un||p===cn||p===en){let b=p,C;for(t.keepQuotes!==!0&&(p="");f<A&&(C=_());){if(C===qe){p+=C+_();continue}if(C===b){t.keepQuotes===!0&&(p+=C);break}p+=C}R({type:"text",value:p});continue}if(p===an){m++;let b=o.value&&o.value.slice(-1)==="$"||i.dollar===!0;i=R({type:"brace",open:!0,close:!1,dollar:b,depth:m,commas:0,ranges:0,nodes:[]}),a.push(i),R({type:"open",value:p});continue}if(p===on){if(i.type!=="brace"){R({type:"text",value:p});continue}let b="close";i=a.pop(),i.close=!0,R({type:b,value:p}),m--,i=a[a.length-1];continue}if(p===tn&&m>0){if(i.ranges>0){i.ranges=0;let b=i.nodes.shift();i.nodes=[b,{type:"text",value:Jr(i)}]}R({type:"comma",value:p}),i.commas++;continue}if(p===rn&&m>0&&i.commas===0){let b=i.nodes;if(m===0||b.length===0){R({type:"text",value:p});continue}if(o.type==="dot"){if(i.range=[],o.value+=p,o.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,o.type="text";continue}i.ranges++,i.args=[];continue}if(o.type==="range"){b.pop();let C=b[b.length-1];C.value+=o.value+p,o=C,i.ranges--;continue}R({type:"dot",value:p});continue}R({type:"text",value:p})}do if(i=a.pop(),i.type!=="root"){i.nodes.forEach(T=>{T.nodes||(T.type==="open"&&(T.isOpen=!0),T.type==="close"&&(T.isClose=!0),T.nodes||(T.type="text"),T.invalid=!0)});let b=a[a.length-1],C=b.nodes.indexOf(i);b.nodes.splice(C,1,...i.nodes)}while(a.length>0);return R({type:"eos"}),s};Ot.exports=fn});var Gt=q((hs,Pt)=>{"use strict";var Dt=$e(),hn=vt(),dn=Tt(),gn=Mt(),z=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let s=z.create(n,t);Array.isArray(s)?r.push(...s):r.push(s)}else r=[].concat(z.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};z.parse=(e,t={})=>gn(e,t);z.stringify=(e,t={})=>typeof e=="string"?Dt(z.parse(e,t),t):Dt(e,t);z.compile=(e,t={})=>(typeof e=="string"&&(e=z.parse(e,t)),hn(e,t));z.expand=(e,t={})=>{typeof e=="string"&&(e=z.parse(e,t));let r=dn(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};z.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?z.compile(e,t):z.expand(e,t);Pt.exports=z});var Re=q((ds,Ut)=>{"use strict";var An=require("path"),se="\\\\/",qt=`[^${se}]`,oe="\\.",mn="\\+",Rn="\\?",ke="\\/",yn="(?=.)",Kt="[^/]",Ke=`(?:${ke}|$)`,Wt=`(?:^|${ke})`,We=`${oe}{1,2}${Ke}`,_n=`(?!${oe})`,E
2021-07-03 03:01:50 +00:00
/*!
* fill-range <https://github.com/jonschlinkert/fill-range>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Licensed under the MIT License.
*/
/*!
* is-number <https://github.com/jonschlinkert/is-number>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.
*/
/*!
* to-regex-range <https://github.com/micromatch/to-regex-range>
*
* Copyright (c) 2015-present, Jon Schlinkert.
* Released under the MIT License.
*/
return plugin;
}
};