action-setup/dist/index.js

1 line
404 KiB
JavaScript
Raw Normal View History

2020-05-08 15:17:43 +08:00
module.exports=function(e,i){"use strict";var t={};function __webpack_require__(i){if(t[i]){return t[i].exports}var n=t[i]={i:i,l:false,exports:{}};e[i].call(n.exports,n,n.exports,__webpack_require__);n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(803)}return startup()}({0:function(e,i){"use strict";Object.defineProperty(i,"__esModule",{value:true});i.ref="301414cec74a2b6b63c95b42f2ad1790ccb980ed";i.url=`https://raw.githubusercontent.com/pnpm/self-installer/${i.ref}/install.js`;i.default=i.url},1:function(e){"use strict";class CancelError extends Error{constructor(){super("Promise was canceled");this.name="CancelError"}get isCanceled(){return true}}class PCancelable{static fn(e){return function(){const i=[].slice.apply(arguments);return new PCancelable((t,n,a)=>{i.push(a);e.apply(null,i).then(t,n)})}}constructor(e){this._cancelHandlers=[];this._isPending=true;this._isCanceled=false;this._promise=new Promise((i,t)=>{this._reject=t;return e(e=>{this._isPending=false;i(e)},e=>{this._isPending=false;t(e)},e=>{this._cancelHandlers.push(e)})})}then(e,i){return this._promise.then(e,i)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(){if(!this._isPending||this._isCanceled){return}if(this._cancelHandlers.length>0){try{for(const e of this._cancelHandlers){e()}}catch(e){this._reject(e)}}this._isCanceled=true;this._reject(new CancelError)}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(PCancelable.prototype,Promise.prototype);e.exports=PCancelable;e.exports.CancelError=CancelError},2:function(e,i,t){"use strict";const n=t(747);const a=t(622);const r=t(210);const o={mode:511&~process.umask(),fs:n};const s=e=>{if(process.platform==="win32"){const i=/[<>:"|?*]/.test(e.replace(a.parse(e).root,""));if(i){const i=new Error(`Path contains invalid characters: ${e}`);i.code="EINVAL";throw i}}};e.exports=((e,i)=>Promise.resolve().then(()=>{s(e);i=Object.assign({},o,i);const t=r(i.fs.mkdir);const n=r(i.fs.stat);const c=e=>{return t(e,i.mode).then(()=>e).catch(i=>{if(i.code==="ENOENT"){if(i.message.includes("null bytes")||a.dirname(e)===e){throw i}return c(a.dirname(e)).then(()=>c(e))}return n(e).then(i=>i.isDirectory()?e:Promise.reject()).catch(()=>{throw i})})};return c(a.resolve(e))}));e.exports.sync=((e,i)=>{s(e);i=Object.assign({},o,i);const t=e=>{try{i.fs.mkdirSync(e,i.mode)}catch(n){if(n.code==="ENOENT"){if(n.message.includes("null bytes")||a.dirname(e)===e){throw n}t(a.dirname(e));return t(e)}try{if(!i.fs.statSync(e).isDirectory()){throw new Error("The path is not a directory")}}catch(e){throw n}}return e};return t(a.resolve(e))})},3:function(e,i,t){var n=t(669);var a=t(45);var r=t(791);var o=t(286);var s=t(441).Writable;var c=t(441).PassThrough;var p=function(){};var u=function(e){e&=511;return e&&512-e};var l=function(e,i){var t=new d(e,i);t.end();return t};var f=function(e,i){if(i.path)e.name=i.path;if(i.linkpath)e.linkname=i.linkpath;if(i.size)e.size=parseInt(i.size,10);e.pax=i;return e};var d=function(e,i){this._parent=e;this.offset=i;c.call(this)};n.inherits(d,c);d.prototype.destroy=function(e){this._parent.destroy(e)};var m=function(e){if(!(this instanceof m))return new m(e);s.call(this,e);e=e||{};this._offset=0;this._buffer=a();this._missing=0;this._partial=false;this._onparse=p;this._header=null;this._stream=null;this._overflow=null;this._cb=null;this._locked=false;this._destroyed=false;this._pax=null;this._paxGlobal=null;this._gnuLongPath=null;this._gnuLongLinkPath=null;var i=this;var t=i._buffer;var n=function(){i._continue()};var c=function(e){i._locked=false;if(e)return i.destroy(e);if(!i._stream)n()};var h=function(){i._stream=null;var e=u(i._header.size);if(e)i._parse(e,x);else i._parse(512,w);if(!i._locked)n()};var x=function(){i._buffer.consume(u(i._header.size));i._parse(512,w);n()};var v=function(){var e=i._header.size;i._paxGlobal=o.decodePax(t.slice(0,e));t.consume(e);h()};var b=function(){var e=i._header.size;i._pax=o.decodePax(t.slice(0,e));if(i._paxGlobal)i._pax=r(i._paxGlobal,i._pax);t.consume(