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
49 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) {
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,O=(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},j=(e,t)=>wr(e,vr(t)),Lr=e=>ge(e,"__esModule",{value:!0});var G=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),kr=(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(Lr(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=G(ee=>{"use strict";ee.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;ee.find=(e,t)=>e.nodes.find(r=>r.type===t);ee.exceedsLimit=(e,t,r=1,n)=>n===!1||!ee.isInteger(e)||!ee.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;ee.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)};ee.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0==0?(e.invalid=!0,!0):!1;ee.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;ee.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;ee.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);ee.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=G((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=G((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=G((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=O({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 g=Math.min(e,t),f=Math.max(e,t);if(Math.abs(g-f)===1){let m=e+"|"+t;return n.capture?`(${m})`:n.wrap===!1?m:`(?:${m})`}let R=pt(e)||pt(t),p={min:e,max:t,a:g,b:f},$=[],_=[];if(R&&(p.isPadded=R,p.maxLen=String(p.max).length),g<0){let m=f<0?Math.abs(f):1;_=lt(m,Math.abs(g),p,n),g=p.a=0}return f>=0&&($=lt(g,f,p,n)),p.negatives=_,p.positives=$,p.result=Nr(_,$,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&$.length+_.length>1&&(p.result=`(?:${p.result})`),pe.cache[h]=p,p.result};function Nr(e,t,r){let n=Me(e,t,"-",!1,r)||[],s=Me(t,e,"",!1,r)||[],a=Me(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,g]=n[o];h===g?a+=h:h!=="0"||g!=="9"?a+=Pr(h,g,r):i++}return i&&(a+=r
`,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=G((fs,Ot)=>{"use strict";var Jr=$e(),{MAX_LENGTH:Nt,CHAR_BACKSLASH:Ue,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}=kt(),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,g=e.length,f=0,R=0,p,$={},_=()=>e[f++],m=x=>{if(x.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&x.type==="text"){o.value+=x.value;return}return i.nodes.push(x),x.parent=i,x.prev=o,o=x,x};for(m({type:"bos"});f<g;)if(i=a[a.length-1],p=_(),!(p===pn||p===ln)){if(p===Ue){m({type:"text",value:(t.keepEscaping?p:"")+_()});continue}if(p===Bt){m({type:"text",value:"\\"+p});continue}if(p===It){h++;let x=!0,S;for(;f<g&&(S=_());){if(p+=S,S===It){h++;continue}if(S===Ue){p+=_();continue}if(S===Bt&&(h--,h===0))break}m({type:"text",value:p});continue}if(p===nn){i=m({type:"paren",nodes:[]}),a.push(i),m({type:"text",value:p});continue}if(p===sn){if(i.type!=="paren"){m({type:"text",value:p});continue}i=a.pop(),m({type:"text",value:p}),i=a[a.length-1];continue}if(p===un||p===cn||p===en){let x=p,S;for(t.keepQuotes!==!0&&(p="");f<g&&(S=_());){if(S===Ue){p+=S+_();continue}if(S===x){t.keepQuotes===!0&&(p+=S);break}p+=S}m({type:"text",value:p});continue}if(p===an){R++;let x=o.value&&o.value.slice(-1)==="$"||i.dollar===!0;i=m({type:"brace",open:!0,close:!1,dollar:x,depth:R,commas:0,ranges:0,nodes:[]}),a.push(i),m({type:"open",value:p});continue}if(p===on){if(i.type!=="brace"){m({type:"text",value:p});continue}let x="close";i=a.pop(),i.close=!0,m({type:x,value:p}),R--,i=a[a.length-1];continue}if(p===tn&&R>0){if(i.ranges>0){i.ranges=0;let x=i.nodes.shift();i.nodes=[x,{type:"text",value:Jr(i)}]}m({type:"comma",value:p}),i.commas++;continue}if(p===rn&&R>0&&i.commas===0){let x=i.nodes;if(R===0||x.length===0){m({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"){x.pop();let S=x[x.length-1];S.value+=o.value+p,o=S,i.ranges--;continue}m({type:"dot",value:p});continue}m({type:"text",value:p})}do if(i=a.pop(),i.type!=="root"){i.nodes.forEach(b=>{b.nodes||(b.type==="open"&&(b.isOpen=!0),b.type==="close"&&(b.isClose=!0),b.nodes||(b.type="text"),b.invalid=!0)});let x=a[a.length-1],S=x.nodes.indexOf(i);x.nodes.splice(S,1,...i.nodes)}while(a.length>0);return m({type:"eos"}),s};Ot.exports=fn});var Gt=G((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 me=G((ds,Ut)=>{"use strict";var An=require("path"),se="\\\\/",qt=`[^${se}]`,oe="\\.",Rn="\\+",mn="\\?",Le="\\/",yn="(?=.)",Kt="[^/]",qe=`(?:${Le}|$)`,Wt=`(?:^|${Le})`,Ke=`${oe}{1,2}${qe}`,_n=`(?!${oe})`,E
/*!
* 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;
}
};