module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t){e.exports=require("assert")},function(e,t){e.exports=require("child_process")},function(e,t){e.exports=require("crypto")},function(e,t){e.exports=require("events")},function(e,t){e.exports=require("fs")},function(e,t){e.exports=require("http")},function(e,t){e.exports=require("https")},function(e,t){e.exports=require("net")},function(e,t){e.exports=require("os")},function(e,t){e.exports=require("path")},function(e,t){e.exports=require("process")},function(e,t){e.exports=require("tls")},function(e,t){e.exports=require("url")},function(e,t){e.exports=require("util")},function(e,t){e.exports=require("zlib")},,function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/tasks/gitversion/execute.ts")}({"./node_modules/azure-pipelines-task-lib sync recursive": /*!****************************************************!*\ !*** ./node_modules/azure-pipelines-task-lib sync ***! \****************************************************/ /*! no static exports found */function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="./node_modules/azure-pipelines-task-lib sync recursive"},"./node_modules/azure-pipelines-task-lib/internal.js": /*!***********************************************************!*\ !*** ./node_modules/azure-pipelines-task-lib/internal.js ***! \***********************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! fs */"fs"),i=n(/*! path */"path"),o=n(/*! os */"os"),s=n(/*! minimatch */"./node_modules/minimatch/minimatch.js"),a=n(/*! util */"util"),u=n(/*! ./taskcommand */"./node_modules/azure-pipelines-task-lib/taskcommand.js"),c=n(/*! ./vault */"./node_modules/azure-pipelines-task-lib/vault.js"),l=n(/*! semver */"./node_modules/semver/semver.js"),d=n(/*! crypto */"crypto");function p(e,t){return e.slice(0,t.length)==t}function f(e,t){return e.slice(-t.length)==t}t._knownVariableMap={},l.lt(process.versions.node,"4.2.0")&&this.warning("Tasks require a new agent. Upgrade your agent or node to 4.2.0 or later"),t._startsWith=p,t._endsWith=f;var h=process.stdout;process.stderr;function g(e){h.write(e+o.EOL)}t._writeLine=g,t._setStdStream=function(e){h=e},t._setErrStream=function(e){e};var y={},m={},v=!1,_="en-US";function b(e){var t;if(O(e)){var n=r.readFileSync(e,"utf8").toString();0==n.indexOf("\ufeff")&&(n=n.slice(1));try{t=JSON.parse(n)}catch(e){A("unable to parse resjson with err: "+e.message)}}else A(".resjson file not found: "+e);return t}function w(e,t){var n={};if(O(e)){var o=b(e);if(o&&o.hasOwnProperty("messages")){var s,a=i.join(i.dirname(e),"Strings","resources.resjson"),u=t.toUpperCase(),c=[];try{c=r.readdirSync(a)}catch(e){}for(var l=0;l0?a.format.apply(this,[t].concat(n)):t}function E(e){var n,r,i=j(e);return t._knownVariableMap.hasOwnProperty(i)&&(r=t._knownVariableMap[i]),r&&r.secret?n=t._vault.retrieveSecret("SECRET_"+i):(n=process.env[i])||"AGENT.JOBSTATUS"!=e.toUpperCase()||(n=process.env["agent.jobstatus"]),A(e+"="+n),n}function j(e){if(!e)throw new Error(S("LIB_ParameterIsRequired","name"));return e.replace(/\./g,"_").replace(/ /g,"_").toUpperCase()}function x(e,t,n){g(new u.TaskCommand(e,t,n).toString())}function T(e){x("task.issue",{type:"warning"},e)}function A(e){x("task.debug",null,e)}function O(e){var t=!1;try{t=!(!e||null==r.statSync(e))}catch(e){if(!e||"ENOENT"!==e.code)throw e;t=!1}return t}function k(e,t){if(A("check path : "+e),!O(e))throw new Error(S("LIB_PathNotFound",t,e))}function P(e,t){try{if((d=r.statSync(e)).isFile())if("win32"==process.platform){var n=i.basename(e),o=n.lastIndexOf(".");if(o>=0){var s=n.substr(o).toUpperCase();if(t.some((function(e){return e.toUpperCase()==s})))return e}}else if(R(d))return e}catch(t){"ENOENT"!=t.code&&A("Unexpected error attempting to determine if executable file exists '"+e+"': "+t)}for(var a=e,u=0,c=t;u0||(8&e.mode)>0&&e.gid===process.getgid()||(64&e.mode)>0&&e.uid===process.getuid()}function C(e){return{debug:e.debug,nobrace:e.nobrace,noglobstar:e.noglobstar,dot:e.dot,noext:e.noext,nocase:e.nocase,nonull:e.nonull,matchBase:e.matchBase,nocomment:e.nocomment,nonegate:e.nonegate,flipNegate:e.flipNegate}}function N(e,t){if(!e)throw new Error('ensurePatternRooted() parameter "root" cannot be empty');if(!t)throw new Error('ensurePatternRooted() parameter "p" cannot be empty');return D(t)?t:(e=B(e),I(e=("win32"==process.platform?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^\/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]").replace(/\+\(/g,"[+](").replace(/@\(/g,"[@](").replace(/!\(/g,"[!]("),t))}function I(e,t){if(!e)throw new Error('ensureRooted() parameter "root" cannot be empty');if(!t)throw new Error('ensureRooted() parameter "p" cannot be empty');return D(t)?t:"win32"==process.platform&&e.match(/^[A-Z]:$/i)?e+t:(f(e,"/")||"win32"==process.platform&&f(e,"\\")||(e+=i.sep),e+t)}function M(e){if(!e)return"";if(e=B(e),"win32"==process.platform){if(/^[A-Z]:\\?[^\\]+$/i.test(e))return"\\"==e.charAt(2)?e.substring(0,3):e.substring(0,2);if(/^[A-Z]:\\?$/i.test(e))return"";var t=e.lastIndexOf("\\");return t<0?"":"\\"==e?"":0==t?"\\":/^\\\\[^\\]+(\\[^\\]*)?$/.test(e)?"":e.substring(0,t)}return e.indexOf("/")<0?"":"/"==e?"":f(e,"/")?e.substring(0,e.length-1):i.dirname(e)}function D(e){if(!(e=B(e)))throw new Error('isRooted() parameter "p" cannot be empty');return"win32"==process.platform?p(e,"\\")||/^[A-Z]:/i.test(e):p(e,"/")}function B(e){return e=e||"","win32"==process.platform?(e=e.replace(/\//g,"\\"),(/^\\\\+[^\\]/.test(e)?"\\":"")+e.replace(/\\\\+/g,"\\")):e.replace(/\/\/+/g,"/")}function F(e,t){if(t){var n=d.randomBytes(256),o=d.createCipher("aes-256-ctr",n),s=o.update(t,"utf8","hex");s+=o.final("hex");var a=i.join(E("Agent.TempDirectory")||E("agent.workFolder")||process.cwd(),e);return r.writeFileSync(a,n.toString("base64"),{encoding:"utf8"}),new Buffer(a).toString("base64")+":"+new Buffer(s).toString("base64")}}t._setResourcePath=function(e){if(process.env.TASKLIB_INPROC_UNITS&&(m={},v=!1,y={},_="en-US"),m[e])T(S("LIB_ResourceFileAlreadySet",e));else{k(e,"resource file path"),m[e]=e,A("adding resource file: "+e);var t=w(e,_=E("system.culture")||_);for(var n in t)y[n]=t[n]}},t._loc=S,t._getVariable=E,t._getVariableKey=j,t._command=x,t._warning=T,t._error=function(e){x("task.issue",{type:"error"},e)},t._debug=A,t._exist=O,t._checkPath=k,t._which=function e(t,n){if(!t)throw new Error("parameter 'tool' is required");if(n){var r=e(t,!1);if(r)return r;throw"win32"==process.platform?new Error(S("LIB_WhichNotFound_Win",t)):new Error(S("LIB_WhichNotFound_Linux",t))}A("which '"+t+"'");try{var o=[];if("win32"==process.platform&&process.env.PATHEXT)for(var s=0,a=process.env.PATHEXT.split(i.delimiter);s=0||"win32"==process.platform&&t.indexOf("\\")>=0)return A("not found"),"";var c=[];if(process.env.PATH)for(var l=0,d=process.env.PATH.split(i.delimiter);l0){var t=E("Agent.ProxyUsername"),n=E("Agent.ProxyPassword"),r=E("Agent.ProxyBypassList");global._vsts_task_lib_proxy_url=e,global._vsts_task_lib_proxy_username=t,global._vsts_task_lib_proxy_bypass=r,global._vsts_task_lib_proxy_password=F("proxy",n||""),A("expose agent proxy configuration."),global._vsts_task_lib_proxy=!0}},t._exposeCertSettings=function(){var e=E("Agent.CAInfo");e&&(global._vsts_task_lib_cert_ca=e);var t=E("Agent.ClientCert");if(t){var n=E("Agent.ClientCertKey"),r=E("Agent.ClientCertArchive"),i=E("Agent.ClientCertPassword");global._vsts_task_lib_cert_clientcert=t,global._vsts_task_lib_cert_key=n,global._vsts_task_lib_cert_archive=r,global._vsts_task_lib_cert_passphrase=F("cert",i||"")}(e||t)&&(A("expose agent certificate configuration."),global._vsts_task_lib_cert=!0);var o=E("Agent.SkipCertValidation")||"false";o&&(global._vsts_task_lib_skip_cert_validation="TRUE"===o.toUpperCase())}},"./node_modules/azure-pipelines-task-lib/task.js": /*!*******************************************************!*\ !*** ./node_modules/azure-pipelines-task-lib/task.js ***! \*******************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i,o,s,a,u,c=n(/*! shelljs */"./node_modules/shelljs/shell.js"),l=n(/*! child_process */"child_process"),d=n(/*! fs */"fs"),p=n(/*! path */"path"),f=n(/*! os */"os"),h=n(/*! minimatch */"./node_modules/minimatch/minimatch.js"),g=n(/*! ./internal */"./node_modules/azure-pipelines-task-lib/internal.js"),y=n(/*! ./taskcommand */"./node_modules/azure-pipelines-task-lib/taskcommand.js"),m=n(/*! ./toolrunner */"./node_modules/azure-pipelines-task-lib/toolrunner.js"),v=n(/*! semver */"./node_modules/semver/semver.js");function _(e,n,i){t.debug("task result: "+r[e]),e==r.Failed&&n?t.error(n):e==r.SucceededWithIssues&&n&&t.warning(n);var o={result:r[e]};i&&(o.done="true"),t.command("task.complete",o,n)}function b(e){if(v.lt(e,"2.104.1"))throw new Error("assertAgent() requires the parameter to be 2.104.1 or higher");var n=t.getVariable("Agent.Version");if(n&&v.lt(n,e))throw new Error("Agent version "+e+" or higher is required")}function w(e,n){var r=g._vault.retrieveSecret("INPUT_"+g._getVariableKey(e));if(r&&(r=r.trim()),n&&!r)throw new Error(t.loc("LIB_InputRequired",e));return t.debug(e+"="+r),r}function S(e,n){var r=c.error();if(r){t.debug(e+" failed");var i=t.loc("LIB_OperationFailed",e,r);if(t.debug(i),!n)throw new Error(i)}}function E(){switch(process.platform){case"win32":return u.Windows;case"darwin":return u.MacOS;case"linux":return u.Linux;default:throw Error(t.loc("LIB_PlatformNotSupported",process.platform))}}function j(e,n){if(!e)return t.debug("no path specified"),[];e=p.normalize(e),t.debug("findPath: '"+e+"'"),T(n=n||{allowBrokenSymbolicLinks:!1,followSpecifiedSymbolicLink:!0,followSymbolicLinks:!0});try{d.lstatSync(e)}catch(e){if("ENOENT"==e.code)return t.debug("0 results"),[];throw e}try{for(var r=[],i=[new x(e,1)],o=[],s=function(){var e=i.pop();r.push(e.path);var s=void 0;if(n.followSymbolicLinks)try{s=d.statSync(e.path)}catch(r){if("ENOENT"!=r.code||!n.allowBrokenSymbolicLinks)throw r;s=d.lstatSync(e.path),t.debug(" "+e.path+" (broken symlink)")}else if(n.followSpecifiedSymbolicLink&&1==r.length)try{s=d.statSync(e.path)}catch(r){if("ENOENT"!=r.code||!n.allowBrokenSymbolicLinks)throw r;s=d.lstatSync(e.path),t.debug(" "+e.path+" (broken symlink)")}else s=d.lstatSync(e.path);if(s.isDirectory()){if(t.debug(" "+e.path+" (directory)"),n.followSymbolicLinks){for(var a=d.realpathSync(e.path);o.length>=e.level;)o.pop();if(o.some((function(e){return e==a})))return t.debug(" cycle detected"),"continue";o.push(a)}for(var u=e.level+1,c=d.readdirSync(e.path).map((function(t){return new x(p.join(e.path,t),u)})),l=c.length-1;l>=0;l--)i.push(c[l])}else t.debug(" "+e.path+" (file)")};i.length;)s();return t.debug(r.length+" results"),r}catch(e){throw new Error(t.loc("LIB_OperationFailed","find",e.message))}}!function(e){e[e.Succeeded=0]="Succeeded",e[e.SucceededWithIssues=1]="SucceededWithIssues",e[e.Failed=2]="Failed",e[e.Cancelled=3]="Cancelled",e[e.Skipped=4]="Skipped"}(r=t.TaskResult||(t.TaskResult={})),function(e){e[e.Unknown=0]="Unknown",e[e.Initialized=1]="Initialized",e[e.InProgress=2]="InProgress",e[e.Completed=3]="Completed"}(i=t.TaskState||(t.TaskState={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning"}(o=t.IssueType||(t.IssueType={})),function(e){e[e.Container=0]="Container",e[e.FilePath=1]="FilePath",e[e.VersionControl=2]="VersionControl",e[e.GitRef=3]="GitRef",e[e.TfvcLabel=4]="TfvcLabel"}(s=t.ArtifactType||(t.ArtifactType={})),function(e){e[e.AuthParameter=0]="AuthParameter",e[e.DataParameter=1]="DataParameter",e[e.Url=2]="Url"}(a=t.FieldType||(t.FieldType={})),function(e){e[e.Windows=0]="Windows",e[e.MacOS=1]="MacOS",e[e.Linux=2]="Linux"}(u=t.Platform||(t.Platform={})),t.setStdStream=g._setStdStream,t.setErrStream=g._setErrStream,t.setResult=_,process.on("uncaughtException",(function(e){_(r.Failed,t.loc("LIB_UnhandledEx",e.message))})),t.setResourcePath=g._setResourcePath,t.loc=g._loc,t.getVariable=g._getVariable,t.assertAgent=b,t.getVariables=function(){return Object.keys(g._knownVariableMap).map((function(e){var n=g._knownVariableMap[e];return{name:n.name,value:t.getVariable(n.name),secret:n.secret}}))},t.setVariable=function(e,n,r){void 0===r&&(r=!1);var i=g._getVariableKey(e);g._knownVariableMap.hasOwnProperty(i)&&(r=r||g._knownVariableMap[i].secret);var o=n||"";if(t.debug("set "+e+"="+(r&&o?"********":o)),r){if(o&&o.match(/\r|\n/)&&"TRUE"!=(""+process.env.SYSTEM_UNSAFEALLOWMULTILINESECRET).toUpperCase())throw new Error(t.loc("LIB_MultilineSecret"));g._vault.storeSecret("SECRET_"+i,o),delete process.env[i]}else process.env[i]=o;g._knownVariableMap[i]={name:e,secret:r},t.command("task.setvariable",{variable:e||"",issecret:(r||!1).toString()},o)},t.setSecret=function(e){if(e){if(e.match(/\r|\n/)&&"TRUE"!==(""+process.env.SYSTEM_UNSAFEALLOWMULTILINESECRET).toUpperCase())throw new Error(t.loc("LIB_MultilineSecret"));t.command("task.setsecret",{},e)}},t.getInput=w,t.getBoolInput=function(e,t){return"TRUE"==(w(e,t)||"").toUpperCase()},t.getDelimitedInput=function(e,t,n){var r=w(e,n);if(!r)return[];var i=[];return r.split(t).forEach((function(e){e&&i.push(e)})),i},t.filePathSupplied=function(e){var n=this.resolve(this.getPathInput(e)||"")!==this.resolve(t.getVariable("build.sourcesDirectory")||t.getVariable("system.defaultWorkingDirectory")||"");return t.debug(e+"path supplied :"+n),n},t.getPathInput=function(e,n,r){var i=w(e,n);return i&&r&&t.checkPath(i,e),i},t.getEndpointUrl=function(e,n){var r=process.env["ENDPOINT_URL_"+e];if(!n&&!r)throw new Error(t.loc("LIB_EndpointNotExist",e));return t.debug(e+"="+r),r},t.getEndpointDataParameter=function(e,n,r){var i=process.env["ENDPOINT_DATA_"+e+"_"+n.toUpperCase()];if(!r&&!i)throw new Error(t.loc("LIB_EndpointDataNotExist",e,n));return t.debug(e+" data "+n+" = "+i),i},t.getEndpointAuthorizationScheme=function(e,n){var r=g._vault.retrieveSecret("ENDPOINT_AUTH_SCHEME_"+e);if(!n&&!r)throw new Error(t.loc("LIB_EndpointAuthNotExist",e));return t.debug(e+" auth scheme = "+r),r},t.getEndpointAuthorizationParameter=function(e,n,r){var i=g._vault.retrieveSecret("ENDPOINT_AUTH_PARAMETER_"+e+"_"+n.toUpperCase());if(!r&&!i)throw new Error(t.loc("LIB_EndpointAuthNotExist",e));return t.debug(e+" auth param "+n+" = "+i),i},t.getEndpointAuthorization=function(e,n){var i,o=g._vault.retrieveSecret("ENDPOINT_AUTH_"+e);n||o||_(r.Failed,t.loc("LIB_EndpointAuthNotExist",e)),t.debug(e+" exists "+(null!==o));try{o&&(i=JSON.parse(o))}catch(e){throw new Error(t.loc("LIB_InvalidEndpointAuth",o))}return i},t.getSecureFileName=function(e){var n=process.env["SECUREFILE_NAME_"+e];return t.debug("secure file name for id "+e+" = "+n),n},t.getSecureFileTicket=function(e){var n=g._vault.retrieveSecret("SECUREFILE_TICKET_"+e);return t.debug("secure file ticket for id "+e+" = "+n),n},t.getTaskVariable=function(e){b("2.115.0");var n=g._vault.retrieveSecret("VSTS_TASKVARIABLE_"+g._getVariableKey(e));return n&&(n=n.trim()),t.debug("task variable: "+e+"="+n),n},t.setTaskVariable=function(e,n,r){void 0===r&&(r=!1),b("2.115.0");var i=g._getVariableKey(e),o=n||"";t.debug("set task variable: "+e+"="+(r&&o?"********":o)),g._vault.storeSecret("VSTS_TASKVARIABLE_"+i,o),delete process.env[i],t.command("task.settaskvariable",{variable:e||"",issecret:(r||!1).toString()},o)},t.command=g._command,t.warning=g._warning,t.error=g._error,t.debug=g._debug,t.stats=function(e){return d.statSync(e)},t.exist=g._exist,t.writeFile=function(e,t,n){"string"==typeof n?d.writeFileSync(e,t,{encoding:n}):d.writeFileSync(e,t,n)},t.osType=function(){return f.type()},t.getPlatform=E,t.cwd=function(){return process.cwd()},t.checkPath=g._checkPath,t.cd=function(e){e&&(c.cd(e),S("cd"))},t.pushd=function(e){c.pushd(e),S("pushd")},t.popd=function(){c.popd(),S("popd")},t.mkdirP=function(e){if(!e)throw new Error(t.loc("LIB_ParameterIsRequired","p"));for(var n=[],r=e;;){if(n.length>=(process.env.TASKLIB_TEST_MKDIRP_FAILSAFE||1e3))return t.debug("loop is out of control"),void d.mkdirSync(e);t.debug("testing directory '"+r+"'");var i=void 0;try{i=d.statSync(r)}catch(i){if("ENOENT"==i.code){var o=p.dirname(r);if(r==o)throw new Error(t.loc("LIB_MkdirFailedInvalidDriveRoot",e,r));n.push(r),r=o;continue}throw"UNKNOWN"==i.code?new Error(t.loc("LIB_MkdirFailedInvalidShare",e,r)):i}if(!i.isDirectory())throw new Error(t.loc("LIB_MkdirFailedFileExists",e,r));break}for(;n.length;){var s=n.pop();t.debug("mkdir '"+s+"'");try{d.mkdirSync(s)}catch(n){throw new Error(t.loc("LIB_MkdirFailed",e,n.message))}}},t.resolve=function(){for(var e=[],n=0;n=0?o:s,s>=0?s:o);t=g._getDirectoryName(e.substring(0,a))}if(!t)return"continue";var u=g._legacyFindFiles_convertPatternToRegExp(e);j(t,{followSymbolicLinks:!0}).filter((function(e){if(r&&i)return!0;var t=d.statSync(e).isDirectory();return r&&!t||i&&t})).forEach((function(e){var t="win32"==process.platform?e.replace(/\\/g,"/"):e,r=t+"/",o=!1;if(u.test(t)||i&&u.test(r)){o=!0;for(var s=0,a=n;s=0)&&(b=g._ensureRooted(r,b),t.debug("rooted pattern: '"+b+"'")),p){t.debug("applying include pattern against original list");var w=h.match(e,b,l);t.debug(w.length+" matches");for(var S=0,E=w;S0){var r=t.getVariable("Agent.ProxyUsername"),i=t.getVariable("Agent.ProxyPassword"),o=JSON.parse(t.getVariable("Agent.ProxyBypassList")||"[]"),s=!1;return e&&o.forEach((function(t){new RegExp(t,"i").test(e)&&(s=!0)})),s?null:{proxyUrl:n,proxyUsername:r,proxyPassword:i,proxyBypassHosts:o}}return null},t.getHttpCertConfiguration=function(){var e=t.getVariable("Agent.CAInfo"),n=t.getVariable("Agent.ClientCert");if(e||n){var r={};if(r.caFile=e,r.certFile=n,n){var i=t.getVariable("Agent.ClientCertKey"),o=t.getVariable("Agent.ClientCertArchive"),s=t.getVariable("Agent.ClientCertPassword");r.keyFile=i,r.certArchiveFile=o,r.passphrase=s}return r}return null};var k=function(){function e(e){this.testRunner=e}return e.prototype.publish=function(e,n,r,i,o,s,a){a=a||"VSTSTask";var u={};u.type=this.testRunner,n&&(u.mergeResults=n),r&&(u.platform=r),i&&(u.config=i),o&&(u.runTitle=o),s&&(u.publishRunAttachments=s),e&&(u.resultFiles=e),u.testRunSystem=a,t.command("results.publish",u,"")},e}();t.TestPublisher=k;var P=function(){function e(){}return e.prototype.publish=function(e,n,r,i){var o={};e&&(o.codecoveragetool=e),n&&(o.summaryfile=n),r&&(o.reportdirectory=r),i&&(o.additionalcodecoveragefiles=i),t.command("codecoverage.publish",o,"")},e}();t.CodeCoveragePublisher=P;var R=function(){function e(e,t){this.buildTool=e,this.ccTool=t}return e.prototype.enableCodeCoverage=function(e){e.buildtool=this.buildTool,e.codecoveragetool=this.ccTool,t.command("codecoverage.enable",e,"")},e}();t.CodeCoverageEnabler=R,t.uploadFile=function(e){t.command("task.uploadfile",null,e)},t.prependPath=function(e){b("2.115.0"),t.command("task.prependpath",null,e)},t.uploadSummary=function(e){t.command("task.uploadsummary",null,e)},t.addAttachment=function(e,n,r){t.command("task.addattachment",{type:e,name:n},r)},t.setEndpoint=function(e,n,r,i){t.command("task.setendpoint",{id:e,field:a[n].toLowerCase(),key:r},i)},t.setProgress=function(e,n){t.command("task.setprogress",{value:""+e},n)},t.logDetail=function(e,n,o,s,a,u,c,l,d,p,f){var h={id:e,parentid:o,type:s,name:a,order:u?u.toString():void 0,starttime:c,finishtime:l,progress:d?d.toString():void 0,state:p?i[p]:void 0,result:f?r[f]:void 0};t.command("task.logdetail",h,n)},t.logIssue=function(e,n,r,i,s,a){var u={type:o[e].toLowerCase(),code:a,sourcepath:r,linenumber:i?i.toString():void 0,columnnumber:s?s.toString():void 0};t.command("task.logissue",u,n)},t.uploadArtifact=function(e,n,r){t.command("artifact.upload",{containerfolder:e,artifactname:r},n)},t.associateArtifact=function(e,n,r){t.command("artifact.associate",{type:s[r].toLowerCase(),artifactname:e},n)},t.uploadBuildLog=function(e){t.command("build.uploadlog",null,e)},t.updateBuildNumber=function(e){t.command("build.updatebuildnumber",null,e)},t.addBuildTag=function(e){t.command("build.addbuildtag",null,e)},t.updateReleaseName=function(e){b("2.132"),t.command("release.updatereleasename",null,e)},t.TaskCommand=y.TaskCommand,t.commandFromString=y.commandFromString,t.ToolRunner=m.ToolRunner,v.lt(process.versions.node,"4.2.0")&&this.warning("Tasks require a new agent. Upgrade your agent or node to 4.2.0 or later"),global._vsts_task_lib_loaded||(g._loadData(),g._exposeProxySettings(),g._exposeCertSettings())},"./node_modules/azure-pipelines-task-lib/taskcommand.js": /*!**************************************************************!*\ !*** ./node_modules/azure-pipelines-task-lib/taskcommand.js ***! \**************************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){e||(e="missing.command"),this.command=e,this.properties=t,this.message=n}return e.prototype.toString=function(){var e="##vso["+this.command;if(this.properties&&Object.keys(this.properties).length>0)for(var t in e+=" ",this.properties)if(this.properties.hasOwnProperty(t)){var n=this.properties[t];n&&(e+=t+"="+(""+(n||"")).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/]/g,"%5D").replace(/;/g,"%3B")+";")}return e+="]",e+=function(e){return e.replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(""+(this.message||""))},e}();t.TaskCommand=r,t.commandFromString=function(e){var t=e.indexOf("["),n=e.indexOf("]");if(-1==t||-1==n||n-t<3)throw new Error("Invalid command brackets");var i=e.substring(t+1,n),o=i.indexOf(" "),s=i,a={};o>0&&(s=i.trim().substring(0,o),i.trim().substring(o+1).split(";").forEach((function(e){if((e=e.trim()).length>0){var t=e.indexOf("=");if(-1==t)throw new Error("Invalid property: "+e);var n=e.substring(0,t),r=e.substring(t+1);a[n]=r.replace(/%0D/g,"\r").replace(/%0A/g,"\n").replace(/%5D/g,"]").replace(/%3B/g,";").replace(/%25/g,"%")}})));var u=e.substring(n+1).replace(/%0D/g,"\r").replace(/%0A/g,"\n").replace(/%25/g,"%");return new r(s,a,u)}},"./node_modules/azure-pipelines-task-lib/toolrunner.js": /*!*************************************************************!*\ !*** ./node_modules/azure-pipelines-task-lib/toolrunner.js ***! \*************************************************************/ /*! no static exports found */function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(/*! q */"./node_modules/q/q.js"),s=n(/*! os */"os"),a=n(/*! events */"events"),u=n(/*! child_process */"child_process"),c=n(/*! ./internal */"./node_modules/azure-pipelines-task-lib/internal.js"),l=n(/*! fs */"fs"),d=function(e){function t(t){var n=e.call(this)||this;if(!t)throw new Error("Parameter 'toolPath' cannot be null or empty.");return n.toolPath=c._which(t,!0),n.args=[],n._debug("toolRunner toolPath: "+t),n}return i(t,e),t.prototype._debug=function(e){this.emit("debug",e)},t.prototype._argStringToArray=function(e){for(var t=[],n=!1,r=!1,i=!0,o="",s=function(e){r&&'"'!==e&&(o+="\\"),o+=e,r=!1},a=0;a-1;){n(r.substring(0,i)),i=(r=r.substring(i+s.EOL.length)).indexOf(s.EOL)}t=r}catch(e){this._debug("error processing line")}},t.prototype._getSpawnFileName=function(){return"win32"==process.platform&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath},t.prototype._getSpawnArgs=function(e){if("win32"==process.platform){if(this._isCmdFile()){for(var t='/D /S /C "'+this._windowsQuoteCmdArg(this.toolPath),n=0;n",'"'],n=!1,r=function(e){if(t.some((function(t){return t==e})))return n=!0,"break"},i=0,o=e;i0;u--)s+=e[u-1],a&&"\\"==e[u-1]?s+="\\":'"'==e[u-1]?(a=!0,s+='"'):a=!1;return(s+='"').split("").reverse().join("")},t.prototype._uv_quote_cmd_arg=function(e){if(!e)return'""';if(e.indexOf(" ")<0&&e.indexOf("\t")<0&&e.indexOf('"')<0)return e;if(e.indexOf('"')<0&&e.indexOf("\\")<0)return'"'+e+'"';for(var t='"',n=!0,r=e.length;r>0;r--)t+=e[r-1],n&&"\\"==e[r-1]?t+="\\":'"'==e[r-1]?(n=!0,t+="\\"):n=!1;return(t+='"').split("").reverse().join("")},t.prototype._cloneExecOptions=function(e){var t={cwd:(e=e||{}).cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1};return t.outStream=e.outStream||process.stdout,t.errStream=e.errStream||process.stderr,t},t.prototype._getSpawnOptions=function(e){e=e||{};var t={};return t.cwd=e.cwd,t.env=e.env,t.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),t},t.prototype._getSpawnSyncOptions=function(e){var t={};return t.cwd=e.cwd,t.env=e.env,t.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),t},t.prototype.execWithPiping=function(e,t){var n=this,r=o.defer();this._debug("exec tool: "+this.toolPath),this._debug("arguments:"),this.args.forEach((function(e){n._debug(" "+e)}));var i,a=!0,c=this._cloneExecOptions(t);c.silent||c.outStream.write(this._getCommandString(c)+s.EOL);var d,p,f,h,g=e.toolPath,y=!0,m=0,v=0;d=this.toolPath,m++;var _=u.spawn(this._getSpawnFileName(),this._getSpawnArgs(c),this._getSpawnOptions(c));m++,i=u.spawn(e._getSpawnFileName(),e._getSpawnArgs(c),e._getSpawnOptions(c)),(f=this.pipeOutputToFile?l.createWriteStream(this.pipeOutputToFile):null)&&(m++,f.on("finish",(function(){m--,f=null,0==m&&(h?r.reject(h):r.resolve(v))})),f.on("error",(function(e){m--,n._debug("Failed to pipe output of "+d+" to file "+n.pipeOutputToFile+". Error = "+e),f=null,0==m&&(h?r.reject(h):r.resolve(v))}))),_.stdout.on("data",(function(e){try{f&&f.write(e),i.stdin.write(e)}catch(e){n._debug("Failed to pipe output of "+d+" to "+g),n._debug(g+" might have exited due to errors prematurely. Verify the arguments passed are valid.")}})),_.stderr.on("data",(function(e){(f&&f.write(e),y=!c.failOnStdErr,c.silent)||(c.failOnStdErr?c.errStream:c.outStream).write(e)})),_.on("error",(function(e){m--,f&&f.end(),i.stdin.end(),h=new Error(d+" failed. "+e.message),0==m&&r.reject(h)})),_.on("close",(function(e,t){m--,0==e||c.ignoreReturnCode||(y=!1,v=p=e),n._debug("success of first tool:"+y),f&&f.end(),i.stdin.end(),0==m&&(h?r.reject(h):r.resolve(v))}));i.stdout.on("data",(function(e){n.emit("stdout",e),c.silent||c.outStream.write(e),n._processLineBuffer(e,"",(function(e){n.emit("stdline",e)}))}));return i.stderr.on("data",(function(e){(n.emit("stderr",e),a=!c.failOnStdErr,c.silent)||(c.failOnStdErr?c.errStream:c.outStream).write(e);n._processLineBuffer(e,"",(function(e){n.emit("errline",e)}))})),i.on("error",(function(e){m--,h=new Error(g+" failed. "+e.message),0==m&&r.reject(h)})),i.on("close",(function(e,t){m--,n._debug("rc:"+e),v=e,"".length>0&&n.emit("stdline",""),"".length>0&&n.emit("errline",""),0==e||c.ignoreReturnCode||(a=!1),n._debug("success:"+a),y?a||(h=new Error(g+" failed with return code: "+e)):h=new Error(d+" failed with return code: "+p),0==m&&(h?r.reject(h):r.resolve(v))})),r.promise},t.prototype.arg=function(e){return e?(e instanceof Array?(this._debug(this.toolPath+" arg: "+JSON.stringify(e)),this.args=this.args.concat(e)):"string"==typeof e&&(this._debug(this.toolPath+" arg: "+e),this.args=this.args.concat(e.trim())),this):this},t.prototype.line=function(e){return e?(this._debug(this.toolPath+" arg: "+e),this.args=this.args.concat(this._argStringToArray(e)),this):this},t.prototype.argIf=function(e,t){return e&&this.arg(t),this},t.prototype.pipeExecOutputToTool=function(e,t){return this.pipeOutputToTool=e,this.pipeOutputToFile=t,this},t.prototype.exec=function(e){var t=this;if(this.pipeOutputToTool)return this.execWithPiping(this.pipeOutputToTool,e);var n=o.defer();this._debug("exec tool: "+this.toolPath),this._debug("arguments:"),this.args.forEach((function(e){t._debug(" "+e)}));var r=this._cloneExecOptions(e);r.silent||r.outStream.write(this._getCommandString(r)+s.EOL);var i=new p(r,this.toolPath);i.on("debug",(function(e){t._debug(e)}));var a=u.spawn(this._getSpawnFileName(),this._getSpawnArgs(r),this._getSpawnOptions(e));a.stdout.on("finish",(function(){r.silent||r.outStream.write(s.EOL)}));a.stdout.on("data",(function(e){t.emit("stdout",e),r.silent||r.outStream.write(e),t._processLineBuffer(e,"",(function(e){t.emit("stdline",e)}))}));return a.stderr.on("data",(function(e){(i.processStderr=!0,t.emit("stderr",e),r.silent)||(r.failOnStdErr?r.errStream:r.outStream).write(e);t._processLineBuffer(e,"",(function(e){t.emit("errline",e)}))})),a.on("error",(function(e){i.processError=e.message,i.processExited=!0,i.processClosed=!0,i.CheckComplete()})),a.on("exit",(function(e,n){i.processExitCode=e,i.processExited=!0,t._debug("Exit code "+e+" received from tool '"+t.toolPath+"'"),i.CheckComplete()})),a.on("close",(function(e,n){i.processExitCode=e,i.processExited=!0,i.processClosed=!0,t._debug("STDIO streams have closed for tool '"+t.toolPath+"'"),i.CheckComplete()})),i.on("done",(function(e,r){"".length>0&&t.emit("stdline",""),"".length>0&&t.emit("errline",""),a.removeAllListeners(),e?n.reject(e):n.resolve(r)})),n.promise},t.prototype.execSync=function(e){var t=this;this._debug("exec tool: "+this.toolPath),this._debug("arguments:"),this.args.forEach((function(e){t._debug(" "+e)}));(e=this._cloneExecOptions(e)).silent||e.outStream.write(this._getCommandString(e)+s.EOL);var n=u.spawnSync(this._getSpawnFileName(),this._getSpawnArgs(e),this._getSpawnSyncOptions(e));!e.silent&&n.stdout&&n.stdout.length>0&&e.outStream.write(n.stdout),!e.silent&&n.stderr&&n.stderr.length>0&&e.errStream.write(n.stderr);var r={code:n.status,error:n.error};return r.stdout=n.stdout?n.stdout.toString():"",r.stderr=n.stderr?n.stderr.toString():"",r},t}(a.EventEmitter);t.ToolRunner=d;var p=function(e){function t(t,n){var r=e.call(this)||this;if(r.delay=1e4,r.timeout=null,!n)throw new Error("toolPath must not be empty");r.options=t,r.toolPath=n;var i=process.env.TASKLIB_TEST_TOOLRUNNER_EXITDELAY;return i&&(r.delay=parseInt(i)),r}return i(t,e),t.prototype.CheckComplete=function(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=setTimeout(t.HandleTimeout,this.delay,this)))},t.prototype._debug=function(e){this.emit("debug",e)},t.prototype._setResult=function(){var e;this.processExited&&(this.processError?e=new Error(c._loc("LIB_ProcessError",this.toolPath,this.processError)):0==this.processExitCode||this.options.ignoreReturnCode?this.processStderr&&this.options.failOnStdErr&&(e=new Error(c._loc("LIB_ProcessStderr",this.toolPath))):e=new Error(c._loc("LIB_ProcessExitCode",this.toolPath,this.processExitCode))),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",e,this.processExitCode)},t.HandleTimeout=function(e){e.done||(!e.processClosed&&e.processExited&&(console.log(c._loc("LIB_StdioNotClosed",e.delay/1e3,e.toolPath)),e._debug(c._loc("LIB_StdioNotClosed",e.delay/1e3,e.toolPath))),e._setResult())},t}(a.EventEmitter)},"./node_modules/azure-pipelines-task-lib/vault.js": /*!********************************************************!*\ !*** ./node_modules/azure-pipelines-task-lib/vault.js ***! \********************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! fs */"fs"),i=n(/*! path */"path"),o=n(/*! crypto */"crypto"),s=n(/*! uuid/v4 */"./node_modules/uuid/v4.js"),a=function(){function e(e){this._keyFile=i.join(e,".taskkey"),this._store={},this.genKey()}return e.prototype.initialize=function(){},e.prototype.storeSecret=function(e,t){if(!e||0==e.length)return!1;if(e=e.toLowerCase(),!t||0==t.length)return this._store.hasOwnProperty(e)&&delete this._store[e],!1;var n=this.getKey(),r=o.randomBytes(16),i=o.createCipheriv("aes-256-ctr",n,r),s=i.update(t,"utf8","hex"),a=i.final("hex");return this._store[e]=r.toString("hex")+s+a,!0},e.prototype.retrieveSecret=function(e){var t;if(e=(e||"").toLowerCase(),this._store.hasOwnProperty(e)){var n=this.getKey(),r=this._store[e],i=Buffer.from(r,"hex"),s=i.slice(0,16),a=i.slice(16),u=o.createDecipheriv("aes-256-ctr",n,s);t=u.update(a,"hex","utf8")+u.final("utf8")}return t},e.prototype.getKey=function(){var e=r.readFileSync(this._keyFile).toString("utf8");return o.createHash("sha256").update(e).digest()},e.prototype.genKey=function(){r.writeFileSync(this._keyFile,s(),{encoding:"utf8"})},e}();t.Vault=a},"./node_modules/azure-pipelines-tool-lib sync recursive": /*!****************************************************!*\ !*** ./node_modules/azure-pipelines-tool-lib sync ***! \****************************************************/ /*! no static exports found */function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="./node_modules/azure-pipelines-tool-lib sync recursive"},"./node_modules/azure-pipelines-tool-lib/node_modules/typed-rest-client/HttpClient.js": /*!********************************************************************************************!*\ !*** ./node_modules/azure-pipelines-tool-lib/node_modules/typed-rest-client/HttpClient.js ***! \********************************************************************************************/ /*! no static exports found */function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,a)}u((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(/*! url */"url"),o=n(/*! http */"http"),s=n(/*! https */"https"),a=n(/*! tunnel */"./node_modules/tunnel/index.js"),u=n(/*! fs */"fs");var c;!function(e){e[e.OK=200]="OK",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.ResourceMoved=302]="ResourceMoved",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.SwitchProxy=306]="SwitchProxy",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout"}(c=t.HttpCodes||(t.HttpCodes={}));const l=[c.MovedPermanently,c.ResourceMoved,c.SeeOther,c.TemporaryRedirect,c.PermanentRedirect];class d{constructor(e){this.message=e}readBody(){return new Promise((e,t)=>r(this,void 0,void 0,(function*(){let t="";this.message.on("data",e=>{t+=e}),this.message.on("end",()=>{e(t)})})))}}var p;t.HttpClientResponse=d,t.isHttps=function(e){return"https:"===i.parse(e).protocol},function(e){e.HTTP_PROXY="HTTP_PROXY",e.HTTPS_PROXY="HTTPS_PROXY"}(p||(p={}));t.HttpClient=class{constructor(e,t,n){this._ignoreSslError=!1,this._allowRedirects=!0,this._maxRedirects=50,this._keepAlive=!1,this._disposed=!1,this.userAgent=e,this.handlers=t||[],this.requestOptions=n,n&&(null!=n.ignoreSslError&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,this._httpProxy=n.proxy,n.proxy&&n.proxy.proxyBypassHosts&&(this._httpProxyBypassHosts=[],n.proxy.proxyBypassHosts.forEach(e=>{this._httpProxyBypassHosts.push(new RegExp(e,"i"))})),this._certConfig=n.cert,this._certConfig&&this._certConfig.caFile&&u.existsSync(this._certConfig.caFile)&&(this._ca=u.readFileSync(this._certConfig.caFile,"utf8")),this._certConfig&&this._certConfig.certFile&&u.existsSync(this._certConfig.certFile)&&(this._cert=u.readFileSync(this._certConfig.certFile,"utf8")),this._certConfig&&this._certConfig.keyFile&&u.existsSync(this._certConfig.keyFile)&&(this._key=u.readFileSync(this._certConfig.keyFile,"utf8")),null!=n.allowRedirects&&(this._allowRedirects=n.allowRedirects),null!=n.maxRedirects&&(this._maxRedirects=Math.max(n.maxRedirects,0)),null!=n.keepAlive&&(this._keepAlive=n.keepAlive))}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,n){return this.request("POST",e,t,n||{})}patch(e,t,n){return this.request("PATCH",e,t,n||{})}put(e,t,n){return this.request("PUT",e,t,n||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,n,r){return this.request(e,t,n,r)}request(e,t,n,i){return r(this,void 0,void 0,(function*(){if(this._disposed)throw new Error("Client has already been disposed.");let r=this._prepareRequest(e,t,i),o=yield this.requestRaw(r,n);if(o&&o.message&&o.message.statusCode===c.Unauthorized){let e;for(let t=0;t0;){const t=o.message.headers.location;if(!t)break;yield o.readBody(),r=this._prepareRequest(e,t,i),o=yield this.requestRaw(r,n),s--}return o}))}dispose(){this._agent&&this._agent.destroy(),this._disposed=!0}requestRaw(e,t){return new Promise((n,r)=>{this.requestRawWithCallback(e,t,(function(e,t){e&&r(e),n(t)}))})}requestRawWithCallback(e,t,n){let r;"string"==typeof t&&(e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8"));let i=!1,o=(e,t)=>{i||(i=!0,n(e,t))},s=e.httpModule.request(e.options,e=>{let t=new d(e);o(null,t)});s.on("socket",e=>{r=e}),s.setTimeout(this._socketTimeout||18e4,()=>{r&&r.end(),o(new Error("Request timeout: "+e.options.path),null)}),s.on("error",(function(e){o(e,null)})),t&&"string"==typeof t&&s.write(t,"utf8"),t&&"string"!=typeof t?(t.on("close",(function(){s.end()})),t.pipe(s)):s.end()}_prepareRequest(e,t,n){const r={};r.parsedUrl=i.parse(t);const a="https:"===r.parsedUrl.protocol;r.httpModule=a?s:o;const u=a?443:80;return r.options={},r.options.host=r.parsedUrl.hostname,r.options.port=r.parsedUrl.port?parseInt(r.parsedUrl.port):u,r.options.path=(r.parsedUrl.pathname||"")+(r.parsedUrl.search||""),r.options.method=e,r.options.headers=n||{},r.options.headers["User-Agent"]=this.userAgent,r.options.agent=this._getAgent(t),this.handlers&&this.handlers.forEach(e=>{e.prepareRequest(r.options)}),r}_getAgent(e){let t,n=this._getProxy(e),r=n.proxyUrl&&n.proxyUrl.hostname&&!this._isBypassProxy(e);if(this._keepAlive&&r&&(t=this._proxyAgent),this._keepAlive&&!r&&(t=this._agent),t)return t;const u="https:"===i.parse(e).protocol;let c=100;if(this.requestOptions&&(c=this.requestOptions.maxSockets||o.globalAgent.maxSockets),r){const e={maxSockets:c,keepAlive:this._keepAlive,proxy:{proxyAuth:n.proxyAuth,host:n.proxyUrl.hostname,port:n.proxyUrl.port}};let r;const i="https:"===n.proxyUrl.protocol;r=u?i?a.httpsOverHttps:a.httpsOverHttp:i?a.httpOverHttps:a.httpOverHttp,t=r(e),this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:c};t=u?new s.Agent(e):new o.Agent(e),this._agent=t}return t||(t=u?s.globalAgent:o.globalAgent),u&&this._ignoreSslError&&(t.options=Object.assign(t.options||{},{rejectUnauthorized:!1})),u&&this._certConfig&&(t.options=Object.assign(t.options||{},{ca:this._ca,cert:this._cert,key:this._key,passphrase:this._certConfig.passphrase})),t}_getProxy(e){let t,n,r="https:"===i.parse(e).protocol,o=this._httpProxy,s=process.env[p.HTTPS_PROXY],a=process.env[p.HTTP_PROXY];return o||(s&&r?o={proxyUrl:s}:a&&(o={proxyUrl:a})),o&&(o.proxyUrl.length>0&&(t=i.parse(o.proxyUrl)),(o.proxyUsername||o.proxyPassword)&&(n=o.proxyUsername+":"+o.proxyPassword)),{proxyUrl:t,proxyAuth:n}}_isBypassProxy(e){if(!this._httpProxyBypassHosts)return!1;let t=!1;return this._httpProxyBypassHosts.forEach(n=>{n.test(e)&&(t=!0)}),t}}},"./node_modules/azure-pipelines-tool-lib/tool.js": /*!*******************************************************!*\ !*** ./node_modules/azure-pipelines-tool-lib/tool.js ***! \*******************************************************/ /*! no static exports found */function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,a)}u((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(/*! typed-rest-client/HttpClient */"./node_modules/azure-pipelines-tool-lib/node_modules/typed-rest-client/HttpClient.js"),o=n(/*! path */"path"),s=n(/*! os */"os"),a=n(/*! process */"process"),u=n(/*! fs */"fs"),c=n(/*! semver */"./node_modules/semver/semver.js"),l=n(/*! azure-pipelines-task-lib/task */"./node_modules/azure-pipelines-task-lib/task.js"),d=n(/*! semver-compare */"./node_modules/semver-compare/index.js"),p=n(/*! uuid/v4 */"./node_modules/uuid/v4.js");let f={proxy:l.getHttpProxyConfiguration(),cert:l.getHttpCertConfiguration()},h=new i.HttpClient("vsts-task-installer/1.2.3",null,f);function g(e){return new Promise(t=>setTimeout(t,e))}function y(e){let t=c.clean(e);l.debug("isExplicit: "+t);let n=null!=c.valid(t);return l.debug("explicit? "+n),n}function m(e,t){let n;l.debug("evaluating "+e.length+" versions");for(let r=(e=e.sort(d)).length-1;r>=0;r--){let i=e[r];if(c.satisfies(i,t)){n=i;break}}return n?l.debug("matched: "+n):l.debug("match not found"),n}function v(e,t){let n=[];t=t||s.arch();let r=o.join(S(),e);if(l.exist(r)){l.ls("",[r]).forEach(e=>{if(y(e)){let i=o.join(r,e,t);l.exist(i)&&l.exist(`${i}.complete`)&&n.push(e)}})}return n}function _(e,t,n){let r=o.join(S(),e,c.clean(t),n);l.debug("destination "+r);let i=`${r}.complete`;return l.rmRF(r),l.rmRF(i),l.mkdirP(r),r}function b(e,t,n){let r=`${o.join(S(),e,c.clean(t),n)}.complete`;l.writeFile(r,""),l.debug("finished caching tool")}function w(e){return e||(e=o.join(E(),p())),l.mkdirP(e),e}function S(){l.assertAgent("2.115.0");let e=l.getVariable("Agent.ToolsDirectory");if(!e)throw new Error("Agent.ToolsDirectory is not set");return e}function E(){l.assertAgent("2.115.0");let e=l.getVariable("Agent.TempDirectory");if(!e)throw new Error("Agent.TempDirectory is not set");return e}l.setResourcePath(o.join(__dirname,"lib.json")),t.debug=function(e){l.debug(e)},t.prependPath=function(e){if(l.assertAgent("2.115.0"),!e)throw new Error("Parameter toolPath must not be null or empty");if(!l.exist(e)||!l.stats(e).isDirectory())throw new Error("Directory does not exist: "+e);console.log(l.loc("TOOL_LIB_PrependPath",e));let t=e+o.delimiter+a.env.PATH;l.debug("new Path: "+t),a.env.PATH=t,console.log("##vso[task.prependpath]"+e)},t.isExplicitVersion=y,t.cleanVersion=function(e){return l.debug("cleaning: "+e),c.clean(e)},t.evaluateVersions=m,t.findLocalTool=function(e,t,n){if(!e)throw new Error("toolName parameter is required");if(!t)throw new Error("versionSpec parameter is required");if(n=n||s.arch(),!y(t)){t=m(v(e,n),t)}let r;if(t){t=c.clean(t);let i=S(),s=o.join(i,e,t,n);l.debug("checking cache: "+s),l.exist(s)&&l.exist(`${s}.complete`)?(console.log(l.loc("TOOL_LIB_FoundInCache",e,t,n)),r=s):l.debug("not found")}return r},t.findLocalToolVersions=v,t.downloadTool=function(e,t){return r(this,void 0,void 0,(function*(){return new Promise((n,s)=>r(this,void 0,void 0,(function*(){try{var a;if(l.debug(t),t=t||p(),a=o.isAbsolute(t)?t:o.join(E(),t),l.mkdirP(o.dirname(a)),console.log(l.loc("TOOL_LIB_Downloading",e)),l.debug("destination "+a),u.existsSync(a))throw new Error("Destination file path already exists");l.debug("downloading");const c=[i.HttpCodes.BadGateway,i.HttpCodes.ServiceUnavailable,i.HttpCodes.GatewayTimeout];let d=1;const f=3;let y=yield h.get(e);for(;d-1;)l.debug(`Download attempt "${d}" of "${f}" failed with status code "${y.message.statusCode}".`),d+=1,yield g(1e3),l.debug(`Downloading attempt "${d}" of "${f}"`),y=yield h.get(e);if(200!=y.message.statusCode){let n=new Error("Unexpected HTTP response: "+y.message.statusCode);throw n.httpStatusCode=y.message.statusCode,l.debug(`Failed to download "${t}" from "${e}". Code(${y.message.statusCode}) Message(${y.message.statusMessage})`),n}l.debug("creating stream");let m=u.createWriteStream(a);m.on("open",e=>r(this,void 0,void 0,(function*(){try{y.message.pipe(m).on("close",()=>{l.debug("download complete"),n(a)})}catch(e){s(e)}}))),m.on("error",e=>{m.end(),s(e)})}catch(e){s(e)}})))}))},t.cacheDir=function(e,t,n,i){return r(this,void 0,void 0,(function*(){if(n=c.clean(n),i=i||s.arch(),console.log(l.loc("TOOL_LIB_CachingTool",t,n,i)),l.debug("source dir: "+e),!l.stats(e).isDirectory())throw new Error("sourceDir is not a directory");let r=_(t,n,i);for(let t of u.readdirSync(e)){let n=o.join(e,t);l.cp(n,r+"/","-r")}return b(t,n,i),r}))},t.cacheFile=function(e,t,n,i,a){return r(this,void 0,void 0,(function*(){if(i=c.clean(i),a=a||s.arch(),console.log(l.loc("TOOL_LIB_CachingTool",n,i,a)),l.debug("source file:"+e),!l.stats(e).isFile())throw new Error("sourceFile is not a file");let r=_(n,i,a),u=o.join(r,t);return l.debug("destination file"+u),l.cp(e,u),b(n,i,a),r}))},t.extract7z=function(e,t,n){return r(this,void 0,void 0,(function*(){if("win32"!=a.platform)throw new Error("extract7z() not supported on current OS");if(!e)throw new Error("parameter 'file' is required");console.log(l.loc("TOOL_LIB_ExtractingArchive")),t=w(t);let r=a.cwd();try{if(a.chdir(t),n){let t=l.tool(n).arg("x").arg("-bb1").arg("-bd").arg("-sccUTF-8").arg(e);yield t.exec()}else{let n=`& '${o.join(__dirname,"Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Source '${e.replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Target '${t.replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`,r=l.which("powershell",!0),i=l.tool(r).line("-NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command").arg(n);i.on("stdout",e=>{a.stdout.write(e)}),i.on("stderr",e=>{a.stderr.write(e)}),yield i.exec({silent:!0})}}finally{a.chdir(r)}return t}))},t.extractTar=function(e,t){return r(this,void 0,void 0,(function*(){console.log(l.loc("TOOL_LIB_ExtractingArchive"));let n=w(t),r=l.tool("tar");return r.arg(["xzC",n,"-f",e]),yield r.exec(),n}))},t.extractZip=function(e,t){return r(this,void 0,void 0,(function*(){if(!e)throw new Error("parameter 'file' is required");console.log(l.loc("TOOL_LIB_ExtractingArchive"));let n=w(t);if("win32"==a.platform){let t=`$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('${e.replace(/'/g,"''").replace(/"|\n|\r/g,"")}', '${n.replace(/'/g,"''").replace(/"|\n|\r/g,"")}')`,r=o.join(a.env.windir,"system32","chcp.com");yield l.exec(r,"65001");let i=l.tool("powershell").line("-NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command").arg(t);yield i.exec()}else{let t=l.tool("unzip").arg(e);yield t.exec({cwd:n})}return n}))},t.scrape=function(e,t){return r(this,void 0,void 0,(function*(){let n=(yield(yield h.get(e)).readBody()).match(t),r={},i=[];for(let e=0;e=0&&c>0){for(r=[],o=n.length;l>=0&&!a;)l==u?(r.push(l),u=n.indexOf(e,l+1)):1==r.length?a=[r.pop(),c]:((i=r.pop())=0?u:c;r.length&&(a=[o,s])}return a}e.exports=r,r.range=o},"./node_modules/brace-expansion/index.js": /*!***********************************************!*\ !*** ./node_modules/brace-expansion/index.js ***! \***********************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! concat-map */"./node_modules/concat-map/index.js"),i=n(/*! balanced-match */"./node_modules/balanced-match/index.js");e.exports=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return function e(t,n){var o=[],s=i("{","}",t);if(!s||/\$$/.test(s.pre))return[t];var u,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),y=c||d,m=s.body.indexOf(",")>=0;if(!y&&!m)return s.post.match(/,.*\}/)?(t=s.pre+"{"+s.body+a+s.post,e(t)):[t];if(y)u=s.body.split(/\.\./);else{if(1===(u=function e(t){if(!t)return[""];var n=[],r=i("{","}",t);if(!r)return t.split(",");var o=r.pre,s=r.body,a=r.post,u=o.split(",");u[u.length-1]+="{"+s+"}";var c=e(a);a.length&&(u[u.length-1]+=c.shift(),u.push.apply(u,c));return n.push.apply(n,u),n}(s.body)).length)if(1===(u=e(u[0],!1).map(p)).length)return(b=s.post.length?e(s.post,!1):[""]).map((function(e){return s.pre+u[0]+e}))}var v,_=s.pre,b=s.post.length?e(s.post,!1):[""];if(y){var w=l(u[0]),S=l(u[1]),E=Math.max(u[0].length,u[1].length),j=3==u.length?Math.abs(l(u[2])):1,x=h;S0){var P=new Array(k+1).join("0");O=A<0?"-"+P+O.slice(1):P+O}}v.push(O)}}else v=r(u,(function(t){return e(t,!1)}));for(var R=0;R=t}},"./node_modules/concat-map/index.js": /*!******************************************!*\ !*** ./node_modules/concat-map/index.js ***! \******************************************/ /*! no static exports found */function(e,t){e.exports=function(e,t){for(var r=[],i=0;i= than the number of constructor arguments of its base class."},t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",t.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class",t.POST_CONSTRUCT_ERROR=function(){for(var e=[],t=0;t0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?t._map.set(r,i):t._map.delete(r)}))},e.prototype.hasKey=function(e){if(null==e)throw new Error(r.NULL_ARGUMENT);return this._map.has(e)},e.prototype.clone=function(){var t=new e;return this._map.forEach((function(e,n){e.forEach((function(e){return t.add(n,e.clone())}))})),t},e.prototype.traverse=function(e){this._map.forEach((function(t,n){e(n,t)}))},e}();t.Lookup=i},"./node_modules/inversify/lib/inversify.js": /*!*************************************************!*\ !*** ./node_modules/inversify/lib/inversify.js ***! \*************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ./constants/metadata_keys */"./node_modules/inversify/lib/constants/metadata_keys.js");t.METADATA_KEY=r;var i=n(/*! ./container/container */"./node_modules/inversify/lib/container/container.js");t.Container=i.Container;var o=n(/*! ./constants/literal_types */"./node_modules/inversify/lib/constants/literal_types.js");t.BindingScopeEnum=o.BindingScopeEnum,t.BindingTypeEnum=o.BindingTypeEnum,t.TargetTypeEnum=o.TargetTypeEnum;var s=n(/*! ./container/container_module */"./node_modules/inversify/lib/container/container_module.js");t.AsyncContainerModule=s.AsyncContainerModule,t.ContainerModule=s.ContainerModule;var a=n(/*! ./annotation/injectable */"./node_modules/inversify/lib/annotation/injectable.js");t.injectable=a.injectable;var u=n(/*! ./annotation/tagged */"./node_modules/inversify/lib/annotation/tagged.js");t.tagged=u.tagged;var c=n(/*! ./annotation/named */"./node_modules/inversify/lib/annotation/named.js");t.named=c.named;var l=n(/*! ./annotation/inject */"./node_modules/inversify/lib/annotation/inject.js");t.inject=l.inject,t.LazyServiceIdentifer=l.LazyServiceIdentifer;var d=n(/*! ./annotation/optional */"./node_modules/inversify/lib/annotation/optional.js");t.optional=d.optional;var p=n(/*! ./annotation/unmanaged */"./node_modules/inversify/lib/annotation/unmanaged.js");t.unmanaged=p.unmanaged;var f=n(/*! ./annotation/multi_inject */"./node_modules/inversify/lib/annotation/multi_inject.js");t.multiInject=f.multiInject;var h=n(/*! ./annotation/target_name */"./node_modules/inversify/lib/annotation/target_name.js");t.targetName=h.targetName;var g=n(/*! ./annotation/post_construct */"./node_modules/inversify/lib/annotation/post_construct.js");t.postConstruct=g.postConstruct;var y=n(/*! ./planning/metadata_reader */"./node_modules/inversify/lib/planning/metadata_reader.js");t.MetadataReader=y.MetadataReader;var m=n(/*! ./utils/id */"./node_modules/inversify/lib/utils/id.js");t.id=m.id;var v=n(/*! ./annotation/decorator_utils */"./node_modules/inversify/lib/annotation/decorator_utils.js");t.decorate=v.decorate;var _=n(/*! ./syntax/constraint_helpers */"./node_modules/inversify/lib/syntax/constraint_helpers.js");t.traverseAncerstors=_.traverseAncerstors,t.taggedConstraint=_.taggedConstraint,t.namedConstraint=_.namedConstraint,t.typeConstraint=_.typeConstraint;var b=n(/*! ./utils/serialization */"./node_modules/inversify/lib/utils/serialization.js");t.getServiceIdentifierAsString=b.getServiceIdentifierAsString;var w=n(/*! ./utils/binding_utils */"./node_modules/inversify/lib/utils/binding_utils.js");t.multiBindToService=w.multiBindToService},"./node_modules/inversify/lib/planning/context.js": /*!********************************************************!*\ !*** ./node_modules/inversify/lib/planning/context.js ***! \********************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../utils/id */"./node_modules/inversify/lib/utils/id.js"),i=function(){function e(e){this.id=r.id(),this.container=e}return e.prototype.addPlan=function(e){this.plan=e},e.prototype.setCurrentRequest=function(e){this.currentRequest=e},e}();t.Context=i},"./node_modules/inversify/lib/planning/metadata.js": /*!*********************************************************!*\ !*** ./node_modules/inversify/lib/planning/metadata.js ***! \*********************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../constants/metadata_keys */"./node_modules/inversify/lib/constants/metadata_keys.js"),i=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.toString=function(){return this.key===r.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},e}();t.Metadata=i},"./node_modules/inversify/lib/planning/metadata_reader.js": /*!****************************************************************!*\ !*** ./node_modules/inversify/lib/planning/metadata_reader.js ***! \****************************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../constants/metadata_keys */"./node_modules/inversify/lib/constants/metadata_keys.js"),i=function(){function e(){}return e.prototype.getConstructorMetadata=function(e){return{compilerGeneratedMetadata:Reflect.getMetadata(r.PARAM_TYPES,e),userGeneratedMetadata:Reflect.getMetadata(r.TAGGED,e)||{}}},e.prototype.getPropertiesMetadata=function(e){return Reflect.getMetadata(r.TAGGED_PROP,e)||[]},e}();t.MetadataReader=i},"./node_modules/inversify/lib/planning/plan.js": /*!*****************************************************!*\ !*** ./node_modules/inversify/lib/planning/plan.js ***! \*****************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.parentContext=e,this.rootRequest=t};t.Plan=r},"./node_modules/inversify/lib/planning/planner.js": /*!********************************************************!*\ !*** ./node_modules/inversify/lib/planning/planner.js ***! \********************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../bindings/binding_count */"./node_modules/inversify/lib/bindings/binding_count.js"),i=n(/*! ../constants/error_msgs */"./node_modules/inversify/lib/constants/error_msgs.js"),o=n(/*! ../constants/literal_types */"./node_modules/inversify/lib/constants/literal_types.js"),s=n(/*! ../constants/metadata_keys */"./node_modules/inversify/lib/constants/metadata_keys.js"),a=n(/*! ../utils/exceptions */"./node_modules/inversify/lib/utils/exceptions.js"),u=n(/*! ../utils/serialization */"./node_modules/inversify/lib/utils/serialization.js"),c=n(/*! ./context */"./node_modules/inversify/lib/planning/context.js"),l=n(/*! ./metadata */"./node_modules/inversify/lib/planning/metadata.js"),d=n(/*! ./plan */"./node_modules/inversify/lib/planning/plan.js"),p=n(/*! ./reflection_utils */"./node_modules/inversify/lib/planning/reflection_utils.js"),f=n(/*! ./request */"./node_modules/inversify/lib/planning/request.js"),h=n(/*! ./target */"./node_modules/inversify/lib/planning/target.js");function g(e){return e._bindingDictionary}function y(e,t,n,o,s){var a=m(n.container,s.serviceIdentifier),c=[];return a.length===r.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof s.serviceIdentifier&&e.getConstructorMetadata(s.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(s.serviceIdentifier).toSelf(),a=m(n.container,s.serviceIdentifier)),c=t?a:a.filter((function(e){var t=new f.Request(e.serviceIdentifier,n,o,e,s);return e.constraint(t)})),function(e,t,n,o){switch(t.length){case r.BindingCount.NoBindingsAvailable:if(n.isOptional())return t;var s=u.getServiceIdentifierAsString(e),a=i.NOT_REGISTERED;throw a+=u.listMetadataForTarget(s,n),a+=u.listRegisteredBindingsForServiceIdentifier(o,s,m),new Error(a);case r.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return t;case r.BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return t;s=u.getServiceIdentifierAsString(e),a=i.AMBIGUOUS_MATCH+" "+s;throw a+=u.listRegisteredBindingsForServiceIdentifier(o,s,m),new Error(a)}}(s.serviceIdentifier,c,s,n.container),c}function m(e,t){var n=[],r=g(e);return r.hasKey(t)?n=r.get(t):null!==e.parent&&(n=m(e.parent,t)),n}t.getBindingDictionary=g,t.plan=function(e,t,n,r,g,m,v,_){void 0===_&&(_=!1);var b=new c.Context(t),w=function(e,t,n,r,i,o){var a=e?s.MULTI_INJECT_TAG:s.INJECT_TAG,u=new l.Metadata(a,n),c=new h.Target(t,r,n,u);if(void 0!==i){var d=new l.Metadata(i,o);c.metadata.push(d)}return c}(n,r,g,"",m,v);try{return function e(t,n,r,s,a,u){var c,l;if(null===a){c=y(t,n,s,null,u),l=new f.Request(r,s,null,c,u);var h=new d.Plan(s,l);s.addPlan(h)}else c=y(t,n,s,a,u),l=a.addChildRequest(u.serviceIdentifier,c,u);c.forEach((function(n){var r=null;if(u.isArray())r=l.addChildRequest(n.serviceIdentifier,n,u);else{if(n.cache)return;r=l}if(n.type===o.BindingTypeEnum.Instance&&null!==n.implementationType){var a=p.getDependencies(t,n.implementationType);if(!s.container.options.skipBaseClassChecks){var c=p.getBaseClassDependencyCount(t,n.implementationType);if(a.length0?f.length:n.length),g=function e(t,n){for(var r=t.getPropertiesMetadata(n),i=[],s=Object.keys(r),a=0,c=s;a0?l:e(t,r)}return 0}},"./node_modules/inversify/lib/planning/request.js": /*!********************************************************!*\ !*** ./node_modules/inversify/lib/planning/request.js ***! \********************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../utils/id */"./node_modules/inversify/lib/utils/id.js"),i=function(){function e(e,t,n,i,o){this.id=r.id(),this.serviceIdentifier=e,this.parentContext=t,this.parentRequest=n,this.target=o,this.childRequests=[],this.bindings=Array.isArray(i)?i:[i],this.requestScope=null===n?new Map:null}return e.prototype.addChildRequest=function(t,n,r){var i=new e(t,this.parentContext,this,n,r);return this.childRequests.push(i),i},e}();t.Request=i},"./node_modules/inversify/lib/planning/target.js": /*!*******************************************************!*\ !*** ./node_modules/inversify/lib/planning/target.js ***! \*******************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../constants/metadata_keys */"./node_modules/inversify/lib/constants/metadata_keys.js"),i=n(/*! ../utils/id */"./node_modules/inversify/lib/utils/id.js"),o=n(/*! ./metadata */"./node_modules/inversify/lib/planning/metadata.js"),s=n(/*! ./queryable_string */"./node_modules/inversify/lib/planning/queryable_string.js"),a=function(){function e(e,t,n,a){this.id=i.id(),this.type=e,this.serviceIdentifier=n,this.name=new s.QueryableString(t||""),this.metadata=new Array;var u=null;"string"==typeof a?u=new o.Metadata(r.NAMED_TAG,a):a instanceof o.Metadata&&(u=a),null!==u&&this.metadata.push(u)}return e.prototype.hasTag=function(e){for(var t=0,n=this.metadata;t0){var c=t.filter((function(e){return null!==e.target&&e.target.type===i.TargetTypeEnum.ConstructorArgument})).map(n);a=c,u=function(e,t,n){var r=t.filter((function(e){return null!==e.target&&e.target.type===i.TargetTypeEnum.ClassProperty})),o=r.map(n);return r.forEach((function(t,n){var r;r=t.target.name.value();var i=o[n];e[r]=i})),e}(u=new((s=e).bind.apply(s,[void 0].concat(a))),t,n)}else u=new e;return function(e,t){if(Reflect.hasMetadata(o.POST_CONSTRUCT,e)){var n=Reflect.getMetadata(o.POST_CONSTRUCT,e);try{t[n.value]()}catch(t){throw new Error(r.POST_CONSTRUCT_ERROR(e.name,t.message))}}}(e,u),u}},"./node_modules/inversify/lib/resolution/resolver.js": /*!***********************************************************!*\ !*** ./node_modules/inversify/lib/resolution/resolver.js ***! \***********************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../constants/error_msgs */"./node_modules/inversify/lib/constants/error_msgs.js"),i=n(/*! ../constants/literal_types */"./node_modules/inversify/lib/constants/literal_types.js"),o=n(/*! ../utils/exceptions */"./node_modules/inversify/lib/utils/exceptions.js"),s=n(/*! ../utils/serialization */"./node_modules/inversify/lib/utils/serialization.js"),a=n(/*! ./instantiation */"./node_modules/inversify/lib/resolution/instantiation.js"),u=function(e,t,n){try{return n()}catch(n){throw o.isStackOverflowExeption(n)?new Error(r.CIRCULAR_DEPENDENCY_IN_FACTORY(e,t.toString())):n}},c=function(e){return function(t){t.parentContext.setCurrentRequest(t);var n=t.bindings,o=t.childRequests,l=t.target&&t.target.isArray(),d=!(t.parentRequest&&t.parentRequest.target&&t.target&&t.parentRequest.target.matchesArray(t.target.serviceIdentifier));if(l&&d)return o.map((function(t){return c(e)(t)}));var p=null;if(!t.target.isOptional()||0!==n.length){var f=n[0],h=f.scope===i.BindingScopeEnum.Singleton,g=f.scope===i.BindingScopeEnum.Request;if(h&&f.activated)return f.cache;if(g&&null!==e&&e.has(f.id))return e.get(f.id);if(f.type===i.BindingTypeEnum.ConstantValue)p=f.cache;else if(f.type===i.BindingTypeEnum.Function)p=f.cache;else if(f.type===i.BindingTypeEnum.Constructor)p=f.implementationType;else if(f.type===i.BindingTypeEnum.DynamicValue&&null!==f.dynamicValue)p=u("toDynamicValue",f.serviceIdentifier,(function(){return f.dynamicValue(t.parentContext)}));else if(f.type===i.BindingTypeEnum.Factory&&null!==f.factory)p=u("toFactory",f.serviceIdentifier,(function(){return f.factory(t.parentContext)}));else if(f.type===i.BindingTypeEnum.Provider&&null!==f.provider)p=u("toProvider",f.serviceIdentifier,(function(){return f.provider(t.parentContext)}));else{if(f.type!==i.BindingTypeEnum.Instance||null===f.implementationType){var y=s.getServiceIdentifierAsString(t.serviceIdentifier);throw new Error(r.INVALID_BINDING_TYPE+" "+y)}p=a.resolveInstance(f.implementationType,o,c(e))}return"function"==typeof f.onActivation&&(p=f.onActivation(t.parentContext,p)),h&&(f.cache=p,f.activated=!0),g&&null!==e&&!e.has(f.id)&&e.set(f.id,p),p}}};t.resolve=function(e){return c(e.plan.rootRequest.requestScope)(e.plan.rootRequest)}},"./node_modules/inversify/lib/syntax/binding_in_syntax.js": /*!****************************************************************!*\ !*** ./node_modules/inversify/lib/syntax/binding_in_syntax.js ***! \****************************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../constants/literal_types */"./node_modules/inversify/lib/constants/literal_types.js"),i=n(/*! ./binding_when_on_syntax */"./node_modules/inversify/lib/syntax/binding_when_on_syntax.js"),o=function(){function e(e){this._binding=e}return e.prototype.inRequestScope=function(){return this._binding.scope=r.BindingScopeEnum.Request,new i.BindingWhenOnSyntax(this._binding)},e.prototype.inSingletonScope=function(){return this._binding.scope=r.BindingScopeEnum.Singleton,new i.BindingWhenOnSyntax(this._binding)},e.prototype.inTransientScope=function(){return this._binding.scope=r.BindingScopeEnum.Transient,new i.BindingWhenOnSyntax(this._binding)},e}();t.BindingInSyntax=o},"./node_modules/inversify/lib/syntax/binding_in_when_on_syntax.js": /*!************************************************************************!*\ !*** ./node_modules/inversify/lib/syntax/binding_in_when_on_syntax.js ***! \************************************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ./binding_in_syntax */"./node_modules/inversify/lib/syntax/binding_in_syntax.js"),i=n(/*! ./binding_on_syntax */"./node_modules/inversify/lib/syntax/binding_on_syntax.js"),o=n(/*! ./binding_when_syntax */"./node_modules/inversify/lib/syntax/binding_when_syntax.js"),s=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new o.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new i.BindingOnSyntax(this._binding),this._bindingInSyntax=new r.BindingInSyntax(e)}return e.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},e.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},e.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();t.BindingInWhenOnSyntax=s},"./node_modules/inversify/lib/syntax/binding_on_syntax.js": /*!****************************************************************!*\ !*** ./node_modules/inversify/lib/syntax/binding_on_syntax.js ***! \****************************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ./binding_when_syntax */"./node_modules/inversify/lib/syntax/binding_when_syntax.js"),i=function(){function e(e){this._binding=e}return e.prototype.onActivation=function(e){return this._binding.onActivation=e,new r.BindingWhenSyntax(this._binding)},e}();t.BindingOnSyntax=i},"./node_modules/inversify/lib/syntax/binding_to_syntax.js": /*!****************************************************************!*\ !*** ./node_modules/inversify/lib/syntax/binding_to_syntax.js ***! \****************************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../constants/error_msgs */"./node_modules/inversify/lib/constants/error_msgs.js"),i=n(/*! ../constants/literal_types */"./node_modules/inversify/lib/constants/literal_types.js"),o=n(/*! ./binding_in_when_on_syntax */"./node_modules/inversify/lib/syntax/binding_in_when_on_syntax.js"),s=n(/*! ./binding_when_on_syntax */"./node_modules/inversify/lib/syntax/binding_when_on_syntax.js"),a=function(){function e(e){this._binding=e}return e.prototype.to=function(e){return this._binding.type=i.BindingTypeEnum.Instance,this._binding.implementationType=e,new o.BindingInWhenOnSyntax(this._binding)},e.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+r.INVALID_TO_SELF_VALUE);var e=this._binding.serviceIdentifier;return this.to(e)},e.prototype.toConstantValue=function(e){return this._binding.type=i.BindingTypeEnum.ConstantValue,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,new s.BindingWhenOnSyntax(this._binding)},e.prototype.toDynamicValue=function(e){return this._binding.type=i.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new o.BindingInWhenOnSyntax(this._binding)},e.prototype.toConstructor=function(e){return this._binding.type=i.BindingTypeEnum.Constructor,this._binding.implementationType=e,new s.BindingWhenOnSyntax(this._binding)},e.prototype.toFactory=function(e){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=e,new s.BindingWhenOnSyntax(this._binding)},e.prototype.toFunction=function(e){if("function"!=typeof e)throw new Error(r.INVALID_FUNCTION_BINDING);var t=this.toConstantValue(e);return this._binding.type=i.BindingTypeEnum.Function,t},e.prototype.toAutoFactory=function(e){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=function(t){return function(){return t.container.get(e)}},new s.BindingWhenOnSyntax(this._binding)},e.prototype.toProvider=function(e){return this._binding.type=i.BindingTypeEnum.Provider,this._binding.provider=e,new s.BindingWhenOnSyntax(this._binding)},e.prototype.toService=function(e){this.toDynamicValue((function(t){return t.container.get(e)}))},e}();t.BindingToSyntax=a},"./node_modules/inversify/lib/syntax/binding_when_on_syntax.js": /*!*********************************************************************!*\ !*** ./node_modules/inversify/lib/syntax/binding_when_on_syntax.js ***! \*********************************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ./binding_on_syntax */"./node_modules/inversify/lib/syntax/binding_on_syntax.js"),i=n(/*! ./binding_when_syntax */"./node_modules/inversify/lib/syntax/binding_when_syntax.js"),o=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new i.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new r.BindingOnSyntax(this._binding)}return e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();t.BindingWhenOnSyntax=o},"./node_modules/inversify/lib/syntax/binding_when_syntax.js": /*!******************************************************************!*\ !*** ./node_modules/inversify/lib/syntax/binding_when_syntax.js ***! \******************************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ./binding_on_syntax */"./node_modules/inversify/lib/syntax/binding_on_syntax.js"),i=n(/*! ./constraint_helpers */"./node_modules/inversify/lib/syntax/constraint_helpers.js"),o=function(){function e(e){this._binding=e}return e.prototype.when=function(e){return this._binding.constraint=e,new r.BindingOnSyntax(this._binding)},e.prototype.whenTargetNamed=function(e){return this._binding.constraint=i.namedConstraint(e),new r.BindingOnSyntax(this._binding)},e.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(e){return null!==e.target&&!e.target.isNamed()&&!e.target.isTagged()},new r.BindingOnSyntax(this._binding)},e.prototype.whenTargetTagged=function(e,t){return this._binding.constraint=i.taggedConstraint(e)(t),new r.BindingOnSyntax(this._binding)},e.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(t){return i.typeConstraint(e)(t.parentRequest)},new r.BindingOnSyntax(this._binding)},e.prototype.whenParentNamed=function(e){return this._binding.constraint=function(t){return i.namedConstraint(e)(t.parentRequest)},new r.BindingOnSyntax(this._binding)},e.prototype.whenParentTagged=function(e,t){return this._binding.constraint=function(n){return i.taggedConstraint(e)(t)(n.parentRequest)},new r.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(t){return i.traverseAncerstors(t,i.typeConstraint(e))},new r.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(t){return!i.traverseAncerstors(t,i.typeConstraint(e))},new r.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(t){return i.traverseAncerstors(t,i.namedConstraint(e))},new r.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(t){return!i.traverseAncerstors(t,i.namedConstraint(e))},new r.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._binding.constraint=function(n){return i.traverseAncerstors(n,i.taggedConstraint(e)(t))},new r.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorTagged=function(e,t){return this._binding.constraint=function(n){return!i.traverseAncerstors(n,i.taggedConstraint(e)(t))},new r.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(t){return i.traverseAncerstors(t,e)},new r.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(t){return!i.traverseAncerstors(t,e)},new r.BindingOnSyntax(this._binding)},e}();t.BindingWhenSyntax=o},"./node_modules/inversify/lib/syntax/constraint_helpers.js": /*!*****************************************************************!*\ !*** ./node_modules/inversify/lib/syntax/constraint_helpers.js ***! \*****************************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../constants/metadata_keys */"./node_modules/inversify/lib/constants/metadata_keys.js"),i=n(/*! ../planning/metadata */"./node_modules/inversify/lib/planning/metadata.js"),o=function(e,t){var n=e.parentRequest;return null!==n&&(!!t(n)||o(n,t))};t.traverseAncerstors=o;var s=function(e){return function(t){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(e)(t)};return n.metaData=new i.Metadata(e,t),n}};t.taggedConstraint=s;var a=s(r.NAMED_TAG);t.namedConstraint=a;t.typeConstraint=function(e){return function(t){var n=null;if(null!==t){if(n=t.bindings[0],"string"==typeof e)return n.serviceIdentifier===e;var r=t.bindings[0].implementationType;return e===r}return!1}}},"./node_modules/inversify/lib/utils/binding_utils.js": /*!***********************************************************!*\ !*** ./node_modules/inversify/lib/utils/binding_utils.js ***! \***********************************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiBindToService=function(e){return function(t){return function(){for(var n=[],r=0;r65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return i;if(""===e)return"";var r,o="",u=!!n.nocase,c=!1,l=[],d=[],p=!1,h=-1,g=-1,y="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",m=this;function v(){if(r){switch(r){case"*":o+="[^/]*?",u=!0;break;case"?":o+="[^/]",u=!0;break;default:o+="\\"+r}m.debug("clearStateChar %j %j",r,o),r=!1}}for(var _,b=0,w=e.length;b-1;O--){var k=d[O],P=o.slice(0,k.reStart),R=o.slice(k.reStart,k.reEnd-8),C=o.slice(k.reEnd-8,k.reEnd),N=o.slice(k.reEnd);C+=N;var I=P.split("(").length-1,M=N;for(b=0;b=0&&!(i=e[o]);o--);for(o=0;o>> no match, partial?",e,p,t,f),p!==a))}if("string"==typeof l?(c=r.nocase?d.toLowerCase()===l.toLowerCase():d===l,this.debug("string match",l,d,c)):(c=d.match(l),this.debug("pattern match",l,d,c)),!c)return!1}if(o===a&&s===u)return!0;if(o===a)return n;if(s===u)return o===a-1&&""===e[o];throw new Error("wtf?")}},"./node_modules/q/q.js": /*!*****************************!*\ !*** ./node_modules/q/q.js ***! \*****************************/ /*! no static exports found */function(e,t,n){ /*! * * Copyright 2009-2017 Kris Kowal under the terms of the MIT * license found at https://github.com/kriskowal/q/blob/v1/LICENSE * * With parts by Tyler Close * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found * at http://www.opensource.org/licenses/mit-license.html * Forked at ref_send.js version: 2009-05-11 * * With parts by Mark Miller * Copyright (C) 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ !function(t){"use strict";"function"==typeof bootstrap?bootstrap("promise",t):e.exports=t()}((function(){"use strict";var e=!1;try{throw new Error}catch(t){e=!!t.stack}var t,n=w(),r=function(){},i=function(){var e={task:void 0,next:null},t=e,n=!1,r=void 0,o=!1,s=[];function a(){for(var t,r;e.next;)t=(e=e.next).task,e.task=void 0,(r=e.domain)&&(e.domain=void 0,r.enter()),u(t,r);for(;s.length;)u(t=s.pop());n=!1}function u(e,t){try{e()}catch(e){if(o)throw t&&t.exit(),setTimeout(a,0),t&&t.enter(),e;setTimeout((function(){throw e}),0)}t&&t.exit()}if(i=function(e){t=t.next={task:e,domain:o&&process.domain,next:null},n||(n=!0,r())},"object"==typeof process&&"[object process]"===process.toString()&&process.nextTick)o=!0,r=function(){process.nextTick(a)};else if("function"==typeof setImmediate)r="undefined"!=typeof window?setImmediate.bind(window,a):function(){setImmediate(a)};else if("undefined"!=typeof MessageChannel){var c=new MessageChannel;c.port1.onmessage=function(){r=l,c.port1.onmessage=a,a()};var l=function(){c.port2.postMessage(0)};r=function(){setTimeout(a,0),l()}}else r=function(){setTimeout(a,0)};return i.runAfter=function(e){s.push(e),n||(n=!0,r())},i}(),o=Function.call;function s(e){return function(){return o.apply(e,arguments)}}var a,u=s(Array.prototype.slice),c=s(Array.prototype.reduce||function(e,t){var n=0,r=this.length;if(1===arguments.length)for(;;){if(n in this){t=this[n++];break}if(++n>=r)throw new TypeError}for(;ni.stackCounter)&&(f(t,"__minimumStackCounter__",{value:i.stackCounter,configurable:!0}),r.unshift(i.stack));r.unshift(t.stack);var o=function(e){for(var t=e.split("\n"),n=[],r=0;r=n&&o<=z}function w(){if(e)try{throw new Error}catch(e){var n=e.stack.split("\n"),r=_(n[0].indexOf("@")>0?n[1]:n[2]);if(!r)return;return t=r[0],r[1]}}function S(e){return e instanceof A?e:R(e)?function(e){var t=j();return S.nextTick((function(){try{e.then(t.resolve,t.reject,t.notify)}catch(e){t.reject(e)}})),t.promise}(e):q(e)}S.resolve=S,S.nextTick=i,S.longStackSupport=!1;var E=1;function j(){var t,n=[],r=[],i=p(j.prototype),o=p(A.prototype);if(o.promiseDispatch=function(e,i,o){var s=u(arguments);n?(n.push(s),"when"===i&&o[1]&&r.push(o[1])):S.nextTick((function(){t.promiseDispatch.apply(t,s)}))},o.valueOf=function(){if(n)return o;var e=k(t);return P(e)&&(t=e),e},o.inspect=function(){return t?t.inspect():{state:"pending"}},S.longStackSupport&&e)try{throw new Error}catch(e){o.stack=e.stack.substring(e.stack.indexOf("\n")+1),o.stackCounter=E++}function s(i){t=i,S.longStackSupport&&e&&(o.source=i),c(n,(function(e,t){S.nextTick((function(){i.promiseDispatch.apply(i,t)}))}),void 0),n=void 0,r=void 0}return i.promise=o,i.resolve=function(e){t||s(S(e))},i.fulfill=function(e){t||s(q(e))},i.reject=function(e){t||s(U(e))},i.notify=function(e){t||c(r,(function(t,n){S.nextTick((function(){n(e)}))}),void 0)},i}function x(e){if("function"!=typeof e)throw new TypeError("resolver must be a function.");var t=j();try{e(t.resolve,t.reject,t.notify)}catch(e){t.reject(e)}return t.promise}function T(e){return x((function(t,n){for(var r=0,i=e.length;r2?e.resolve(u(arguments,1)):e.resolve(n)}},S.Promise=x,S.promise=x,x.race=T,x.all=H,x.reject=U,x.resolve=S,S.passByCopy=function(e){return e},A.prototype.passByCopy=function(){return this},S.join=function(e,t){return S(e).join(t)},A.prototype.join=function(e){return S([this,e]).spread((function(e,t){if(e===t)return e;throw new Error("Q can't join: not the same: "+e+" "+t)}))},S.race=T,A.prototype.race=function(){return this.then(S.race)},S.makePromise=A,A.prototype.toString=function(){return"[object Promise]"},A.prototype.then=function(e,t,n){var r=this,i=j(),o=!1;return S.nextTick((function(){r.promiseDispatch((function(t){o||(o=!0,i.resolve(function(t){try{return"function"==typeof e?e(t):t}catch(e){return U(e)}}(t)))}),"when",[function(e){o||(o=!0,i.resolve(function(e){if("function"==typeof t){v(e,r);try{return t(e)}catch(e){return U(e)}}return U(e)}(e)))}])})),r.promiseDispatch(void 0,"when",[void 0,function(e){var t,r=!1;try{t=function(e){return"function"==typeof n?n(e):e}(e)}catch(e){if(r=!0,!S.onerror)throw e;S.onerror(e)}r||i.notify(t)}]),i.promise},S.tap=function(e,t){return S(e).tap(t)},A.prototype.tap=function(e){return e=S(e),this.then((function(t){return e.fcall(t).thenResolve(t)}))},S.when=O,A.prototype.thenResolve=function(e){return this.then((function(){return e}))},S.thenResolve=function(e,t){return S(e).thenResolve(t)},A.prototype.thenReject=function(e){return this.then((function(){throw e}))},S.thenReject=function(e,t){return S(e).thenReject(t)},S.nearer=k,S.isPromise=P,S.isPromiseAlike=R,S.isPending=function(e){return P(e)&&"pending"===e.inspect().state},A.prototype.isPending=function(){return"pending"===this.inspect().state},S.isFulfilled=function(e){return!P(e)||"fulfilled"===e.inspect().state},A.prototype.isFulfilled=function(){return"fulfilled"===this.inspect().state},S.isRejected=function(e){return P(e)&&"rejected"===e.inspect().state},A.prototype.isRejected=function(){return"rejected"===this.inspect().state};var C,N,I,M=[],D=[],B=[],F=!0;function L(){M.length=0,D.length=0,F||(F=!0)}function U(e){var t=A({when:function(t){return t&&function(e){if(F){var t=l(D,e);-1!==t&&("object"==typeof process&&"function"==typeof process.emit&&S.nextTick.runAfter((function(){var n=l(B,e);-1!==n&&(process.emit("rejectionHandled",M[t],e),B.splice(n,1))})),D.splice(t,1),M.splice(t,1))}}(this),t?t(e):this}},(function(){return this}),(function(){return{state:"rejected",reason:e}}));return function(e,t){F&&("object"==typeof process&&"function"==typeof process.emit&&S.nextTick.runAfter((function(){-1!==l(D,e)&&(process.emit("unhandledRejection",t,e),B.push(e))})),D.push(e),t&&void 0!==t.stack?M.push(t.stack):M.push("(no stack) "+t))}(t,e),t}function q(e){return A({when:function(){return e},get:function(t){return e[t]},set:function(t,n){e[t]=n},delete:function(t){delete e[t]},post:function(t,n){return null==t?e.apply(void 0,n):e[t].apply(e,n)},apply:function(t,n){return e.apply(t,n)},keys:function(){return g(e)}},void 0,(function(){return{state:"fulfilled",value:e}}))}function V(e,t,n){return S(e).spread(t,n)}function G(e,t,n){return S(e).dispatch(t,n)}function H(e){return O(e,(function(e){var t=0,n=j();return c(e,(function(r,i,o){var s;P(i)&&"fulfilled"===(s=i.inspect()).state?e[o]=s.value:(++t,O(i,(function(r){e[o]=r,0==--t&&n.resolve(e)}),n.reject,(function(e){n.notify({index:o,value:e})})))}),void 0),0===t&&n.resolve(e),n.promise}))}function W(e){if(0===e.length)return S.resolve();var t=S.defer(),n=0;return c(e,(function(r,i,o){var s=e[o];n++,O(s,(function(e){t.resolve(e)}),(function(e){if(0===--n){var r=e||new Error(""+e);r.message="Q can't get fulfillment value from any promise, all promises were rejected. Last error message: "+r.message,t.reject(r)}}),(function(e){t.notify({index:o,value:e})}))}),void 0),t.promise}function $(e){return O(e,(function(e){return e=d(e,S),O(H(d(e,(function(e){return O(e,r,r)}))),(function(){return e}))}))}S.resetUnhandledRejections=L,S.getUnhandledReasons=function(){return M.slice()},S.stopUnhandledRejectionTracking=function(){L(),F=!1},L(),S.reject=U,S.fulfill=q,S.master=function(e){return A({isDef:function(){}},(function(t,n){return G(e,t,n)}),(function(){return S(e).inspect()}))},S.spread=V,A.prototype.spread=function(e,t){return this.all().then((function(t){return e.apply(void 0,t)}),t)},S.async=function(e){return function(){function t(e,t){var o;if("undefined"==typeof StopIteration){try{o=n[e](t)}catch(e){return U(e)}return o.done?S(o.value):O(o.value,r,i)}try{o=n[e](t)}catch(e){return m(e)?S(e.value):U(e)}return O(o,r,i)}var n=e.apply(this,arguments),r=t.bind(t,"next"),i=t.bind(t,"throw");return r()}},S.spawn=function(e){S.done(S.async(e)())},S.return=function(e){throw new a(e)},S.promised=function(e){return function(){return V([this,H(arguments)],(function(t,n){return e.apply(t,n)}))}},S.dispatch=G,A.prototype.dispatch=function(e,t){var n=this,r=j();return S.nextTick((function(){n.promiseDispatch(r.resolve,e,t)})),r.promise},S.get=function(e,t){return S(e).dispatch("get",[t])},A.prototype.get=function(e){return this.dispatch("get",[e])},S.set=function(e,t,n){return S(e).dispatch("set",[t,n])},A.prototype.set=function(e,t){return this.dispatch("set",[e,t])},S.del=S.delete=function(e,t){return S(e).dispatch("delete",[t])},A.prototype.del=A.prototype.delete=function(e){return this.dispatch("delete",[e])},S.mapply=S.post=function(e,t,n){return S(e).dispatch("post",[t,n])},A.prototype.mapply=A.prototype.post=function(e,t){return this.dispatch("post",[e,t])},S.send=S.mcall=S.invoke=function(e,t){return S(e).dispatch("post",[t,u(arguments,2)])},A.prototype.send=A.prototype.mcall=A.prototype.invoke=function(e){return this.dispatch("post",[e,u(arguments,1)])},S.fapply=function(e,t){return S(e).dispatch("apply",[void 0,t])},A.prototype.fapply=function(e){return this.dispatch("apply",[void 0,e])},S.try=S.fcall=function(e){return S(e).dispatch("apply",[void 0,u(arguments,1)])},A.prototype.fcall=function(){return this.dispatch("apply",[void 0,u(arguments)])},S.fbind=function(e){var t=S(e),n=u(arguments,1);return function(){return t.dispatch("apply",[this,n.concat(u(arguments))])}},A.prototype.fbind=function(){var e=this,t=u(arguments);return function(){return e.dispatch("apply",[this,t.concat(u(arguments))])}},S.keys=function(e){return S(e).dispatch("keys",[])},A.prototype.keys=function(){return this.dispatch("keys",[])},S.all=H,A.prototype.all=function(){return H(this)},S.any=W,A.prototype.any=function(){return W(this)},S.allResolved=(C=$,N="allResolved",I="allSettled",function(){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(N+" is deprecated, use "+I+" instead.",new Error("").stack),C.apply(C,arguments)}),A.prototype.allResolved=function(){return $(this)},S.allSettled=function(e){return S(e).allSettled()},A.prototype.allSettled=function(){return this.then((function(e){return H(d(e,(function(e){function t(){return e.inspect()}return(e=S(e)).then(t,t)})))}))},S.fail=S.catch=function(e,t){return S(e).then(void 0,t)},A.prototype.fail=A.prototype.catch=function(e){return this.then(void 0,e)},S.progress=function(e,t){return S(e).then(void 0,void 0,t)},A.prototype.progress=function(e){return this.then(void 0,void 0,e)},S.fin=S.finally=function(e,t){return S(e).finally(t)},A.prototype.fin=A.prototype.finally=function(e){if(!e||"function"!=typeof e.apply)throw new Error("Q can't apply finally callback");return e=S(e),this.then((function(t){return e.fcall().then((function(){return t}))}),(function(t){return e.fcall().then((function(){throw t}))}))},S.done=function(e,t,n,r){return S(e).done(t,n,r)},A.prototype.done=function(e,t,n){var r=function(e){S.nextTick((function(){if(v(e,i),!S.onerror)throw e;S.onerror(e)}))},i=e||t||n?this.then(e,t,n):this;"object"==typeof process&&process&&process.domain&&(r=process.domain.bind(r)),i.then(void 0,r)},S.timeout=function(e,t,n){return S(e).timeout(t,n)},A.prototype.timeout=function(e,t){var n=j(),r=setTimeout((function(){t&&"string"!=typeof t||((t=new Error(t||"Timed out after "+e+" ms")).code="ETIMEDOUT"),n.reject(t)}),e);return this.then((function(e){clearTimeout(r),n.resolve(e)}),(function(e){clearTimeout(r),n.reject(e)}),n.notify),n.promise},S.delay=function(e,t){return void 0===t&&(t=e,e=void 0),S(e).delay(t)},A.prototype.delay=function(e){return this.then((function(t){var n=j();return setTimeout((function(){n.resolve(t)}),e),n.promise}))},S.nfapply=function(e,t){return S(e).nfapply(t)},A.prototype.nfapply=function(e){var t=j(),n=u(e);return n.push(t.makeNodeResolver()),this.fapply(n).fail(t.reject),t.promise},S.nfcall=function(e){var t=u(arguments,1);return S(e).nfapply(t)},A.prototype.nfcall=function(){var e=u(arguments),t=j();return e.push(t.makeNodeResolver()),this.fapply(e).fail(t.reject),t.promise},S.nfbind=S.denodeify=function(e){if(void 0===e)throw new Error("Q can't wrap an undefined function");var t=u(arguments,1);return function(){var n=t.concat(u(arguments)),r=j();return n.push(r.makeNodeResolver()),S(e).fapply(n).fail(r.reject),r.promise}},A.prototype.nfbind=A.prototype.denodeify=function(){var e=u(arguments);return e.unshift(this),S.denodeify.apply(void 0,e)},S.nbind=function(e,t){var n=u(arguments,2);return function(){var r=n.concat(u(arguments)),i=j();function o(){return e.apply(t,arguments)}return r.push(i.makeNodeResolver()),S(o).fapply(r).fail(i.reject),i.promise}},A.prototype.nbind=function(){var e=u(arguments,0);return e.unshift(this),S.nbind.apply(void 0,e)},S.nmapply=S.npost=function(e,t,n){return S(e).npost(t,n)},A.prototype.nmapply=A.prototype.npost=function(e,t){var n=u(t||[]),r=j();return n.push(r.makeNodeResolver()),this.dispatch("post",[e,n]).fail(r.reject),r.promise},S.nsend=S.nmcall=S.ninvoke=function(e,t){var n=u(arguments,2),r=j();return n.push(r.makeNodeResolver()),S(e).dispatch("post",[t,n]).fail(r.reject),r.promise},A.prototype.nsend=A.prototype.nmcall=A.prototype.ninvoke=function(e){var t=u(arguments,1),n=j();return t.push(n.makeNodeResolver()),this.dispatch("post",[e,t]).fail(n.reject),n.promise},S.nodeify=function(e,t){return S(e).nodeify(t)},A.prototype.nodeify=function(e){if(!e)return this;this.then((function(t){S.nextTick((function(){e(null,t)}))}),(function(t){S.nextTick((function(){e(t)}))}))},S.noConflict=function(){throw new Error("Q.noConflict only works when Q is used as a global")};var z=w();return S}))},"./node_modules/qs/lib/formats.js": /*!****************************************!*\ !*** ./node_modules/qs/lib/formats.js ***! \****************************************/ /*! no static exports found */function(e,t,n){"use strict";var r=String.prototype.replace,i=/%20/g,o=n(/*! ./utils */"./node_modules/qs/lib/utils.js"),s={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=o.assign({default:s.RFC3986,formatters:{RFC1738:function(e){return r.call(e,i,"+")},RFC3986:function(e){return String(e)}}},s)},"./node_modules/qs/lib/index.js": /*!**************************************!*\ !*** ./node_modules/qs/lib/index.js ***! \**************************************/ /*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./stringify */"./node_modules/qs/lib/stringify.js"),i=n(/*! ./parse */"./node_modules/qs/lib/parse.js"),o=n(/*! ./formats */"./node_modules/qs/lib/formats.js");e.exports={formats:o,parse:i,stringify:r}},"./node_modules/qs/lib/parse.js": /*!**************************************!*\ !*** ./node_modules/qs/lib/parse.js ***! \**************************************/ /*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./utils */"./node_modules/qs/lib/utils.js"),i=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t,n){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(r),a=s?r.slice(0,s.index):r,u=[];if(a){if(!n.plainObjects&&i.call(Object.prototype,a)&&!n.allowPrototypes)return;u.push(a)}for(var c=0;n.depth>0&&null!==(s=o.exec(r))&&c=0;--i){var o,s=e[i];if("[]"===s&&n.parseArrays)o=[].concat(r);else{o=n.plainObjects?Object.create(null):{};var a="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(a,10);n.parseArrays||""!==a?!isNaN(u)&&s!==a&&String(u)===a&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(o=[])[u]=r:o[a]=r:o={0:r}}r=o}return r}(u,t,n)}};e.exports=function(e,t){var n=function(e){if(!e)return s;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?s.charset:e.charset;return{allowDots:void 0===e.allowDots?s.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var c="string"==typeof e?function(e,t){var n,u={},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,l=t.parameterLimit===1/0?void 0:t.parameterLimit,d=c.split(t.delimiter,l),p=-1,f=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(g=g.split(",")),y.indexOf("[]=")>-1&&(g=o(g)?[g]:g),i.call(u,h)?u[h]=r.combine(u[h],g):u[h]=g}return u}(e,n):e,l=n.plainObjects?Object.create(null):{},d=Object.keys(c),p=0;p0?v+m:""}},"./node_modules/qs/lib/utils.js": /*!**************************************!*\ !*** ./node_modules/qs/lib/utils.js ***! \**************************************/ /*! no static exports found */function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?i+=r.charAt(s):a<128?i+=o[a]:a<2048?i+=o[192|a>>6]+o[128|63&a]:a<55296||a>=57344?i+=o[224|a>>12]+o[128|a>>6&63]+o[128|63&a]:(s+=1,a=65536+((1023&a)<<10|1023&r.charCodeAt(s)),i+=o[240|a>>18]+o[128|a>>12&63]+o[128|a>>6&63]+o[128|63&a])}return i},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,n,o){if(!n)return t;if("object"!=typeof n){if(i(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(o&&(o.plainObjects||o.allowPrototypes)||!r.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return i(t)&&!i(n)&&(a=s(t,o)),i(t)&&i(n)?(n.forEach((function(n,i){if(r.call(t,i)){var s=t[i];s&&"object"==typeof s&&n&&"object"==typeof n?t[i]=e(s,n,o):t.push(n)}else t[i]=n})),t):Object.keys(n).reduce((function(t,i){var s=n[i];return r.call(t,i)?t[i]=e(t[i],s,o):t[i]=s,t}),a)}}},"./node_modules/reflect-metadata/Reflect.js": /*!**************************************************!*\ !*** ./node_modules/reflect-metadata/Reflect.js ***! \**************************************************/ /*! no static exports found */function(e,t){ /*! ***************************************************************************** Copyright (C) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var n;!function(e){!function(t){var n="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),r=i(e);function i(e,t){return function(n,r){"function"!=typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0===n.Reflect?n.Reflect=e:r=i(n.Reflect,r),function(e){var t=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,r=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,s={__proto__:[]}instanceof Array,a=!o&&!s,u={create:o?function(){return C(Object.create(null))}:s?function(){return C({__proto__:null})}:function(){return C({})},has:a?function(e,n){return t.call(e,n)}:function(e,t){return t in e},get:a?function(e,n){return t.call(e,n)?e[n]:void 0}:function(e,t){return e[t]}},c=Object.getPrototypeOf(Function),l="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,d=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var e={},t=[],n=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[i]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i=0;--n){var r=(0,e[n])(t);if(!b(r)&&!w(r)){if(!A(r))throw new TypeError;t=r}}return t}(e,t)}if(!x(e))throw new TypeError;if(!S(t))throw new TypeError;if(!S(r)&&!b(r)&&!w(r))throw new TypeError;return w(r)&&(r=void 0),function(e,t,n,r){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,n,r);if(!b(o)&&!w(o)){if(!S(o))throw new TypeError;r=o}}return r}(e,t,n=j(n),r)})),e("metadata",(function(e,t){return function(n,r){if(!S(n))throw new TypeError;if(!b(r)&&!function(e){switch(_(e)){case 3:case 4:return!0;default:return!1}}(r))throw new TypeError;m(e,t,n,r)}})),e("defineMetadata",(function(e,t,n,r){if(!S(n))throw new TypeError;return b(r)||(r=j(r)),m(e,t,n,r)})),e("hasMetadata",(function(e,t,n){if(!S(t))throw new TypeError;return b(n)||(n=j(n)),function e(t,n,r){if(g(t,n,r))return!0;var i=R(n);return!w(i)&&e(t,i,r)}(e,t,n)})),e("hasOwnMetadata",(function(e,t,n){if(!S(t))throw new TypeError;return b(n)||(n=j(n)),g(e,t,n)})),e("getMetadata",(function(e,t,n){if(!S(t))throw new TypeError;return b(n)||(n=j(n)),function e(t,n,r){if(g(t,n,r))return y(t,n,r);var i=R(n);return w(i)?void 0:e(t,i,r)}(e,t,n)})),e("getOwnMetadata",(function(e,t,n){if(!S(t))throw new TypeError;return b(n)||(n=j(n)),y(e,t,n)})),e("getMetadataKeys",(function(e,t){if(!S(e))throw new TypeError;return b(t)||(t=j(t)),function e(t,n){var r=v(t,n),i=R(t);if(null===i)return r;var o=e(i,n);if(o.length<=0)return r;if(r.length<=0)return o;for(var s=new p,a=[],u=0,c=r;u0)return!0;var i=f.get(t);return i.delete(n),i.size>0||(f.delete(t),!0)}))}(r)}()}(n||(n={}))},"./node_modules/semver-compare/index.js": /*!**********************************************!*\ !*** ./node_modules/semver-compare/index.js ***! \**********************************************/ /*! no static exports found */function(e,t){e.exports=function(e,t){for(var n=e.split("."),r=t.split("."),i=0;i<3;i++){var o=Number(n[i]),s=Number(r[i]);if(o>s)return 1;if(s>o)return-1;if(!isNaN(o)&&isNaN(s))return 1;if(isNaN(o)&&!isNaN(s))return-1}return 0}},"./node_modules/semver/semver.js": /*!***************************************!*\ !*** ./node_modules/semver/semver.js ***! \***************************************/ /*! no static exports found */function(e,t){var n;t=e.exports=$,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,i=t.re=[],o=t.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var u=s++;o[u]="[0-9]+";var c=s++;o[c]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var l=s++;o[l]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var d=s++;o[d]="("+o[u]+")\\.("+o[u]+")\\.("+o[u]+")";var p=s++;o[p]="(?:"+o[a]+"|"+o[c]+")";var f=s++;o[f]="(?:"+o[u]+"|"+o[c]+")";var h=s++;o[h]="(?:-("+o[p]+"(?:\\."+o[p]+")*))";var g=s++;o[g]="(?:-?("+o[f]+"(?:\\."+o[f]+")*))";var y=s++;o[y]="[0-9A-Za-z-]+";var m=s++;o[m]="(?:\\+("+o[y]+"(?:\\."+o[y]+")*))";var v=s++,_="v?"+o[l]+o[h]+"?"+o[m]+"?";o[v]="^"+_+"$";var b="[v=\\s]*"+o[d]+o[g]+"?"+o[m]+"?",w=s++;o[w]="^"+b+"$";var S=s++;o[S]="((?:<|>)?=?)";var E=s++;o[E]=o[u]+"|x|X|\\*";var j=s++;o[j]=o[a]+"|x|X|\\*";var x=s++;o[x]="[v=\\s]*("+o[j]+")(?:\\.("+o[j]+")(?:\\.("+o[j]+")(?:"+o[h]+")?"+o[m]+"?)?)?";var T=s++;o[T]="[v=\\s]*("+o[E]+")(?:\\.("+o[E]+")(?:\\.("+o[E]+")(?:"+o[g]+")?"+o[m]+"?)?)?";var A=s++;o[A]="^"+o[S]+"\\s*"+o[x]+"$";var O=s++;o[O]="^"+o[S]+"\\s*"+o[T]+"$";var k=s++;o[k]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var P=s++;o[P]="(?:~>?)";var R=s++;o[R]="(\\s*)"+o[P]+"\\s+",i[R]=new RegExp(o[R],"g");var C=s++;o[C]="^"+o[P]+o[x]+"$";var N=s++;o[N]="^"+o[P]+o[T]+"$";var I=s++;o[I]="(?:\\^)";var M=s++;o[M]="(\\s*)"+o[I]+"\\s+",i[M]=new RegExp(o[M],"g");var D=s++;o[D]="^"+o[I]+o[x]+"$";var B=s++;o[B]="^"+o[I]+o[T]+"$";var F=s++;o[F]="^"+o[S]+"\\s*("+b+")$|^$";var L=s++;o[L]="^"+o[S]+"\\s*("+_+")$|^$";var U=s++;o[U]="(\\s*)"+o[S]+"\\s*("+b+"|"+o[x]+")",i[U]=new RegExp(o[U],"g");var q=s++;o[q]="^\\s*("+o[x]+")\\s+-\\s+("+o[x]+")\\s*$";var V=s++;o[V]="^\\s*("+o[T]+")\\s+-\\s+("+o[T]+")\\s*$";var G=s++;o[G]="(<|>)?=?\\s*\\*";for(var H=0;H<35;H++)n(H,o[H]),i[H]||(i[H]=new RegExp(o[H]));function W(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof $)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?i[w]:i[v]).test(e))return null;try{return new $(e,t)}catch(e){return null}}function $(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof $){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof $))return new $(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[w]:i[v]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new $(e,n).inc(t,r).version}catch(e){return null}},t.diff=function(e,t){if(Q(e,t))return null;var n=W(e),r=W(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},t.compareIdentifiers=Y;var z=/^[0-9]+$/;function Y(e,t){var n=z.test(e),r=z.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e0}function X(e,t,n){return K(e,t,n)<0}function Q(e,t,n){return 0===K(e,t,n)}function Z(e,t,n){return 0!==K(e,t,n)}function ee(e,t,n){return K(e,t,n)>=0}function te(e,t,n){return K(e,t,n)<=0}function ne(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Q(e,n,r);case"!=":return Z(e,n,r);case">":return J(e,n,r);case">=":return ee(e,n,r);case"<":return X(e,n,r);case"<=":return te(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function re(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof re){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof re))return new re(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return Y(t,e)},t.major=function(e,t){return new $(e,t).major},t.minor=function(e,t){return new $(e,t).minor},t.patch=function(e,t){return new $(e,t).patch},t.compare=K,t.compareLoose=function(e,t){return K(e,t,!0)},t.rcompare=function(e,t,n){return K(t,e,n)},t.sort=function(e,n){return e.sort((function(e,r){return t.compare(e,r,n)}))},t.rsort=function(e,n){return e.sort((function(e,r){return t.rcompare(e,r,n)}))},t.gt=J,t.lt=X,t.eq=Q,t.neq=Z,t.gte=ee,t.lte=te,t.cmp=ne,t.Comparator=re;var ie={};function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof re)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,n,r,i,o,s,a,u,c,l,d,p){return((t=se(n)?"":se(r)?">="+n+".0.0":se(i)?">="+n+"."+r+".0":">="+t)+" "+(a=se(u)?"":se(c)?"<"+(+u+1)+".0.0":se(l)?"<"+u+"."+(+c+1)+".0":d?"<="+u+"."+c+"."+l+"-"+d:"<="+a)).trim()}function ue(e,t,r){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ce(e,t,n){try{t=new oe(t,n)}catch(e){return!1}return t.test(e)}function le(e,t,n,r){var i,o,s,a,u;switch(e=new $(e,r),t=new oe(t,r),n){case">":i=J,o=te,s=X,a=">",u=">=";break;case"<":i=X,o=ee,s=J,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ce(e,t,r))return!1;for(var c=0;c=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,r)?d=e:s(e.semver,p.semver,r)&&(p=e)})),d.operator===a||d.operator===u)return!1;if((!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===u&&s(e,p.semver))return!1}return!0}re.prototype.parse=function(e){var t=this.options.loose?i[F]:i[L],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new $(n[2],this.options.loose):this.semver=ie},re.prototype.toString=function(){return this.value},re.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new $(e,this.options)),ne(e,this.operator,this.semver,this.options))},re.prototype.intersects=function(e,t){if(!(e instanceof re))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new oe(e.value,t),ce(this.value,n,t);if(""===e.operator)return n=new oe(this.value,t),ce(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||u},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?i[V]:i[q];e=e.replace(r,ae),n("hyphen replace",e),e=e.replace(i[U],"$1$2$3"),n("comparator trim",e,i[U]),e=(e=(e=e.replace(i[R],"$1~")).replace(i[M],"$1^")).split(/\s+/).join(" ");var o=t?i[F]:i[L],s=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?i[B]:i[D];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?i[N]:i[C];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?i[O]:i[A];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var u=se(i),c=u||se(o),l=c||se(s);return"="===r&&l&&(r=""),u?t=">"===r||"<"===r?"<0.0.0":"*":r&&l?(c&&(o=0),s=0,">"===r?(r=">=",c?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",c?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):c?t=">="+i+".0.0 <"+(+i+1)+".0.0":l&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(i[G],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s=s.map((function(e){return new re(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new $(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!J(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(n&&e.test(n))return n;return null},t.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return le(e,t,"<",n)},t.gtr=function(e,t,n){return le(e,t,">",n)},t.outside=le,t.prerelease=function(e,t){var n=W(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new oe(e,n),t=new oe(t,n),e.intersects(t)},t.coerce=function(e){if(e instanceof $)return e;if("string"!=typeof e)return null;var t=e.match(i[k]);if(null==t)return null;return W(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},"./node_modules/shelljs/shell.js": /*!***************************************!*\ !*** ./node_modules/shelljs/shell.js ***! \***************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! ./src/common */"./node_modules/shelljs/src/common.js"),i=n(/*! ./src/cd */"./node_modules/shelljs/src/cd.js");t.cd=r.wrap("cd",i);var o=n(/*! ./src/pwd */"./node_modules/shelljs/src/pwd.js");t.pwd=r.wrap("pwd",o);var s=n(/*! ./src/ls */"./node_modules/shelljs/src/ls.js");t.ls=r.wrap("ls",s);var a=n(/*! ./src/find */"./node_modules/shelljs/src/find.js");t.find=r.wrap("find",a);var u=n(/*! ./src/cp */"./node_modules/shelljs/src/cp.js");t.cp=r.wrap("cp",u);var c=n(/*! ./src/rm */"./node_modules/shelljs/src/rm.js");t.rm=r.wrap("rm",c);var l=n(/*! ./src/mv */"./node_modules/shelljs/src/mv.js");t.mv=r.wrap("mv",l);var d=n(/*! ./src/mkdir */"./node_modules/shelljs/src/mkdir.js");t.mkdir=r.wrap("mkdir",d);var p=n(/*! ./src/test */"./node_modules/shelljs/src/test.js");t.test=r.wrap("test",p);var f=n(/*! ./src/cat */"./node_modules/shelljs/src/cat.js");t.cat=r.wrap("cat",f);var h=n(/*! ./src/to */"./node_modules/shelljs/src/to.js");String.prototype.to=r.wrap("to",h);var g=n(/*! ./src/toEnd */"./node_modules/shelljs/src/toEnd.js");String.prototype.toEnd=r.wrap("toEnd",g);var y=n(/*! ./src/sed */"./node_modules/shelljs/src/sed.js");t.sed=r.wrap("sed",y);var m=n(/*! ./src/grep */"./node_modules/shelljs/src/grep.js");t.grep=r.wrap("grep",m);var v=n(/*! ./src/which */"./node_modules/shelljs/src/which.js");t.which=r.wrap("which",v);var _=n(/*! ./src/echo */"./node_modules/shelljs/src/echo.js");t.echo=_;var b=n(/*! ./src/dirs */"./node_modules/shelljs/src/dirs.js").dirs;t.dirs=r.wrap("dirs",b);var w=n(/*! ./src/dirs */"./node_modules/shelljs/src/dirs.js").pushd;t.pushd=r.wrap("pushd",w);var S=n(/*! ./src/dirs */"./node_modules/shelljs/src/dirs.js").popd;t.popd=r.wrap("popd",S);var E=n(/*! ./src/ln */"./node_modules/shelljs/src/ln.js");t.ln=r.wrap("ln",E),t.exit=process.exit,t.env=process.env;var j=n(/*! ./src/exec */"./node_modules/shelljs/src/exec.js");t.exec=r.wrap("exec",j,{notUnix:!0});var x=n(/*! ./src/chmod */"./node_modules/shelljs/src/chmod.js");t.chmod=r.wrap("chmod",x);var T=n(/*! ./src/tempdir */"./node_modules/shelljs/src/tempdir.js");t.tempdir=r.wrap("tempdir",T);var A=n(/*! ./src/error */"./node_modules/shelljs/src/error.js");t.error=A,t.config=r.config},"./node_modules/shelljs/src/cat.js": /*!*****************************************!*\ !*** ./node_modules/shelljs/src/cat.js ***! \*****************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! ./common */"./node_modules/shelljs/src/common.js"),i=n(/*! fs */"fs");e.exports=function(e,t){var n="";return t||r.error("no paths given"),"string"==typeof t&&(t=[].slice.call(arguments,1)),(t=r.expand(t)).forEach((function(e){i.existsSync(e)||r.error("no such file or directory: "+e),n+=i.readFileSync(e,"utf8")+"\n"})),"\n"===n[n.length-1]&&(n=n.substring(0,n.length-1)),r.ShellString(n)}},"./node_modules/shelljs/src/cd.js": /*!****************************************!*\ !*** ./node_modules/shelljs/src/cd.js ***! \****************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! fs */"fs"),i=n(/*! ./common */"./node_modules/shelljs/src/common.js");e.exports=function(e,t){t||i.error("directory not specified"),r.existsSync(t)||i.error("no such file or directory: "+t),r.statSync(t).isDirectory()||i.error("not a directory: "+t),process.chdir(t)}},"./node_modules/shelljs/src/chmod.js": /*!*******************************************!*\ !*** ./node_modules/shelljs/src/chmod.js ***! \*******************************************/ /*! no static exports found */function(e,t,n){var r,i=n(/*! ./common */"./node_modules/shelljs/src/common.js"),o=n(/*! fs */"fs"),s=n(/*! path */"path"),a={OTHER_EXEC:(r={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:r.WRITE,OTHER_READ:r.READ,GROUP_EXEC:r.EXEC<<3,GROUP_WRITE:r.WRITE<<3,GROUP_READ:r.READ<<3,OWNER_EXEC:r.EXEC<<6,OWNER_WRITE:r.WRITE<<6,OWNER_READ:r.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};e.exports=function(e,t,n){var r;n||(e.length>0&&"-"===e.charAt(0)?(n=t,t=e,e=""):i.error("You must specify a file.")),"string"==typeof n&&(n=[n]),(e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"})).recursive?(r=[],i.expand(n).forEach((function e(t){var n=o.lstatSync(t);n.isSymbolicLink()||(r.push(t),n.isDirectory()&&o.readdirSync(t).forEach((function(n){e(t+"/"+n)})))}))):r=i.expand(n),r.forEach((function(n){if(n=s.resolve(n),o.existsSync(n)||i.error("File not found: "+n),!e.recursive||!o.lstatSync(n).isSymbolicLink()){var r=o.statSync(n).mode,u=r&a.TYPE_MASK,c=r;isNaN(parseInt(t,8))?t.split(",").forEach((function(t){var s=/([ugoa]*)([=\+-])([rwxXst]*)/i.exec(t);if(s){var l=s[1],d=s[2],p=s[3],f=-1!=l.indexOf("u")||"a"===l||""===l,h=-1!=l.indexOf("g")||"a"===l||""===l,g=-1!=l.indexOf("o")||"a"===l||""===l,y=-1!=p.indexOf("r"),m=-1!=p.indexOf("w"),v=-1!=p.indexOf("x"),_=-1!=p.indexOf("t"),b=-1!=p.indexOf("s"),w=0;switch(f&&(w|=(y?a.OWNER_READ:0)+(m?a.OWNER_WRITE:0)+(v?a.OWNER_EXEC:0)+(b?a.SETUID:0)),h&&(w|=(y?a.GROUP_READ:0)+(m?a.GROUP_WRITE:0)+(v?a.GROUP_EXEC:0)+(b?a.SETGID:0)),g&&(w|=(y?a.OTHER_READ:0)+(m?a.OTHER_WRITE:0)+(v?a.OTHER_EXEC:0)),_&&(w|=a.STICKY),d){case"+":c|=w;break;case"-":c&=~w;break;case"=":c=u+w,o.statSync(n).isDirectory()&&(c|=a.SETUID+a.SETGID&r)}e.verbose&&log(n+" -> "+c.toString(8)),r!=c&&(!e.verbose&&e.changes&&log(n+" -> "+c.toString(8)),o.chmodSync(n,c))}else i.error("Invalid symbolic mode change: "+t)})):(c=u+parseInt(t,8),o.statSync(n).isDirectory()&&(c|=a.SETUID+a.SETGID&r),o.chmodSync(n,c))}}))}},"./node_modules/shelljs/src/common.js": /*!********************************************!*\ !*** ./node_modules/shelljs/src/common.js ***! \********************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! os */"os"),i=n(/*! fs */"fs"),o=n(/*! ./ls */"./node_modules/shelljs/src/ls.js"),s={silent:!1,fatal:!1};t.config=s;var a={error:null,currentCmd:"shell.js",tempDir:null};t.state=a;var u=r.type().match(/^Win/)?"win":"unix";function c(){s.silent||console.log.apply(this,arguments)}function l(e,t){if(null===a.error&&(a.error=""),a.error+=a.currentCmd+": "+e+"\n",e.length>0&&c(a.error),s.fatal&&process.exit(1),!t)throw""}t.platform=u,t.log=c,t.error=l,t.ShellString=function(e){return e},t.parseOptions=function(e,t){t||l("parseOptions() internal error: no map given");var n={};for(var r in t)n[t[r]]=!1;if(!e)return n;"string"!=typeof e&&l("parseOptions() internal error: wrong str");var i=e.match(/^\-(.+)/);return i?(i[1].split("").forEach((function(e){e in t?n[t[e]]=!0:l("option not recognized: "+e)})),n):n},t.expand=function(e){var t=[];return e.forEach((function(e){if(e.search(/\*[^\/]*\//)>-1||e.search(/\*\*[^\/]*\//)>-1){var n=e.match(/^([^*]+\/|)(.*)/),r=n[1],i=n[2].replace(/\*\*/g,".*").replace(/\*/g,"[^\\/]*");i=new RegExp(i),o("-R",r).filter((function(e){return i.test(e)})).forEach((function(e){t.push(e)}))}else e.search(/\*/)>-1?o("",e).forEach((function(e){t.push(e)})):t.push(e)})),t},t.unlinkSync=function(e){try{i.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;i.chmodSync(e,"0666"),i.unlinkSync(e)}},t.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var n="",r=0;r and/or "):arguments.length>3?(t=[].slice.call(arguments,1,arguments.length-1),n=arguments[arguments.length-1]):"string"==typeof t?t=[t]:"length"in t?t=t:o.error("invalid arguments");var s=r.existsSync(n),c=s&&r.statSync(n);if(s&&c.isDirectory()||!(t.length>1)||o.error("dest is not a directory (too many sources)"),s&&c.isFile()&&!e.force&&o.error("dest file already exists: "+n),e.recursive){t.forEach((function(e,n){"/"===e[e.length-1]&&(t[n]+="*")}));try{r.mkdirSync(n,parseInt("0777",8))}catch(e){}}(t=o.expand(t)).forEach((function(t){if(r.existsSync(t))if(r.statSync(t).isDirectory())if(e.recursive){var s=i.join(n,i.basename(t)),c=r.statSync(t);try{r.mkdirSync(s,c.mode)}catch(e){if("EEXIST"!==e.code)throw e}u(t,s,{force:e.force})}else o.log(t+" is a directory (not copied)");else{var l=n;r.existsSync(n)&&r.statSync(n).isDirectory()&&(l=i.normalize(n+"/"+i.basename(t))),!r.existsSync(l)||e.force?a(t,l):o.error("dest file already exists: "+l,!0)}else o.error("no such file or directory: "+t,!0)}))}},"./node_modules/shelljs/src/dirs.js": /*!******************************************!*\ !*** ./node_modules/shelljs/src/dirs.js ***! \******************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! ./common */"./node_modules/shelljs/src/common.js"),i=n(/*! ./cd */"./node_modules/shelljs/src/cd.js"),o=n(/*! path */"path"),s=[];function a(e){return/^[\-+]\d+$/.test(e)}function u(e){if(a(e)){if(Math.abs(e)1))return r.error("no other directory");n=n.splice(1,1).concat(n)}return e["no-cd"]?n=n.slice(1):(t=o.resolve(n.shift()),i("",t)),s=n,l("")},t.popd=function(e,t){if(a(e)&&(t=e,e=""),e=r.parseOptions(e,{n:"no-cd"}),!s.length)return r.error("directory stack empty");if(t=u(t||"+0"),e["no-cd"]||t>0||s.length+t===0)t=t>0?t-1:t,s.splice(t,1);else{var n=o.resolve(s.shift());i("",n)}return l("")},t.dirs=l},"./node_modules/shelljs/src/echo.js": /*!******************************************!*\ !*** ./node_modules/shelljs/src/echo.js ***! \******************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! ./common */"./node_modules/shelljs/src/common.js");e.exports=function(){var e=[].slice.call(arguments,0);return console.log.apply(this,e),r.ShellString(e.join(" "))}},"./node_modules/shelljs/src/error.js": /*!*******************************************!*\ !*** ./node_modules/shelljs/src/error.js ***! \*******************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! ./common */"./node_modules/shelljs/src/common.js");e.exports=function(){return r.state.error}},"./node_modules/shelljs/src/exec.js": /*!******************************************!*\ !*** ./node_modules/shelljs/src/exec.js ***! \******************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! ./common */"./node_modules/shelljs/src/common.js"),i=n(/*! ./tempdir */"./node_modules/shelljs/src/tempdir.js"),o=n(/*! ./pwd */"./node_modules/shelljs/src/pwd.js"),s=n(/*! path */"path"),a=n(/*! fs */"fs"),u=n(/*! child_process */"child_process");e.exports=function(e,t,n){return e||r.error("must specify command"),"function"==typeof t&&(n=t,t={async:!0}),"object"==typeof t&&"function"==typeof n&&(t.async=!0),(t=r.extend({silent:r.config.silent,async:!1},t)).async?function(e,t,n){var i="",o=r.extend({silent:r.config.silent},t),s=u.exec(e,{env:process.env,maxBuffer:20971520},(function(e){n&&n(e?e.code:0,i)}));return s.stdout.on("data",(function(e){i+=e,o.silent||process.stdout.write(e)})),s.stderr.on("data",(function(e){i+=e,o.silent||process.stdout.write(e)})),s}(e,t,n):function(e,t){var n=i(),c=s.resolve(n+"/"+r.randomFileName()),l=s.resolve(n+"/"+r.randomFileName()),d=s.resolve(n+"/"+r.randomFileName()),p=s.resolve(n+"/"+r.randomFileName()),f=r.extend({silent:r.config.silent},t),h="";function g(){if(!f.silent&&a.existsSync(c)){var e=a.readFileSync(c,"utf8");e.length<=h.length||(process.stdout.write(e.substr(h.length)),h=e)}}function y(e){return(e+"").replace(/([\\"'])/g,"\\$1").replace(/\0/g,"\\0")}var m="var child = require('child_process'), fs = require('fs');child.exec('"+y(e+=" > "+c+" 2>&1")+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) { fs.writeFileSync('"+y(l)+"', err ? err.code.toString() : '0');});";for(a.existsSync(d)&&r.unlinkSync(d),a.existsSync(c)&&r.unlinkSync(c),a.existsSync(l)&&r.unlinkSync(l),a.writeFileSync(d,m),u.exec('"'+process.execPath+'" '+d,{env:process.env,cwd:o(),maxBuffer:20971520});!a.existsSync(l);)g(),a.writeFileSync(p,"a");for(;!a.existsSync(c);)g(),a.writeFileSync(p,"a");for(var v=parseInt("",10);isNaN(v);)v=parseInt(a.readFileSync(l,"utf8"),10);var _=a.readFileSync(c,"utf8");try{r.unlinkSync(d)}catch(e){}try{r.unlinkSync(c)}catch(e){}try{r.unlinkSync(l)}catch(e){}try{r.unlinkSync(p)}catch(e){}return(1===v||2===v||v>=126)&&r.error("",!0),{code:v,output:_}}(e,t)}},"./node_modules/shelljs/src/find.js": /*!******************************************!*\ !*** ./node_modules/shelljs/src/find.js ***! \******************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! fs */"fs"),i=n(/*! ./common */"./node_modules/shelljs/src/common.js"),o=n(/*! ./ls */"./node_modules/shelljs/src/ls.js");e.exports=function(e,t){t?"object"==typeof t?t=t:"string"==typeof t&&(t=[].slice.call(arguments,1)):i.error("no path specified");var n=[];function s(e){"win"===i.platform&&(e=e.replace(/\\/g,"/")),n.push(e)}return t.forEach((function(e){s(e),r.statSync(e).isDirectory()&&o("-RA",e+"/*").forEach((function(e){s(e)}))})),n}},"./node_modules/shelljs/src/grep.js": /*!******************************************!*\ !*** ./node_modules/shelljs/src/grep.js ***! \******************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! ./common */"./node_modules/shelljs/src/common.js"),i=n(/*! fs */"fs");e.exports=function(e,t,n){e=r.parseOptions(e,{v:"inverse"}),n||r.error("no paths given"),"string"==typeof n&&(n=[].slice.call(arguments,2)),n=r.expand(n);var o="";return n.forEach((function(n){i.existsSync(n)?i.readFileSync(n,"utf8").split(/\r*\n/).forEach((function(n){var r=n.match(t);(e.inverse&&!r||!e.inverse&&r)&&(o+=n+"\n")})):r.error("no such file or directory: "+n,!0)})),r.ShellString(o)}},"./node_modules/shelljs/src/ln.js": /*!****************************************!*\ !*** ./node_modules/shelljs/src/ln.js ***! \****************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! fs */"fs"),i=n(/*! path */"path"),o=n(/*! ./common */"./node_modules/shelljs/src/common.js"),s=n(/*! os */"os");e.exports=function(e,t,n){e=o.parseOptions(e,{s:"symlink",f:"force"}),t&&n||o.error("Missing and/or "),t=i.resolve(process.cwd(),String(t)),n=i.resolve(process.cwd(),String(n)),r.existsSync(t)||o.error("Source file does not exist",!0),r.existsSync(n)&&(e.force||o.error("Destination file exists",!0),r.unlinkSync(n)),e.symlink?r.symlinkSync(t,n,"win32"===s.platform()?"junction":null):r.linkSync(t,n,"win32"===s.platform()?"junction":null)}},"./node_modules/shelljs/src/ls.js": /*!****************************************!*\ !*** ./node_modules/shelljs/src/ls.js ***! \****************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! path */"path"),i=n(/*! fs */"fs"),o=n(/*! ./common */"./node_modules/shelljs/src/common.js"),s=n(/*! ./cd */"./node_modules/shelljs/src/cd.js"),a=n(/*! ./pwd */"./node_modules/shelljs/src/pwd.js");e.exports=function e(t,n){(t=o.parseOptions(t,{R:"recursive",A:"all",a:"all_deprecated"})).all_deprecated&&(o.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),n?"object"==typeof n?n=n:"string"==typeof n&&(n=[].slice.call(arguments,1)):n=["."];var u=[];function c(e,n){return!!("."!==r.basename(e)[0]||t.all||"."===r.basename(n)[0]&&r.basename(n).length>1)&&("win"===o.platform&&(e=e.replace(/\\/g,"/")),u.push(e),!0)}return n.forEach((function(n){if(i.existsSync(n)){var l=i.statSync(n);if(l.isFile())return void c(n,n);if(l.isDirectory())return void i.readdirSync(n).forEach((function(r){if(c(r,n)&&t.recursive){var o=a();s("",n),i.statSync(r).isDirectory()&&(u=u.concat(e("-R"+(t.all?"A":""),r+"/*"))),s("",o)}}))}var d=r.basename(n),p=r.dirname(n);if(d.search(/\*/)>-1&&i.existsSync(p)&&i.statSync(p).isDirectory){var f=d.replace(/(\^|\$|\(|\)|<|>|\[|\]|\{|\}|\.|\+|\?)/g,"\\$1");return f="^"+f.replace(/\*/g,".*")+"$",void i.readdirSync(p).forEach((function(n){if(n.match(new RegExp(f))){if(!c(r.normalize(p+"/"+n),d))return;if(t.recursive){var o=p+"/"+n;i.lstatSync(o).isDirectory()&&(u=u.concat(e("-R"+(t.all?"A":""),o+"/*")))}}}))}o.error("no such file or directory: "+n,!0)})),u}},"./node_modules/shelljs/src/mkdir.js": /*!*******************************************!*\ !*** ./node_modules/shelljs/src/mkdir.js ***! \*******************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! ./common */"./node_modules/shelljs/src/common.js"),i=n(/*! fs */"fs"),o=n(/*! path */"path");function s(e){var t=o.dirname(e);i.existsSync(t)?i.mkdirSync(e,parseInt("0777",8)):(s(t),i.mkdirSync(e,parseInt("0777",8)))}e.exports=function(e,t){e=r.parseOptions(e,{p:"fullpath"}),t||r.error("no paths given"),"string"==typeof t&&(t=[].slice.call(arguments,1)),t.forEach((function(t){if(i.existsSync(t))e.fullpath||r.error("path already exists: "+t,!0);else{var n=o.dirname(t);i.existsSync(n)||e.fullpath?e.fullpath?s(t):i.mkdirSync(t,parseInt("0777",8)):r.error("no such file or directory: "+n,!0)}}))}},"./node_modules/shelljs/src/mv.js": /*!****************************************!*\ !*** ./node_modules/shelljs/src/mv.js ***! \****************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! fs */"fs"),i=n(/*! path */"path"),o=n(/*! ./common */"./node_modules/shelljs/src/common.js");e.exports=function(e,t,n){e=o.parseOptions(e,{f:"force"}),arguments.length<3?o.error("missing and/or "):arguments.length>3?(t=[].slice.call(arguments,1,arguments.length-1),n=arguments[arguments.length-1]):"string"==typeof t?t=[t]:"length"in t?t=t:o.error("invalid arguments"),t=o.expand(t);var s=r.existsSync(n),a=s&&r.statSync(n);s&&a.isDirectory()||!(t.length>1)||o.error("dest is not a directory (too many sources)"),s&&a.isFile()&&!e.force&&o.error("dest file already exists: "+n),t.forEach((function(t){if(r.existsSync(t)){var s=n;r.existsSync(n)&&r.statSync(n).isDirectory()&&(s=i.normalize(n+"/"+i.basename(t))),!r.existsSync(s)||e.force?i.resolve(t)!==i.dirname(i.resolve(s))?r.renameSync(t,s):o.error("cannot move to self: "+t,!0):o.error("dest file already exists: "+s,!0)}else o.error("no such file or directory: "+t,!0)}))}},"./node_modules/shelljs/src/pwd.js": /*!*****************************************!*\ !*** ./node_modules/shelljs/src/pwd.js ***! \*****************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! path */"path"),i=n(/*! ./common */"./node_modules/shelljs/src/common.js");e.exports=function(e){var t=r.resolve(process.cwd());return i.ShellString(t)}},"./node_modules/shelljs/src/rm.js": /*!****************************************!*\ !*** ./node_modules/shelljs/src/rm.js ***! \****************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! ./common */"./node_modules/shelljs/src/common.js"),i=n(/*! fs */"fs");function o(e,t){var n,a;n=i.readdirSync(e);for(var u=0;u=this.maxSockets?i.requests.push(o):i.createSocket(o,(function(t){function n(){i.emit("free",t,o)}function r(e){i.removeSocket(t),t.removeListener("free",n),t.removeListener("close",r),t.removeListener("agentRemove",r)}t.on("free",n),t.on("close",r),t.on("agentRemove",r),e.onSocket(t)}))},l.prototype.createSocket=function(e,t){var n=this,i={};n.sockets.push(i);var o=f({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1});o.proxyAuth&&(o.headers=o.headers||{},o.headers["Proxy-Authorization"]="Basic "+new Buffer(o.proxyAuth).toString("base64")),r("making CONNECT request");var s=n.request(o);function a(o,a,c){if(s.removeAllListeners(),a.removeAllListeners(),200===o.statusCode)u.equal(c.length,0),r("tunneling connection has established"),n.sockets[n.sockets.indexOf(i)]=a,t(a);else{r("tunneling socket could not be established, statusCode=%d",o.statusCode);var l=new Error("tunneling socket could not be established, statusCode="+o.statusCode);l.code="ECONNRESET",e.request.emit("error",l),n.removeSocket(i)}}s.useChunkedEncodingByDefault=!1,s.once("response",(function(e){e.upgrade=!0})),s.once("upgrade",(function(e,t,n){process.nextTick((function(){a(e,t,n)}))})),s.once("connect",a),s.once("error",(function(t){s.removeAllListeners(),r("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var o=new Error("tunneling socket could not be established, cause="+t.message);o.code="ECONNRESET",e.request.emit("error",o),n.removeSocket(i)})),s.end()},l.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var n=this.requests.shift();n&&this.createSocket(n,(function(e){n.request.onSocket(e)}))}},r=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},t.debug=r},"./node_modules/typed-rest-client/HttpClient.js": /*!******************************************************!*\ !*** ./node_modules/typed-rest-client/HttpClient.js ***! \******************************************************/ /*! no static exports found */function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,a)}u((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(/*! url */"url"),o=n(/*! http */"http"),s=n(/*! https */"https"),a=n(/*! ./Util */"./node_modules/typed-rest-client/Util.js");let u,c;var l;!function(e){e[e.OK=200]="OK",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.ResourceMoved=302]="ResourceMoved",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.SwitchProxy=306]="SwitchProxy",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout"}(l=t.HttpCodes||(t.HttpCodes={}));const d=[l.MovedPermanently,l.ResourceMoved,l.SeeOther,l.TemporaryRedirect,l.PermanentRedirect],p=[l.BadGateway,l.ServiceUnavailable,l.GatewayTimeout],f=["OPTIONS","GET","DELETE","HEAD"];class h{constructor(e){this.message=e}readBody(){return new Promise((e,t)=>r(this,void 0,void 0,(function*(){let n=Buffer.alloc(0);const i=a.obtainContentCharset(this),o=this.message.headers["content-encoding"]||"",s=new RegExp("(gzip$)|(gzip, *deflate)").test(o);this.message.on("data",(function(e){const t="string"==typeof e?Buffer.from(e,i):e;n=Buffer.concat([n,t])})).on("end",(function(){return r(this,void 0,void 0,(function*(){if(s){const t=yield a.decompressGzippedContent(n,i);e(t)}else e(n.toString(i))}))})).on("error",(function(e){t(e)}))})))}}var g;t.HttpClientResponse=h,t.isHttps=function(e){return"https:"===i.parse(e).protocol},function(e){e.HTTP_PROXY="HTTP_PROXY",e.HTTPS_PROXY="HTTPS_PROXY",e.NO_PROXY="NO_PROXY"}(g||(g={}));t.HttpClient=class{constructor(e,t,r){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=e,this.handlers=t||[];let i=process.env[g.NO_PROXY];i&&(this._httpProxyBypassHosts=[],i.split(",").forEach(e=>{this._httpProxyBypassHosts.push(new RegExp(e,"i"))})),this.requestOptions=r,r&&(null!=r.ignoreSslError&&(this._ignoreSslError=r.ignoreSslError),this._socketTimeout=r.socketTimeout,this._httpProxy=r.proxy,r.proxy&&r.proxy.proxyBypassHosts&&(this._httpProxyBypassHosts=[],r.proxy.proxyBypassHosts.forEach(e=>{this._httpProxyBypassHosts.push(new RegExp(e,"i"))})),this._certConfig=r.cert,this._certConfig&&(u=n(/*! fs */"fs"),this._certConfig.caFile&&u.existsSync(this._certConfig.caFile)&&(this._ca=u.readFileSync(this._certConfig.caFile,"utf8")),this._certConfig.certFile&&u.existsSync(this._certConfig.certFile)&&(this._cert=u.readFileSync(this._certConfig.certFile,"utf8")),this._certConfig.keyFile&&u.existsSync(this._certConfig.keyFile)&&(this._key=u.readFileSync(this._certConfig.keyFile,"utf8"))),null!=r.allowRedirects&&(this._allowRedirects=r.allowRedirects),null!=r.allowRedirectDowngrade&&(this._allowRedirectDowngrade=r.allowRedirectDowngrade),null!=r.maxRedirects&&(this._maxRedirects=Math.max(r.maxRedirects,0)),null!=r.keepAlive&&(this._keepAlive=r.keepAlive),null!=r.allowRetries&&(this._allowRetries=r.allowRetries),null!=r.maxRetries&&(this._maxRetries=r.maxRetries))}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,n){return this.request("POST",e,t,n||{})}patch(e,t,n){return this.request("PATCH",e,t,n||{})}put(e,t,n){return this.request("PUT",e,t,n||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,n,r){return this.request(e,t,n,r)}request(e,t,n,o){return r(this,void 0,void 0,(function*(){if(this._disposed)throw new Error("Client has already been disposed.");let r,s=i.parse(t),a=this._prepareRequest(e,s,o),u=this._allowRetries&&-1!=f.indexOf(e)?this._maxRetries+1:1,c=0;for(;c0;){const u=r.message.headers.location;if(!u)break;let c=i.parse(u);if("https:"==s.protocol&&s.protocol!=c.protocol&&!this._allowRedirectDowngrade)throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");yield r.readBody(),a=this._prepareRequest(e,c,o),r=yield this.requestRaw(a,n),t--}if(-1==p.indexOf(r.message.statusCode))return r;c+=1,c{this.requestRawWithCallback(e,t,(function(e,t){e&&r(e),n(t)}))})}requestRawWithCallback(e,t,n){let r;"string"==typeof t&&(e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8"));let i=!1,o=(e,t)=>{i||(i=!0,n(e,t))},s=e.httpModule.request(e.options,e=>{let t=new h(e);o(null,t)});s.on("socket",e=>{r=e}),s.setTimeout(this._socketTimeout||18e4,()=>{r&&r.destroy(),o(new Error("Request timeout: "+e.options.path),null)}),s.on("error",(function(e){o(e,null)})),t&&"string"==typeof t&&s.write(t,"utf8"),t&&"string"!=typeof t?(t.on("close",(function(){s.end()})),t.pipe(s)):s.end()}_prepareRequest(e,t,n){const r={};r.parsedUrl=t;const a="https:"===r.parsedUrl.protocol;r.httpModule=a?s:o;const u=a?443:80;return r.options={},r.options.host=r.parsedUrl.hostname,r.options.port=r.parsedUrl.port?parseInt(r.parsedUrl.port):u,r.options.path=(r.parsedUrl.pathname||"")+(r.parsedUrl.search||""),r.options.method=e,r.options.headers=this._mergeHeaders(n),null!=this.userAgent&&(r.options.headers["user-agent"]=this.userAgent),r.options.agent=this._getAgent(r.parsedUrl),this.handlers&&!this._isPresigned(i.format(t))&&this.handlers.forEach(e=>{e.prepareRequest(r.options)}),r}_isPresigned(e){if(this.requestOptions&&this.requestOptions.presignedUrlPatterns){const t=this.requestOptions.presignedUrlPatterns;for(let n=0;nObject.keys(e).reduce((t,n)=>(t[n.toLowerCase()]=e[n],t),{});return this.requestOptions&&this.requestOptions.headers?Object.assign({},t(this.requestOptions.headers),t(e)):t(e||{})}_getAgent(e){let t,r=this._getProxy(e),i=r.proxyUrl&&r.proxyUrl.hostname&&!this._isMatchInBypassProxyList(e);if(this._keepAlive&&i&&(t=this._proxyAgent),this._keepAlive&&!i&&(t=this._agent),t)return t;const a="https:"===e.protocol;let u=100;if(this.requestOptions&&(u=this.requestOptions.maxSockets||o.globalAgent.maxSockets),i){c||(c=n(/*! tunnel */"./node_modules/typed-rest-client/node_modules/tunnel/index.js"));const e={maxSockets:u,keepAlive:this._keepAlive,proxy:{proxyAuth:r.proxyAuth,host:r.proxyUrl.hostname,port:r.proxyUrl.port}};let i;const o="https:"===r.proxyUrl.protocol;i=a?o?c.httpsOverHttps:c.httpsOverHttp:o?c.httpOverHttps:c.httpOverHttp,t=i(e),this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:u};t=a?new s.Agent(e):new o.Agent(e),this._agent=t}return t||(t=a?s.globalAgent:o.globalAgent),a&&this._ignoreSslError&&(t.options=Object.assign(t.options||{},{rejectUnauthorized:!1})),a&&this._certConfig&&(t.options=Object.assign(t.options||{},{ca:this._ca,cert:this._cert,key:this._key,passphrase:this._certConfig.passphrase})),t}_getProxy(e){let t,n,r="https:"===e.protocol,o=this._httpProxy,s=process.env[g.HTTPS_PROXY],a=process.env[g.HTTP_PROXY];return o||(s&&r?o={proxyUrl:s}:a&&(o={proxyUrl:a})),o&&(o.proxyUrl.length>0&&(t=i.parse(o.proxyUrl)),(o.proxyUsername||o.proxyPassword)&&(n=o.proxyUsername+":"+o.proxyPassword)),{proxyUrl:t,proxyAuth:n}}_isMatchInBypassProxyList(e){if(!this._httpProxyBypassHosts)return!1;let t=!1;return this._httpProxyBypassHosts.forEach(n=>{n.test(e.href)&&(t=!0)}),t}_performExponentialBackoff(e){e=Math.min(10,e);const t=5*Math.pow(2,e);return new Promise(e=>setTimeout(()=>e(),t))}}},"./node_modules/typed-rest-client/Util.js": /*!************************************************!*\ !*** ./node_modules/typed-rest-client/Util.js ***! \************************************************/ /*! no static exports found */function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,a)}u((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(/*! qs */"./node_modules/qs/lib/index.js"),o=n(/*! url */"url"),s=n(/*! path */"path"),a=n(/*! zlib */"zlib");t.getUrl=function(e,t,n){const r=s.posix||s;let a="";if(t)if(e){const n=o.parse(t),i=o.parse(e);i.protocol=i.protocol||n.protocol,i.auth=i.auth||n.auth,i.host=i.host||n.host,i.pathname=r.resolve(n.pathname,i.pathname),!i.pathname.endsWith("/")&&e.endsWith("/")&&(i.pathname+="/"),a=o.format(i)}else a=t;else a=e;return n?function(e,t){const n=e.replace(/\?$/g,""),r=i.stringify(t.params,function(e){return{addQueryPrefix:!0,delimiter:(e.options||{}).separator||"&",allowDots:(e.options||{}).shouldAllowDots||!1,arrayFormat:(e.options||{}).arrayFormat||"repeat",encodeValuesOnly:(e.options||{}).shouldOnlyEncodeValues||!0}}(t));return`${n}${r}`}(a,n):a},t.decompressGzippedContent=function(e,t){return r(this,void 0,void 0,(function*(){return new Promise((n,i)=>r(this,void 0,void 0,(function*(){a.gunzip(e,(function(e,r){e&&i(e),n(r.toString(t||"utf-8"))}))})))}))},t.obtainContentCharset=function(e){const t=(e.message.headers["content-type"]||"").match(/charset=([^;,\r\n]+)/i);return t&&t[1]?t[1]:"utf-8"}},"./node_modules/typed-rest-client/node_modules/tunnel/index.js": /*!*********************************************************************!*\ !*** ./node_modules/typed-rest-client/node_modules/tunnel/index.js ***! \*********************************************************************/ /*! no static exports found */function(e,t,n){e.exports=n(/*! ./lib/tunnel */"./node_modules/typed-rest-client/node_modules/tunnel/lib/tunnel.js")},"./node_modules/typed-rest-client/node_modules/tunnel/lib/tunnel.js": /*!**************************************************************************!*\ !*** ./node_modules/typed-rest-client/node_modules/tunnel/lib/tunnel.js ***! \**************************************************************************/ /*! no static exports found */function(e,t,n){"use strict";n(/*! net */"net");var r,i=n(/*! tls */"tls"),o=n(/*! http */"http"),s=n(/*! https */"https"),a=n(/*! events */"events"),u=(n(/*! assert */"assert"),n(/*! util */"util"));function c(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,n,r,i){for(var o=d(n,r,i),s=0,a=t.requests.length;s=this.maxSockets?i.requests.push(o):i.createSocket(o,(function(t){function n(){i.emit("free",t,o)}function r(e){i.removeSocket(t),t.removeListener("free",n),t.removeListener("close",r),t.removeListener("agentRemove",r)}t.on("free",n),t.on("close",r),t.on("agentRemove",r),e.onSocket(t)}))},c.prototype.createSocket=function(e,t){var n=this,i={};n.sockets.push(i);var o=p({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(o.localAddress=e.localAddress),o.proxyAuth&&(o.headers=o.headers||{},o.headers["Proxy-Authorization"]="Basic "+new Buffer(o.proxyAuth).toString("base64")),r("making CONNECT request");var s=n.request(o);function a(o,a,u){var c;return s.removeAllListeners(),a.removeAllListeners(),200!==o.statusCode?(r("tunneling socket could not be established, statusCode=%d",o.statusCode),a.destroy(),(c=new Error("tunneling socket could not be established, statusCode="+o.statusCode)).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(i)):u.length>0?(r("got illegal response body from proxy"),a.destroy(),(c=new Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(i)):(r("tunneling connection has established"),n.sockets[n.sockets.indexOf(i)]=a,t(a))}s.useChunkedEncodingByDefault=!1,s.once("response",(function(e){e.upgrade=!0})),s.once("upgrade",(function(e,t,n){process.nextTick((function(){a(e,t,n)}))})),s.once("connect",a),s.once("error",(function(t){s.removeAllListeners(),r("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var o=new Error("tunneling socket could not be established, cause="+t.message);o.code="ECONNRESET",e.request.emit("error",o),n.removeSocket(i)})),s.end()},c.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var n=this.requests.shift();n&&this.createSocket(n,(function(e){n.request.onSocket(e)}))}},r=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},t.debug=r},"./node_modules/uuid/lib/bytesToUuid.js": /*!**********************************************!*\ !*** ./node_modules/uuid/lib/bytesToUuid.js ***! \**********************************************/ /*! no static exports found */function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},"./node_modules/uuid/lib/rng.js": /*!**************************************!*\ !*** ./node_modules/uuid/lib/rng.js ***! \**************************************/ /*! no static exports found */function(e,t,n){var r=n(/*! crypto */"crypto");e.exports=function(){return r.randomBytes(16)}},"./node_modules/uuid/v4.js": /*!*********************************!*\ !*** ./node_modules/uuid/v4.js ***! \*********************************/ /*! no static exports found */function(e,t,n){var r=n(/*! ./lib/rng */"./node_modules/uuid/lib/rng.js"),i=n(/*! ./lib/bytesToUuid */"./node_modules/uuid/lib/bytesToUuid.js");e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},"./src/agent/azure/build-agent.ts": /*!****************************************!*\ !*** ./src/agent/azure/build-agent.ts ***! \****************************************/ /*! no static exports found */function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=n(/*! inversify */"./node_modules/inversify/lib/inversify.js"),s=i(n(/*! azure-pipelines-task-lib/task */"./node_modules/azure-pipelines-task-lib/task.js")),a=i(n(/*! azure-pipelines-tool-lib/tool */"./node_modules/azure-pipelines-tool-lib/tool.js"));let u=class{get agentName(){return"Azure Pipelines"}find(e,t,n){return a.findLocalTool(e,t,n)}cacheDir(e,t,n,r){return a.cacheDir(e,t,n,r)}createTempDir(){return Promise.resolve(s.getVariable("Agent.TempDirectory"))}debug(e){s.debug(e)}setFailed(e,t){s.setResult(s.TaskResult.Failed,e,t)}setSucceeded(e,t){s.setResult(s.TaskResult.Succeeded,e,t)}exportVariable(e,t){s.setVariable(e,t)}getVariable(e){return s.getVariable(e)}addPath(e){a.prependPath(e)}which(e,t){return Promise.resolve(s.which(e,t))}exec(e,t){const n=s.tool(e);n.arg(t);const r=n.execSync();return Promise.resolve({code:r.code,error:r.error,stderr:r.stderr,stdout:r.stdout})}getSourceDir(){return this.getVariable("Build.SourcesDirectory")}setOutput(e,t){s.setVariable(e,t)}getInput(e,t){var n;return null===(n=s.getInput(e,t))||void 0===n?void 0:n.trim()}getListInput(e,t){return s.getInput(e,t).split("\n").filter(e=>""!==e)}getBooleanInput(e,t){return s.getBoolInput(e,t)}isValidInputFile(e,t){return s.filePathSupplied(e)&&this.fileExists(t)}fileExists(e){return s.exist(e)&&s.stats(e).isFile()}directoryExists(e){return s.exist(e)&&s.stats(e).isDirectory()}};u=r([o.injectable()],u),t.BuildAgent=u},"./src/core/dotnet-tool.ts": /*!*********************************!*\ !*** ./src/core/dotnet-tool.ts ***! \*********************************/ /*! no static exports found */function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const u=a(n(/*! fs */"fs")),c=a(n(/*! os */"os")),l=a(n(/*! path */"path")),d=a(n(/*! typed-rest-client/HttpClient */"./node_modules/typed-rest-client/HttpClient.js")),p=n(/*! inversify */"./node_modules/inversify/lib/inversify.js"),f=n(/*! ./models */"./src/core/models.ts");let h=class{constructor(e,t){this.buildAgent=e,this.versionManager=t,this.httpClient=new d.HttpClient("dotnet")}disableTelemetry(){this.buildAgent.exportVariable("DOTNET_CLI_TELEMETRY_OPTOUT","1")}execute(e,t){return console.log(`Command: ${e} ${t.join(" ")}`),this.buildAgent.exec(e,t)}toolInstall(e,t,n,r){return s(this,void 0,void 0,(function*(){let i;if(console.log(""),console.log("--------------------------"),console.log(`Installing ${e} version `+t),console.log("--------------------------"),this.versionManager.isExplicitVersion(t)&&(n=!1),n||(i=this.buildAgent.find(e,t)),!i){let n;if(this.versionManager.isExplicitVersion(t))n=t;else{if(n=yield this.queryLatestMatch(e,t,r),!n)throw new Error(`Unable to find ${e} version '${t}'.`);i=this.buildAgent.find(e,n)}i||(i=yield this.acquireTool(e,n))}if(this.buildAgent.debug(`toolPath: ${i}`),"win32"!==c.platform()&&!this.buildAgent.getVariable("DOTNET_ROOT")){let e=yield this.buildAgent.which("dotnet");e=u.readlinkSync(e)||e;const t=l.dirname(e);this.buildAgent.exportVariable("DOTNET_ROOT",t)}return this.buildAgent.addPath(i),i}))}queryLatestMatch(e,t,n){return s(this,void 0,void 0,(function*(){this.buildAgent.debug(`querying tool versions for ${e}${t?`@${t}`:""} ${n?"including pre-releases":""}`);const r=`https://api-v2v3search-0.nuget.org/query?q=${encodeURIComponent(e.toLowerCase())}&prerelease=${n?"true":"false"}&semVerLevel=2.0.0`,i=yield this.httpClient.get(r);if(!i||200!==i.message.statusCode)return null;const o=yield i.readBody(),s=JSON.parse(o).data[0].versions.map(e=>e.version);return s&&s.length?(this.buildAgent.debug(`got versions: ${s.join(", ")}`),this.versionManager.evaluateVersions(s,t)):null}))}acquireTool(e,t){return s(this,void 0,void 0,(function*(){const n=yield this.buildAgent.createTempDir();let r=["tool","install",e,"--tool-path",n];t&&(t=this.versionManager.cleanVersion(t),r=r.concat(["--version",t]));const i=yield this.execute("dotnet",r),o=0===i.code?"success":"failure",s=0===i.code?i.stdout:i.stderr;if(this.buildAgent.debug(`tool install result: ${o} ${s}`),i.code)throw new Error("Error installing tool");return yield this.buildAgent.cacheDir(n,e,t)}))}};h=r([p.injectable(),o(0,p.inject(f.TYPES.IBuildAgent)),o(1,p.inject(f.TYPES.IVersionManager)),i("design:paramtypes",[Object,Object])],h),t.DotnetTool=h},"./src/core/ioc.ts": /*!*************************!*\ !*** ./src/core/ioc.ts ***! \*************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(/*! inversify */"./node_modules/inversify/lib/inversify.js"),i=n(/*! ./versionManager */"./src/core/versionManager.ts"),o=n(/*! ./models */"./src/core/models.ts"),s=n(/*! ../agent/mock/build-agent */"./src/agent/azure/build-agent.ts"),a=new r.Container;a.bind(o.TYPES.IVersionManager).to(i.VersionManager),a.bind(o.TYPES.IBuildAgent).to(s.BuildAgent),t.default=a},"./src/core/models.ts": /*!****************************!*\ !*** ./src/core/models.ts ***! \****************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TYPES={IBuildAgent:Symbol.for("BuildAgent"),IDotnetTool:Symbol.for("DotnetTool"),IGitVersionTool:Symbol.for("GitVersionTool"),IGitReleaseManagerTool:Symbol.for("GitReleaseManagerTool"),IVersionManager:Symbol.for("VersionManager")},function(e){e.includePrerelease="includePrerelease",e.versionSpec="versionSpec"}(t.SetupFields||(t.SetupFields={}))},"./src/core/settings.ts": /*!******************************!*\ !*** ./src/core/settings.ts ***! \******************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(/*! ./models */"./src/core/models.ts");t.Settings=class{static getSetupSettings(e){return{versionSpec:e.getInput(r.SetupFields.versionSpec),includePrerelease:e.getBooleanInput(r.SetupFields.includePrerelease)}}}},"./src/core/versionManager.ts": /*!************************************!*\ !*** ./src/core/versionManager.ts ***! \************************************/ /*! no static exports found */function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const u=s(n(/*! semver-compare */"./node_modules/semver-compare/index.js")),c=a(n(/*! semver */"./node_modules/semver/semver.js")),l=n(/*! inversify */"./node_modules/inversify/lib/inversify.js"),d=n(/*! ./models */"./src/core/models.ts");let p=class{constructor(e){this.buildAgent=e}isExplicitVersion(e){const t=c.clean(e);this.buildAgent.debug("isExplicit: "+t);const n=null!=c.valid(t);return this.buildAgent.debug("explicit? "+n),n}evaluateVersions(e,t){let n;this.buildAgent.debug("evaluating "+e.length+" versions");for(let r=(e=e.sort(u.default)).length-1;r>=0;r--){const i=e[r];if(c.satisfies(i,t)){n=i;break}}return n?this.buildAgent.debug("matched: "+n):this.buildAgent.debug("match not found"),n}cleanVersion(e){return this.buildAgent.debug("cleaning: "+e),c.clean(e)}};p=r([l.injectable(),o(0,l.inject(d.TYPES.IBuildAgent)),i("design:paramtypes",[Object])],p),t.VersionManager=p},"./src/tasks/gitversion/execute.ts": /*!*****************************************!*\ !*** ./src/tasks/gitversion/execute.ts ***! \*****************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(/*! reflect-metadata */"./node_modules/reflect-metadata/Reflect.js"),n(/*! ./main */"./src/tasks/gitversion/main.ts").run()},"./src/tasks/gitversion/main.ts": /*!**************************************!*\ !*** ./src/tasks/gitversion/main.ts ***! \**************************************/ /*! no static exports found */function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(/*! ../../core/models */"./src/core/models.ts"),s=n(/*! ../../core/settings */"./src/core/settings.ts"),a=n(/*! ../../tools/gitversion/settings */"./src/tools/gitversion/settings.ts"),u=n(/*! ../../tools/gitversion/tool */"./src/tools/gitversion/tool.ts"),c=i(n(/*! ../../core/ioc */"./src/core/ioc.ts"));c.default.bind(o.TYPES.IGitVersionTool).to(u.GitVersionTool);const l=c.default.get(o.TYPES.IGitVersionTool),d=c.default.get(o.TYPES.IBuildAgent);t.setup=function(){return r(this,void 0,void 0,(function*(){try{l.disableTelemetry();const e=s.Settings.getSetupSettings(d);yield l.install(e.versionSpec,e.includePrerelease),d.setSucceeded("GitVersion installed successfully",!0)}catch(e){d.setFailed(e.message,!0)}}))},t.run=function(){return r(this,void 0,void 0,(function*(){try{l.disableTelemetry();const e=a.Settings.getGitVersionSettings(d),t=yield l.run(e),{stdout:n}=t,r=n.substr(n.indexOf("{")),i=JSON.parse(r);l.writeGitVersionToAgent(i),0===t.code?d.setSucceeded("GitVersion executed successfully",!0):d.setFailed(t.error.message,!0)}catch(e){d.setFailed(e,!0)}}))}},"./src/tools/gitversion/models.ts": /*!****************************************!*\ !*** ./src/tools/gitversion/models.ts ***! \****************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.targetPath="targetPath",e.useConfigFile="useConfigFile",e.configFilePath="configFilePath",e.updateAssemblyInfo="updateAssemblyInfo",e.updateAssemblyInfoFilename="updateAssemblyInfoFilename",e.additionalArguments="additionalArguments",e.srcDir="srcDir"}(t.ExecuteFields||(t.ExecuteFields={}))},"./src/tools/gitversion/settings.ts": /*!******************************************!*\ !*** ./src/tools/gitversion/settings.ts ***! \******************************************/ /*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(/*! ./models */"./src/tools/gitversion/models.ts");t.Settings=class{static getGitVersionSettings(e){var t;return{targetPath:e.getInput(r.ExecuteFields.targetPath),useConfigFile:e.getBooleanInput(r.ExecuteFields.useConfigFile),configFilePath:e.getInput(r.ExecuteFields.configFilePath),updateAssemblyInfo:e.getBooleanInput(r.ExecuteFields.updateAssemblyInfo),updateAssemblyInfoFilename:e.getInput(r.ExecuteFields.updateAssemblyInfoFilename),additionalArguments:e.getInput(r.ExecuteFields.additionalArguments),srcDir:null===(t=e.getSourceDir())||void 0===t?void 0:t.replace(/\\/g,"/")}}}},"./src/tools/gitversion/tool.ts": /*!**************************************!*\ !*** ./src/tools/gitversion/tool.ts ***! \**************************************/ /*! no static exports found */function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const a=n(/*! path */"path"),u=n(/*! inversify */"./node_modules/inversify/lib/inversify.js"),c=n(/*! ../../core/models */"./src/core/models.ts"),l=n(/*! ../../core/dotnet-tool */"./src/core/dotnet-tool.ts");let d=class extends l.DotnetTool{constructor(e,t){super(e,t)}install(e,t){return s(this,void 0,void 0,(function*(){yield this.toolInstall("GitVersion.Tool",e,!1,t)}))}run(e){const t=this.getRepoDir(e.targetPath),n=this.getArguments(t,e);return this.execute("dotnet-gitversion",n)}getRepoDir(e){let t;const n=this.buildAgent.getSourceDir()||".";if(e){if(!this.buildAgent.directoryExists(e))throw new Error("Directory not found at "+e);t=a.join(n,e)}else t=n;return t.replace(/\\/g,"/")}getArguments(e,t){const n=[e,"/output","json","/output","buildserver"],{useConfigFile:r,configFilePath:i,updateAssemblyInfo:o,updateAssemblyInfoFilename:s,additionalArguments:a}=t;if(r){if(!this.buildAgent.isValidInputFile("configFilePath",i))throw new Error("GitVersion configuration file not found at "+i);n.push("/config",i)}if(o){if(n.push("/updateassemblyinfo"),!this.buildAgent.isValidInputFile("updateAssemblyInfoFilename",s))throw new Error("AssemblyInfoFilename file not found at "+s);n.push(s)}return a&&n.push(a),n}writeGitVersionToAgent(e){this.buildAgent.setOutput("major",e.Major.toString()),this.buildAgent.setOutput("minor",e.Minor.toString()),this.buildAgent.setOutput("patch",e.Patch.toString()),this.buildAgent.setOutput("preReleaseTag",e.PreReleaseTag),this.buildAgent.setOutput("preReleaseTagWithDash",e.PreReleaseTagWithDash),this.buildAgent.setOutput("preReleaseLabel",e.PreReleaseLabel),this.buildAgent.setOutput("preReleaseNumber",e.PreReleaseNumber.toString()),this.buildAgent.setOutput("weightedPreReleaseNumber",e.WeightedPreReleaseNumber.toString()),this.buildAgent.setOutput("buildMetaData",e.BuildMetaData.toString()),this.buildAgent.setOutput("buildMetaDataPadded",e.BuildMetaDataPadded),this.buildAgent.setOutput("fullBuildMetaData",e.FullBuildMetaData),this.buildAgent.setOutput("majorMinorPatch",e.MajorMinorPatch),this.buildAgent.setOutput("semVer",e.SemVer),this.buildAgent.setOutput("legacySemVer",e.LegacySemVer),this.buildAgent.setOutput("legacySemVerPadded",e.LegacySemVerPadded),this.buildAgent.setOutput("assemblySemVer",e.AssemblySemVer),this.buildAgent.setOutput("assemblySemFileVer",e.AssemblySemFileVer),this.buildAgent.setOutput("fullSemVer",e.FullSemVer),this.buildAgent.setOutput("informationalVersion",e.InformationalVersion),this.buildAgent.setOutput("branchName",e.BranchName),this.buildAgent.setOutput("sha",e.Sha),this.buildAgent.setOutput("shortSha",e.ShortSha),this.buildAgent.setOutput("nuGetVersionV2",e.NuGetVersionV2),this.buildAgent.setOutput("nuGetVersion",e.NuGetVersion),this.buildAgent.setOutput("nuGetPreReleaseTagV2",e.NuGetPreReleaseTagV2),this.buildAgent.setOutput("nuGetPreReleaseTag",e.NuGetPreReleaseTag),this.buildAgent.setOutput("versionSourceSha",e.VersionSourceSha),this.buildAgent.setOutput("commitsSinceVersionSource",e.CommitsSinceVersionSource.toString()),this.buildAgent.setOutput("commitsSinceVersionSourcePadded",e.CommitsSinceVersionSourcePadded),this.buildAgent.setOutput("commitDate",e.CommitDate)}};d=r([u.injectable(),o(0,u.inject(c.TYPES.IBuildAgent)),o(1,u.inject(c.TYPES.IVersionManager)),i("design:paramtypes",[Object,Object])],d),t.GitVersionTool=d},assert: /*!*************************!*\ !*** external "assert" ***! \*************************/ /*! no static exports found */function(e,t){e.exports=n(0)},child_process: /*!********************************!*\ !*** external "child_process" ***! \********************************/ /*! no static exports found */function(e,t){e.exports=n(1)},crypto: /*!*************************!*\ !*** external "crypto" ***! \*************************/ /*! no static exports found */function(e,t){e.exports=n(2)},events: /*!*************************!*\ !*** external "events" ***! \*************************/ /*! no static exports found */function(e,t){e.exports=n(3)},fs: /*!*********************!*\ !*** external "fs" ***! \*********************/ /*! no static exports found */function(e,t){e.exports=n(4)},http: /*!***********************!*\ !*** external "http" ***! \***********************/ /*! no static exports found */function(e,t){e.exports=n(5)},https: /*!************************!*\ !*** external "https" ***! \************************/ /*! no static exports found */function(e,t){e.exports=n(6)},net: /*!**********************!*\ !*** external "net" ***! \**********************/ /*! no static exports found */function(e,t){e.exports=n(7)},os: /*!*********************!*\ !*** external "os" ***! \*********************/ /*! no static exports found */function(e,t){e.exports=n(8)},path: /*!***********************!*\ !*** external "path" ***! \***********************/ /*! no static exports found */function(e,t){e.exports=n(9)},process: /*!**************************!*\ !*** external "process" ***! \**************************/ /*! no static exports found */function(e,t){e.exports=n(10)},tls: /*!**********************!*\ !*** external "tls" ***! \**********************/ /*! no static exports found */function(e,t){e.exports=n(11)},url: /*!**********************!*\ !*** external "url" ***! \**********************/ /*! no static exports found */function(e,t){e.exports=n(12)},util: /*!***********************!*\ !*** external "util" ***! \***********************/ /*! no static exports found */function(e,t){e.exports=n(13)},zlib: /*!***********************!*\ !*** external "zlib" ***! \***********************/ /*! no static exports found */function(e,t){e.exports=n(14)}})}]);