gradle-build-action/dist/post/index.js

2 lines
1.4 MiB
JavaScript
Raw Normal View History

2021-12-08 17:14:19 -05:00
require('./sourcemap-register.js');module.exports=function(e,t){"use strict";var a={};function __webpack_require__(t){if(a[t]){return a[t].exports}var i=a[t]={i:t,l:false,exports:{}};var n=true;try{e[t].call(i.exports,i,i.exports,__webpack_require__);n=false}finally{if(n)delete a[t]}i.l=true;return i.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(878)}return startup()}([,function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var s=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a(function(t){t(e)})}return new(a||(a=Promise))(function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const r=a(357);const p=o(a(129));const l=o(a(622));const c=a(669);const d=o(a(672));const u=c.promisify(p.exec);const m=c.promisify(p.execFile);function cp(e,t,a={}){return s(this,void 0,void 0,function*(){const{force:i,recursive:n,copySourceDirectory:o}=readCopyOptions(a);const s=(yield d.exists(t))?yield d.stat(t):null;if(s&&s.isFile()&&!i){return}const r=s&&s.isDirectory()&&o?l.join(t,l.basename(e)):t;if(!(yield d.exists(e))){throw new Error(`no such file or directory: ${e}`)}const p=yield d.stat(e);if(p.isDirectory()){if(!n){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,r,0,i)}}else{if(l.relative(e,r)===""){throw new Error(`'${r}' and '${e}' are the same file`)}yield copyFile(e,r,i)}})}t.cp=cp;function mv(e,t,a={}){return s(this,void 0,void 0,function*(){if(yield d.exists(t)){let i=true;if(yield d.isDirectory(t)){t=l.join(t,l.basename(e));i=yield d.exists(t)}if(i){if(a.force==null||a.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(l.dirname(t));yield d.rename(e,t)})}t.mv=mv;function rmRF(e){return s(this,void 0,void 0,function*(){if(d.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}try{const t=d.getCmdPath();if(yield d.isDirectory(e,true)){yield u(`${t} /s /c "rd /s /q "%inputPath%""`,{env:{inputPath:e}})}else{yield u(`${t} /s /c "del /f /a "%inputPath%""`,{env:{inputPath:e}})}}catch(e){if(e.code!=="ENOENT")throw e}try{yield d.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield d.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield m(`rm`,[`-rf`,`${e}`])}else{yield d.unlink(e)}}})}t.rmRF=rmRF;function mkdirP(e){return s(this,void 0,void 0,function*(){r.ok(e,"a path argument must be provided");yield d.mkdir(e,{recursive:true})})}t.mkdirP=mkdirP;function which(e,t){return s(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(d.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}return t}cons
2021-09-14 20:11:31 -04:00
//# sourceMappingURL=index.js.map