@ticketmaster/allure-command
Version:
The official Allure CLI
2 lines • 582 kB
JavaScript
#!/usr/bin/env node
(()=>{var e={1088:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const n=r(7147);t.FILE_SYSTEM_ADAPTER={lstat:n.lstat,stat:n.stat,lstatSync:n.lstatSync,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync};function createFileSystemAdapter(e){if(e===undefined){return t.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}t.createFileSystemAdapter=createFileSystemAdapter},4919:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const r=process.versions.node.split(".");if(r[0]===undefined||r[1]===undefined){throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`)}const n=Number.parseInt(r[0],10);const i=Number.parseInt(r[1],10);const s=10;const a=10;const o=n>s;const l=n===s&&i>=a;t.IS_SUPPORT_READDIR_WITH_FILE_TYPES=o||l},7552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Settings=t.scandirSync=t.scandir=void 0;const n=r(7091);const i=r(1328);const s=r(3022);t.Settings=s.default;function scandir(e,t,r){if(typeof t==="function"){n.read(e,getSettings(),t);return}n.read(e,getSettings(t),r)}t.scandir=scandir;function scandirSync(e,t){const r=getSettings(t);return i.read(e,r)}t.scandirSync=scandirSync;function getSettings(e={}){if(e instanceof s.default){return e}return new s.default(e)}},7091:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.readdir=t.readdirWithFileTypes=t.read=void 0;const n=r(2580);const i=r(1188);const s=r(4919);const a=r(8047);const o=r(4845);function read(e,t,r){if(!t.stats&&s.IS_SUPPORT_READDIR_WITH_FILE_TYPES){readdirWithFileTypes(e,t,r);return}readdir(e,t,r)}t.read=read;function readdirWithFileTypes(e,t,r){t.fs.readdir(e,{withFileTypes:true},((n,s)=>{if(n!==null){callFailureCallback(r,n);return}const a=s.map((r=>({dirent:r,name:r.name,path:o.joinPathSegments(e,r.name,t.pathSegmentSeparator)})));if(!t.followSymbolicLinks){callSuccessCallback(r,a);return}const l=a.map((e=>makeRplTaskEntry(e,t)));i(l,((e,t)=>{if(e!==null){callFailureCallback(r,e);return}callSuccessCallback(r,t)}))}))}t.readdirWithFileTypes=readdirWithFileTypes;function makeRplTaskEntry(e,t){return r=>{if(!e.dirent.isSymbolicLink()){r(null,e);return}t.fs.stat(e.path,((n,i)=>{if(n!==null){if(t.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,e);return}e.dirent=a.fs.createDirentFromStats(e.name,i);r(null,e)}))}}function readdir(e,t,r){t.fs.readdir(e,((s,l)=>{if(s!==null){callFailureCallback(r,s);return}const u=l.map((r=>{const i=o.joinPathSegments(e,r,t.pathSegmentSeparator);return e=>{n.stat(i,t.fsStatSettings,((n,s)=>{if(n!==null){e(n);return}const o={name:r,path:i,dirent:a.fs.createDirentFromStats(r,s)};if(t.stats){o.stats=s}e(null,o)}))}}));i(u,((e,t)=>{if(e!==null){callFailureCallback(r,e);return}callSuccessCallback(r,t)}))}))}t.readdir=readdir;function callFailureCallback(e,t){e(t)}function callSuccessCallback(e,t){e(null,t)}},4845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.joinPathSegments=void 0;function joinPathSegments(e,t,r){if(e.endsWith(r)){return e+t}return e+r+t}t.joinPathSegments=joinPathSegments},1328:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.readdir=t.readdirWithFileTypes=t.read=void 0;const n=r(2580);const i=r(4919);const s=r(8047);const a=r(4845);function read(e,t){if(!t.stats&&i.IS_SUPPORT_READDIR_WITH_FILE_TYPES){return readdirWithFileTypes(e,t)}return readdir(e,t)}t.read=read;function readdirWithFileTypes(e,t){const r=t.fs.readdirSync(e,{withFileTypes:true});return r.map((r=>{const n={dirent:r,name:r.name,path:a.joinPathSegments(e,r.name,t.pathSegmentSeparator)};if(n.dirent.isSymbolicLink()&&t.followSymbolicLinks){try{const e=t.fs.statSync(n.path);n.dirent=s.fs.createDirentFromStats(n.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink){throw e}}}return n}))}t.readdirWithFileTypes=readdirWithFileTypes;function readdir(e,t){const r=t.fs.readdirSync(e);return r.map((r=>{const i=a.joinPathSegments(e,r,t.pathSegmentSeparator);const o=n.statSync(i,t.fsStatSettings);const l={name:r,path:i,dirent:s.fs.createDirentFromStats(r,o)};if(t.stats){l.stats=o}return l}))}t.readdir=readdir},3022:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(1017);const i=r(2580);const s=r(1088);class Settings{constructor(e={}){this._options=e;this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,false);this.fs=s.createFileSystemAdapter(this._options.fs);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,n.sep);this.stats=this._getValue(this._options.stats,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true);this.fsStatSettings=new i.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e!==null&&e!==void 0?e:t}}t["default"]=Settings},7876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createDirentFromStats=void 0;class DirentFromStats{constructor(e,t){this.name=e;this.isBlockDevice=t.isBlockDevice.bind(t);this.isCharacterDevice=t.isCharacterDevice.bind(t);this.isDirectory=t.isDirectory.bind(t);this.isFIFO=t.isFIFO.bind(t);this.isFile=t.isFile.bind(t);this.isSocket=t.isSocket.bind(t);this.isSymbolicLink=t.isSymbolicLink.bind(t)}}function createDirentFromStats(e,t){return new DirentFromStats(e,t)}t.createDirentFromStats=createDirentFromStats},8047:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.fs=void 0;const n=r(7876);t.fs=n},7650:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const n=r(7147);t.FILE_SYSTEM_ADAPTER={lstat:n.lstat,stat:n.stat,lstatSync:n.lstatSync,statSync:n.statSync};function createFileSystemAdapter(e){if(e===undefined){return t.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}t.createFileSystemAdapter=createFileSystemAdapter},2580:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.statSync=t.stat=t.Settings=void 0;const n=r(5939);const i=r(105);const s=r(2466);t.Settings=s.default;function stat(e,t,r){if(typeof t==="function"){n.read(e,getSettings(),t);return}n.read(e,getSettings(t),r)}t.stat=stat;function statSync(e,t){const r=getSettings(t);return i.read(e,r)}t.statSync=statSync;function getSettings(e={}){if(e instanceof s.default){return e}return new s.default(e)}},5939:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.read=void 0;function read(e,t,r){t.fs.lstat(e,((n,i)=>{if(n!==null){callFailureCallback(r,n);return}if(!i.isSymbolicLink()||!t.followSymbolicLink){callSuccessCallback(r,i);return}t.fs.stat(e,((e,n)=>{if(e!==null){if(t.throwErrorOnBrokenSymbolicLink){callFailureCallback(r,e);return}callSuccessCallback(r,i);return}if(t.markSymbolicLink){n.isSymbolicLink=()=>true}callSuccessCallback(r,n)}))}))}t.read=read;function callFailureCallback(e,t){e(t)}function callSuccessCallback(e,t){e(null,t)}},105:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.read=void 0;function read(e,t){const r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink){return r}try{const r=t.fs.statSync(e);if(t.markSymbolicLink){r.isSymbolicLink=()=>true}return r}catch(e){if(!t.throwErrorOnBrokenSymbolicLink){return r}throw e}}t.read=read},2466:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(7650);class Settings{constructor(e={}){this._options=e;this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,true);this.fs=n.createFileSystemAdapter(this._options.fs);this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true)}_getValue(e,t){return e!==null&&e!==void 0?e:t}}t["default"]=Settings},803:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Settings=t.walkStream=t.walkSync=t.walk=void 0;const n=r(6887);const i=r(7499);const s=r(6875);const a=r(8265);t.Settings=a.default;function walk(e,t,r){if(typeof t==="function"){new n.default(e,getSettings()).read(t);return}new n.default(e,getSettings(t)).read(r)}t.walk=walk;function walkSync(e,t){const r=getSettings(t);const n=new s.default(e,r);return n.read()}t.walkSync=walkSync;function walkStream(e,t){const r=getSettings(t);const n=new i.default(e,r);return n.read()}t.walkStream=walkStream;function getSettings(e={}){if(e instanceof a.default){return e}return new a.default(e)}},6887:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(6203);class AsyncProvider{constructor(e,t){this._root=e;this._settings=t;this._reader=new n.default(this._root,this._settings);this._storage=[]}read(e){this._reader.onError((t=>{callFailureCallback(e,t)}));this._reader.onEntry((e=>{this._storage.push(e)}));this._reader.onEnd((()=>{callSuccessCallback(e,this._storage)}));this._reader.read()}}t["default"]=AsyncProvider;function callFailureCallback(e,t){e(t)}function callSuccessCallback(e,t){e(null,t)}},7499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(2781);const i=r(6203);class StreamProvider{constructor(e,t){this._root=e;this._settings=t;this._reader=new i.default(this._root,this._settings);this._stream=new n.Readable({objectMode:true,read:()=>{},destroy:()=>{if(!this._reader.isDestroyed){this._reader.destroy()}}})}read(){this._reader.onError((e=>{this._stream.emit("error",e)}));this._reader.onEntry((e=>{this._stream.push(e)}));this._reader.onEnd((()=>{this._stream.push(null)}));this._reader.read();return this._stream}}t["default"]=StreamProvider},6875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(1214);class SyncProvider{constructor(e,t){this._root=e;this._settings=t;this._reader=new n.default(this._root,this._settings)}read(){return this._reader.read()}}t["default"]=SyncProvider},6203:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(2361);const i=r(7552);const s=r(2696);const a=r(7628);const o=r(3402);class AsyncReader extends o.default{constructor(e,t){super(e,t);this._settings=t;this._scandir=i.scandir;this._emitter=new n.EventEmitter;this._queue=s(this._worker.bind(this),this._settings.concurrency);this._isFatalError=false;this._isDestroyed=false;this._queue.drain=()=>{if(!this._isFatalError){this._emitter.emit("end")}}}read(){this._isFatalError=false;this._isDestroyed=false;setImmediate((()=>{this._pushToQueue(this._root,this._settings.basePath)}));return this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed){throw new Error("The reader is already destroyed")}this._isDestroyed=true;this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,(e=>{if(e!==null){this._handleError(e)}}))}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,((r,n)=>{if(r!==null){t(r,undefined);return}for(const t of n){this._handleEntry(t,e.base)}t(null,undefined)}))}_handleError(e){if(this._isDestroyed||!a.isFatalError(this._settings,e)){return}this._isFatalError=true;this._isDestroyed=true;this._emitter.emit("error",e)}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError){return}const r=e.path;if(t!==undefined){e.path=a.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)}if(a.isAppliedFilter(this._settings.entryFilter,e)){this._emitEntry(e)}if(e.dirent.isDirectory()&&a.isAppliedFilter(this._settings.deepFilter,e)){this._pushToQueue(r,t===undefined?undefined:e.path)}}_emitEntry(e){this._emitter.emit("entry",e)}}t["default"]=AsyncReader},7628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.joinPathSegments=t.replacePathSegmentSeparator=t.isAppliedFilter=t.isFatalError=void 0;function isFatalError(e,t){if(e.errorFilter===null){return true}return!e.errorFilter(t)}t.isFatalError=isFatalError;function isAppliedFilter(e,t){return e===null||e(t)}t.isAppliedFilter=isAppliedFilter;function replacePathSegmentSeparator(e,t){return e.split(/[/\\]/).join(t)}t.replacePathSegmentSeparator=replacePathSegmentSeparator;function joinPathSegments(e,t,r){if(e===""){return t}if(e.endsWith(r)){return e+t}return e+r+t}t.joinPathSegments=joinPathSegments},3402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(7628);class Reader{constructor(e,t){this._root=e;this._settings=t;this._root=n.replacePathSegmentSeparator(e,t.pathSegmentSeparator)}}t["default"]=Reader},1214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(7552);const i=r(7628);const s=r(3402);class SyncReader extends s.default{constructor(){super(...arguments);this._scandir=n.scandirSync;this._storage=[];this._queue=new Set}read(){this._pushToQueue(this._root,this._settings.basePath);this._handleQueue();return this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values()){this._handleDirectory(e.directory,e.base)}}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r){this._handleEntry(e,t)}}catch(e){this._handleError(e)}}_handleError(e){if(!i.isFatalError(this._settings,e)){return}throw e}_handleEntry(e,t){const r=e.path;if(t!==undefined){e.path=i.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)}if(i.isAppliedFilter(this._settings.entryFilter,e)){this._pushToStorage(e)}if(e.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,e)){this._pushToQueue(r,t===undefined?undefined:e.path)}}_pushToStorage(e){this._storage.push(e)}}t["default"]=SyncReader},8265:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(1017);const i=r(7552);class Settings{constructor(e={}){this._options=e;this.basePath=this._getValue(this._options.basePath,undefined);this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY);this.deepFilter=this._getValue(this._options.deepFilter,null);this.entryFilter=this._getValue(this._options.entryFilter,null);this.errorFilter=this._getValue(this._options.errorFilter,null);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,n.sep);this.fsScandirSettings=new i.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e!==null&&e!==void 0?e:t}}t["default"]=Settings},8404:(e,t,r)=>{"use strict";const n=r(7125);const i=r(3631);const cleanInternalStack=e=>e.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,"");class AggregateError extends Error{constructor(e){if(!Array.isArray(e)){throw new TypeError(`Expected input to be an Array, got ${typeof e}`)}e=[...e].map((e=>{if(e instanceof Error){return e}if(e!==null&&typeof e==="object"){return Object.assign(new Error(e.message),e)}return new Error(e)}));let t=e.map((e=>typeof e.stack==="string"?cleanInternalStack(i(e.stack)):String(e))).join("\n");t="\n"+n(t,4);super(t);this.name="AggregateError";Object.defineProperty(this,"_errors",{value:e})}*[Symbol.iterator](){for(const e of this._errors){yield e}}}e.exports=AggregateError},6879:e=>{"use strict";e.exports=({onlyFirst:e=false}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?undefined:"g")}},3741:(e,t,r)=>{"use strict";e=r.nmd(e);const wrapAnsi16=(e,t)=>(...r)=>{const n=e(...r);return`[${n+t}m`};const wrapAnsi256=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};5;${n}m`};const wrapAnsi16m=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};2;${n[0]};${n[1]};${n[2]}m`};const ansi2ansi=e=>e;const rgb2rgb=(e,t,r)=>[e,t,r];const setLazyProperty=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const n=r();Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true});return n},enumerable:true,configurable:true})};let n;const makeDynamicStyles=(e,t,i,s)=>{if(n===undefined){n=r(2830)}const a=s?10:0;const o={};for(const[r,s]of Object.entries(n)){const n=r==="ansi16"?"ansi":r;if(r===t){o[n]=e(i,a)}else if(typeof s==="object"){o[n]=e(s[t],a)}}return o};function assembleStyles(){const e=new Map;const t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright;t.bgColor.bgGray=t.bgColor.bgBlackBright;t.color.grey=t.color.blackBright;t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[r,n]of Object.entries(t)){for(const[r,i]of Object.entries(n)){t[r]={open:`[${i[0]}m`,close:`[${i[1]}m`};n[r]=t[r];e.set(i[0],i[1])}Object.defineProperty(t,r,{value:n,enumerable:false})}Object.defineProperty(t,"codes",{value:e,enumerable:false});t.color.close="[39m";t.bgColor.close="[49m";setLazyProperty(t.color,"ansi",(()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,false)));setLazyProperty(t.color,"ansi256",(()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,false)));setLazyProperty(t.color,"ansi16m",(()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,false)));setLazyProperty(t.bgColor,"ansi",(()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,true)));setLazyProperty(t.bgColor,"ansi256",(()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,true)));setLazyProperty(t.bgColor,"ansi16m",(()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,true)));return t}Object.defineProperty(e,"exports",{enumerable:true,get:assembleStyles})},4644:(e,t,r)=>{var n=r(552);var i=r(1017);var s=r(5883);var a=r(7852);var o=r(1538);var l=r(254);var u=r(3146);var h=e.exports={};var p=/[\/\\]/g;var processPatterns=function(e,t){var r=[];s(e).forEach((function(e){var n=e.indexOf("!")===0;if(n){e=e.slice(1)}var i=t(e);if(n){r=a(r,i)}else{r=o(r,i)}}));return r};h.exists=function(){var e=i.join.apply(i,arguments);return n.existsSync(e)};h.expand=function(...e){var t=l(e[0])?e.shift():{};var r=Array.isArray(e[0])?e[0]:e;if(r.length===0){return[]}var s=processPatterns(r,(function(e){return u.sync(e,t)}));if(t.filter){s=s.filter((function(e){e=i.join(t.cwd||"",e);try{if(typeof t.filter==="function"){return t.filter(e)}else{return n.statSync(e)[t.filter]()}}catch(e){return false}}))}return s};h.expandMapping=function(e,t,r){r=Object.assign({rename:function(e,t){return i.join(e||"",t)}},r);var n=[];var s={};h.expand(r,e).forEach((function(e){var a=e;if(r.flatten){a=i.basename(a)}if(r.ext){a=a.replace(/(\.[^\/]*)?$/,r.ext)}var o=r.rename(t,a,r);if(r.cwd){e=i.join(r.cwd,e)}o=o.replace(p,"/");e=e.replace(p,"/");if(s[o]){s[o].src.push(e)}else{n.push({src:[e],dest:o});s[o]=n[n.length-1]}}));return n};h.normalizeFilesArray=function(e){var t=[];e.forEach((function(e){var r;if("src"in e||"dest"in e){t.push(e)}}));if(t.length===0){return[]}t=_(t).chain().forEach((function(e){if(!("src"in e)||!e.src){return}if(Array.isArray(e.src)){e.src=s(e.src)}else{e.src=[e.src]}})).map((function(e){var t=Object.assign({},e);delete t.src;delete t.dest;if(e.expand){return h.expandMapping(e.src,e.dest,t).map((function(t){var r=Object.assign({},e);r.orig=Object.assign({},e);r.src=t.src;r.dest=t.dest;["expand","cwd","flatten","rename","ext"].forEach((function(e){delete r[e]}));return r}))}var r=Object.assign({},e);r.orig=Object.assign({},e);if("src"in r){Object.defineProperty(r,"src",{enumerable:true,get:function fn(){var r;if(!("result"in fn)){r=e.src;r=Array.isArray(r)?s(r):[r];fn.result=h.expand(t,r)}return fn.result}})}if("dest"in r){r.dest=e.dest}return r})).flatten().value();return t}},4059:(e,t,r)=>{var n=r(552);var i=r(1017);var s=r(3837);var a=r(8222);var o=r(4458);var l=r(1732);var u=r(2781).Stream;var h=r(8953).PassThrough;var p=e.exports={};p.file=r(4644);function assertPath(e){if(typeof e!=="string"){throw new TypeError("Path must be a string. Received "+nutils.inspect(e))}}p.collectStream=function(e,t){var r=[];var n=0;e.on("error",t);e.on("data",(function(e){r.push(e);n+=e.length}));e.on("end",(function(){var e=new Buffer(n);var i=0;r.forEach((function(t){t.copy(e,i);i+=t.length}));t(null,e)}))};p.dateify=function(e){e=e||new Date;if(e instanceof Date){e=e}else if(typeof e==="string"){e=new Date(e)}else{e=new Date}return e};p.defaults=function(e,t,r){var n=arguments;n[0]=n[0]||{};return l(...n)};p.isStream=function(e){return e instanceof u};p.lazyReadStream=function(e){return new a.Readable((function(){return n.createReadStream(e)}))};p.normalizeInputSource=function(e){if(e===null){return new Buffer(0)}else if(typeof e==="string"){return new Buffer(e)}else if(p.isStream(e)&&!e._readableState){var t=new h;e.pipe(t);return t}return e};p.sanitizePath=function(e){return o(e,false).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")};p.trailingSlashIt=function(e){return e.slice(-1)!=="/"?e+"/":e};p.unixifyPath=function(e){return o(e,false).replace(/^\w+:/,"")};p.walkdir=function(e,t,r){var s=[];if(typeof t==="function"){r=t;t=e}n.readdir(e,(function(a,o){var l=0;var u;var h;if(a){return r(a)}(function next(){u=o[l++];if(!u){return r(null,s)}h=i.join(e,u);n.stat(h,(function(e,r){s.push({path:h,relative:i.relative(t,h).replace(/\\/g,"/"),stats:r});if(r&&r.isDirectory()){p.walkdir(h,t,(function(e,t){t.forEach((function(e){s.push(e)}));next()}))}else{next()}}))})()}))}},9979:(e,t,r)=>{t.setopts=setopts;t.ownProp=ownProp;t.makeAbs=makeAbs;t.finish=finish;t.mark=mark;t.isIgnored=isIgnored;t.childrenIgnored=childrenIgnored;function ownProp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var n=r(7147);var i=r(1017);var s=r(9566);var a=r(1323);var o=s.Minimatch;function alphasort(e,t){return e.localeCompare(t,"en")}function setupIgnores(e,t){e.ignore=t.ignore||[];if(!Array.isArray(e.ignore))e.ignore=[e.ignore];if(e.ignore.length){e.ignore=e.ignore.map(ignoreMap)}}function ignoreMap(e){var t=null;if(e.slice(-3)==="/**"){var r=e.replace(/(\/\*\*)+$/,"");t=new o(r,{dot:true})}return{matcher:new o(e,{dot:true}),gmatcher:t}}function setopts(e,t,r){if(!r)r={};if(r.matchBase&&-1===t.indexOf("/")){if(r.noglobstar){throw new Error("base matching requires globstar")}t="**/"+t}e.silent=!!r.silent;e.pattern=t;e.strict=r.strict!==false;e.realpath=!!r.realpath;e.realpathCache=r.realpathCache||Object.create(null);e.follow=!!r.follow;e.dot=!!r.dot;e.mark=!!r.mark;e.nodir=!!r.nodir;if(e.nodir)e.mark=true;e.sync=!!r.sync;e.nounique=!!r.nounique;e.nonull=!!r.nonull;e.nosort=!!r.nosort;e.nocase=!!r.nocase;e.stat=!!r.stat;e.noprocess=!!r.noprocess;e.absolute=!!r.absolute;e.fs=r.fs||n;e.maxLength=r.maxLength||Infinity;e.cache=r.cache||Object.create(null);e.statCache=r.statCache||Object.create(null);e.symlinks=r.symlinks||Object.create(null);setupIgnores(e,r);e.changedCwd=false;var s=process.cwd();if(!ownProp(r,"cwd"))e.cwd=s;else{e.cwd=i.resolve(r.cwd);e.changedCwd=e.cwd!==s}e.root=r.root||i.resolve(e.cwd,"/");e.root=i.resolve(e.root);if(process.platform==="win32")e.root=e.root.replace(/\\/g,"/");e.cwdAbs=a(e.cwd)?e.cwd:makeAbs(e,e.cwd);if(process.platform==="win32")e.cwdAbs=e.cwdAbs.replace(/\\/g,"/");e.nomount=!!r.nomount;r.nonegate=true;r.nocomment=true;r.allowWindowsEscape=false;e.minimatch=new o(t,r);e.options=e.minimatch.options}function finish(e){var t=e.nounique;var r=t?[]:Object.create(null);for(var n=0,i=e.matches.length;n<i;n++){var s=e.matches[n];if(!s||Object.keys(s).length===0){if(e.nonull){var a=e.minimatch.globSet[n];if(t)r.push(a);else r[a]=true}}else{var o=Object.keys(s);if(t)r.push.apply(r,o);else o.forEach((function(e){r[e]=true}))}}if(!t)r=Object.keys(r);if(!e.nosort)r=r.sort(alphasort);if(e.mark){for(var n=0;n<r.length;n++){r[n]=e._mark(r[n])}if(e.nodir){r=r.filter((function(t){var r=!/\/$/.test(t);var n=e.cache[t]||e.cache[makeAbs(e,t)];if(r&&n)r=n!=="DIR"&&!Array.isArray(n);return r}))}}if(e.ignore.length)r=r.filter((function(t){return!isIgnored(e,t)}));e.found=r}function mark(e,t){var r=makeAbs(e,t);var n=e.cache[r];var i=t;if(n){var s=n==="DIR"||Array.isArray(n);var a=t.slice(-1)==="/";if(s&&!a)i+="/";else if(!s&&a)i=i.slice(0,-1);if(i!==t){var o=makeAbs(e,i);e.statCache[o]=e.statCache[r];e.cache[o]=e.cache[r]}}return i}function makeAbs(e,t){var r=t;if(t.charAt(0)==="/"){r=i.join(e.root,t)}else if(a(t)||t===""){r=t}else if(e.changedCwd){r=i.resolve(e.cwd,t)}else{r=i.resolve(t)}if(process.platform==="win32")r=r.replace(/\\/g,"/");return r}function isIgnored(e,t){if(!e.ignore.length)return false;return e.ignore.some((function(e){return e.matcher.match(t)||!!(e.gmatcher&&e.gmatcher.match(t))}))}function childrenIgnored(e,t){if(!e.ignore.length)return false;return e.ignore.some((function(e){return!!(e.gmatcher&&e.gmatcher.match(t))}))}},3146:(e,t,r)=>{e.exports=glob;var n=r(8945);var i=r(9566);var s=i.Minimatch;var a=r(6919);var o=r(2361).EventEmitter;var l=r(1017);var u=r(9491);var h=r(1323);var p=r(1477);var d=r(9979);var g=d.setopts;var y=d.ownProp;var b=r(9442);var v=r(3837);var _=d.childrenIgnored;var w=d.isIgnored;var S=r(7197);function glob(e,t,r){if(typeof t==="function")r=t,t={};if(!t)t={};if(t.sync){if(r)throw new TypeError("callback provided to sync glob");return p(e,t)}return new Glob(e,t,r)}glob.sync=p;var E=glob.GlobSync=p.GlobSync;glob.glob=glob;function extend(e,t){if(t===null||typeof t!=="object"){return e}var r=Object.keys(t);var n=r.length;while(n--){e[r[n]]=t[r[n]]}return e}glob.hasMagic=function(e,t){var r=extend({},t);r.noprocess=true;var n=new Glob(e,r);var i=n.minimatch.set;if(!e)return false;if(i.length>1)return true;for(var s=0;s<i[0].length;s++){if(typeof i[0][s]!=="string")return true}return false};glob.Glob=Glob;a(Glob,o);function Glob(e,t,r){if(typeof t==="function"){r=t;t=null}if(t&&t.sync){if(r)throw new TypeError("callback provided to sync glob");return new E(e,t)}if(!(this instanceof Glob))return new Glob(e,t,r);g(this,e,t);this._didRealPath=false;var n=this.minimatch.set.length;this.matches=new Array(n);if(typeof r==="function"){r=S(r);this.on("error",r);this.on("end",(function(e){r(null,e)}))}var i=this;this._processing=0;this._emitQueue=[];this._processQueue=[];this.paused=false;if(this.noprocess)return this;if(n===0)return done();var s=true;for(var a=0;a<n;a++){this._process(this.minimatch.set[a],a,false,done)}s=false;function done(){--i._processing;if(i._processing<=0){if(s){process.nextTick((function(){i._finish()}))}else{i._finish()}}}}Glob.prototype._finish=function(){u(this instanceof Glob);if(this.aborted)return;if(this.realpath&&!this._didRealpath)return this._realpath();d.finish(this);this.emit("end",this.found)};Glob.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=true;var e=this.matches.length;if(e===0)return this._finish();var t=this;for(var r=0;r<this.matches.length;r++)this._realpathSet(r,next);function next(){if(--e===0)t._finish()}};Glob.prototype._realpathSet=function(e,t){var r=this.matches[e];if(!r)return t();var i=Object.keys(r);var s=this;var a=i.length;if(a===0)return t();var o=this.matches[e]=Object.create(null);i.forEach((function(r,i){r=s._makeAbs(r);n.realpath(r,s.realpathCache,(function(n,i){if(!n)o[i]=true;else if(n.syscall==="stat")o[r]=true;else s.emit("error",n);if(--a===0){s.matches[e]=o;t()}}))}))};Glob.prototype._mark=function(e){return d.mark(this,e)};Glob.prototype._makeAbs=function(e){return d.makeAbs(this,e)};Glob.prototype.abort=function(){this.aborted=true;this.emit("abort")};Glob.prototype.pause=function(){if(!this.paused){this.paused=true;this.emit("pause")}};Glob.prototype.resume=function(){if(this.paused){this.emit("resume");this.paused=false;if(this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var r=e[t];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(var t=0;t<n.length;t++){var i=n[t];this._processing--;this._process(i[0],i[1],i[2],i[3])}}}};Glob.prototype._process=function(e,t,r,n){u(this instanceof Glob);u(typeof n==="function");if(this.aborted)return;this._processing++;if(this.paused){this._processQueue.push([e,t,r,n]);return}var s=0;while(typeof e[s]==="string"){s++}var a;switch(s){case e.length:this._processSimple(e.join("/"),t,n);return;case 0:a=null;break;default:a=e.slice(0,s).join("/");break}var o=e.slice(s);var l;if(a===null)l=".";else if(h(a)||h(e.map((function(e){return typeof e==="string"?e:"[*]"})).join("/"))){if(!a||!h(a))a="/"+a;l=a}else l=a;var p=this._makeAbs(l);if(_(this,l))return n();var d=o[0]===i.GLOBSTAR;if(d)this._processGlobStar(a,l,p,o,t,r,n);else this._processReaddir(a,l,p,o,t,r,n)};Glob.prototype._processReaddir=function(e,t,r,n,i,s,a){var o=this;this._readdir(r,s,(function(l,u){return o._processReaddir2(e,t,r,n,i,s,u,a)}))};Glob.prototype._processReaddir2=function(e,t,r,n,i,s,a,o){if(!a)return o();var u=n[0];var h=!!this.minimatch.negate;var p=u._glob;var d=this.dot||p.charAt(0)===".";var g=[];for(var y=0;y<a.length;y++){var b=a[y];if(b.charAt(0)!=="."||d){var v;if(h&&!e){v=!b.match(u)}else{v=b.match(u)}if(v)g.push(b)}}var _=g.length;if(_===0)return o();if(n.length===1&&!this.mark&&!this.stat){if(!this.matches[i])this.matches[i]=Object.create(null);for(var y=0;y<_;y++){var b=g[y];if(e){if(e!=="/")b=e+"/"+b;else b=e+b}if(b.charAt(0)==="/"&&!this.nomount){b=l.join(this.root,b)}this._emitMatch(i,b)}return o()}n.shift();for(var y=0;y<_;y++){var b=g[y];var w;if(e){if(e!=="/")b=e+"/"+b;else b=e+b}this._process([b].concat(n),i,s,o)}o()};Glob.prototype._emitMatch=function(e,t){if(this.aborted)return;if(w(this,t))return;if(this.paused){this._emitQueue.push([e,t]);return}var r=h(t)?t:this._makeAbs(t);if(this.mark)t=this._mark(t);if(this.absolute)t=r;if(this.matches[e][t])return;if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[e][t]=true;var i=this.statCache[r];if(i)this.emit("stat",t,i);this.emit("match",t)};Glob.prototype._readdirInGlobStar=function(e,t){if(this.aborted)return;if(this.follow)return this._readdir(e,false,t);var r="lstat\0"+e;var n=this;var i=b(r,lstatcb_);if(i)n.fs.lstat(e,i);function lstatcb_(r,i){if(r&&r.code==="ENOENT")return t();var s=i&&i.isSymbolicLink();n.symlinks[e]=s;if(!s&&i&&!i.isDirectory()){n.cache[e]="FILE";t()}else n._readdir(e,false,t)}};Glob.prototype._readdir=function(e,t,r){if(this.aborted)return;r=b("readdir\0"+e+"\0"+t,r);if(!r)return;if(t&&!y(this.symlinks,e))return this._readdirInGlobStar(e,r);if(y(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return r();if(Array.isArray(n))return r(null,n)}var i=this;i.fs.readdir(e,readdirCb(this,e,r))};function readdirCb(e,t,r){return function(n,i){if(n)e._readdirError(t,n,r);else e._readdirEntries(t,i,r)}}Glob.prototype._readdirEntries=function(e,t,r){if(this.aborted)return;if(!this.mark&&!this.stat){for(var n=0;n<t.length;n++){var i=t[n];if(e==="/")i=e+i;else i=e+"/"+i;this.cache[i]=true}}this.cache[e]=t;return r(null,t)};Glob.prototype._readdirError=function(e,t,r){if(this.aborted)return;switch(t.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);this.cache[n]="FILE";if(n===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);i.path=this.cwd;i.code=t.code;this.emit("error",i);this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=false;break;default:this.cache[this._makeAbs(e)]=false;if(this.strict){this.emit("error",t);this.abort()}if(!this.silent)console.error("glob error",t);break}return r()};Glob.prototype._processGlobStar=function(e,t,r,n,i,s,a){var o=this;this._readdir(r,s,(function(l,u){o._processGlobStar2(e,t,r,n,i,s,u,a)}))};Glob.prototype._processGlobStar2=function(e,t,r,n,i,s,a,o){if(!a)return o();var l=n.slice(1);var u=e?[e]:[];var h=u.concat(l);this._process(h,i,false,o);var p=this.symlinks[r];var d=a.length;if(p&&s)return o();for(var g=0;g<d;g++){var y=a[g];if(y.charAt(0)==="."&&!this.dot)continue;var b=u.concat(a[g],l);this._process(b,i,true,o);var v=u.concat(a[g],n);this._process(v,i,true,o)}o()};Glob.prototype._processSimple=function(e,t,r){var n=this;this._stat(e,(function(i,s){n._processSimple2(e,t,i,s,r)}))};Glob.prototype._processSimple2=function(e,t,r,n,i){if(!this.matches[t])this.matches[t]=Object.create(null);if(!n)return i();if(e&&h(e)&&!this.nomount){var s=/[\/\\]$/.test(e);if(e.charAt(0)==="/"){e=l.join(this.root,e)}else{e=l.resolve(this.root,e);if(s)e+="/"}}if(process.platform==="win32")e=e.replace(/\\/g,"/");this._emitMatch(t,e);i()};Glob.prototype._stat=function(e,t){var r=this._makeAbs(e);var n=e.slice(-1)==="/";if(e.length>this.maxLength)return t();if(!this.stat&&y(this.cache,r)){var i=this.cache[r];if(Array.isArray(i))i="DIR";if(!n||i==="DIR")return t(null,i);if(n&&i==="FILE")return t()}var s;var a=this.statCache[r];if(a!==undefined){if(a===false)return t(null,a);else{var o=a.isDirectory()?"DIR":"FILE";if(n&&o==="FILE")return t();else return t(null,o,a)}}var l=this;var u=b("stat\0"+r,lstatcb_);if(u)l.fs.lstat(r,u);function lstatcb_(n,i){if(i&&i.isSymbolicLink()){return l.fs.stat(r,(function(n,s){if(n)l._stat2(e,r,null,i,t);else l._stat2(e,r,n,s,t)}))}else{l._stat2(e,r,n,i,t)}}};Glob.prototype._stat2=function(e,t,r,n,i){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[t]=false;return i()}var s=e.slice(-1)==="/";this.statCache[t]=n;if(t.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,false,n);var a=true;if(n)a=n.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||a;if(s&&a==="FILE")return i();return i(null,a,n)}},1477:(e,t,r)=>{e.exports=globSync;globSync.GlobSync=GlobSync;var n=r(8945);var i=r(9566);var s=i.Minimatch;var a=r(3146).Glob;var o=r(3837);var l=r(1017);var u=r(9491);var h=r(1323);var p=r(9979);var d=p.setopts;var g=p.ownProp;var y=p.childrenIgnored;var b=p.isIgnored;function globSync(e,t){if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(e,t).found}function GlobSync(e,t){if(!e)throw new Error("must provide pattern");if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(e,t);d(this,e,t);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++){this._process(this.minimatch.set[n],n,false)}this._finish()}GlobSync.prototype._finish=function(){u.ok(this instanceof GlobSync);if(this.realpath){var e=this;this.matches.forEach((function(t,r){var i=e.matches[r]=Object.create(null);for(var s in t){try{s=e._makeAbs(s);var a=n.realpathSync(s,e.realpathCache);i[a]=true}catch(t){if(t.syscall==="stat")i[e._makeAbs(s)]=true;else throw t}}}))}p.finish(this)};GlobSync.prototype._process=function(e,t,r){u.ok(this instanceof GlobSync);var n=0;while(typeof e[n]==="string"){n++}var s;switch(n){case e.length:this._processSimple(e.join("/"),t);return;case 0:s=null;break;default:s=e.slice(0,n).join("/");break}var a=e.slice(n);var o;if(s===null)o=".";else if(h(s)||h(e.map((function(e){return typeof e==="string"?e:"[*]"})).join("/"))){if(!s||!h(s))s="/"+s;o=s}else o=s;var l=this._makeAbs(o);if(y(this,o))return;var p=a[0]===i.GLOBSTAR;if(p)this._processGlobStar(s,o,l,a,t,r);else this._processReaddir(s,o,l,a,t,r)};GlobSync.prototype._processReaddir=function(e,t,r,n,i,s){var a=this._readdir(r,s);if(!a)return;var o=n[0];var u=!!this.minimatch.negate;var h=o._glob;var p=this.dot||h.charAt(0)===".";var d=[];for(var g=0;g<a.length;g++){var y=a[g];if(y.charAt(0)!=="."||p){var b;if(u&&!e){b=!y.match(o)}else{b=y.match(o)}if(b)d.push(y)}}var v=d.length;if(v===0)return;if(n.length===1&&!this.mark&&!this.stat){if(!this.matches[i])this.matches[i]=Object.create(null);for(var g=0;g<v;g++){var y=d[g];if(e){if(e.slice(-1)!=="/")y=e+"/"+y;else y=e+y}if(y.charAt(0)==="/"&&!this.nomount){y=l.join(this.root,y)}this._emitMatch(i,y)}return}n.shift();for(var g=0;g<v;g++){var y=d[g];var _;if(e)_=[e,y];else _=[y];this._process(_.concat(n),i,s)}};GlobSync.prototype._emitMatch=function(e,t){if(b(this,t))return;var r=this._makeAbs(t);if(this.mark)t=this._mark(t);if(this.absolute){t=r}if(this.matches[e][t])return;if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[e][t]=true;if(this.stat)this._stat(t)};GlobSync.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,false);var t;var r;var n;try{r=this.fs.lstatSync(e)}catch(e){if(e.code==="ENOENT"){return null}}var i=r&&r.isSymbolicLink();this.symlinks[e]=i;if(!i&&r&&!r.isDirectory())this.cache[e]="FILE";else t=this._readdir(e,false);return t};GlobSync.prototype._readdir=function(e,t){var r;if(t&&!g(this.symlinks,e))return this._readdirInGlobStar(e);if(g(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return null;if(Array.isArray(n))return n}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(t){this._readdirError(e,t);return null}};GlobSync.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat){for(var r=0;r<t.length;r++){var n=t[r];if(e==="/")n=e+n;else n=e+"/"+n;this.cache[n]=true}}this.cache[e]=t;return t};GlobSync.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);this.cache[r]="FILE";if(r===this.cwdAbs){var n=new Error(t.code+" invalid cwd "+this.cwd);n.path=this.cwd;n.code=t.code;throw n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=false;break;default:this.cache[this._makeAbs(e)]=false;if(this.strict)throw t;if(!this.silent)console.error("glob error",t);break}};GlobSync.prototype._processGlobStar=function(e,t,r,n,i,s){var a=this._readdir(r,s);if(!a)return;var o=n.slice(1);var l=e?[e]:[];var u=l.concat(o);this._process(u,i,false);var h=a.length;var p=this.symlinks[r];if(p&&s)return;for(var d=0;d<h;d++){var g=a[d];if(g.charAt(0)==="."&&!this.dot)continue;var y=l.concat(a[d],o);this._process(y,i,true);var b=l.concat(a[d],n);this._process(b,i,true)}};GlobSync.prototype._processSimple=function(e,t){var r=this._stat(e);if(!this.matches[t])this.matches[t]=Object.create(null);if(!r)return;if(e&&h(e)&&!this.nomount){var n=/[\/\\]$/.test(e);if(e.charAt(0)==="/"){e=l.join(this.root,e)}else{e=l.resolve(this.root,e);if(n)e+="/"}}if(process.platform==="win32")e=e.replace(/\\/g,"/");this._emitMatch(t,e)};GlobSync.prototype._stat=function(e){var t=this._makeAbs(e);var r=e.slice(-1)==="/";if(e.length>this.maxLength)return false;if(!this.stat&&g(this.cache,t)){var n=this.cache[t];if(Array.isArray(n))n="DIR";if(!r||n==="DIR")return n;if(r&&n==="FILE")return false}var i;var s=this.statCache[t];if(!s){var a;try{a=this.fs.lstatSync(t)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR")){this.statCache[t]=false;return false}}if(a&&a.isSymbolicLink()){try{s=this.fs.statSync(t)}catch(e){s=a}}else{s=a}}this.statCache[t]=s;var n=true;if(s)n=s.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||n;if(r&&n==="FILE")return false;return n};GlobSync.prototype._mark=function(e){return p.mark(this,e)};GlobSync.prototype._makeAbs=function(e){return p.makeAbs(this,e)}},9717:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return t.call(e)=="[object Array]"}},8710:(e,t,r)=>{"use strict";var n=r(7843);var i=Object.keys||function(e){var t=[];for(var r in e){t.push(r)}return t};e.exports=Duplex;var s=Object.create(r(3487));s.inherits=r(6919);var a=r(7336);var o=r(8947);s.inherits(Duplex,a);{var l=i(o.prototype);for(var u=0;u<l.length;u++){var h=l[u];if(!Duplex.prototype[h])Duplex.prototype[h]=o.prototype[h]}}function Duplex(e){if(!(this instanceof Duplex))return new Duplex(e);a.call(this,e);o.call(this,e);if(e&&e.readable===false)this.readable=false;if(e&&e.writable===false)this.writable=false;this.allowHalfOpen=true;if(e&&e.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",onend)}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function onend(){if(this.allowHalfOpen||this._writableState.ended)return;n.nextTick(onEndNT,this)}function onEndNT(e){e.end()}Object.defineProperty(Duplex.prototype,"destroyed",{get:function(){if(this._readableState===undefined||this._writableState===undefined){return false}return this._readableState.destroyed&&this._writableState.destroyed},set:function(e){if(this._readableState===undefined||this._writableState===undefined){return}this._readableState.destroyed=e;this._writableState.destroyed=e}});Duplex.prototype._destroy=function(e,t){this.push(null);this.end();n.nextTick(t,e)}},9446:(e,t,r)=>{"use strict";e.exports=PassThrough;var n=r(1100);var i=Object.create(r(3487));i.inherits=r(6919);i.inherits(PassThrough,n);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);n.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},7336:(e,t,r)=>{"use strict";var n=r(7843);e.exports=Readable;var i=r(9717);var s;Readable.ReadableState=ReadableState;var a=r(2361).EventEmitter;var EElistenerCount=function(e,t){return e.listeners(t).length};var o=r(40);var l=r(3118).Buffer;var u=(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(e){return l.from(e)}function _isUint8Array(e){return l.isBuffer(e)||e instanceof u}var h=Object.create(r(3487));h.inherits=r(6919);var p=r(3837);var d=void 0;if(p&&p.debuglog){d=p.debuglog("stream")}else{d=function(){}}var g=r(2388);var y=r(2946);var b;h.inherits(Readable,o);var v=["error","close","destroy","pause","resume"];function prependListener(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(i(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function ReadableState(e,t){s=s||r(8710);e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode;if(n)this.objectMode=this.objectMode||!!e.readableObjectMode;var i=e.highWaterMark;var a=e.readableHighWaterMark;var o=this.objectMode?16:16*1024;if(i||i===0)this.highWaterMark=i;else if(n&&(a||a===0))this.highWaterMark=a;else this.highWaterMark=o;this.highWaterMark=Math.floor(this.highWaterMark);this.buffer=new g;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.destroyed=false;this.defaultEncoding=e.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(e.encoding){if(!b)b=r(8343).s;this.decoder=new b(e.encoding);this.encoding=e.encoding}}function Readable(e){s=s||r(8710);if(!(this instanceof Readable))return new Readable(e);this._readableState=new ReadableState(e,this);this.readable=true;if(e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}o.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function(e){if(!this._readableState){return}this._readableState.destroyed=e}});Readable.prototype.destroy=y.destroy;Readable.prototype._undestroy=y.undestroy;Readable.prototype._destroy=function(e,t){this.push(null);t(e)};Readable.prototype.push=function(e,t){var r=this._readableState;var n;if(!r.objectMode){if(typeof e==="string"){t=t||r.defaultEncoding;if(t!==r.encoding){e=l.from(e,t);t=""}n=true}}else{n=true}return readableAddChunk(this,e,t,false,n)};Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,true,false)};function readableAddChunk(e,t,r,n,i){var s=e._readableState;if(t===null){s.reading=false;onEofChunk(e,s)}else{var a;if(!i)a=chunkInvalid(s,t);if(a){e.emit("error",a)}else if(s.objectMode||t&&t.length>0){if(typeof t!=="string"&&!s.objectMode&&Object.getPrototypeOf(t)!==l.prototype){t=_uint8ArrayToBuffer(t)}if(n){if(s.endEmitted)e.emit("error",new Error("stream.unshift() after end event"));else addChunk(e,s,t,true)}else if(s.ended){e.emit("error",new Error("stream.push() after EOF"))}else{s.reading=false;if(s.decoder&&!r){t=s.decoder.write(t);if(s.objectMode||t.length!==0)addChunk(e,s,t,false);else maybeReadMore(e,s)}else{addChunk(e,s,t,false)}}}else if(!n){s.reading=false}}return needMoreData(s)}function addChunk(e,t,r,n){if(t.flowing&&t.length===0&&!t.sync){e.emit("data",r);e.read(0)}else{t.length+=t.objectMode?1:r.length;if(n)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var r;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){r=new TypeError("Invalid non-string/buffer chunk")}return r}function needMoreData(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Readable.prototype.isPaused=function(){return this._readableState.flowing===false};Readable.prototype.setEncoding=function(e){if(!b)b=r(8343).s;this._readableState.decoder=new b(e);this._readableState.encoding=e;return this};var _=8388608;function computeNewHighWaterMark(e){if(e>=_){e=_}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){d("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){d("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var n=t.needReadable;d("need readable",n);if(t.length===0||t.length-e<t.highWaterMark){n=true;d("length less than watermark",n)}if(t.ended||t.reading){n=false;d("reading or ended",n)}else if(n){d("do read");t.reading=true;t.sync=true;if(t.length===0)t.needReadable=true;this._read(t.highWaterMark);t.sync=false;if(!t.reading)e=howMuchToRead(r,t)}var i;if(e>0)i=fromList(e,t);else i=null;if(i===null){t.needReadable=true;e=0}else{t.length-=e}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(i!==null)this.emit("data",i);return i};function onEofChunk(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;emitReadable(e)}function emitReadable(e){var t=e._readableState;t.needReadable=false;if(!t.emittedReadable){d("emitReadable",t.flowing);t.emittedReadable=true;if(t.sync)n.nextTick(emitReadable_,e);else emitReadable_(e)}}function emitReadable_(e){d("emit readable");e.emit("readable");flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;n.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){var r=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark){d("maybeReadMore read 0");e.read(0);if(r===t.length)break;else r=t.length}t.readingMore=false}Readable.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Readable.prototype.pipe=function(e,t){var r=this;var i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1;d("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||t.end!==false)&&e!==process.stdout&&e!==process.stderr;var a=s?onend:unpipe;if(i.endEmitted)n.nextTick(a);else r.once("end",a);e.on("unpipe",onunpipe);function onunpipe(e,t){d("onunpipe");if(e===r){if(t&&t.hasUnpiped===false){t.hasUnpiped=true;cleanup()}}}function onend(){d("onend");e.end()}var o=pipeOnDrain(r);e.on("drain",o);var l=false;function cleanup(){d("cleanup");e.removeListener("close",onclose);e.removeListener("finish",onfinish);e.removeListener("drain",o);e.removeListener("error",onerror);e.removeListener("unpipe",onunpipe);r.removeListener("end",onend);r.removeListener("end",unpipe);r.removeListener("data",ondata);l=true;if(i.awaitDrain&&(!e._writableState||e._writableState.needDrain))o()}var u=false;r.on("data",ondata);function ondata(t){d("ondata");u=false;var n=e.write(t);if(false===n&&!u){if((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&indexOf(i.pipes,e)!==-1)&&!l){d("false write response, pause",i.awaitDrain);i.awaitDrain++;u=true}r.pause()}}function onerror(t){d("onerror",t);unpipe();e.removeListener("error",onerror);if(EElistenerCount(e,"error")===0)e.emit("error",t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){d("onfinish");e.removeListene