sst 2.8.3 → 2.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof be))r
16
16
  `));var r=e.pax;if(r)for(var i in r)t+=Lo(" "+i+"="+r[i]+`
17
17
  `);return Buffer.from(t)};wr.decodePax=function(e){for(var t={};e.length;){for(var r=0;r<e.length&&e[r]!==32;)r++;var i=parseInt(e.slice(0,r).toString(),10);if(!i)return t;var n=e.slice(r+1,i-1).toString(),s=n.indexOf("=");if(s===-1)return t;t[n.slice(0,s)]=n.slice(s+1),e=e.slice(i)}return t};wr.encode=function(e){var t=wE(512),r=e.name,i="";if(e.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var n=r.indexOf("/");if(n===-1)return null;i+=i?"/"+r.slice(0,n):r.slice(0,n),r=r.slice(n+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(i)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(t.write(r),t.write(wt(e.mode&RE,6),100),t.write(wt(e.uid,6),108),t.write(wt(e.gid,6),116),t.write(wt(e.size,11),124),t.write(wt(e.mtime.getTime()/1e3|0,11),136),t[156]=Hd+LE(e.type),e.linkname&&t.write(e.linkname,157),$d.copy(t,li),OE.copy(t,Mo),e.uname&&t.write(e.uname,265),e.gname&&t.write(e.gname,297),t.write(wt(e.devmajor||0,6),329),t.write(wt(e.devminor||0,6),337),i&&t.write(i,345),t.write(wt(Vd(t),6),148),t)};wr.decode=function(e,t,r){var i=e[156]===0?0:e[156]-Hd,n=br(e,0,100,t),s=St(e,100,8),o=St(e,108,8),u=St(e,116,8),l=St(e,124,12),p=St(e,136,12),d=IE(i),m=e[157]===0?null:br(e,157,100,t),y=br(e,265,32),g=br(e,297,32),b=St(e,329,8),A=St(e,337,8),E=Vd(e);if(E===8*32)return null;if(E!==St(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if($d.compare(e,li,li+6)===0)e[345]&&(n=br(e,345,155,t)+"/"+n);else if(!(TE.compare(e,li,li+6)===0&&xE.compare(e,Mo,Mo+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return i===0&&n&&n[n.length-1]==="/"&&(i=5),{name:n,mode:s,uid:o,gid:u,size:l,mtime:new Date(1e3*p),type:d,linkname:m,uname:y,gname:g,devmajor:b,devminor:A}}});var tp=L((Ox,ep)=>{var Yd=D("util"),DE=Wd(),hi=Do(),Kd=We().Writable,Xd=We().PassThrough,Jd=a(function(){},"noop"),Qd=a(function(e){return e&=511,e&&512-e},"overflow"),PE=a(function(e,t){var r=new Hn(e,t);return r.end(),r},"emptyStream"),CE=a(function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e},"mixinPax"),Hn=a(function(e,t){this._parent=e,this.offset=t,Xd.call(this,{autoDestroy:!1})},"Source");Yd.inherits(Hn,Xd);Hn.prototype.destroy=function(e){this._parent.destroy(e)};var it=a(function(e){if(!(this instanceof it))return new it(e);Kd.call(this,e),e=e||{},this._offset=0,this._buffer=DE(),this._missing=0,this._partial=!1,this._onparse=Jd,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var t=this,r=t._buffer,i=a(function(){t._continue()},"oncontinue"),n=a(function(y){if(t._locked=!1,y)return t.destroy(y);t._stream||i()},"onunlock"),s=a(function(){t._stream=null;var y=Qd(t._header.size);y?t._parse(y,o):t._parse(512,m),t._locked||i()},"onstreamend"),o=a(function(){t._buffer.consume(Qd(t._header.size)),t._parse(512,m),i()},"ondrain"),u=a(function(){var y=t._header.size;t._paxGlobal=hi.decodePax(r.slice(0,y)),r.consume(y),s()},"onpaxglobalheader"),l=a(function(){var y=t._header.size;t._pax=hi.decodePax(r.slice(0,y)),t._paxGlobal&&(t._pax=Object.assign({},t._paxGlobal,t._pax)),r.consume(y),s()},"onpaxheader"),p=a(function(){var y=t._header.size;this._gnuLongPath=hi.decodeLongPath(r.slice(0,y),e.filenameEncoding),r.consume(y),s()},"ongnulongpath"),d=a(function(){var y=t._header.size;this._gnuLongLinkPath=hi.decodeLongPath(r.slice(0,y),e.filenameEncoding),r.consume(y),s()},"ongnulonglinkpath"),m=a(function(){var y=t._offset,g;try{g=t._header=hi.decode(r.slice(0,512),e.filenameEncoding,e.allowUnknownFormat)}catch(b){t.emit("error",b)}if(r.consume(512),!g){t._parse(512,m),i();return}if(g.type==="gnu-long-path"){t._parse(g.size,p),i();return}if(g.type==="gnu-long-link-path"){t._parse(g.size,d),i();return}if(g.type==="pax-global-header"){t._parse(g.size,u),i();return}if(g.type==="pax-header"){t._parse(g.size,l),i();return}if(t._gnuLongPath&&(g.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(g.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=g=CE(g,t._pax),t._pax=null),t._locked=!0,!g.size||g.type==="directory"){t._parse(512,m),t.emit("entry",g,PE(t,y),n);return}t._stream=new Hn(t,y),t.emit("entry",g,t._stream,n),t._parse(g.size,s),i()},"onheader");this._onheader=m,this._parse(512,m)},"Extract");Yd.inherits(it,Kd);it.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))};it.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)};it.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=Jd,this._overflow?this._write(this._overflow,void 0,e):e()}};it.prototype._write=function(e,t,r){if(!this._destroyed){var i=this._stream,n=this._buffer,s=this._missing;if(e.length&&(this._partial=!0),e.length<s)return this._missing-=e.length,this._overflow=null,i?i.write(e,r):(n.append(e),r());this._cb=r,this._missing=0;var o=null;e.length>s&&(o=e.slice(s),e=e.slice(0,s)),i?i.end(e):n.append(e),this._overflow=o,this._onparse()}};it.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"));e()};ep.exports=it});var ip=L((xx,rp)=>{rp.exports=D("fs").constants||D("constants")});var sp=L((Rx,ap)=>{var NE=Kr(),qE=a(function(){},"noop"),FE=a(function(e){return e.setHeader&&typeof e.abort=="function"},"isRequest"),jE=a(function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},"isChildProcess"),np=a(function(e,t,r){if(typeof t=="function")return np(e,null,t);t||(t={}),r=NE(r||qE);var i=e._writableState,n=e._readableState,s=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,u=!1,l=a(function(){e.writable||p()},"onlegacyfinish"),p=a(function(){o=!1,s||r.call(e)},"onfinish"),d=a(function(){s=!1,o||r.call(e)},"onend"),m=a(function(E){r.call(e,E?new Error("exited with error code: "+E):null)},"onexit"),y=a(function(E){r.call(e,E)},"onerror"),g=a(function(){process.nextTick(b)},"onclose"),b=a(function(){if(!u){if(s&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"));if(o&&!(i&&i.ended&&!i.destroyed))return r.call(e,new Error("premature close"))}},"onclosenexttick"),A=a(function(){e.req.on("finish",p)},"onrequest");return FE(e)?(e.on("complete",p),e.on("abort",g),e.req?A():e.on("request",A)):o&&!i&&(e.on("end",l),e.on("close",l)),jE(e)&&e.on("exit",m),e.on("end",d),e.on("finish",p),t.error!==!1&&e.on("error",y),e.on("close",g),function(){u=!0,e.removeListener("complete",p),e.removeListener("abort",g),e.removeListener("request",A),e.req&&e.req.removeListener("finish",p),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",p),e.removeListener("exit",m),e.removeListener("end",d),e.removeListener("error",y),e.removeListener("close",g)}},"eos");ap.exports=np});var hp=L((Ix,lp)=>{var Sr=ip(),op=sp(),Zn=Me(),kE=Buffer.alloc,up=We().Readable,Er=We().Writable,BE=D("string_decoder").StringDecoder,$n=Do(),UE=parseInt("755",8),GE=parseInt("644",8),fp=kE(1024),Co=a(function(){},"noop"),Po=a(function(e,t){t&=511,t&&e.push(fp.slice(0,512-t))},"overflow");function zE(e){switch(e&Sr.S_IFMT){case Sr.S_IFBLK:return"block-device";case Sr.S_IFCHR:return"character-device";case Sr.S_IFDIR:return"directory";case Sr.S_IFIFO:return"fifo";case Sr.S_IFLNK:return"symlink"}return"file"}a(zE,"modeToType");var Vn=a(function(e){Er.call(this),this.written=0,this._to=e,this._destroyed=!1},"Sink");Zn(Vn,Er);Vn.prototype._write=function(e,t,r){if(this.written+=e.length,this._to.push(e))return r();this._to._drain=r};Vn.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Qn=a(function(){Er.call(this),this.linkname="",this._decoder=new BE("utf-8"),this._destroyed=!1},"LinkSink");Zn(Qn,Er);Qn.prototype._write=function(e,t,r){this.linkname+=this._decoder.write(e),r()};Qn.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var ci=a(function(){Er.call(this),this._destroyed=!1},"Void");Zn(ci,Er);ci.prototype._write=function(e,t,r){r(new Error("No body allowed for this entry"))};ci.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Ye=a(function(e){if(!(this instanceof Ye))return new Ye(e);up.call(this,e),this._drain=Co,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null},"Pack");Zn(Ye,up);Ye.prototype.entry=function(e,t,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof t=="function"&&(r=t,t=null),r||(r=Co);var i=this;if((!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=zE(e.mode)),e.mode||(e.mode=e.type==="directory"?UE:GE),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof t=="string"&&(t=Buffer.from(t)),Buffer.isBuffer(t)){e.size=t.length,this._encode(e);var n=this.push(t);return Po(i,e.size),n?process.nextTick(r):this._drain=r,new ci}if(e.type==="symlink"&&!e.linkname){var s=new Qn;return op(s,function(u){if(u)return i.destroy(),r(u);e.linkname=s.linkname,i._encode(e),r()}),s}if(this._encode(e),e.type!=="file"&&e.type!=="contiguous-file")return process.nextTick(r),new ci;var o=new Vn(this);return this._stream=o,op(o,function(u){if(i._stream=null,u)return i.destroy(),r(u);if(o.written!==e.size)return i.destroy(),r(new Error("size mismatch"));Po(i,e.size),i._finalizing&&i.finalize(),r()}),o}};Ye.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(fp),this.push(null))};Ye.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};Ye.prototype._encode=function(e){if(!e.pax){var t=$n.encode(e);if(t){this.push(t);return}}this._encodePax(e)};Ye.prototype._encodePax=function(e){var t=$n.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push($n.encode(r)),this.push(t),Po(this,t.length),r.size=e.size,r.type=e.type,this.push($n.encode(r))};Ye.prototype._read=function(e){var t=this._drain;this._drain=Co,t()};lp.exports=Ye});var cp=L(No=>{No.extract=tp();No.pack=hp()});var gp=L((Dx,pp)=>{var WE=D("zlib"),HE=cp(),dp=pr(),nt=a(function(e){if(!(this instanceof nt))return new nt(e);e=this.options=dp.defaults(e,{gzip:!1}),typeof e.gzipOptions!="object"&&(e.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=HE.pack(e),this.compressor=!1,e.gzip&&(this.compressor=WE.createGzip(e.gzipOptions),this.compressor.on("error",this._onCompressorError.bind(this)))},"Tar");nt.prototype._onCompressorError=function(e){this.engine.emit("error",e)};nt.prototype.append=function(e,t,r){var i=this;t.mtime=t.date;function n(o,u){if(o){r(o);return}i.engine.entry(t,u,function(l){r(l,t)})}if(a(n,"append"),t.sourceType==="buffer")n(null,e);else if(t.sourceType==="stream"&&t.stats){t.size=t.stats.size;var s=i.engine.entry(t,function(o){r(o,t)});e.pipe(s)}else t.sourceType==="stream"&&dp.collectStream(e,n)};nt.prototype.finalize=function(){this.engine.finalize()};nt.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};nt.prototype.pipe=function(e,t){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(e,t):this.engine.pipe.apply(this.engine,arguments)};nt.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)};pp.exports=nt});var _p=L((Cx,mp)=>{var $E=D("util").inherits,yp=We().Transform,ZE=So(),vp=pr(),Et=a(function(e){if(!(this instanceof Et))return new Et(e);e=this.options=vp.defaults(e,{}),yp.call(this,e),this.supports={directory:!0,symlink:!0},this.files=[]},"Json");$E(Et,yp);Et.prototype._transform=function(e,t,r){r(null,e)};Et.prototype._writeStringified=function(){var e=JSON.stringify(this.files);this.write(e)};Et.prototype.append=function(e,t,r){var i=this;t.crc32=0;function n(s,o){if(s){r(s);return}t.size=o.length||0,t.crc32=ZE.unsigned(o),i.files.push(t),r(null,t)}a(n,"onend"),t.sourceType==="buffer"?n(null,e):t.sourceType==="stream"&&vp.collectStream(e,n)};Et.prototype.finalize=function(){this._writeStringified(),this.end()};mp.exports=Et});var wp=L((qx,bp)=>{var VE=ad(),di={},Ot=a(function(e,t){return Ot.create(e,t)},"vending");Ot.create=function(e,t){if(di[e]){var r=new VE(e,t);return r.setFormat(e),r.setModule(new di[e](t)),r}else throw new Error("create("+e+"): format not registered")};Ot.registerFormat=function(e,t){if(di[e])throw new Error("register("+e+"): format already registered");if(typeof t!="function")throw new Error("register("+e+"): format module invalid");if(typeof t.prototype.append!="function"||typeof t.prototype.finalize!="function")throw new Error("register("+e+"): format module missing methods");di[e]=t};Ot.isRegisteredFormat=function(e){return!!di[e]};Ot.registerFormat("zip",Bd());Ot.registerFormat("tar",gp());Ot.registerFormat("json",_p());bp.exports=Ot});var Fo=L(Tt=>{Tt.setopts=e1;Tt.ownProp=Sp;Tt.makeAbs=pi;Tt.finish=t1;Tt.mark=r1;Tt.isIgnored=Op;Tt.childrenIgnored=i1;function Sp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}a(Sp,"ownProp");var QE=D("fs"),Ht=D("path"),YE=Dr(),Ep=D("path").isAbsolute,qo=YE.Minimatch;function KE(e,t){return e.localeCompare(t,"en")}a(KE,"alphasort");function XE(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]),e.ignore.length&&(e.ignore=e.ignore.map(JE))}a(XE,"setupIgnores");function JE(e){var t=null;if(e.slice(-3)==="/**"){var r=e.replace(/(\/\*\*)+$/,"");t=new qo(r,{dot:!0})}return{matcher:new qo(e,{dot:!0}),gmatcher:t}}a(JE,"ignoreMap");function e1(e,t,r){if(r||(r={}),r.matchBase&&t.indexOf("/")===-1){if(r.noglobstar)throw new Error("base matching requires globstar");t="**/"+t}e.silent=!!r.silent,e.pattern=t,e.strict=r.strict!==!1,e.realpath=!!r.realpath,e.realpathCache=r.realpathCache||Object.create(null),e.follow=!!r.follow,e.dot=!!r.dot,e.mark=!!r.mark,e.nodir=!!r.nodir,e.nodir&&(e.mark=!0),e.sync=!!r.sync,e.nounique=!!r.nounique,e.nonull=!!r.nonull,e.nosort=!!r.nosort,e.nocase=!!r.nocase,e.stat=!!r.stat,e.noprocess=!!r.noprocess,e.absolute=!!r.absolute,e.fs=r.fs||QE,e.maxLength=r.maxLength||1/0,e.cache=r.cache||Object.create(null),e.statCache=r.statCache||Object.create(null),e.symlinks=r.symlinks||Object.create(null),XE(e,r),e.changedCwd=!1;var i=process.cwd();Sp(r,"cwd")?(e.cwd=Ht.resolve(r.cwd),e.changedCwd=e.cwd!==i):e.cwd=Ht.resolve(i),e.root=r.root||Ht.resolve(e.cwd,"/"),e.root=Ht.resolve(e.root),e.cwdAbs=Ep(e.cwd)?e.cwd:pi(e,e.cwd),e.nomount=!!r.nomount,process.platform==="win32"&&(e.root=e.root.replace(/\\/g,"/"),e.cwd=e.cwd.replace(/\\/g,"/"),e.cwdAbs=e.cwdAbs.replace(/\\/g,"/")),r.nonegate=!0,r.nocomment=!0,r.allowWindowsEscape=!0,e.minimatch=new qo(t,r),e.options=e.minimatch.options}a(e1,"setopts");function t1(e){for(var t=e.nounique,r=t?[]:Object.create(null),i=0,n=e.matches.length;i<n;i++){var s=e.matches[i];if(!s||Object.keys(s).length===0){if(e.nonull){var o=e.minimatch.globSet[i];t?r.push(o):r[o]=!0}}else{var u=Object.keys(s);t?r.push.apply(r,u):u.forEach(function(l){r[l]=!0})}}if(t||(r=Object.keys(r)),e.nosort||(r=r.sort(KE)),e.mark){for(var i=0;i<r.length;i++)r[i]=e._mark(r[i]);e.nodir&&(r=r.filter(function(l){var p=!/\/$/.test(l),d=e.cache[l]||e.cache[pi(e,l)];return p&&d&&(p=d!=="DIR"&&!Array.isArray(d)),p}))}e.ignore.length&&(r=r.filter(function(l){return!Op(e,l)})),e.found=r}a(t1,"finish");function r1(e,t){var r=pi(e,t),i=e.cache[r],n=t;if(i){var s=i==="DIR"||Array.isArray(i),o=t.slice(-1)==="/";if(s&&!o?n+="/":!s&&o&&(n=n.slice(0,-1)),n!==t){var u=pi(e,n);e.statCache[u]=e.statCache[r],e.cache[u]=e.cache[r]}}return n}a(r1,"mark");function pi(e,t){var r=t;return t.charAt(0)==="/"?r=Ht.join(e.root,t):Ep(t)||t===""?r=t:e.changedCwd?r=Ht.resolve(e.cwd,t):r=Ht.resolve(t),process.platform==="win32"&&(r=r.replace(/\\/g,"/")),r}a(pi,"makeAbs");function Op(e,t){return e.ignore.length?e.ignore.some(function(r){return r.matcher.match(t)||!!(r.gmatcher&&r.gmatcher.match(t))}):!1}a(Op,"isIgnored");function i1(e,t){return e.ignore.length?e.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(t))}):!1}a(i1,"childrenIgnored")});var Ip=L((zx,Ap)=>{Ap.exports=Rp;Rp.GlobSync=we;var n1=Vr(),Tp=Dr(),Bx=Tp.Minimatch,Ux=Bo().Glob,Gx=D("util"),jo=D("path"),xp=D("assert"),Yn=D("path").isAbsolute,$t=Fo(),a1=$t.setopts,ko=$t.ownProp,s1=$t.childrenIgnored,o1=$t.isIgnored;function Rp(e,t){if(typeof t=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
18
18
  See: https://github.com/isaacs/node-glob/issues/167`);return new we(e,t).found}a(Rp,"globSync");function we(e,t){if(!e)throw new Error("must provide pattern");if(typeof t=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
19
- See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof we))return new we(e,t);if(a1(this,e,t),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var i=0;i<r;i++)this._process(this.minimatch.set[i],i,!1);this._finish()}a(we,"GlobSync");we.prototype._finish=function(){if(xp.ok(this instanceof we),this.realpath){var e=this;this.matches.forEach(function(t,r){var i=e.matches[r]=Object.create(null);for(var n in t)try{n=e._makeAbs(n);var s=n1.realpathSync(n,e.realpathCache);i[s]=!0}catch(o){if(o.syscall==="stat")i[e._makeAbs(n)]=!0;else throw o}})}$t.finish(this)};we.prototype._process=function(e,t,r){xp.ok(this instanceof we);for(var i=0;typeof e[i]=="string";)i++;var n;switch(i){case e.length:this._processSimple(e.join("/"),t);return;case 0:n=null;break;default:n=e.slice(0,i).join("/");break}var s=e.slice(i),o;n===null?o=".":((Yn(n)||Yn(e.map(function(p){return typeof p=="string"?p:"[*]"}).join("/")))&&(!n||!Yn(n))&&(n="/"+n),o=n);var u=this._makeAbs(o);if(!s1(this,o)){var l=s[0]===Tp.GLOBSTAR;l?this._processGlobStar(n,o,u,s,t,r):this._processReaddir(n,o,u,s,t,r)}};we.prototype._processReaddir=function(e,t,r,i,n,s){var o=this._readdir(r,s);if(o){for(var u=i[0],l=!!this.minimatch.negate,p=u._glob,d=this.dot||p.charAt(0)===".",m=[],y=0;y<o.length;y++){var g=o[y];if(g.charAt(0)!=="."||d){var b;l&&!e?b=!g.match(u):b=g.match(u),b&&m.push(g)}}var A=m.length;if(A!==0){if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var y=0;y<A;y++){var g=m[y];e&&(e.slice(-1)!=="/"?g=e+"/"+g:g=e+g),g.charAt(0)==="/"&&!this.nomount&&(g=jo.join(this.root,g)),this._emitMatch(n,g)}return}i.shift();for(var y=0;y<A;y++){var g=m[y],E;e?E=[e,g]:E=[g],this._process(E.concat(i),n,s)}}}};we.prototype._emitMatch=function(e,t){if(!o1(this,t)){var r=this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=r),!this.matches[e][t]){if(this.nodir){var i=this.cache[r];if(i==="DIR"||Array.isArray(i))return}this.matches[e][t]=!0,this.stat&&this._stat(t)}}};we.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,!1);var t,r,i;try{r=this.fs.lstatSync(e)}catch(s){if(s.code==="ENOENT")return null}var n=r&&r.isSymbolicLink();return this.symlinks[e]=n,!n&&r&&!r.isDirectory()?this.cache[e]="FILE":t=this._readdir(e,!1),t};we.prototype._readdir=function(e,t){var r;if(t&&!ko(this.symlinks,e))return this._readdirInGlobStar(e);if(ko(this.cache,e)){var i=this.cache[e];if(!i||i==="FILE")return null;if(Array.isArray(i))return i}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(n){return this._readdirError(e,n),null}};we.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat)for(var r=0;r<t.length;r++){var i=t[r];e==="/"?i=e+i:i=e+"/"+i,this.cache[i]=!0}return this.cache[e]=t,t};we.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);if(this.cache[r]="FILE",r===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);throw i.path=this.cwd,i.code=t.code,i}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:if(this.cache[this._makeAbs(e)]=!1,this.strict)throw t;this.silent||console.error("glob error",t);break}};we.prototype._processGlobStar=function(e,t,r,i,n,s){var o=this._readdir(r,s);if(o){var u=i.slice(1),l=e?[e]:[],p=l.concat(u);this._process(p,n,!1);var d=o.length,m=this.symlinks[r];if(!(m&&s))for(var y=0;y<d;y++){var g=o[y];if(!(g.charAt(0)==="."&&!this.dot)){var b=l.concat(o[y],u);this._process(b,n,!0);var A=l.concat(o[y],i);this._process(A,n,!0)}}}};we.prototype._processSimple=function(e,t){var r=this._stat(e);if(this.matches[t]||(this.matches[t]=Object.create(null)),!!r){if(e&&Yn(e)&&!this.nomount){var i=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=jo.join(this.root,e):(e=jo.resolve(this.root,e),i&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e)}};we.prototype._stat=function(e){var t=this._makeAbs(e),r=e.slice(-1)==="/";if(e.length>this.maxLength)return!1;if(!this.stat&&ko(this.cache,t)){var o=this.cache[t];if(Array.isArray(o)&&(o="DIR"),!r||o==="DIR")return o;if(r&&o==="FILE")return!1}var i,n=this.statCache[t];if(!n){var s;try{s=this.fs.lstatSync(t)}catch(u){if(u&&(u.code==="ENOENT"||u.code==="ENOTDIR"))return this.statCache[t]=!1,!1}if(s&&s.isSymbolicLink())try{n=this.fs.statSync(t)}catch{n=s}else n=s}this.statCache[t]=n;var o=!0;return n&&(o=n.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||o,r&&o==="FILE"?!1:o};we.prototype._mark=function(e){return $t.mark(this,e)};we.prototype._makeAbs=function(e){return $t.makeAbs(this,e)}});var Bo=L((Zx,Mp)=>{Mp.exports=Zt;var u1=Vr(),Lp=Dr(),Hx=Lp.Minimatch,f1=Me(),l1=D("events").EventEmitter,Uo=D("path"),Go=D("assert"),gi=D("path").isAbsolute,Wo=Ip(),Vt=Fo(),h1=Vt.setopts,zo=Vt.ownProp,Ho=Rs(),$x=D("util"),c1=Vt.childrenIgnored,d1=Vt.isIgnored,p1=Kr();function Zt(e,t,r){if(typeof t=="function"&&(r=t,t={}),t||(t={}),t.sync){if(r)throw new TypeError("callback provided to sync glob");return Wo(e,t)}return new le(e,t,r)}a(Zt,"glob");Zt.sync=Wo;var g1=Zt.GlobSync=Wo.GlobSync;Zt.glob=Zt;function y1(e,t){if(t===null||typeof t!="object")return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e}a(y1,"extend");Zt.hasMagic=function(e,t){var r=y1({},t);r.noprocess=!0;var i=new le(e,r),n=i.minimatch.set;if(!e)return!1;if(n.length>1)return!0;for(var s=0;s<n[0].length;s++)if(typeof n[0][s]!="string")return!0;return!1};Zt.Glob=le;f1(le,l1);function le(e,t,r){if(typeof t=="function"&&(r=t,t=null),t&&t.sync){if(r)throw new TypeError("callback provided to sync glob");return new g1(e,t)}if(!(this instanceof le))return new le(e,t,r);h1(this,e,t),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof r=="function"&&(r=p1(r),this.on("error",r),this.on("end",function(l){r(null,l)}));var n=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(i===0)return u();for(var s=!0,o=0;o<i;o++)this._process(this.minimatch.set[o],o,!1,u);s=!1;function u(){--n._processing,n._processing<=0&&(s?process.nextTick(function(){n._finish()}):n._finish())}a(u,"done")}a(le,"Glob");le.prototype._finish=function(){if(Go(this instanceof le),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();Vt.finish(this),this.emit("end",this.found)}};le.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var e=this.matches.length;if(e===0)return this._finish();for(var t=this,r=0;r<this.matches.length;r++)this._realpathSet(r,i);function i(){--e===0&&t._finish()}a(i,"next")};le.prototype._realpathSet=function(e,t){var r=this.matches[e];if(!r)return t();var i=Object.keys(r),n=this,s=i.length;if(s===0)return t();var o=this.matches[e]=Object.create(null);i.forEach(function(u,l){u=n._makeAbs(u),u1.realpath(u,n.realpathCache,function(p,d){p?p.syscall==="stat"?o[u]=!0:n.emit("error",p):o[d]=!0,--s===0&&(n.matches[e]=o,t())})})};le.prototype._mark=function(e){return Vt.mark(this,e)};le.prototype._makeAbs=function(e){return Vt.makeAbs(this,e)};le.prototype.abort=function(){this.aborted=!0,this.emit("abort")};le.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};le.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var r=e[t];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var i=this._processQueue.slice(0);this._processQueue.length=0;for(var t=0;t<i.length;t++){var n=i[t];this._processing--,this._process(n[0],n[1],n[2],n[3])}}}};le.prototype._process=function(e,t,r,i){if(Go(this instanceof le),Go(typeof i=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([e,t,r,i]);return}for(var n=0;typeof e[n]=="string";)n++;var s;switch(n){case e.length:this._processSimple(e.join("/"),t,i);return;case 0:s=null;break;default:s=e.slice(0,n).join("/");break}var o=e.slice(n),u;s===null?u=".":((gi(s)||gi(e.map(function(d){return typeof d=="string"?d:"[*]"}).join("/")))&&(!s||!gi(s))&&(s="/"+s),u=s);var l=this._makeAbs(u);if(c1(this,u))return i();var p=o[0]===Lp.GLOBSTAR;p?this._processGlobStar(s,u,l,o,t,r,i):this._processReaddir(s,u,l,o,t,r,i)}};le.prototype._processReaddir=function(e,t,r,i,n,s,o){var u=this;this._readdir(r,s,function(l,p){return u._processReaddir2(e,t,r,i,n,s,p,o)})};le.prototype._processReaddir2=function(e,t,r,i,n,s,o,u){if(!o)return u();for(var l=i[0],p=!!this.minimatch.negate,d=l._glob,m=this.dot||d.charAt(0)===".",y=[],g=0;g<o.length;g++){var b=o[g];if(b.charAt(0)!=="."||m){var A;p&&!e?A=!b.match(l):A=b.match(l),A&&y.push(b)}}var E=y.length;if(E===0)return u();if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var g=0;g<E;g++){var b=y[g];e&&(e!=="/"?b=e+"/"+b:b=e+b),b.charAt(0)==="/"&&!this.nomount&&(b=Uo.join(this.root,b)),this._emitMatch(n,b)}return u()}i.shift();for(var g=0;g<E;g++){var b=y[g],x;e&&(e!=="/"?b=e+"/"+b:b=e+b),this._process([b].concat(i),n,s,u)}u()};le.prototype._emitMatch=function(e,t){if(!this.aborted&&!d1(this,t)){if(this.paused){this._emitQueue.push([e,t]);return}var r=gi(t)?t:this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=r),!this.matches[e][t]){if(this.nodir){var i=this.cache[r];if(i==="DIR"||Array.isArray(i))return}this.matches[e][t]=!0;var n=this.statCache[r];n&&this.emit("stat",t,n),this.emit("match",t)}}};le.prototype._readdirInGlobStar=function(e,t){if(this.aborted)return;if(this.follow)return this._readdir(e,!1,t);var r="lstat\0"+e,i=this,n=Ho(r,s);n&&i.fs.lstat(e,n);function s(o,u){if(o&&o.code==="ENOENT")return t();var l=u&&u.isSymbolicLink();i.symlinks[e]=l,!l&&u&&!u.isDirectory()?(i.cache[e]="FILE",t()):i._readdir(e,!1,t)}a(s,"lstatcb_")};le.prototype._readdir=function(e,t,r){if(!this.aborted&&(r=Ho("readdir\0"+e+"\0"+t,r),!!r)){if(t&&!zo(this.symlinks,e))return this._readdirInGlobStar(e,r);if(zo(this.cache,e)){var i=this.cache[e];if(!i||i==="FILE")return r();if(Array.isArray(i))return r(null,i)}var n=this;n.fs.readdir(e,v1(this,e,r))}};function v1(e,t,r){return function(i,n){i?e._readdirError(t,i,r):e._readdirEntries(t,n,r)}}a(v1,"readdirCb");le.prototype._readdirEntries=function(e,t,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var i=0;i<t.length;i++){var n=t[i];e==="/"?n=e+n:n=e+"/"+n,this.cache[n]=!0}return this.cache[e]=t,r(null,t)}};le.prototype._readdirError=function(e,t,r){if(!this.aborted){switch(t.code){case"ENOTSUP":case"ENOTDIR":var i=this._makeAbs(e);if(this.cache[i]="FILE",i===this.cwdAbs){var n=new Error(t.code+" invalid cwd "+this.cwd);n.path=this.cwd,n.code=t.code,this.emit("error",n),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:this.cache[this._makeAbs(e)]=!1,this.strict&&(this.emit("error",t),this.abort()),this.silent||console.error("glob error",t);break}return r()}};le.prototype._processGlobStar=function(e,t,r,i,n,s,o){var u=this;this._readdir(r,s,function(l,p){u._processGlobStar2(e,t,r,i,n,s,p,o)})};le.prototype._processGlobStar2=function(e,t,r,i,n,s,o,u){if(!o)return u();var l=i.slice(1),p=e?[e]:[],d=p.concat(l);this._process(d,n,!1,u);var m=this.symlinks[r],y=o.length;if(m&&s)return u();for(var g=0;g<y;g++){var b=o[g];if(!(b.charAt(0)==="."&&!this.dot)){var A=p.concat(o[g],l);this._process(A,n,!0,u);var E=p.concat(o[g],i);this._process(E,n,!0,u)}}u()};le.prototype._processSimple=function(e,t,r){var i=this;this._stat(e,function(n,s){i._processSimple2(e,t,n,s,r)})};le.prototype._processSimple2=function(e,t,r,i,n){if(this.matches[t]||(this.matches[t]=Object.create(null)),!i)return n();if(e&&gi(e)&&!this.nomount){var s=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=Uo.join(this.root,e):(e=Uo.resolve(this.root,e),s&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e),n()};le.prototype._stat=function(e,t){var r=this._makeAbs(e),i=e.slice(-1)==="/";if(e.length>this.maxLength)return t();if(!this.stat&&zo(this.cache,r)){var n=this.cache[r];if(Array.isArray(n)&&(n="DIR"),!i||n==="DIR")return t(null,n);if(i&&n==="FILE")return t()}var s,o=this.statCache[r];if(o!==void 0){if(o===!1)return t(null,o);var u=o.isDirectory()?"DIR":"FILE";return i&&u==="FILE"?t():t(null,u,o)}var l=this,p=Ho("stat\0"+r,d);p&&l.fs.lstat(r,p);function d(m,y){if(y&&y.isSymbolicLink())return l.fs.stat(r,function(g,b){g?l._stat2(e,r,null,y,t):l._stat2(e,r,g,b,t)});l._stat2(e,r,m,y,t)}a(d,"lstatcb_")};le.prototype._stat2=function(e,t,r,i,n){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return this.statCache[t]=!1,n();var s=e.slice(-1)==="/";if(this.statCache[t]=i,t.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,!1,i);var o=!0;return i&&(o=i.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||o,s&&o==="FILE"?n():n(null,o,i)}});var E1=L(()=>{process.on("unhandledRejection",e=>{throw e});var Kn=D("path"),Xn=D("fs/promises"),m1=D("fs"),_1=wp(),b1=Bo(),Zo=process.argv.slice(2),w1=Zo[0],Dp=Zo[1],Np=Zo[2],Pp=Np*1024*1024,Jn,xt,$o,ea=[],Cp=[];S1().catch(()=>{process.exit(1)});function S1(){return new Promise(async(e,t)=>{await i();for(let s of w1.split(",")){let o=n(s);for(let u of o){let l=Kn.join(s,u),[p,d]=await Promise.all([Xn.readFile(l),Xn.stat(l)]),m=d.size;if(m>Pp)throw new Error(`Cannot package file "${l}". The file is larger than ${Np}MB.`);$o+m>Pp&&(await xt.finalize(),await i()),xt.append(p,{name:u,date:new Date("1980-01-01T00:00:00.000Z"),mode:d.mode}),$o+=m}Cp.push(o)}await xt.finalize();let r=Kn.join(Dp,"filenames");await Xn.writeFile(r,Cp.join(`
19
+ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof we))return new we(e,t);if(a1(this,e,t),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var i=0;i<r;i++)this._process(this.minimatch.set[i],i,!1);this._finish()}a(we,"GlobSync");we.prototype._finish=function(){if(xp.ok(this instanceof we),this.realpath){var e=this;this.matches.forEach(function(t,r){var i=e.matches[r]=Object.create(null);for(var n in t)try{n=e._makeAbs(n);var s=n1.realpathSync(n,e.realpathCache);i[s]=!0}catch(o){if(o.syscall==="stat")i[e._makeAbs(n)]=!0;else throw o}})}$t.finish(this)};we.prototype._process=function(e,t,r){xp.ok(this instanceof we);for(var i=0;typeof e[i]=="string";)i++;var n;switch(i){case e.length:this._processSimple(e.join("/"),t);return;case 0:n=null;break;default:n=e.slice(0,i).join("/");break}var s=e.slice(i),o;n===null?o=".":((Yn(n)||Yn(e.map(function(p){return typeof p=="string"?p:"[*]"}).join("/")))&&(!n||!Yn(n))&&(n="/"+n),o=n);var u=this._makeAbs(o);if(!s1(this,o)){var l=s[0]===Tp.GLOBSTAR;l?this._processGlobStar(n,o,u,s,t,r):this._processReaddir(n,o,u,s,t,r)}};we.prototype._processReaddir=function(e,t,r,i,n,s){var o=this._readdir(r,s);if(o){for(var u=i[0],l=!!this.minimatch.negate,p=u._glob,d=this.dot||p.charAt(0)===".",m=[],y=0;y<o.length;y++){var g=o[y];if(g.charAt(0)!=="."||d){var b;l&&!e?b=!g.match(u):b=g.match(u),b&&m.push(g)}}var A=m.length;if(A!==0){if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var y=0;y<A;y++){var g=m[y];e&&(e.slice(-1)!=="/"?g=e+"/"+g:g=e+g),g.charAt(0)==="/"&&!this.nomount&&(g=jo.join(this.root,g)),this._emitMatch(n,g)}return}i.shift();for(var y=0;y<A;y++){var g=m[y],E;e?E=[e,g]:E=[g],this._process(E.concat(i),n,s)}}}};we.prototype._emitMatch=function(e,t){if(!o1(this,t)){var r=this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=r),!this.matches[e][t]){if(this.nodir){var i=this.cache[r];if(i==="DIR"||Array.isArray(i))return}this.matches[e][t]=!0,this.stat&&this._stat(t)}}};we.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,!1);var t,r,i;try{r=this.fs.lstatSync(e)}catch(s){if(s.code==="ENOENT")return null}var n=r&&r.isSymbolicLink();return this.symlinks[e]=n,!n&&r&&!r.isDirectory()?this.cache[e]="FILE":t=this._readdir(e,!1),t};we.prototype._readdir=function(e,t){var r;if(t&&!ko(this.symlinks,e))return this._readdirInGlobStar(e);if(ko(this.cache,e)){var i=this.cache[e];if(!i||i==="FILE")return null;if(Array.isArray(i))return i}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(n){return this._readdirError(e,n),null}};we.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat)for(var r=0;r<t.length;r++){var i=t[r];e==="/"?i=e+i:i=e+"/"+i,this.cache[i]=!0}return this.cache[e]=t,t};we.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);if(this.cache[r]="FILE",r===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);throw i.path=this.cwd,i.code=t.code,i}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:if(this.cache[this._makeAbs(e)]=!1,this.strict)throw t;this.silent||console.error("glob error",t);break}};we.prototype._processGlobStar=function(e,t,r,i,n,s){var o=this._readdir(r,s);if(o){var u=i.slice(1),l=e?[e]:[],p=l.concat(u);this._process(p,n,!1);var d=o.length,m=this.symlinks[r];if(!(m&&s))for(var y=0;y<d;y++){var g=o[y];if(!(g.charAt(0)==="."&&!this.dot)){var b=l.concat(o[y],u);this._process(b,n,!0);var A=l.concat(o[y],i);this._process(A,n,!0)}}}};we.prototype._processSimple=function(e,t){var r=this._stat(e);if(this.matches[t]||(this.matches[t]=Object.create(null)),!!r){if(e&&Yn(e)&&!this.nomount){var i=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=jo.join(this.root,e):(e=jo.resolve(this.root,e),i&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e)}};we.prototype._stat=function(e){var t=this._makeAbs(e),r=e.slice(-1)==="/";if(e.length>this.maxLength)return!1;if(!this.stat&&ko(this.cache,t)){var o=this.cache[t];if(Array.isArray(o)&&(o="DIR"),!r||o==="DIR")return o;if(r&&o==="FILE")return!1}var i,n=this.statCache[t];if(!n){var s;try{s=this.fs.lstatSync(t)}catch(u){if(u&&(u.code==="ENOENT"||u.code==="ENOTDIR"))return this.statCache[t]=!1,!1}if(s&&s.isSymbolicLink())try{n=this.fs.statSync(t)}catch{n=s}else n=s}this.statCache[t]=n;var o=!0;return n&&(o=n.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||o,r&&o==="FILE"?!1:o};we.prototype._mark=function(e){return $t.mark(this,e)};we.prototype._makeAbs=function(e){return $t.makeAbs(this,e)}});var Bo=L((Zx,Mp)=>{Mp.exports=Zt;var u1=Vr(),Lp=Dr(),Hx=Lp.Minimatch,f1=Me(),l1=D("events").EventEmitter,Uo=D("path"),Go=D("assert"),gi=D("path").isAbsolute,Wo=Ip(),Vt=Fo(),h1=Vt.setopts,zo=Vt.ownProp,Ho=Rs(),$x=D("util"),c1=Vt.childrenIgnored,d1=Vt.isIgnored,p1=Kr();function Zt(e,t,r){if(typeof t=="function"&&(r=t,t={}),t||(t={}),t.sync){if(r)throw new TypeError("callback provided to sync glob");return Wo(e,t)}return new le(e,t,r)}a(Zt,"glob");Zt.sync=Wo;var g1=Zt.GlobSync=Wo.GlobSync;Zt.glob=Zt;function y1(e,t){if(t===null||typeof t!="object")return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e}a(y1,"extend");Zt.hasMagic=function(e,t){var r=y1({},t);r.noprocess=!0;var i=new le(e,r),n=i.minimatch.set;if(!e)return!1;if(n.length>1)return!0;for(var s=0;s<n[0].length;s++)if(typeof n[0][s]!="string")return!0;return!1};Zt.Glob=le;f1(le,l1);function le(e,t,r){if(typeof t=="function"&&(r=t,t=null),t&&t.sync){if(r)throw new TypeError("callback provided to sync glob");return new g1(e,t)}if(!(this instanceof le))return new le(e,t,r);h1(this,e,t),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof r=="function"&&(r=p1(r),this.on("error",r),this.on("end",function(l){r(null,l)}));var n=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(i===0)return u();for(var s=!0,o=0;o<i;o++)this._process(this.minimatch.set[o],o,!1,u);s=!1;function u(){--n._processing,n._processing<=0&&(s?process.nextTick(function(){n._finish()}):n._finish())}a(u,"done")}a(le,"Glob");le.prototype._finish=function(){if(Go(this instanceof le),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();Vt.finish(this),this.emit("end",this.found)}};le.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var e=this.matches.length;if(e===0)return this._finish();for(var t=this,r=0;r<this.matches.length;r++)this._realpathSet(r,i);function i(){--e===0&&t._finish()}a(i,"next")};le.prototype._realpathSet=function(e,t){var r=this.matches[e];if(!r)return t();var i=Object.keys(r),n=this,s=i.length;if(s===0)return t();var o=this.matches[e]=Object.create(null);i.forEach(function(u,l){u=n._makeAbs(u),u1.realpath(u,n.realpathCache,function(p,d){p?p.syscall==="stat"?o[u]=!0:n.emit("error",p):o[d]=!0,--s===0&&(n.matches[e]=o,t())})})};le.prototype._mark=function(e){return Vt.mark(this,e)};le.prototype._makeAbs=function(e){return Vt.makeAbs(this,e)};le.prototype.abort=function(){this.aborted=!0,this.emit("abort")};le.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};le.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var r=e[t];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var i=this._processQueue.slice(0);this._processQueue.length=0;for(var t=0;t<i.length;t++){var n=i[t];this._processing--,this._process(n[0],n[1],n[2],n[3])}}}};le.prototype._process=function(e,t,r,i){if(Go(this instanceof le),Go(typeof i=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([e,t,r,i]);return}for(var n=0;typeof e[n]=="string";)n++;var s;switch(n){case e.length:this._processSimple(e.join("/"),t,i);return;case 0:s=null;break;default:s=e.slice(0,n).join("/");break}var o=e.slice(n),u;s===null?u=".":((gi(s)||gi(e.map(function(d){return typeof d=="string"?d:"[*]"}).join("/")))&&(!s||!gi(s))&&(s="/"+s),u=s);var l=this._makeAbs(u);if(c1(this,u))return i();var p=o[0]===Lp.GLOBSTAR;p?this._processGlobStar(s,u,l,o,t,r,i):this._processReaddir(s,u,l,o,t,r,i)}};le.prototype._processReaddir=function(e,t,r,i,n,s,o){var u=this;this._readdir(r,s,function(l,p){return u._processReaddir2(e,t,r,i,n,s,p,o)})};le.prototype._processReaddir2=function(e,t,r,i,n,s,o,u){if(!o)return u();for(var l=i[0],p=!!this.minimatch.negate,d=l._glob,m=this.dot||d.charAt(0)===".",y=[],g=0;g<o.length;g++){var b=o[g];if(b.charAt(0)!=="."||m){var A;p&&!e?A=!b.match(l):A=b.match(l),A&&y.push(b)}}var E=y.length;if(E===0)return u();if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var g=0;g<E;g++){var b=y[g];e&&(e!=="/"?b=e+"/"+b:b=e+b),b.charAt(0)==="/"&&!this.nomount&&(b=Uo.join(this.root,b)),this._emitMatch(n,b)}return u()}i.shift();for(var g=0;g<E;g++){var b=y[g],x;e&&(e!=="/"?b=e+"/"+b:b=e+b),this._process([b].concat(i),n,s,u)}u()};le.prototype._emitMatch=function(e,t){if(!this.aborted&&!d1(this,t)){if(this.paused){this._emitQueue.push([e,t]);return}var r=gi(t)?t:this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=r),!this.matches[e][t]){if(this.nodir){var i=this.cache[r];if(i==="DIR"||Array.isArray(i))return}this.matches[e][t]=!0;var n=this.statCache[r];n&&this.emit("stat",t,n),this.emit("match",t)}}};le.prototype._readdirInGlobStar=function(e,t){if(this.aborted)return;if(this.follow)return this._readdir(e,!1,t);var r="lstat\0"+e,i=this,n=Ho(r,s);n&&i.fs.lstat(e,n);function s(o,u){if(o&&o.code==="ENOENT")return t();var l=u&&u.isSymbolicLink();i.symlinks[e]=l,!l&&u&&!u.isDirectory()?(i.cache[e]="FILE",t()):i._readdir(e,!1,t)}a(s,"lstatcb_")};le.prototype._readdir=function(e,t,r){if(!this.aborted&&(r=Ho("readdir\0"+e+"\0"+t,r),!!r)){if(t&&!zo(this.symlinks,e))return this._readdirInGlobStar(e,r);if(zo(this.cache,e)){var i=this.cache[e];if(!i||i==="FILE")return r();if(Array.isArray(i))return r(null,i)}var n=this;n.fs.readdir(e,v1(this,e,r))}};function v1(e,t,r){return function(i,n){i?e._readdirError(t,i,r):e._readdirEntries(t,n,r)}}a(v1,"readdirCb");le.prototype._readdirEntries=function(e,t,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var i=0;i<t.length;i++){var n=t[i];e==="/"?n=e+n:n=e+"/"+n,this.cache[n]=!0}return this.cache[e]=t,r(null,t)}};le.prototype._readdirError=function(e,t,r){if(!this.aborted){switch(t.code){case"ENOTSUP":case"ENOTDIR":var i=this._makeAbs(e);if(this.cache[i]="FILE",i===this.cwdAbs){var n=new Error(t.code+" invalid cwd "+this.cwd);n.path=this.cwd,n.code=t.code,this.emit("error",n),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:this.cache[this._makeAbs(e)]=!1,this.strict&&(this.emit("error",t),this.abort()),this.silent||console.error("glob error",t);break}return r()}};le.prototype._processGlobStar=function(e,t,r,i,n,s,o){var u=this;this._readdir(r,s,function(l,p){u._processGlobStar2(e,t,r,i,n,s,p,o)})};le.prototype._processGlobStar2=function(e,t,r,i,n,s,o,u){if(!o)return u();var l=i.slice(1),p=e?[e]:[],d=p.concat(l);this._process(d,n,!1,u);var m=this.symlinks[r],y=o.length;if(m&&s)return u();for(var g=0;g<y;g++){var b=o[g];if(!(b.charAt(0)==="."&&!this.dot)){var A=p.concat(o[g],l);this._process(A,n,!0,u);var E=p.concat(o[g],i);this._process(E,n,!0,u)}}u()};le.prototype._processSimple=function(e,t,r){var i=this;this._stat(e,function(n,s){i._processSimple2(e,t,n,s,r)})};le.prototype._processSimple2=function(e,t,r,i,n){if(this.matches[t]||(this.matches[t]=Object.create(null)),!i)return n();if(e&&gi(e)&&!this.nomount){var s=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=Uo.join(this.root,e):(e=Uo.resolve(this.root,e),s&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e),n()};le.prototype._stat=function(e,t){var r=this._makeAbs(e),i=e.slice(-1)==="/";if(e.length>this.maxLength)return t();if(!this.stat&&zo(this.cache,r)){var n=this.cache[r];if(Array.isArray(n)&&(n="DIR"),!i||n==="DIR")return t(null,n);if(i&&n==="FILE")return t()}var s,o=this.statCache[r];if(o!==void 0){if(o===!1)return t(null,o);var u=o.isDirectory()?"DIR":"FILE";return i&&u==="FILE"?t():t(null,u,o)}var l=this,p=Ho("stat\0"+r,d);p&&l.fs.lstat(r,p);function d(m,y){if(y&&y.isSymbolicLink())return l.fs.stat(r,function(g,b){g?l._stat2(e,r,null,y,t):l._stat2(e,r,g,b,t)});l._stat2(e,r,m,y,t)}a(d,"lstatcb_")};le.prototype._stat2=function(e,t,r,i,n){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return this.statCache[t]=!1,n();var s=e.slice(-1)==="/";if(this.statCache[t]=i,t.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,!1,i);var o=!0;return i&&(o=i.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||o,s&&o==="FILE"?n():n(null,o,i)}});var E1=L(()=>{process.on("unhandledRejection",e=>{throw e});var Kn=D("path"),Xn=D("fs/promises"),m1=D("fs"),_1=wp(),b1=Bo(),Zo=process.argv.slice(2),w1=Zo[0],Dp=Zo[1],Np=Zo[2],Pp=Np*1024*1024,Jn,xt,$o,ea=[],Cp=[];S1().catch(()=>{process.exit(1)});function S1(){return new Promise(async(e,t)=>{await i();for(let s of w1.split(",")){let o=n(s);for(let u of o){let l=Kn.join(s,u),[p,d]=await Promise.all([Xn.readFile(l),Xn.stat(l)]),m=d.size;if(m>Pp)throw new Error(`Cannot package file "${l}". The file is larger than ${Np}MB.`);$o+m>Pp&&(await xt.finalize(),await i()),xt.append(p,{name:u,date:new Date("1980-01-01T00:00:00.000Z"),mode:d.mode}),$o+=m,Cp.push(u)}}await xt.finalize();let r=Kn.join(Dp,"filenames");await Xn.writeFile(r,Cp.join(`
20
20
  `));async function i(){let s=ea.length,o=Kn.join(Dp,`part${s}.zip`);await Xn.mkdir(Kn.dirname(o),{recursive:!0}),Jn=m1.createWriteStream(o),xt=_1("zip"),$o=0,ea.push({output:Jn,archive:xt,isOutputClosed:!1}),xt.on("warning",t),xt.on("error",t),Jn.once("close",()=>{ea[s].isOutputClosed=!0,ea.every(({isOutputClosed:u})=>u)&&e()}),xt.pipe(Jn)}a(i,"openZip");function n(s){return b1.sync("**",{dot:!0,nodir:!0,follow:!0,cwd:s})}a(n,"getFilesInPath")})}a(S1,"generateZips")});export default E1();
21
21
  /*! Bundled license information:
22
22
 
package/scrap.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/scrap.js DELETED
@@ -1,58 +0,0 @@
1
- class vehicle {
2
- #wheels;
3
- #seats;
4
- get wheels() {
5
- return this.#wheels;
6
- }
7
- get seats() {
8
- return this.#seats;
9
- }
10
- constructor(wheels, seats) {
11
- this.#wheels = wheels;
12
- this.#seats = seats;
13
- }
14
- }
15
- class driftable {
16
- #swervefactor;
17
- get swervefactor() {
18
- return this.#swervefactor;
19
- }
20
- constructor(swervefactor) {
21
- this.#swervefactor = swervefactor;
22
- }
23
- }
24
- class car extends vehicle {
25
- constructor() {
26
- super(4, 5);
27
- }
28
- }
29
- const mycar = new car();
30
- mycar.seats;
31
- mycar.wheels;
32
- function createvehicle(wheels, seats) {
33
- return {
34
- get wheels() {
35
- return wheels;
36
- },
37
- get seats() {
38
- return seats;
39
- },
40
- };
41
- }
42
- function createdriftable(swervefactor) {
43
- return {
44
- get swervefactor() {
45
- return swervefactor;
46
- },
47
- };
48
- }
49
- function createcar() {
50
- const vehicle = createvehicle(4, 4);
51
- const driftable = createdriftable(0.5);
52
- return {
53
- ...vehicle,
54
- ...driftable,
55
- };
56
- }
57
- const functionalcar = createcar();
58
- export {};