From cd27ff1d1cb227bb563ffc65b958d7d16416491b Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 19 Feb 2021 20:07:49 +0000 Subject: [PATCH] chore: publish dist --- dist/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 1488172..61436db 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -module.exports=function(t,e){"use strict";var r={};function __webpack_require__(e){if(r[e]){return r[e].exports}var n=r[e]={i:e,l:false,exports:{}};var i=true;try{t[e].call(n.exports,n,n.exports,__webpack_require__);i=false}finally{if(i)delete r[e]}n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(104)}return startup()}({11:function(t){t.exports=wrappy;function wrappy(t,e){if(t&&e)return wrappy(t)(e);if(typeof t!=="function")throw new TypeError("need wrapper function");Object.keys(t).forEach(function(e){wrapper[e]=t[e]});return wrapper;function wrapper(){var e=new Array(arguments.length);for(var r=0;r1024*64){throw new TypeError("pattern is too long")}var r=this.options;if(!r.noglobstar&&t==="**")return i;if(t==="")return"";var n="";var a=!!r.nocase;var u=false;var f=[];var h=[];var d;var m=false;var v=-1;var g=-1;var y=t.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var E=this;function clearStateChar(){if(d){switch(d){case"*":n+=c;a=true;break;case"?":n+=s;a=true;break;default:n+="\\"+d;break}E.debug("clearStateChar %j %j",d,n);d=false}}for(var b=0,_=t.length,S;b<_&&(S=t.charAt(b));b++){this.debug("%s\t%s %s %j",t,b,n,S);if(u&&l[S]){n+="\\"+S;u=false;continue}switch(S){case"/":return false;case"\\":clearStateChar();u=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",t,b,n,S);if(m){this.debug(" in class");if(S==="!"&&b===g+1)S="^";n+=S;continue}E.debug("call clearStateChar %j",d);clearStateChar();d=S;if(r.noext)clearStateChar();continue;case"(":if(m){n+="(";continue}if(!d){n+="\\(";continue}f.push({type:d,start:b-1,reStart:n.length,open:o[d].open,close:o[d].close});n+=d==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",d,n);d=false;continue;case")":if(m||!f.length){n+="\\)";continue}clearStateChar();a=true;var w=f.pop();n+=w.close;if(w.type==="!"){h.push(w)}w.reEnd=n.length;continue;case"|":if(m||!f.length||u){n+="\\|";u=false;continue}clearStateChar();n+="|";continue;case"[":clearStateChar();if(m){n+="\\"+S;continue}m=true;g=b;v=n.length;n+=S;continue;case"]":if(b===g+1||!m){n+="\\"+S;u=false;continue}if(m){var O=t.substring(g+1,b);try{RegExp("["+O+"]")}catch(t){var T=this.parse(O,p);n=n.substr(0,v)+"\\["+T[0]+"\\]";a=a||T[1];m=false;continue}}a=true;m=false;n+=S;continue;default:clearStateChar();if(u){u=false}else if(l[S]&&!(S==="^"&&m)){n+="\\"}n+=S}}if(m){O=t.substr(g+1);T=this.parse(O,p);n=n.substr(0,v)+"\\["+T[0];a=a||T[1]}for(w=f.pop();w;w=f.pop()){var R=n.slice(w.reStart+w.open.length);this.debug("setting tail",n,w);R=R.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(t,e,r){if(!r){r="\\"}return e+e+r+"|"});this.debug("tail=%j\n %s",R,R,w,n);var A=w.type==="*"?c:w.type==="?"?s:"\\"+w.type;a=true;n=n.slice(0,w.reStart)+A+"\\("+R}clearStateChar();if(u){n+="\\\\"}var I=false;switch(n.charAt(0)){case".":case"[":case"(":I=true}for(var k=h.length-1;k>-1;k--){var G=h[k];var C=n.slice(0,G.reStart);var M=n.slice(G.reStart,G.reEnd-8);var P=n.slice(G.reEnd-8,G.reEnd);var N=n.slice(G.reEnd);P+=N;var j=C.split("(").length-1;var x=N;for(b=0;b=0;o--){a=t[o];if(a)break}for(o=0;o>> no match, partial?",t,l,e,h);if(l===s)return true}return false}var d;if(typeof u==="string"){if(n.nocase){d=f.toLowerCase()===u.toLowerCase()}else{d=f===u}this.debug("string match",u,f,d)}else{d=f.match(u);this.debug("pattern match",u,f,d)}if(!d)return false}if(a===s&&o===c){return true}else if(a===s){return r}else if(o===c){var m=a===s-1&&t[a]==="";return m}throw new Error("wtf?")};function globUnescape(t){return t.replace(/\\(.)/g,"$1")}function regExpEscape(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},102:function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)if(Object.hasOwnProperty.call(t,r))e[r]=t[r];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const i=n(r(747));const a=n(r(87));const o=r(82);function issueCommand(t,e){const r=process.env[`GITHUB_${t}`];if(!r){throw new Error(`Unable to find environment variable for file command ${t}`)}if(!i.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}i.appendFileSync(r,`${o.toCommandValue(e)}${a.EOL}`,{encoding:"utf8"})}e.issueCommand=issueCommand},104:function(t,e,r){const n=r(470);try{r(676)()}catch(t){n.setFailed(`Action failed with error ${t}`)}},117:function(t,e,r){var n=r(622);var i=process.platform==="win32";var a=r(747);var o=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function rethrow(){var t;if(o){var e=new Error;t=debugCallback}else t=missingCallback;return t;function debugCallback(t){if(t){e.message=t.message;t=e;missingCallback(t)}}function missingCallback(t){if(t){if(process.throwDeprecation)throw t;else if(!process.noDeprecation){var e="fs: missing callback "+(t.stack||t.message);if(process.traceDeprecation)console.trace(e);else console.error(e)}}}}function maybeCallback(t){return typeof t==="function"?t:rethrow()}var s=n.normalize;if(i){var c=/(.*?)(?:[\/\\]+|$)/g}else{var c=/(.*?)(?:[\/]+|$)/g}if(i){var u=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{var u=/^[\/]*/}e.realpathSync=function realpathSync(t,e){t=n.resolve(t);if(e&&Object.prototype.hasOwnProperty.call(e,t)){return e[t]}var r=t,o={},s={};var f;var l;var h;var p;start();function start(){var e=u.exec(t);f=e[0].length;l=e[0];h=e[0];p="";if(i&&!s[h]){a.lstatSync(h);s[h]=true}}while(f=t.length){if(e)e[o]=t;return r(null,t)}c.lastIndex=l;var n=c.exec(t);d=h;h+=n[0];p=d+n[1];l=c.lastIndex;if(f[p]||e&&e[p]===p){return process.nextTick(LOOP)}if(e&&Object.prototype.hasOwnProperty.call(e,p)){return gotResolvedLink(e[p])}return a.lstat(p,gotStat)}function gotStat(t,n){if(t)return r(t);if(!n.isSymbolicLink()){f[p]=true;if(e)e[p]=p;return process.nextTick(LOOP)}if(!i){var o=n.dev.toString(32)+":"+n.ino.toString(32);if(s.hasOwnProperty(o)){return gotTarget(null,s[o],p)}}a.stat(p,function(t){if(t)return r(t);a.readlink(p,function(t,e){if(!i)s[o]=e;gotTarget(t,e)})})}function gotTarget(t,i,a){if(t)return r(t);var o=n.resolve(d,i);if(e)e[a]=o;gotResolvedLink(o)}function gotResolvedLink(e){t=n.resolve(e,t.slice(l));start()}}},129:function(t){t.exports=require("child_process")},142:function(t,e,r){"use strict";const{spawnSync:n}=r(129);const i=t=>typeof t==="string";t.exports=((t,e={})=>{if(!i(t)){e=t||{};t=run()}const{added:r,modified:n,untracked:a,deleted:o,renamed:s}=e;const c=parse(t);const u=pick(c,{added:r,modified:n,untracked:a,deleted:o,renamed:s});const f=getNames(u);return f});const a=({name:t})=>t;t.exports.getNames=getNames;function getNames(t){return t.map(a)}t.exports.run=run;function run(){const t=n("git",["status","--porcelain"]);return t.stdout.toString()}t.exports.parse=parse;function parse(t){const e=[];const r=t.split("\n").filter(Boolean);for(const t of r){const{name:r,mode:n}=parseLine(t);e.push({name:r,mode:n})}return e}const o="?";const s="R";const c="-> ";const u=t=>{const e=t.indexOf(c);const r=e+c.length;return t.slice(r)};function parseLine(t){const[e]=t;if(e===o)return{name:t.replace("?? ",""),mode:o};if(e===s)return{name:u(t),mode:s};const[r]=t.match(/^[\sA-Z]{1,}\s/,"");const n=t.replace(r,"");return{name:n,mode:r}}const f=({mode:t})=>/M/.test(t);const l=({mode:t})=>/A/.test(t);const h=({mode:t})=>/R/.test(t);const p=({mode:t})=>/D/.test(t);const d=({mode:t})=>/\?/.test(t);const m=({added:t,modified:e,untracked:r,deleted:n,renamed:i})=>a=>{let o=false;if(t)o=o||l(a);if(e)o=o||f(a);if(r)o=o||d(a);if(n)o=o||p(a);if(i)o=o||h(a);return o};t.exports.pick=pick;function pick(t,{added:e,modified:r,deleted:n,untracked:i,renamed:a}){return t.filter(m({added:e,modified:r,untracked:i,deleted:n,renamed:a}))}},245:function(t,e,r){t.exports=globSync;globSync.GlobSync=GlobSync;var n=r(747);var i=r(302);var a=r(93);var o=a.Minimatch;var s=r(402).Glob;var c=r(669);var u=r(622);var f=r(357);var l=r(681);var h=r(856);var p=h.alphasort;var d=h.alphasorti;var m=h.setopts;var v=h.ownProp;var g=h.childrenIgnored;var y=h.isIgnored;function globSync(t,e){if(typeof e==="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(t,e).found}function GlobSync(t,e){if(!t)throw new Error("must provide pattern");if(typeof e==="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(t,e);m(this,t,e);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;nthis.maxLength)return false;if(!this.stat&&v(this.cache,e)){var i=this.cache[e];if(Array.isArray(i))i="DIR";if(!r||i==="DIR")return i;if(r&&i==="FILE")return false}var a;var o=this.statCache[e];if(!o){var s;try{s=n.lstatSync(e)}catch(t){if(t&&(t.code==="ENOENT"||t.code==="ENOTDIR")){this.statCache[e]=false;return false}}if(s&&s.isSymbolicLink()){try{o=n.statSync(e)}catch(t){o=s}}else{o=s}}this.statCache[e]=o;var i=true;if(o)i=o.isDirectory()?"DIR":"FILE";this.cache[e]=this.cache[e]||i;if(r&&i==="FILE")return false;return i};GlobSync.prototype._mark=function(t){return h.mark(this,t)};GlobSync.prototype._makeAbs=function(t){return h.makeAbs(this,t)}},302:function(t,e,r){t.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var n=r(747);var i=n.realpath;var a=n.realpathSync;var o=process.version;var s=/^v[0-5]\./.test(o);var c=r(117);function newError(t){return t&&t.syscall==="realpath"&&(t.code==="ELOOP"||t.code==="ENOMEM"||t.code==="ENAMETOOLONG")}function realpath(t,e,r){if(s){return i(t,e,r)}if(typeof e==="function"){r=e;e=null}i(t,e,function(n,i){if(newError(n)){c.realpath(t,e,r)}else{r(n,i)}})}function realpathSync(t,e){if(s){return a(t,e)}try{return a(t,e)}catch(r){if(newError(r)){return c.realpathSync(t,e)}else{throw r}}}function monkeypatch(){n.realpath=realpath;n.realpathSync=realpathSync}function unmonkeypatch(){n.realpath=i;n.realpathSync=a}},306:function(t,e,r){var n=r(896);var i=r(621);t.exports=expandTop;var a="\0SLASH"+Math.random()+"\0";var o="\0OPEN"+Math.random()+"\0";var s="\0CLOSE"+Math.random()+"\0";var c="\0COMMA"+Math.random()+"\0";var u="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(a).split("\\{").join(o).split("\\}").join(s).split("\\,").join(c).split("\\.").join(u)}function unescapeBraces(t){return t.split(a).join("\\").split(o).join("{").split(s).join("}").split(c).join(",").split(u).join(".")}function parseCommaParts(t){if(!t)return[""];var e=[];var r=i("{","}",t);if(!r)return t.split(",");var n=r.pre;var a=r.body;var o=r.post;var s=n.split(",");s[s.length-1]+="{"+a+"}";var c=parseCommaParts(o);if(o.length){s[s.length-1]+=c.shift();s.push.apply(s,c)}e.push.apply(e,s);return e}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function identity(t){return t}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,e){return t<=e}function gte(t,e){return t>=e}function expand(t,e){var r=[];var a=i("{","}",t);if(!a||/\$$/.test(a.pre))return[t];var o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body);var c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body);var u=o||c;var f=a.body.indexOf(",")>=0;if(!u&&!f){if(a.post.match(/,.*\}/)){t=a.pre+"{"+a.body+s+a.post;return expand(t)}return[t]}var l;if(u){l=a.body.split(/\.\./)}else{l=parseCommaParts(a.body);if(l.length===1){l=expand(l[0],false).map(embrace);if(l.length===1){var h=a.post.length?expand(a.post,false):[""];return h.map(function(t){return a.pre+l[0]+t})}}}var p=a.pre;var h=a.post.length?expand(a.post,false):[""];var d;if(u){var m=numeric(l[0]);var v=numeric(l[1]);var g=Math.max(l[0].length,l[1].length);var y=l.length==3?Math.abs(numeric(l[2])):1;var E=lte;var b=v0){var T=new Array(O+1).join("0");if(S<0)w="-"+T+w.slice(1);else w=T+w}}}d.push(w)}}else{d=n(l,function(t){return expand(t,false)})}for(var R=0;R1)return true;for(var a=0;athis.maxLength)return e();if(!this.stat&&g(this.cache,r)){var a=this.cache[r];if(Array.isArray(a))a="DIR";if(!i||a==="DIR")return e(null,a);if(i&&a==="FILE")return e()}var o;var s=this.statCache[r];if(s!==undefined){if(s===false)return e(null,s);else{var c=s.isDirectory()?"DIR":"FILE";if(i&&c==="FILE")return e();else return e(null,c,s)}}var u=this;var f=y("stat\0"+r,lstatcb_);if(f)n.lstat(r,f);function lstatcb_(i,a){if(a&&a.isSymbolicLink()){return n.stat(r,function(n,i){if(n)u._stat2(t,r,null,a,e);else u._stat2(t,r,n,i,e)})}else{u._stat2(t,r,i,a,e)}}};Glob.prototype._stat2=function(t,e,r,n,i){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[e]=false;return i()}var a=t.slice(-1)==="/";this.statCache[e]=n;if(e.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,false,n);var o=true;if(n)o=n.isDirectory()?"DIR":"FILE";this.cache[e]=this.cache[e]||o;if(a&&o==="FILE")return i();return i(null,o,n)}},431:function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)if(Object.hasOwnProperty.call(t,r))e[r]=t[r];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const i=n(r(87));const a=r(82);function issueCommand(t,e,r){const n=new Command(t,e,r);process.stdout.write(n.toString()+i.EOL)}e.issueCommand=issueCommand;function issue(t,e=""){issueCommand(t,{},e)}e.issue=issue;const o="::";class Command{constructor(t,e,r){if(!t){t="missing.command"}this.command=t;this.properties=e;this.message=r}toString(){let t=o+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let e=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(e){e=false}else{t+=","}t+=`${r}=${escapeProperty(n)}`}}}}t+=`${o}${escapeData(this.message)}`;return t}}function escapeData(t){return a.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(t){return a.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},450:function(t,e,r){const n=r(747);const i=r(470);const a=r(852)();const o=t=>{return t.split("\n").map(t=>t.trim())};const s={get COMMIT_MESSAGE(){return i.getInput("COMMIT_MESSAGE",{required:false})||`Update file(s) from "%SRC_REPO%"`},DRY_RUN:["1","true"].includes(i.getInput("DRY_RUN",{required:false}).toLowerCase()),FILE_PATTERNS:o(i.getInput("FILE_PATTERNS")).map(t=>new RegExp(t)),GITHUB_TOKEN:i.getInput("GITHUB_TOKEN",{required:true}),GIT_EMAIL:i.getInput("GIT_EMAIL")||`${process.env.GITHUB_ACTOR}@users.noreply.github.com`,GIT_USERNAME:i.getInput("GIT_USERNAME",{required:false})||process.env.GITHUB_ACTOR,SKIP_CLEANUP:["1","true"].includes(i.getInput("SKIP_CLEANUP",{required:false}).toLowerCase()),SKIP_DELETE:["1","true"].includes(i.getInput("SKIP_DELETE",{required:false}).toLowerCase()),SKIP_REPLACE:["1","true"].includes(i.getInput("SKIP_REPLACE",{required:false}).toLowerCase()),SRC_REPO:i.getInput("SRC_REPO",{required:false})||process.env.GITHUB_REPOSITORY,SRC_ROOT:i.getInput("SRC_ROOT",{required:false})||"/",TARGET_REPOS:o(i.getInput("TARGET_REPOS",{required:true})),TARGET_ROOT:i.getInput("TARGET_ROOT",{required:false})||"/",TMPDIR:i.getInput("TEMP_DIR",{required:false})||`tmp-${Date.now().toString()}`};while(n.existsSync(s.TMPDIR)){s.TMPDIR=`tmp-${Date.now().toString()}`;a.info(`TEMP_DIR already exists. Using "${s.TMPDIR}" now.`)}a.info("Context:",{...s,GITHUB_TOKEN:""});t.exports=s},470:function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){function adopt(t){return t instanceof r?t:new r(function(e){e(t)})}return new(r||(r=Promise))(function(r,i){function fulfilled(t){try{step(n.next(t))}catch(t){i(t)}}function rejected(t){try{step(n["throw"](t))}catch(t){i(t)}}function step(t){t.done?r(t.value):adopt(t.value).then(fulfilled,rejected)}step((n=n.apply(t,e||[])).next())})};var i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)if(Object.hasOwnProperty.call(t,r))e[r]=t[r];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const a=r(431);const o=r(102);const s=r(82);const c=i(r(87));const u=i(r(622));var f;(function(t){t[t["Success"]=0]="Success";t[t["Failure"]=1]="Failure"})(f=e.ExitCode||(e.ExitCode={}));function exportVariable(t,e){const r=s.toCommandValue(e);process.env[t]=r;const n=process.env["GITHUB_ENV"]||"";if(n){const e="_GitHubActionsFileCommandDelimeter_";const n=`${t}<<${e}${c.EOL}${r}${c.EOL}${e}`;o.issueCommand("ENV",n)}else{a.issueCommand("set-env",{name:t},r)}}e.exportVariable=exportVariable;function setSecret(t){a.issueCommand("add-mask",{},t)}e.setSecret=setSecret;function addPath(t){const e=process.env["GITHUB_PATH"]||"";if(e){o.issueCommand("PATH",t)}else{a.issueCommand("add-path",{},t)}process.env["PATH"]=`${t}${u.delimiter}${process.env["PATH"]}`}e.addPath=addPath;function getInput(t,e){const r=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!r){throw new Error(`Input required and not supplied: ${t}`)}return r.trim()}e.getInput=getInput;function setOutput(t,e){a.issueCommand("set-output",{name:t},e)}e.setOutput=setOutput;function setCommandEcho(t){a.issue("echo",t?"on":"off")}e.setCommandEcho=setCommandEcho;function setFailed(t){process.exitCode=f.Failure;error(t)}e.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}e.isDebug=isDebug;function debug(t){a.issueCommand("debug",{},t)}e.debug=debug;function error(t){a.issue("error",t instanceof Error?t.toString():t)}e.error=error;function warning(t){a.issue("warning",t instanceof Error?t.toString():t)}e.warning=warning;function info(t){process.stdout.write(t+c.EOL)}e.info=info;function startGroup(t){a.issue("group",t)}e.startGroup=startGroup;function endGroup(){a.issue("endgroup")}e.endGroup=endGroup;function group(t,e){return n(this,void 0,void 0,function*(){startGroup(t);let r;try{r=yield e()}finally{endGroup()}return r})}e.group=group;function saveState(t,e){a.issueCommand("save-state",{name:t},e)}e.saveState=saveState;function getState(t){return process.env[`STATE_${t}`]||""}e.getState=getState},543:function(t,e,r){const n=r(747).promises;const i=r(622);const a=r(50);const o=r(569);const{TMPDIR:s,FILE_PATTERNS:c,DRY_RUN:u,SKIP_DELETE:f,SKIP_REPLACE:l,SRC_REPO:h,SRC_ROOT:p,TARGET_ROOT:d}=r(450);const m=r(852);const v=t=>{const e=m(t);const r=()=>{return t.split(":")[0]};const o=()=>{return t.split(":")[1]||undefined};const v=()=>{return i.join(s,`${r()}${o()===undefined?"":`-${o()}`}`)};const g=()=>t===h?p:d;const y=()=>i.join(v(),g());const E=t=>{return i.relative(y(),t)};const b=e=>e.replace(/\\/g,"/").replace(/^\//,"").replace(new RegExp(`^${s}/${t}${g()}`),"");const _=t=>{e.info("FILE_PATTERNS",c.map(t=>t.toString()));return t.filter(t=>{cleanFile=b(t);const e=c.some(t=>t.test(cleanFile));return e})};const S=async()=>{const t=await a(v(),[".git"]);e.debug("FILES:",JSON.stringify(t.map(b),undefined,2));const r=_(t);e.info("MATCHING FILES:",JSON.stringify(r.map(b),undefined,2));return r};const w=async(t,r)=>{const a=await n.access(r).then(()=>true).catch(()=>false);if(l&&a){e.info("skip copying",t.replace(/\\/g,"/").replace(/^\//,""),"to",r.replace(/\\/g,"/").replace(/^\//,""),"because SKIP_REPLACE = true");return}e.info("copy",t.replace(/\\/g,"/").replace(/^\//,""),"to",r.replace(/\\/g,"/").replace(/^\//,""));if(u){return}await n.mkdir(i.dirname(r),{recursive:true});await n.copyFile(t,r)};const O=async t=>{if(f){e.info("SKIP REMOVING FILES because `SKIP_DELETE` is set to `true`",t.map(t=>`"${t}"`).join(", "))}e.info("REMOVE FILES",t);if(u){return}return Promise.all(t.map(t=>n.unlink(t)))};return{copyFile:w,getFiles:S,getRepoBranch:o,getRepoFilePath:y,getRepoPath:v,getRepoRelativeFilePath:E,getRepoSlug:r,removeFiles:O}};const g=async t=>{new Promise((e,r)=>{o(t,{disableGlob:true},t=>{if(t){return r(t)}e()})})};t.exports={init:v,removeDir:g}},569:function(t,e,r){const n=r(357);const i=r(622);const a=r(747);let o=undefined;try{o=r(402)}catch(t){}const s={nosort:true,silent:true};let c=0;const u=process.platform==="win32";const f=t=>{const e=["unlink","chmod","stat","lstat","rmdir","readdir"];e.forEach(e=>{t[e]=t[e]||a[e];e=e+"Sync";t[e]=t[e]||a[e]});t.maxBusyTries=t.maxBusyTries||3;t.emfileWait=t.emfileWait||1e3;if(t.glob===false){t.disableGlob=true}if(t.disableGlob!==true&&o===undefined){throw Error("glob dependency not found, set `options.disableGlob = true` if intentional")}t.disableGlob=t.disableGlob||false;t.glob=t.glob||s};const l=(t,e,r)=>{if(typeof e==="function"){r=e;e={}}n(t,"rimraf: missing path");n.equal(typeof t,"string","rimraf: path should be a string");n.equal(typeof r,"function","rimraf: callback function required");n(e,"rimraf: invalid options argument provided");n.equal(typeof e,"object","rimraf: options should be object");f(e);let i=0;let a=null;let s=0;const u=t=>{a=a||t;if(--s===0)r(a)};const l=(t,n)=>{if(t)return r(t);s=n.length;if(s===0)return r();n.forEach(t=>{const r=n=>{if(n){if((n.code==="EBUSY"||n.code==="ENOTEMPTY"||n.code==="EPERM")&&ih(t,e,r),i*100)}if(n.code==="EMFILE"&&ch(t,e,r),c++)}if(n.code==="ENOENT")n=null}c=0;u(n)};h(t,e,r)})};if(e.disableGlob||!o.hasMagic(t))return l(null,[t]);e.lstat(t,(r,n)=>{if(!r)return l(null,[t]);o(t,e.glob,l)})};const h=(t,e,r)=>{n(t);n(e);n(typeof r==="function");e.lstat(t,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&u)p(t,e,n,r);if(i&&i.isDirectory())return m(t,e,n,r);e.unlink(t,n=>{if(n){if(n.code==="ENOENT")return r(null);if(n.code==="EPERM")return u?p(t,e,n,r):m(t,e,n,r);if(n.code==="EISDIR")return m(t,e,n,r)}return r(n)})})};const p=(t,e,r,i)=>{n(t);n(e);n(typeof i==="function");e.chmod(t,438,n=>{if(n)i(n.code==="ENOENT"?null:r);else e.stat(t,(n,a)=>{if(n)i(n.code==="ENOENT"?null:r);else if(a.isDirectory())m(t,e,r,i);else e.unlink(t,i)})})};const d=(t,e,r)=>{n(t);n(e);try{e.chmodSync(t,438)}catch(t){if(t.code==="ENOENT")return;else throw r}let i;try{i=e.statSync(t)}catch(t){if(t.code==="ENOENT")return;else throw r}if(i.isDirectory())y(t,e,r);else e.unlinkSync(t)};const m=(t,e,r,i)=>{n(t);n(e);n(typeof i==="function");e.rmdir(t,n=>{if(n&&(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM"))v(t,e,i);else if(n&&n.code==="ENOTDIR")i(r);else i(n)})};const v=(t,e,r)=>{n(t);n(e);n(typeof r==="function");e.readdir(t,(n,a)=>{if(n)return r(n);let o=a.length;if(o===0)return e.rmdir(t,r);let s;a.forEach(n=>{l(i.join(t,n),e,n=>{if(s)return;if(n)return r(s=n);if(--o===0)e.rmdir(t,r)})})})};const g=(t,e)=>{e=e||{};f(e);n(t,"rimraf: missing path");n.equal(typeof t,"string","rimraf: path should be a string");n(e,"rimraf: missing options");n.equal(typeof e,"object","rimraf: options should be object");let r;if(e.disableGlob||!o.hasMagic(t)){r=[t]}else{try{e.lstatSync(t);r=[t]}catch(n){r=o.sync(t,e.glob)}}if(!r.length)return;for(let t=0;t{n(t);n(e);try{e.rmdirSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")E(t,e)}};const E=(t,e)=>{n(t);n(e);e.readdirSync(t).forEach(r=>g(i.join(t,r),e));const r=u?100:1;let a=0;do{let n=true;try{const i=e.rmdirSync(t,e);n=false;return i}finally{if(++a=0&&u>0){n=[];a=r.length;while(f>=0&&!s){if(f==c){n.push(f);c=r.indexOf(t,f+1)}else if(n.length==1){s=[n.pop(),u]}else{i=n.pop();if(i=0?c:u}if(n.length){s=[a,o]}}return s}},622:function(t){t.exports=require("path")},669:function(t){t.exports=require("util")},674:function(t,e,r){var n=r(11);var i=Object.create(null);var a=r(49);t.exports=n(inflight);function inflight(t,e){if(i[t]){i[t].push(e);return null}else{i[t]=[e];return makeres(t)}}function makeres(t){return a(function RES(){var e=i[t];var r=e.length;var n=slice(arguments);try{for(var a=0;ar){e.splice(0,r);process.nextTick(function(){RES.apply(null,n)})}else{delete i[t]}}})}function slice(t){var e=t.length;var r=[];for(var n=0;n{let t;try{const e=c.init(i);const r=h.init(i);await e.clone();const o=await r.getFiles();const s=o.map(t=>r.getRepoRelativeFilePath(t));l(i);await new Promise(t=>setTimeout(t,5e3));await Promise.all(a.map(async t=>{const e=h.init(t);const i=c.init(t);await i.clone();const a=await e.getFiles();const u=a.filter(t=>!s.includes(e.getRepoRelativeFilePath(t)));await Promise.all([e.removeFiles(u),o.map(async t=>e.copyFile(t,n.join(e.getRepoFilePath(),r.getRepoRelativeFilePath(t))))]);await i.commitAll();l(t)}))}catch(e){t=e}l();if(!s){await u(o)}if(t){throw t}};t.exports=p},681:function(t){"use strict";function posix(t){return t.charAt(0)==="/"}function win32(t){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var r=e.exec(t);var n=r[1]||"";var i=Boolean(n&&n.charAt(1)!==":");return Boolean(r[2]||i)}t.exports=process.platform==="win32"?win32:posix;t.exports.posix=posix;t.exports.win32=win32},689:function(t,e,r){try{var n=r(669);if(typeof n.inherits!=="function")throw"";t.exports=n.inherits}catch(e){t.exports=r(315)}},718:function(t,e,r){const{exec:n}=r(129);const{parse:i}=r(142);const{GITHUB_TOKEN:a,SRC_REPO:o,COMMIT_MESSAGE:s,GIT_USERNAME:c,GIT_EMAIL:u,DRY_RUN:f}=r(450);const l=r(543);const h=r(852);const p=(t,e)=>{let r=t;Object.keys(e).forEach(t=>{if(t==="COMMIT_MESSAGE"){return}r=r.replace(new RegExp(`%${t}%`,"g"),e[t])});return r};t.exports={init:t=>{const{getRepoPath:e,getRepoSlug:r,getRepoBranch:d}=l.init(t);const m=h(t);function execCmd(t,e){m.info(`EXEC: "${t}" IN "${e||"./"}"`);return new Promise((r,i)=>{n(t,{cwd:e},function(t,e){m.info(`OUTPUT: "${t}${e}"`);t?i(t):r(e.trim())})})}const v=async()=>{const t=["git clone","--depth 1",d()===undefined?false:` -b ${d()}`,`https://${a}@github.com/${r()}.git`,e()];return execCmd(t.filter(Boolean).join(" "))};const g=async()=>{const t=await execCmd(`git status --porcelain`,e());return i(t).length!==0};const y=async()=>{if(!await g()){m.info("NO CHANGES DETECTED");return}m.info("CHANGES DETECTED");m.info("COMMIT CHANGES...");const r=p(s,{SRC_REPO:o,TARGET_REPO:t});if(!f){const t=await execCmd([`git config --local user.name "${c}"`,`git config --local user.email "${u}"`,`git add -A`,`git status`,`git commit --message "${r}"`,`git push`].join(" && "),e());if(!t.includes("Update file(s) from")){throw new Error("failed to commit changes")}}m.info("CHANGES COMMITED")};return{clone:v,commitAll:y}}}},747:function(t){t.exports=require("fs")},852:function(t,e,r){const n=r(470);const i=(...t)=>t.map(t=>Array.isArray(t)||Object.prototype.toString.call(t)==="[object Object]"?JSON.stringify(t,undefined,2):t).join(" ");const a={};t.exports=(t=>{a[t]=[];const e=(...e)=>{a[t].push(["debug",i(...e)]);if(!t){u()}};const r=(...e)=>{a[t].push(["error",i(...e)]);n.setFailed(`Action failed with error ${message}`);if(!t){u()}};const o=(...e)=>{a[t].push(["info",i(...e)]);if(!t){u()}};const s=(...e)=>{a[t].push(["warning",i(...e)]);if(!t){u()}};const c=t=>{a[t].forEach(([e,r])=>{n[e](t!=="undefined"?`${t}: ${r}`:r)});a[t]=[]};const u=(e=t)=>{if(!e){Object.keys(a).forEach(t=>{c(t)})}else{c(e)}};return{debug:e,error:r,info:o,print:u,warn:s}})},856:function(t,e,r){e.alphasort=alphasort;e.alphasorti=alphasorti;e.setopts=setopts;e.ownProp=ownProp;e.makeAbs=makeAbs;e.finish=finish;e.mark=mark;e.isIgnored=isIgnored;e.childrenIgnored=childrenIgnored;function ownProp(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var n=r(622);var i=r(93);var a=r(681);var o=i.Minimatch;function alphasorti(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}function alphasort(t,e){return t.localeCompare(e)}function setupIgnores(t,e){t.ignore=e.ignore||[];if(!Array.isArray(t.ignore))t.ignore=[t.ignore];if(t.ignore.length){t.ignore=t.ignore.map(ignoreMap)}}function ignoreMap(t){var e=null;if(t.slice(-3)==="/**"){var r=t.replace(/(\/\*\*)+$/,"");e=new o(r,{dot:true})}return{matcher:new o(t,{dot:true}),gmatcher:e}}function setopts(t,e,r){if(!r)r={};if(r.matchBase&&-1===e.indexOf("/")){if(r.noglobstar){throw new Error("base matching requires globstar")}e="**/"+e}t.silent=!!r.silent;t.pattern=e;t.strict=r.strict!==false;t.realpath=!!r.realpath;t.realpathCache=r.realpathCache||Object.create(null);t.follow=!!r.follow;t.dot=!!r.dot;t.mark=!!r.mark;t.nodir=!!r.nodir;if(t.nodir)t.mark=true;t.sync=!!r.sync;t.nounique=!!r.nounique;t.nonull=!!r.nonull;t.nosort=!!r.nosort;t.nocase=!!r.nocase;t.stat=!!r.stat;t.noprocess=!!r.noprocess;t.absolute=!!r.absolute;t.maxLength=r.maxLength||Infinity;t.cache=r.cache||Object.create(null);t.statCache=r.statCache||Object.create(null);t.symlinks=r.symlinks||Object.create(null);setupIgnores(t,r);t.changedCwd=false;var i=process.cwd();if(!ownProp(r,"cwd"))t.cwd=i;else{t.cwd=n.resolve(r.cwd);t.changedCwd=t.cwd!==i}t.root=r.root||n.resolve(t.cwd,"/");t.root=n.resolve(t.root);if(process.platform==="win32")t.root=t.root.replace(/\\/g,"/");t.cwdAbs=a(t.cwd)?t.cwd:makeAbs(t,t.cwd);if(process.platform==="win32")t.cwdAbs=t.cwdAbs.replace(/\\/g,"/");t.nomount=!!r.nomount;r.nonegate=true;r.nocomment=true;t.minimatch=new o(e,r);t.options=t.minimatch.options}function finish(t){var e=t.nounique;var r=e?[]:Object.create(null);for(var n=0,i=t.matches.length;n1024*64){throw new TypeError("pattern is too long")}var r=this.options;if(!r.noglobstar&&t==="**")return i;if(t==="")return"";var n="";var a=!!r.nocase;var u=false;var f=[];var h=[];var d;var m=false;var v=-1;var g=-1;var y=t.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var E=this;function clearStateChar(){if(d){switch(d){case"*":n+=c;a=true;break;case"?":n+=s;a=true;break;default:n+="\\"+d;break}E.debug("clearStateChar %j %j",d,n);d=false}}for(var b=0,_=t.length,S;b<_&&(S=t.charAt(b));b++){this.debug("%s\t%s %s %j",t,b,n,S);if(u&&l[S]){n+="\\"+S;u=false;continue}switch(S){case"/":return false;case"\\":clearStateChar();u=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",t,b,n,S);if(m){this.debug(" in class");if(S==="!"&&b===g+1)S="^";n+=S;continue}E.debug("call clearStateChar %j",d);clearStateChar();d=S;if(r.noext)clearStateChar();continue;case"(":if(m){n+="(";continue}if(!d){n+="\\(";continue}f.push({type:d,start:b-1,reStart:n.length,open:o[d].open,close:o[d].close});n+=d==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",d,n);d=false;continue;case")":if(m||!f.length){n+="\\)";continue}clearStateChar();a=true;var w=f.pop();n+=w.close;if(w.type==="!"){h.push(w)}w.reEnd=n.length;continue;case"|":if(m||!f.length||u){n+="\\|";u=false;continue}clearStateChar();n+="|";continue;case"[":clearStateChar();if(m){n+="\\"+S;continue}m=true;g=b;v=n.length;n+=S;continue;case"]":if(b===g+1||!m){n+="\\"+S;u=false;continue}if(m){var O=t.substring(g+1,b);try{RegExp("["+O+"]")}catch(t){var T=this.parse(O,p);n=n.substr(0,v)+"\\["+T[0]+"\\]";a=a||T[1];m=false;continue}}a=true;m=false;n+=S;continue;default:clearStateChar();if(u){u=false}else if(l[S]&&!(S==="^"&&m)){n+="\\"}n+=S}}if(m){O=t.substr(g+1);T=this.parse(O,p);n=n.substr(0,v)+"\\["+T[0];a=a||T[1]}for(w=f.pop();w;w=f.pop()){var R=n.slice(w.reStart+w.open.length);this.debug("setting tail",n,w);R=R.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(t,e,r){if(!r){r="\\"}return e+e+r+"|"});this.debug("tail=%j\n %s",R,R,w,n);var I=w.type==="*"?c:w.type==="?"?s:"\\"+w.type;a=true;n=n.slice(0,w.reStart)+I+"\\("+R}clearStateChar();if(u){n+="\\\\"}var A=false;switch(n.charAt(0)){case".":case"[":case"(":A=true}for(var k=h.length-1;k>-1;k--){var G=h[k];var C=n.slice(0,G.reStart);var M=n.slice(G.reStart,G.reEnd-8);var P=n.slice(G.reEnd-8,G.reEnd);var N=n.slice(G.reEnd);P+=N;var j=C.split("(").length-1;var x=N;for(b=0;b=0;o--){a=t[o];if(a)break}for(o=0;o>> no match, partial?",t,l,e,h);if(l===s)return true}return false}var d;if(typeof u==="string"){if(n.nocase){d=f.toLowerCase()===u.toLowerCase()}else{d=f===u}this.debug("string match",u,f,d)}else{d=f.match(u);this.debug("pattern match",u,f,d)}if(!d)return false}if(a===s&&o===c){return true}else if(a===s){return r}else if(o===c){var m=a===s-1&&t[a]==="";return m}throw new Error("wtf?")};function globUnescape(t){return t.replace(/\\(.)/g,"$1")}function regExpEscape(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},102:function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)if(Object.hasOwnProperty.call(t,r))e[r]=t[r];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const i=n(r(747));const a=n(r(87));const o=r(82);function issueCommand(t,e){const r=process.env[`GITHUB_${t}`];if(!r){throw new Error(`Unable to find environment variable for file command ${t}`)}if(!i.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}i.appendFileSync(r,`${o.toCommandValue(e)}${a.EOL}`,{encoding:"utf8"})}e.issueCommand=issueCommand},104:function(t,e,r){const n=r(470);try{r(676)()}catch(t){n.setFailed(`Action failed with error ${t}`)}},117:function(t,e,r){var n=r(622);var i=process.platform==="win32";var a=r(747);var o=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function rethrow(){var t;if(o){var e=new Error;t=debugCallback}else t=missingCallback;return t;function debugCallback(t){if(t){e.message=t.message;t=e;missingCallback(t)}}function missingCallback(t){if(t){if(process.throwDeprecation)throw t;else if(!process.noDeprecation){var e="fs: missing callback "+(t.stack||t.message);if(process.traceDeprecation)console.trace(e);else console.error(e)}}}}function maybeCallback(t){return typeof t==="function"?t:rethrow()}var s=n.normalize;if(i){var c=/(.*?)(?:[\/\\]+|$)/g}else{var c=/(.*?)(?:[\/]+|$)/g}if(i){var u=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{var u=/^[\/]*/}e.realpathSync=function realpathSync(t,e){t=n.resolve(t);if(e&&Object.prototype.hasOwnProperty.call(e,t)){return e[t]}var r=t,o={},s={};var f;var l;var h;var p;start();function start(){var e=u.exec(t);f=e[0].length;l=e[0];h=e[0];p="";if(i&&!s[h]){a.lstatSync(h);s[h]=true}}while(f=t.length){if(e)e[o]=t;return r(null,t)}c.lastIndex=l;var n=c.exec(t);d=h;h+=n[0];p=d+n[1];l=c.lastIndex;if(f[p]||e&&e[p]===p){return process.nextTick(LOOP)}if(e&&Object.prototype.hasOwnProperty.call(e,p)){return gotResolvedLink(e[p])}return a.lstat(p,gotStat)}function gotStat(t,n){if(t)return r(t);if(!n.isSymbolicLink()){f[p]=true;if(e)e[p]=p;return process.nextTick(LOOP)}if(!i){var o=n.dev.toString(32)+":"+n.ino.toString(32);if(s.hasOwnProperty(o)){return gotTarget(null,s[o],p)}}a.stat(p,function(t){if(t)return r(t);a.readlink(p,function(t,e){if(!i)s[o]=e;gotTarget(t,e)})})}function gotTarget(t,i,a){if(t)return r(t);var o=n.resolve(d,i);if(e)e[a]=o;gotResolvedLink(o)}function gotResolvedLink(e){t=n.resolve(e,t.slice(l));start()}}},129:function(t){t.exports=require("child_process")},142:function(t,e,r){"use strict";const{spawnSync:n}=r(129);const i=t=>typeof t==="string";t.exports=((t,e={})=>{if(!i(t)){e=t||{};t=run()}const{added:r,modified:n,untracked:a,deleted:o,renamed:s}=e;const c=parse(t);const u=pick(c,{added:r,modified:n,untracked:a,deleted:o,renamed:s});const f=getNames(u);return f});const a=({name:t})=>t;t.exports.getNames=getNames;function getNames(t){return t.map(a)}t.exports.run=run;function run(){const t=n("git",["status","--porcelain"]);return t.stdout.toString()}t.exports.parse=parse;function parse(t){const e=[];const r=t.split("\n").filter(Boolean);for(const t of r){const{name:r,mode:n}=parseLine(t);e.push({name:r,mode:n})}return e}const o="?";const s="R";const c="-> ";const u=t=>{const e=t.indexOf(c);const r=e+c.length;return t.slice(r)};function parseLine(t){const[e]=t;if(e===o)return{name:t.replace("?? ",""),mode:o};if(e===s)return{name:u(t),mode:s};const[r]=t.match(/^[\sA-Z]{1,}\s/,"");const n=t.replace(r,"");return{name:n,mode:r}}const f=({mode:t})=>/M/.test(t);const l=({mode:t})=>/A/.test(t);const h=({mode:t})=>/R/.test(t);const p=({mode:t})=>/D/.test(t);const d=({mode:t})=>/\?/.test(t);const m=({added:t,modified:e,untracked:r,deleted:n,renamed:i})=>a=>{let o=false;if(t)o=o||l(a);if(e)o=o||f(a);if(r)o=o||d(a);if(n)o=o||p(a);if(i)o=o||h(a);return o};t.exports.pick=pick;function pick(t,{added:e,modified:r,deleted:n,untracked:i,renamed:a}){return t.filter(m({added:e,modified:r,untracked:i,deleted:n,renamed:a}))}},245:function(t,e,r){t.exports=globSync;globSync.GlobSync=GlobSync;var n=r(747);var i=r(302);var a=r(93);var o=a.Minimatch;var s=r(402).Glob;var c=r(669);var u=r(622);var f=r(357);var l=r(681);var h=r(856);var p=h.alphasort;var d=h.alphasorti;var m=h.setopts;var v=h.ownProp;var g=h.childrenIgnored;var y=h.isIgnored;function globSync(t,e){if(typeof e==="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(t,e).found}function GlobSync(t,e){if(!t)throw new Error("must provide pattern");if(typeof e==="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(t,e);m(this,t,e);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;nthis.maxLength)return false;if(!this.stat&&v(this.cache,e)){var i=this.cache[e];if(Array.isArray(i))i="DIR";if(!r||i==="DIR")return i;if(r&&i==="FILE")return false}var a;var o=this.statCache[e];if(!o){var s;try{s=n.lstatSync(e)}catch(t){if(t&&(t.code==="ENOENT"||t.code==="ENOTDIR")){this.statCache[e]=false;return false}}if(s&&s.isSymbolicLink()){try{o=n.statSync(e)}catch(t){o=s}}else{o=s}}this.statCache[e]=o;var i=true;if(o)i=o.isDirectory()?"DIR":"FILE";this.cache[e]=this.cache[e]||i;if(r&&i==="FILE")return false;return i};GlobSync.prototype._mark=function(t){return h.mark(this,t)};GlobSync.prototype._makeAbs=function(t){return h.makeAbs(this,t)}},302:function(t,e,r){t.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var n=r(747);var i=n.realpath;var a=n.realpathSync;var o=process.version;var s=/^v[0-5]\./.test(o);var c=r(117);function newError(t){return t&&t.syscall==="realpath"&&(t.code==="ELOOP"||t.code==="ENOMEM"||t.code==="ENAMETOOLONG")}function realpath(t,e,r){if(s){return i(t,e,r)}if(typeof e==="function"){r=e;e=null}i(t,e,function(n,i){if(newError(n)){c.realpath(t,e,r)}else{r(n,i)}})}function realpathSync(t,e){if(s){return a(t,e)}try{return a(t,e)}catch(r){if(newError(r)){return c.realpathSync(t,e)}else{throw r}}}function monkeypatch(){n.realpath=realpath;n.realpathSync=realpathSync}function unmonkeypatch(){n.realpath=i;n.realpathSync=a}},306:function(t,e,r){var n=r(896);var i=r(621);t.exports=expandTop;var a="\0SLASH"+Math.random()+"\0";var o="\0OPEN"+Math.random()+"\0";var s="\0CLOSE"+Math.random()+"\0";var c="\0COMMA"+Math.random()+"\0";var u="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(a).split("\\{").join(o).split("\\}").join(s).split("\\,").join(c).split("\\.").join(u)}function unescapeBraces(t){return t.split(a).join("\\").split(o).join("{").split(s).join("}").split(c).join(",").split(u).join(".")}function parseCommaParts(t){if(!t)return[""];var e=[];var r=i("{","}",t);if(!r)return t.split(",");var n=r.pre;var a=r.body;var o=r.post;var s=n.split(",");s[s.length-1]+="{"+a+"}";var c=parseCommaParts(o);if(o.length){s[s.length-1]+=c.shift();s.push.apply(s,c)}e.push.apply(e,s);return e}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function identity(t){return t}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,e){return t<=e}function gte(t,e){return t>=e}function expand(t,e){var r=[];var a=i("{","}",t);if(!a||/\$$/.test(a.pre))return[t];var o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body);var c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body);var u=o||c;var f=a.body.indexOf(",")>=0;if(!u&&!f){if(a.post.match(/,.*\}/)){t=a.pre+"{"+a.body+s+a.post;return expand(t)}return[t]}var l;if(u){l=a.body.split(/\.\./)}else{l=parseCommaParts(a.body);if(l.length===1){l=expand(l[0],false).map(embrace);if(l.length===1){var h=a.post.length?expand(a.post,false):[""];return h.map(function(t){return a.pre+l[0]+t})}}}var p=a.pre;var h=a.post.length?expand(a.post,false):[""];var d;if(u){var m=numeric(l[0]);var v=numeric(l[1]);var g=Math.max(l[0].length,l[1].length);var y=l.length==3?Math.abs(numeric(l[2])):1;var E=lte;var b=v0){var T=new Array(O+1).join("0");if(S<0)w="-"+T+w.slice(1);else w=T+w}}}d.push(w)}}else{d=n(l,function(t){return expand(t,false)})}for(var R=0;R1)return true;for(var a=0;athis.maxLength)return e();if(!this.stat&&g(this.cache,r)){var a=this.cache[r];if(Array.isArray(a))a="DIR";if(!i||a==="DIR")return e(null,a);if(i&&a==="FILE")return e()}var o;var s=this.statCache[r];if(s!==undefined){if(s===false)return e(null,s);else{var c=s.isDirectory()?"DIR":"FILE";if(i&&c==="FILE")return e();else return e(null,c,s)}}var u=this;var f=y("stat\0"+r,lstatcb_);if(f)n.lstat(r,f);function lstatcb_(i,a){if(a&&a.isSymbolicLink()){return n.stat(r,function(n,i){if(n)u._stat2(t,r,null,a,e);else u._stat2(t,r,n,i,e)})}else{u._stat2(t,r,i,a,e)}}};Glob.prototype._stat2=function(t,e,r,n,i){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[e]=false;return i()}var a=t.slice(-1)==="/";this.statCache[e]=n;if(e.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,false,n);var o=true;if(n)o=n.isDirectory()?"DIR":"FILE";this.cache[e]=this.cache[e]||o;if(a&&o==="FILE")return i();return i(null,o,n)}},431:function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)if(Object.hasOwnProperty.call(t,r))e[r]=t[r];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const i=n(r(87));const a=r(82);function issueCommand(t,e,r){const n=new Command(t,e,r);process.stdout.write(n.toString()+i.EOL)}e.issueCommand=issueCommand;function issue(t,e=""){issueCommand(t,{},e)}e.issue=issue;const o="::";class Command{constructor(t,e,r){if(!t){t="missing.command"}this.command=t;this.properties=e;this.message=r}toString(){let t=o+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let e=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(e){e=false}else{t+=","}t+=`${r}=${escapeProperty(n)}`}}}}t+=`${o}${escapeData(this.message)}`;return t}}function escapeData(t){return a.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(t){return a.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},450:function(t,e,r){const n=r(747);const i=r(470);const a=r(852)();const o=t=>{return t.split("\n").map(t=>t.trim())};const s={get COMMIT_MESSAGE(){return i.getInput("COMMIT_MESSAGE",{required:false})||`Update file(s) from "%SRC_REPO%"`},DRY_RUN:["1","true"].includes(i.getInput("DRY_RUN",{required:false}).toLowerCase()),FILE_PATTERNS:o(i.getInput("FILE_PATTERNS")).map(t=>new RegExp(t)),GITHUB_TOKEN:i.getInput("GITHUB_TOKEN",{required:true}),GIT_EMAIL:i.getInput("GIT_EMAIL")||`${process.env.GITHUB_ACTOR}@users.noreply.github.com`,GIT_USERNAME:i.getInput("GIT_USERNAME",{required:false})||process.env.GITHUB_ACTOR,SKIP_CLEANUP:["1","true"].includes(i.getInput("SKIP_CLEANUP",{required:false}).toLowerCase()),SKIP_DELETE:["1","true"].includes(i.getInput("SKIP_DELETE",{required:false}).toLowerCase()),SKIP_REPLACE:["1","true"].includes(i.getInput("SKIP_REPLACE",{required:false}).toLowerCase()),SRC_REPO:i.getInput("SRC_REPO",{required:false})||process.env.GITHUB_REPOSITORY,SRC_ROOT:i.getInput("SRC_ROOT",{required:false})||"/",TARGET_REPOS:o(i.getInput("TARGET_REPOS",{required:true})),TARGET_ROOT:i.getInput("TARGET_ROOT",{required:false})||"/",TMPDIR:i.getInput("TEMP_DIR",{required:false})||`tmp-${Date.now().toString()}`};while(n.existsSync(s.TMPDIR)){s.TMPDIR=`tmp-${Date.now().toString()}`;a.info(`TEMP_DIR already exists. Using "${s.TMPDIR}" now.`)}a.info("Context:",{...s,GITHUB_TOKEN:""});t.exports=s},470:function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){function adopt(t){return t instanceof r?t:new r(function(e){e(t)})}return new(r||(r=Promise))(function(r,i){function fulfilled(t){try{step(n.next(t))}catch(t){i(t)}}function rejected(t){try{step(n["throw"](t))}catch(t){i(t)}}function step(t){t.done?r(t.value):adopt(t.value).then(fulfilled,rejected)}step((n=n.apply(t,e||[])).next())})};var i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)if(Object.hasOwnProperty.call(t,r))e[r]=t[r];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const a=r(431);const o=r(102);const s=r(82);const c=i(r(87));const u=i(r(622));var f;(function(t){t[t["Success"]=0]="Success";t[t["Failure"]=1]="Failure"})(f=e.ExitCode||(e.ExitCode={}));function exportVariable(t,e){const r=s.toCommandValue(e);process.env[t]=r;const n=process.env["GITHUB_ENV"]||"";if(n){const e="_GitHubActionsFileCommandDelimeter_";const n=`${t}<<${e}${c.EOL}${r}${c.EOL}${e}`;o.issueCommand("ENV",n)}else{a.issueCommand("set-env",{name:t},r)}}e.exportVariable=exportVariable;function setSecret(t){a.issueCommand("add-mask",{},t)}e.setSecret=setSecret;function addPath(t){const e=process.env["GITHUB_PATH"]||"";if(e){o.issueCommand("PATH",t)}else{a.issueCommand("add-path",{},t)}process.env["PATH"]=`${t}${u.delimiter}${process.env["PATH"]}`}e.addPath=addPath;function getInput(t,e){const r=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!r){throw new Error(`Input required and not supplied: ${t}`)}return r.trim()}e.getInput=getInput;function setOutput(t,e){a.issueCommand("set-output",{name:t},e)}e.setOutput=setOutput;function setCommandEcho(t){a.issue("echo",t?"on":"off")}e.setCommandEcho=setCommandEcho;function setFailed(t){process.exitCode=f.Failure;error(t)}e.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}e.isDebug=isDebug;function debug(t){a.issueCommand("debug",{},t)}e.debug=debug;function error(t){a.issue("error",t instanceof Error?t.toString():t)}e.error=error;function warning(t){a.issue("warning",t instanceof Error?t.toString():t)}e.warning=warning;function info(t){process.stdout.write(t+c.EOL)}e.info=info;function startGroup(t){a.issue("group",t)}e.startGroup=startGroup;function endGroup(){a.issue("endgroup")}e.endGroup=endGroup;function group(t,e){return n(this,void 0,void 0,function*(){startGroup(t);let r;try{r=yield e()}finally{endGroup()}return r})}e.group=group;function saveState(t,e){a.issueCommand("save-state",{name:t},e)}e.saveState=saveState;function getState(t){return process.env[`STATE_${t}`]||""}e.getState=getState},543:function(t,e,r){const n=r(747).promises;const i=r(622);const a=r(50);const o=r(569);const{TMPDIR:s,FILE_PATTERNS:c,DRY_RUN:u,SKIP_DELETE:f,SKIP_REPLACE:l,SRC_REPO:h,SRC_ROOT:p,TARGET_ROOT:d}=r(450);const m=r(852);const v=t=>{const e=m(t);const r=()=>{return t.split(":")[0]};const o=()=>{return t.split(":")[1]||undefined};const v=()=>{return i.join(s,`${r()}${o()===undefined?"":`-${o()}`}`)};const g=()=>t===h?p:d;const y=()=>i.join(v(),g());const E=t=>{return i.relative(y(),t)};const b=e=>e.replace(/\\/g,"/").replace(/^\//,"").replace(new RegExp(`^${s}/${t}${g()}`),"");const _=t=>{e.info("FILE_PATTERNS",c.map(t=>t.toString()));return t.filter(t=>{cleanFile=b(t);const e=c.some(t=>t.test(cleanFile));return e})};const S=async()=>{const t=await a(v(),[".git"]);e.debug("FILES:",JSON.stringify(t.map(b),undefined,2));const r=_(t);e.info("MATCHING FILES:",JSON.stringify(r.map(b),undefined,2));return r};const w=async(t,r)=>{const a=await n.access(r).then(()=>true).catch(()=>false);if(l&&a){e.info("skip copying",t.replace(/\\/g,"/").replace(/^\//,""),"to",r.replace(/\\/g,"/").replace(/^\//,""),"because SKIP_REPLACE = true");return}e.info("copy",t.replace(/\\/g,"/").replace(/^\//,""),"to",r.replace(/\\/g,"/").replace(/^\//,""));if(u){return}await n.mkdir(i.dirname(r),{recursive:true});await n.copyFile(t,r)};const O=async t=>{if(f){e.info("SKIP REMOVING FILES because `SKIP_DELETE` is set to `true`",t.map(t=>`"${t}"`).join(", "))}e.info("REMOVE FILES",t);if(u){return}return Promise.all(t.map(t=>n.unlink(t)))};return{copyFile:w,getFiles:S,getRepoBranch:o,getRepoFilePath:y,getRepoPath:v,getRepoRelativeFilePath:E,getRepoSlug:r,removeFiles:O}};const g=async t=>{new Promise((e,r)=>{o(t,{disableGlob:true},t=>{if(t){return r(t)}e()})})};t.exports={init:v,removeDir:g}},569:function(t,e,r){const n=r(357);const i=r(622);const a=r(747);let o=undefined;try{o=r(402)}catch(t){}const s={nosort:true,silent:true};let c=0;const u=process.platform==="win32";const f=t=>{const e=["unlink","chmod","stat","lstat","rmdir","readdir"];e.forEach(e=>{t[e]=t[e]||a[e];e=e+"Sync";t[e]=t[e]||a[e]});t.maxBusyTries=t.maxBusyTries||3;t.emfileWait=t.emfileWait||1e3;if(t.glob===false){t.disableGlob=true}if(t.disableGlob!==true&&o===undefined){throw Error("glob dependency not found, set `options.disableGlob = true` if intentional")}t.disableGlob=t.disableGlob||false;t.glob=t.glob||s};const l=(t,e,r)=>{if(typeof e==="function"){r=e;e={}}n(t,"rimraf: missing path");n.equal(typeof t,"string","rimraf: path should be a string");n.equal(typeof r,"function","rimraf: callback function required");n(e,"rimraf: invalid options argument provided");n.equal(typeof e,"object","rimraf: options should be object");f(e);let i=0;let a=null;let s=0;const u=t=>{a=a||t;if(--s===0)r(a)};const l=(t,n)=>{if(t)return r(t);s=n.length;if(s===0)return r();n.forEach(t=>{const r=n=>{if(n){if((n.code==="EBUSY"||n.code==="ENOTEMPTY"||n.code==="EPERM")&&ih(t,e,r),i*100)}if(n.code==="EMFILE"&&ch(t,e,r),c++)}if(n.code==="ENOENT")n=null}c=0;u(n)};h(t,e,r)})};if(e.disableGlob||!o.hasMagic(t))return l(null,[t]);e.lstat(t,(r,n)=>{if(!r)return l(null,[t]);o(t,e.glob,l)})};const h=(t,e,r)=>{n(t);n(e);n(typeof r==="function");e.lstat(t,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&u)p(t,e,n,r);if(i&&i.isDirectory())return m(t,e,n,r);e.unlink(t,n=>{if(n){if(n.code==="ENOENT")return r(null);if(n.code==="EPERM")return u?p(t,e,n,r):m(t,e,n,r);if(n.code==="EISDIR")return m(t,e,n,r)}return r(n)})})};const p=(t,e,r,i)=>{n(t);n(e);n(typeof i==="function");e.chmod(t,438,n=>{if(n)i(n.code==="ENOENT"?null:r);else e.stat(t,(n,a)=>{if(n)i(n.code==="ENOENT"?null:r);else if(a.isDirectory())m(t,e,r,i);else e.unlink(t,i)})})};const d=(t,e,r)=>{n(t);n(e);try{e.chmodSync(t,438)}catch(t){if(t.code==="ENOENT")return;else throw r}let i;try{i=e.statSync(t)}catch(t){if(t.code==="ENOENT")return;else throw r}if(i.isDirectory())y(t,e,r);else e.unlinkSync(t)};const m=(t,e,r,i)=>{n(t);n(e);n(typeof i==="function");e.rmdir(t,n=>{if(n&&(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM"))v(t,e,i);else if(n&&n.code==="ENOTDIR")i(r);else i(n)})};const v=(t,e,r)=>{n(t);n(e);n(typeof r==="function");e.readdir(t,(n,a)=>{if(n)return r(n);let o=a.length;if(o===0)return e.rmdir(t,r);let s;a.forEach(n=>{l(i.join(t,n),e,n=>{if(s)return;if(n)return r(s=n);if(--o===0)e.rmdir(t,r)})})})};const g=(t,e)=>{e=e||{};f(e);n(t,"rimraf: missing path");n.equal(typeof t,"string","rimraf: path should be a string");n(e,"rimraf: missing options");n.equal(typeof e,"object","rimraf: options should be object");let r;if(e.disableGlob||!o.hasMagic(t)){r=[t]}else{try{e.lstatSync(t);r=[t]}catch(n){r=o.sync(t,e.glob)}}if(!r.length)return;for(let t=0;t{n(t);n(e);try{e.rmdirSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")E(t,e)}};const E=(t,e)=>{n(t);n(e);e.readdirSync(t).forEach(r=>g(i.join(t,r),e));const r=u?100:1;let a=0;do{let n=true;try{const i=e.rmdirSync(t,e);n=false;return i}finally{if(++a=0&&u>0){n=[];a=r.length;while(f>=0&&!s){if(f==c){n.push(f);c=r.indexOf(t,f+1)}else if(n.length==1){s=[n.pop(),u]}else{i=n.pop();if(i=0?c:u}if(n.length){s=[a,o]}}return s}},622:function(t){t.exports=require("path")},669:function(t){t.exports=require("util")},674:function(t,e,r){var n=r(11);var i=Object.create(null);var a=r(49);t.exports=n(inflight);function inflight(t,e){if(i[t]){i[t].push(e);return null}else{i[t]=[e];return makeres(t)}}function makeres(t){return a(function RES(){var e=i[t];var r=e.length;var n=slice(arguments);try{for(var a=0;ar){e.splice(0,r);process.nextTick(function(){RES.apply(null,n)})}else{delete i[t]}}})}function slice(t){var e=t.length;var r=[];for(var n=0;n{let t;try{const e=c.init(i);const r=h.init(i);await e.clone();const o=await r.getFiles();const s=o.map(t=>r.getRepoRelativeFilePath(t));l(i);await new Promise(t=>setTimeout(t,5e3));await Promise.all(a.map(async t=>{const e=h.init(t);const i=c.init(t);await i.clone();const a=await e.getFiles();const u=a.filter(t=>!s.includes(e.getRepoRelativeFilePath(t)));await Promise.all([e.removeFiles(u),o.map(async t=>e.copyFile(t,n.join(e.getRepoFilePath(),r.getRepoRelativeFilePath(t))))]);await i.commitAll();l(t)}))}catch(e){t=e}l();if(!s){await u(o)}if(t){throw t}};t.exports=p},681:function(t){"use strict";function posix(t){return t.charAt(0)==="/"}function win32(t){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var r=e.exec(t);var n=r[1]||"";var i=Boolean(n&&n.charAt(1)!==":");return Boolean(r[2]||i)}t.exports=process.platform==="win32"?win32:posix;t.exports.posix=posix;t.exports.win32=win32},689:function(t,e,r){try{var n=r(669);if(typeof n.inherits!=="function")throw"";t.exports=n.inherits}catch(e){t.exports=r(315)}},718:function(t,e,r){const{exec:n}=r(129);const{parse:i}=r(142);const{GITHUB_TOKEN:a,SRC_REPO:o,COMMIT_MESSAGE:s,GIT_USERNAME:c,GIT_EMAIL:u,DRY_RUN:f}=r(450);const l=r(543);const h=r(852);const p=(t,e)=>{let r=t;Object.keys(e).forEach(t=>{if(t==="COMMIT_MESSAGE"){return}r=r.replace(new RegExp(`%${t}%`,"g"),e[t])});return r};t.exports={init:t=>{const{getRepoPath:e,getRepoSlug:r,getRepoBranch:d}=l.init(t);const m=h(t);function execCmd(t,e){m.info(`EXEC: "${t}" IN "${e||"./"}"`);return new Promise((r,i)=>{n(t,{cwd:e},function(t,e){m.info(`OUTPUT: "${t}${e}"`);t?i(t):r(e.trim())})})}const v=async()=>{const t=["GIT_LFS_SKIP_SMUDGE=1","git clone","--depth 1",d()===undefined?false:` -b ${d()}`,`https://${a}@github.com/${r()}.git`,e()];return execCmd(t.filter(Boolean).join(" "))};const g=async()=>{const t=await execCmd(`git status --porcelain`,e());return i(t).length!==0};const y=async()=>{if(!await g()){m.info("NO CHANGES DETECTED");return}m.info("CHANGES DETECTED");m.info("COMMIT CHANGES...");const r=p(s,{SRC_REPO:o,TARGET_REPO:t});if(!f){const t=await execCmd([`git config --local user.name "${c}"`,`git config --local user.email "${u}"`,`git add -A`,`git status`,`git commit --message "${r}"`,`git push`].join(" && "),e());if(!t.includes("Update file(s) from")){throw new Error("failed to commit changes")}}m.info("CHANGES COMMITED")};return{clone:v,commitAll:y}}}},747:function(t){t.exports=require("fs")},852:function(t,e,r){const n=r(470);const i=(...t)=>t.map(t=>Array.isArray(t)||Object.prototype.toString.call(t)==="[object Object]"?JSON.stringify(t,undefined,2):t).join(" ");const a={};t.exports=(t=>{a[t]=[];const e=(...e)=>{a[t].push(["debug",i(...e)]);if(!t){u()}};const r=(...e)=>{a[t].push(["error",i(...e)]);n.setFailed(`Action failed with error ${message}`);if(!t){u()}};const o=(...e)=>{a[t].push(["info",i(...e)]);if(!t){u()}};const s=(...e)=>{a[t].push(["warning",i(...e)]);if(!t){u()}};const c=t=>{a[t].forEach(([e,r])=>{n[e](t!=="undefined"?`${t}: ${r}`:r)});a[t]=[]};const u=(e=t)=>{if(!e){Object.keys(a).forEach(t=>{c(t)})}else{c(e)}};return{debug:e,error:r,info:o,print:u,warn:s}})},856:function(t,e,r){e.alphasort=alphasort;e.alphasorti=alphasorti;e.setopts=setopts;e.ownProp=ownProp;e.makeAbs=makeAbs;e.finish=finish;e.mark=mark;e.isIgnored=isIgnored;e.childrenIgnored=childrenIgnored;function ownProp(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var n=r(622);var i=r(93);var a=r(681);var o=i.Minimatch;function alphasorti(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}function alphasort(t,e){return t.localeCompare(e)}function setupIgnores(t,e){t.ignore=e.ignore||[];if(!Array.isArray(t.ignore))t.ignore=[t.ignore];if(t.ignore.length){t.ignore=t.ignore.map(ignoreMap)}}function ignoreMap(t){var e=null;if(t.slice(-3)==="/**"){var r=t.replace(/(\/\*\*)+$/,"");e=new o(r,{dot:true})}return{matcher:new o(t,{dot:true}),gmatcher:e}}function setopts(t,e,r){if(!r)r={};if(r.matchBase&&-1===e.indexOf("/")){if(r.noglobstar){throw new Error("base matching requires globstar")}e="**/"+e}t.silent=!!r.silent;t.pattern=e;t.strict=r.strict!==false;t.realpath=!!r.realpath;t.realpathCache=r.realpathCache||Object.create(null);t.follow=!!r.follow;t.dot=!!r.dot;t.mark=!!r.mark;t.nodir=!!r.nodir;if(t.nodir)t.mark=true;t.sync=!!r.sync;t.nounique=!!r.nounique;t.nonull=!!r.nonull;t.nosort=!!r.nosort;t.nocase=!!r.nocase;t.stat=!!r.stat;t.noprocess=!!r.noprocess;t.absolute=!!r.absolute;t.maxLength=r.maxLength||Infinity;t.cache=r.cache||Object.create(null);t.statCache=r.statCache||Object.create(null);t.symlinks=r.symlinks||Object.create(null);setupIgnores(t,r);t.changedCwd=false;var i=process.cwd();if(!ownProp(r,"cwd"))t.cwd=i;else{t.cwd=n.resolve(r.cwd);t.changedCwd=t.cwd!==i}t.root=r.root||n.resolve(t.cwd,"/");t.root=n.resolve(t.root);if(process.platform==="win32")t.root=t.root.replace(/\\/g,"/");t.cwdAbs=a(t.cwd)?t.cwd:makeAbs(t,t.cwd);if(process.platform==="win32")t.cwdAbs=t.cwdAbs.replace(/\\/g,"/");t.nomount=!!r.nomount;r.nonegate=true;r.nocomment=true;t.minimatch=new o(e,r);t.options=t.minimatch.options}function finish(t){var e=t.nounique;var r=e?[]:Object.create(null);for(var n=0,i=t.matches.length;n