mirror of
https://github.com/docker/build-push-action.git
synced 2026-10-04 08:44:35 +03:00
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
2 files changed
+9
-9
No files matched your search
+8
-8
@@ -1,24 +1,24 @@
|
||||
require('./sourcemap-register.js');(()=>{var __webpack_modules__={7799:function(r,i,s){"use strict";var a=this&&this.__createBinding||(Object.create?function(r,i,s,a){if(a===undefined)a=s;var l=Object.getOwnPropertyDescriptor(i,s);if(!l||("get"in l?!i.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return i[s]}}}Object.defineProperty(r,a,l)}:function(r,i,s,a){if(a===undefined)a=s;r[a]=i[s]});var l=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var c=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var s in r)if(s!=="default"&&Object.prototype.hasOwnProperty.call(r,s))a(i,r,s);l(i,r);return i};var p=this&&this.__awaiter||function(r,i,s,a){function adopt(r){return r instanceof s?r:new s((function(i){i(r)}))}return new(s||(s=Promise))((function(s,l){function fulfilled(r){try{step(a.next(r))}catch(r){l(r)}}function rejected(r){try{step(a["throw"](r))}catch(r){l(r)}}function step(r){r.done?s(r.value):adopt(r.value).then(fulfilled,rejected)}step((a=a.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.saveCache=i.restoreCache=i.isFeatureAvailable=i.ReserveCacheError=i.ValidationError=void 0;const d=c(s(2186));const A=c(s(1017));const u=c(s(1518));const m=c(s(8245));const h=s(3434);class ValidationError extends Error{constructor(r){super(r);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}i.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(r){super(r);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}i.ReserveCacheError=ReserveCacheError;function checkPaths(r){if(!r||r.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(r){if(r.length>512){throw new ValidationError(`Key Validation Error: ${r} cannot be larger than 512 characters.`)}const i=/^[^,]*$/;if(!i.test(r)){throw new ValidationError(`Key Validation Error: ${r} cannot contain commas.`)}}function isFeatureAvailable(){return!!process.env["ACTIONS_CACHE_URL"]}i.isFeatureAvailable=isFeatureAvailable;function restoreCache(r,i,s,a,l=false){return p(this,void 0,void 0,(function*(){checkPaths(r);s=s||[];const c=[i,...s];d.debug("Resolved Keys:");d.debug(JSON.stringify(c));if(c.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const r of c){checkKey(r)}const p=yield u.getCompressionMethod();let g="";try{const i=yield m.getCacheEntry(c,r,{compressionMethod:p,enableCrossOsArchive:l});if(!(i===null||i===void 0?void 0:i.archiveLocation)){return undefined}if(a===null||a===void 0?void 0:a.lookupOnly){d.info("Lookup only - skipping download");return i.cacheKey}g=A.join(yield u.createTempDirectory(),u.getCacheFileName(p));d.debug(`Archive Path: ${g}`);yield m.downloadCache(i.archiveLocation,g,a);if(d.isDebug()){yield(0,h.listTar)(g,p)}const s=u.getArchiveFileSizeInBytes(g);d.info(`Cache Size: ~${Math.round(s/(1024*1024))} MB (${s} B)`);yield(0,h.extractTar)(g,p);d.info("Cache restored successfully");return i.cacheKey}catch(r){const i=r;if(i.name===ValidationError.name){throw r}else{d.warning(`Failed to restore: ${r.message}`)}}finally{try{yield u.unlinkFile(g)}catch(r){d.debug(`Failed to delete archive: ${r}`)}}return undefined}))}i.restoreCache=restoreCache;function saveCache(r,i,s,a=false){var l,c,g,E,y;return p(this,void 0,void 0,(function*(){checkPaths(r);checkKey(i);const p=yield u.getCompressionMethod();let C=-1;const b=yield u.resolvePaths(r);d.debug("Cache Paths:");d.debug(`${JSON.stringify(b)}`);if(b.length===0){throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`)}const v=yield u.createTempDirectory();const I=A.join(v,u.getCacheFileName(p));d.debug(`Archive Path: ${I}`);try{yield(0,h.createTar)(v,b,p);if(d.isDebug()){yield(0,h.listTar)(I,p)}const A=10*1024*1024*1024;const B=u.getArchiveFileSizeInBytes(I);d.debug(`File Size: ${B}`);if(B>A&&!u.isGhes()){throw new Error(`Cache size of ~${Math.round(B/(1024*1024))} MB (${B} B) is over the 10GB limit, not saving cache.`)}d.debug("Reserving Cache");const Q=yield m.reserveCache(i,r,{compressionMethod:p,enableCrossOsArchive:a,cacheSize:B});if((l=Q===null||Q===void 0?void 0:Q.result)===null||l===void 0?void 0:l.cacheId){C=(c=Q===null||Q===void 0?void 0:Q.result)===null||c===void 0?void 0:c.cacheId}else if((Q===null||Q===void 0?void 0:Q.statusCode)===400){throw new Error((E=(g=Q===null||Q===void 0?void 0:Q.error)===null||g===void 0?void 0:g.message)!==null&&E!==void 0?E:`Cache size of ~${Math.round(B/(1024*1024))} MB (${B} B) is over the data cap limit, not saving cache.`)}else{throw new ReserveCacheError(`Unable to reserve cache with key ${i}, another job may be creating this cache. More details: ${(y=Q===null||Q===Line truncated
|
||||
require('./sourcemap-register.js');(()=>{var __webpack_modules__={7799:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});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 s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,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?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.saveCache=t.restoreCache=t.isFeatureAvailable=t.ReserveCacheError=t.ValidationError=void 0;const o=s(r(2186));const l=s(r(1017));const c=s(r(1518));const p=s(r(8245));const d=r(3434);class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}t.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(e){super(e);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}t.ReserveCacheError=ReserveCacheError;function checkPaths(e){if(!e||e.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(e){if(e.length>512){throw new ValidationError(`Key Validation Error: ${e} cannot be larger than 512 characters.`)}const t=/^[^,]*$/;if(!t.test(e)){throw new ValidationError(`Key Validation Error: ${e} cannot contain commas.`)}}function isFeatureAvailable(){return!!process.env["ACTIONS_CACHE_URL"]}t.isFeatureAvailable=isFeatureAvailable;function restoreCache(e,t,r,i,n=false){return a(this,void 0,void 0,(function*(){checkPaths(e);r=r||[];const s=[t,...r];o.debug("Resolved Keys:");o.debug(JSON.stringify(s));if(s.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const e of s){checkKey(e)}const a=yield c.getCompressionMethod();let A="";try{const t=yield p.getCacheEntry(s,e,{compressionMethod:a,enableCrossOsArchive:n});if(!(t===null||t===void 0?void 0:t.archiveLocation)){return undefined}if(i===null||i===void 0?void 0:i.lookupOnly){o.info("Lookup only - skipping download");return t.cacheKey}A=l.join(yield c.createTempDirectory(),c.getCacheFileName(a));o.debug(`Archive Path: ${A}`);yield p.downloadCache(t.archiveLocation,A,i);if(o.isDebug()){yield(0,d.listTar)(A,a)}const r=c.getArchiveFileSizeInBytes(A);o.info(`Cache Size: ~${Math.round(r/(1024*1024))} MB (${r} B)`);yield(0,d.extractTar)(A,a);o.info("Cache restored successfully");return t.cacheKey}catch(e){const t=e;if(t.name===ValidationError.name){throw e}else{o.warning(`Failed to restore: ${e.message}`)}}finally{try{yield c.unlinkFile(A)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return undefined}))}t.restoreCache=restoreCache;function saveCache(e,t,r,i=false){var n,s,A,u,m;return a(this,void 0,void 0,(function*(){checkPaths(e);checkKey(t);const a=yield c.getCompressionMethod();let h=-1;const g=yield c.resolvePaths(e);o.debug("Cache Paths:");o.debug(`${JSON.stringify(g)}`);if(g.length===0){throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`)}const E=yield c.createTempDirectory();const y=l.join(E,c.getCacheFileName(a));o.debug(`Archive Path: ${y}`);try{yield(0,d.createTar)(E,g,a);if(o.isDebug()){yield(0,d.listTar)(y,a)}const l=10*1024*1024*1024;const C=c.getArchiveFileSizeInBytes(y);o.debug(`File Size: ${C}`);if(C>l&&!c.isGhes()){throw new Error(`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} B) is over the 10GB limit, not saving cache.`)}o.debug("Reserving Cache");const b=yield p.reserveCache(t,e,{compressionMethod:a,enableCrossOsArchive:i,cacheSize:C});if((n=b===null||b===void 0?void 0:b.result)===null||n===void 0?void 0:n.cacheId){h=(s=b===null||b===void 0?void 0:b.result)===null||s===void 0?void 0:s.cacheId}else if((b===null||b===void 0?void 0:b.statusCode)===400){throw new Error((u=(A=b===null||b===void 0?void 0:b.error)===null||A===void 0?void 0:A.message)!==null&&u!==void 0?u:`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} B) is over the data cap limit, not saving cache.`)}else{throw new ReserveCacheError(`Unable to reserve cache with key ${t}, another job may be creating this cache. More details: ${(m=b===null||b===Line truncated
|
||||
/*!
|
||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/function isObject(r){return Object.prototype.toString.call(r)==="[object Object]"}function isPlainObject(r){var i,s;if(isObject(r)===false)return false;i=r.constructor;if(i===undefined)return true;s=i.prototype;if(isObject(s)===false)return false;if(s.hasOwnProperty("isPrototypeOf")===false){return false}return true}i.isPlainObject=isPlainObject},4329:r=>{"use strict";function e(r){this.message=r}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var i=String(r).replace(/=+$/,"");if(i.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var s,a,l=0,c=0,p="";a=i.charAt(c++);~a&&(s=l%4?64*s+a:a,l++%4)?p+=String.fromCharCode(255&s>>(-2*l&6)):0)a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a);return p};function t(r){var s=r.replace(/-/g,"+").replace(/_/g,"/");switch(s.length%4){case 0:break;case 2:s+="==";break;case 3:s+="=";break;default:throw"Illegal base64url string!"}try{return function(r){return decodeURIComponent(i(r).replace(/(.)/g,(function(r,i){var s=i.charCodeAt(0).toString(16).toUpperCase();return s.length<2&&(s="0"+s),"%"+s})))}(s)}catch(r){return i(s)}}function n(r){this.message=r}function o(r,i){if("string"!=typeof r)throw new n("Invalid token specified");var s=!0===(i=i||{}).header?0:1;try{return JSON.parse(t(r.split(".")[s]))}catch(r){throw new n("Invalid token specified: "+r.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";const s=o;s.default=o,s.InvalidTokenError=n,r.exports=s},7426:(r,i,s)=>{
|
||||
*/function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var t,r;if(isObject(e)===false)return false;t=e.constructor;if(t===undefined)return true;r=t.prototype;if(isObject(r)===false)return false;if(r.hasOwnProperty("isPrototypeOf")===false){return false}return true}t.isPlainObject=isPlainObject},7426:(e,t,r)=>{
|
||||
/*!
|
||||
* mime-db
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
r.exports=s(3765)},3583:(r,i,s)=>{"use strict";
|
||||
e.exports=r(3765)},3583:(e,t,r)=>{"use strict";
|
||||
/*!
|
||||
* mime-types
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/var a=s(7426);var l=s(1017).extname;var c=/^\s*([^;\s]*)(?:;|\s|$)/;var p=/^text\//i;i.charset=charset;i.charsets={lookup:charset};i.contentType=contentType;i.extension=extension;i.extensions=Object.create(null);i.lookup=lookup;i.types=Object.create(null);populateMaps(i.extensions,i.types);function charset(r){if(!r||typeof r!=="string"){return false}var i=c.exec(r);var s=i&&a[i[1].toLowerCase()];if(s&&s.charset){return s.charset}if(i&&p.test(i[1])){return"UTF-8"}return false}function contentType(r){if(!r||typeof r!=="string"){return false}var s=r.indexOf("/")===-1?i.lookup(r):r;if(!s){return false}if(s.indexOf("charset")===-1){var a=i.charset(s);if(a)s+="; charset="+a.toLowerCase()}return s}function extension(r){if(!r||typeof r!=="string"){return false}var s=c.exec(r);var a=s&&i.extensions[s[1].toLowerCase()];if(!a||!a.length){return false}return a[0]}function lookup(r){if(!r||typeof r!=="string"){return false}var s=l("x."+r).toLowerCase().substr(1);if(!s){return false}return i.types[s]||false}function populateMaps(r,i){var s=["nginx","apache",undefined,"iana"];Object.keys(a).forEach((function forEachMimeType(l){var c=a[l];var p=c.extensions;if(!p||!p.length){return}r[l]=p;for(var d=0;d<p.length;d++){var A=p[d];if(i[A]){var u=s.indexOf(a[i[A]].source);var m=s.indexOf(c.source);if(i[A]!=="application/octet-stream"&&(u>m||u===m&&i[A].substr(0,12)==="application/")){continue}}i[A]=l}}))}},3973:(r,i,s)=>{r.exports=minimatch;minimatch.Minimatch=Minimatch;var a=function(){try{return s(1017)}catch(r){}}()||{sep:"/"};minimatch.sep=a.sep;var l=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var c=s(3717);var p={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var d="[^/]";var A=d+"*?";var u="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var m="(?:(?!(?:\\/|^)\\.).)*?";var h=charSet("().*{}+?[]^$\\!");function charSet(r){return r.split("").reduce((function(r,i){r[i]=true;return r}),{})}var g=/\/+/;minimatch.filter=filter;function filter(r,i){i=i||{};return function(s,a,l){return minimatch(s,r,i)}}function ext(r,i){i=i||{};var s={};Object.keys(r).forEach((function(i){s[i]=r[i]}));Object.keys(i).forEach((function(r){s[r]=i[r]}));return s}minimatch.defaults=function(r){if(!r||typeof r!=="object"||!Object.keys(r).length){return minimatch}var i=minimatch;var s=function minimatch(s,a,l){return i(s,a,ext(r,l))};s.Minimatch=function Minimatch(s,a){return new i.Minimatch(s,ext(r,a))};s.Minimatch.defaults=function defaults(s){return i.defaults(ext(r,s)).Minimatch};s.filter=function filter(s,a){return i.filter(s,ext(r,a))};s.defaults=function defaults(s){return i.defaults(ext(r,s))};s.makeRe=function makeRe(s,a){return i.makeRe(s,ext(r,a))};s.braceExpand=function braceExpand(s,a){return i.braceExpand(s,ext(r,a))};s.match=function(s,a,l){return i.match(s,a,ext(r,l))};return s};Minimatch.defaults=function(r){return minimatch.defaults(r).Minimatch};function minimatch(r,i,s){assertValidPattern(i);if(!s)s={};if(!s.nocomment&&i.charAt(0)==="#"){return false}return new Minimatch(i,s).match(r)}function Minimatch(r,i){if(!(this instanceof Minimatch)){return new Minimatch(r,i)}assertValidPattern(r);if(!i)i={};r=r.trim();if(!i.allowWindowsEscape&&a.sep!=="/"){r=r.split(a.sep).join("/")}this.options=i;this.set=[];this.pattern=r;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!i.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var r=this.pattern;var i=this.options;if(!i.nocomment&&r.charAt(0)==="#"){this.comment=true;return}if(!r){this.empty=true;return}this.parseNegate();var s=this.globSet=this.braceExpand();if(i.debug)this.debug=function debug(){console.error.apply(console,arguments)};this.debug(this.pattern,s);s=this.globParts=s.map((function(r){return r.split(g)}));this.debug(this.pattern,s);s=s.map((function(r,i,s){return r.map(this.parse,this)}),this);this.debug(this.pattern,s);s=s.filter((function(r){return r.indexOf(false)===-1}));this.debug(this.pattern,s);this.set=s}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var r=this.pattern;var i=false;var s=this.options;var a=0;if(s.nonegate)return;for(var l=0,c=r.length;l<c&&r.charAt(l)==="!";l++){i=!i;a++}if(a)this.pattern=r.substr(a);this.negate=i}minimatch.braceExpand=function(r,i){return braceExpand(r,i)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(r,i){if(!i){if(this instanceof Minimatch){i=this.options}else{i={}}}r=typeof r==="undefined"?this.pattern:r;assertValidPattern(r);if(i.nobrace||!/\{(?:(?!\{).)*\}/.test(r)){return[r]}return c(r)}var E=1024*64;var assertValidPattern=function(r){if(typeof r!=="string"){throw new TypeError("invalid pattern")}if(r.length>E){throw new TypeError("pattern is too long")}};Minimatch.prototype.parse=parse;var y={};function parse(r,i){assertValidPattern(r);var s=this.options;if(r==="**"){if(!s.noglobstar)return l;else r="*"}iLine truncated
|
||||
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint){(function(){var r=String.fromCharCode;var i=Math.floor;var fromCodePoint=function(){var s=16384;var a=[];var l;var c;var p=-1;var d=arguments.length;if(!d){return""}var A="";while(++p<d){var u=Number(arguments[p]);if(!isFinite(u)||u<0||u>1114111||i(u)!==u){throw RangeError("Invalid code point: "+u)}if(u<=65535){a.push(u)}else{u-=65536;l=(u>>10)+55296;c=u%1024+56320;a.push(l,c)}if(p+1===d||a.length>s){A+=r.apply(null,a);a.length=0}}return A};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}})(false?0:i)},5911:(r,i)=>{i=r.exports=SemVer;var s;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){s=function(){var r=Array.prototype.slice.call(arguments,0);r.unshift("SEMVER");console.log.apply(console,r)}}else{s=function(){}}i.SEMVER_SPEC_VERSION="2.0.0";var a=256;var l=Number.MAX_SAFE_INTEGER||9007199254740991;var c=16;var p=a-6;var d=i.re=[];var A=i.safeRe=[];var u=i.src=[];var m=i.tokens={};var h=0;function tok(r){m[r]=h++}var g="[a-zA-Z0-9-]";var E=[["\\s",1],["\\d",a],[g,p]];function makeSafeRe(r){for(var i=0;i<E.length;i++){var s=E[i][0];var a=E[i][1];r=r.split(s+"*").join(s+"{0,"+a+"}").split(s+"+").join(s+"{1,"+a+"}")}return r}tok("NUMERICIDENTIFIER");u[m.NUMERICIDENTIFIER]="0|[1-9]\\d*";tok("NUMERICIDENTIFIERLOOSE");u[m.NUMERICIDENTIFIERLOOSE]="\\d+";tok("NONNUMERICIDENTIFIER");u[m.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+g+"*";tok("MAINVERSION");u[m.MAINVERSION]="("+u[m.NUMERICIDENTIFIER]+")\\."+"("+u[m.NUMERICIDENTIFIER]+")\\."+"("+u[m.NUMERICIDENTIFIER]+")";tok("MAINVERSIONLOOSE");u[m.MAINVERSIONLOOSE]="("+u[m.NUMERICIDENTIFIERLOOSE]+")\\."+"("+u[m.NUMERICIDENTIFIERLOOSE]+")\\."+"("+u[m.NUMERICIDENTIFIERLOOSE]+")";tok("PRERELEASEIDENTIFIER");u[m.PRERELEASEIDENTIFIER]="(?:"+u[m.NUMERICIDENTIFIER]+"|"+u[m.NONNUMERICIDENTIFIER]+")";tok("PRERELEASEIDENTIFIERLOOSE");u[m.PRERELEASEIDENTIFIERLOOSE]="(?:"+u[m.NUMERICIDENTIFIERLOOSE]+"|"+u[m.NONNUMERICIDENTIFIER]+")";tok("PRERELEASE");u[m.PRERELEASE]="(?:-("+u[m.PRERELEASEIDENTIFIER]+"(?:\\."+u[m.PRERELEASEIDENTIFIER]+")*))";tok("PRERELEASELOOSE");u[m.PRERELEASELOOSE]="(?:-?("+u[m.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+u[m.PRERELEASEIDENTIFIERLOOSE]+")*))";tok("BUILDIDENTIFIER");u[m.BUILDIDENTIFIER]=g+"+";tok("BUILD");u[m.BUILD]="(?:\\+("+u[m.BUILDIDENTIFIER]+"(?:\\."+u[m.BUILDIDENTIFIER]+")*))";tok("FULL");tok("FULLPLAIN");u[m.FULLPLAIN]="v?"+u[m.MAINVERSION]+u[m.PRERELEASE]+"?"+u[m.BUILD]+"?";u[m.FULL]="^"+u[m.FULLPLAIN]+"$";tok("LOOSEPLAIN");u[m.LOOSEPLAIN]="[v=\\s]*"+u[m.MAINVERSIONLOOSE]+u[m.PRERELEASELOOSE]+"?"+u[m.BUILD]+"?";tok("LOOSE");u[m.LOOSE]="^"+u[m.LOOSEPLAIN]+"$";tok("GTLT");u[m.GTLT]="((?:<|>)?=?)";tok("XRANGEIDENTIFIERLOOSE");u[m.XRANGEIDENTIFIERLOOSE]=u[m.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");u[m.XRANGEIDENTIFIER]=u[m.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");u[m.XRANGEPLAIN]="[v=\\s]*("+u[m.XRANGEIDENTIFIER]+")"+"(?:\\.("+u[m.XRANGEIDENTIFIER]+")"+"(?:\\.("+u[m.XRANGEIDENTIFIER]+")"+"(?:"+u[m.PRERELEASE]+")?"+u[m.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");u[m.XRANGEPLAINLOOSE]="[v=\\s]*("+u[m.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+u[m.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+u[m.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+u[m.PRERELEASELOOSE]+")?"+u[m.BUILD]+"?"+")?)?";tok("XRANGE");u[m.XRANGE]="^"+u[m.GTLT]+"\\s*"+u[m.XRANGEPLAIN]+"$";tok("XRANGELOOSE");u[m.XRANGELOOSE]="^"+u[m.GTLT]+"\\s*"+u[m.XRANGEPLAINLOOSE]+"$";tok("COERCE");u[m.COERCE]="(^|[^\\d])"+"(\\d{1,"+c+"})"+"(?:\\.(\\d{1,"+c+"}))?"+"(?:\\.(\\d{1,"+c+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");d[m.COERCERTL]=new RegExp(u[m.COERCE],"g");A[m.COERCERTL]=new RegExp(makeSafeRe(u[m.COERCE]),"g");tok("LONETILDE");u[m.LONETILDE]="(?:~>?)";tok("TILDETRIM");u[m.TILDETRIM]="(\\s*)"+u[m.LONETILDE]+"\\s+";d[m.TILDETRIM]=new RegExp(u[m.TILDETRIM],"g");A[m.TILDETRIM]=new RegExp(makeSafeRe(u[m.TILDETRIM]),"g");var y="$1~";tok("TILDE");u[m.TILDE]="^"+u[m.LONETILDE]+u[m.XRANGEPLAIN]+"$";tok("TILDELOOSE");u[m.TILDELOOSE]="^"+u[m.LONETILDE]+u[m.XRANGEPLAINLOOSE]+"$";tok("LONECARET");u[m.LONECARET]="(?:\\^)";tok("CARETTRIM");u[m.CARETTRIM]="(\\s*)"+u[m.LONECARET]+"\\s+";d[m.CARETTRIM]=new RegExp(u[m.CARETTRIM],"g");A[m.CARETTRIM]=new RegExp(makeSafeRe(u[m.CARETTRIM]),"g");var C="$1^";tok("CARET");u[m.CARET]="^"+u[m.LONECARET]+u[m.XRANGEPLAIN]+"$";tok("CARETLOOSE");u[m.CARETLOOSE]="^"+u[m.LONECARET]+u[m.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");u[m.COMPARATORLOOSE]="^"+u[m.GTLT]+"\\s*("+u[m.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");u[m.COMPARATOR]="^"+u[m.GTLT]+"\\s*("+u[m.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");u[m.COMPARATORTRIM]="(\\s*)"+u[m.GTLT]+"\\s*("+u[m.LOOSEPLAIN]+"|"+u[m.XRANGEPLAIN]+")";d[m.COMPARATORTRIM]=new RegExp(u[m.COMPARATORTRIM],"g");A[m.COMPARATORTRIM]=new RegExp(makeSafeRe(u[m.COMPARATORTRIM]),"g");var b="$1$2$3";tok("HYPLine truncated
|
||||
*/var i=r(7426);var n=r(1017).extname;var s=/^\s*([^;\s]*)(?:;|\s|$)/;var a=/^text\//i;t.charset=charset;t.charsets={lookup:charset};t.contentType=contentType;t.extension=extension;t.extensions=Object.create(null);t.lookup=lookup;t.types=Object.create(null);populateMaps(t.extensions,t.types);function charset(e){if(!e||typeof e!=="string"){return false}var t=s.exec(e);var r=t&&i[t[1].toLowerCase()];if(r&&r.charset){return r.charset}if(t&&a.test(t[1])){return"UTF-8"}return false}function contentType(e){if(!e||typeof e!=="string"){return false}var r=e.indexOf("/")===-1?t.lookup(e):e;if(!r){return false}if(r.indexOf("charset")===-1){var i=t.charset(r);if(i)r+="; charset="+i.toLowerCase()}return r}function extension(e){if(!e||typeof e!=="string"){return false}var r=s.exec(e);var i=r&&t.extensions[r[1].toLowerCase()];if(!i||!i.length){return false}return i[0]}function lookup(e){if(!e||typeof e!=="string"){return false}var r=n("x."+e).toLowerCase().substr(1);if(!r){return false}return t.types[r]||false}function populateMaps(e,t){var r=["nginx","apache",undefined,"iana"];Object.keys(i).forEach((function forEachMimeType(n){var s=i[n];var a=s.extensions;if(!a||!a.length){return}e[n]=a;for(var o=0;o<a.length;o++){var l=a[o];if(t[l]){var c=r.indexOf(i[t[l]].source);var p=r.indexOf(s.source);if(t[l]!=="application/octet-stream"&&(c>p||c===p&&t[l].substr(0,12)==="application/")){continue}}t[l]=n}}))}},3973:(e,t,r)=>{e.exports=minimatch;minimatch.Minimatch=Minimatch;var i=function(){try{return r(1017)}catch(e){}}()||{sep:"/"};minimatch.sep=i.sep;var n=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var s=r(3717);var a={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var o="[^/]";var l=o+"*?";var c="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var p="(?:(?!(?:\\/|^)\\.).)*?";var d=charSet("().*{}+?[]^$\\!");function charSet(e){return e.split("").reduce((function(e,t){e[t]=true;return e}),{})}var A=/\/+/;minimatch.filter=filter;function filter(e,t){t=t||{};return function(r,i,n){return minimatch(r,e,t)}}function ext(e,t){t=t||{};var r={};Object.keys(e).forEach((function(t){r[t]=e[t]}));Object.keys(t).forEach((function(e){r[e]=t[e]}));return r}minimatch.defaults=function(e){if(!e||typeof e!=="object"||!Object.keys(e).length){return minimatch}var t=minimatch;var r=function minimatch(r,i,n){return t(r,i,ext(e,n))};r.Minimatch=function Minimatch(r,i){return new t.Minimatch(r,ext(e,i))};r.Minimatch.defaults=function defaults(r){return t.defaults(ext(e,r)).Minimatch};r.filter=function filter(r,i){return t.filter(r,ext(e,i))};r.defaults=function defaults(r){return t.defaults(ext(e,r))};r.makeRe=function makeRe(r,i){return t.makeRe(r,ext(e,i))};r.braceExpand=function braceExpand(r,i){return t.braceExpand(r,ext(e,i))};r.match=function(r,i,n){return t.match(r,i,ext(e,n))};return r};Minimatch.defaults=function(e){return minimatch.defaults(e).Minimatch};function minimatch(e,t,r){assertValidPattern(t);if(!r)r={};if(!r.nocomment&&t.charAt(0)==="#"){return false}return new Minimatch(t,r).match(e)}function Minimatch(e,t){if(!(this instanceof Minimatch)){return new Minimatch(e,t)}assertValidPattern(e);if(!t)t={};e=e.trim();if(!t.allowWindowsEscape&&i.sep!=="/"){e=e.split(i.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!t.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var r=this.globSet=this.braceExpand();if(t.debug)this.debug=function debug(){console.error.apply(console,arguments)};this.debug(this.pattern,r);r=this.globParts=r.map((function(e){return e.split(A)}));this.debug(this.pattern,r);r=r.map((function(e,t,r){return e.map(this.parse,this)}),this);this.debug(this.pattern,r);r=r.filter((function(e){return e.indexOf(false)===-1}));this.debug(this.pattern,r);this.set=r}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var e=this.pattern;var t=false;var r=this.options;var i=0;if(r.nonegate)return;for(var n=0,s=e.length;n<s&&e.charAt(n)==="!";n++){t=!t;i++}if(i)this.pattern=e.substr(i);this.negate=t}minimatch.braceExpand=function(e,t){return braceExpand(e,t)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(e,t){if(!t){if(this instanceof Minimatch){t=this.options}else{t={}}}e=typeof e==="undefined"?this.pattern:e;assertValidPattern(e);if(t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)){return[e]}return s(e)}var u=1024*64;var assertValidPattern=function(e){if(typeof e!=="string"){throw new TypeError("invalid pattern")}if(e.length>u){throw new TypeError("pattern is too long")}};Minimatch.prototype.parse=parse;var m={};function parse(e,t){assertValidPattern(e);var r=this.options;if(e==="**"){if(!r.noglobstar)return n;else e="*"}iLine truncated
|
||||
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint){(function(){var e=String.fromCharCode;var t=Math.floor;var fromCodePoint=function(){var r=16384;var i=[];var n;var s;var a=-1;var o=arguments.length;if(!o){return""}var l="";while(++a<o){var c=Number(arguments[a]);if(!isFinite(c)||c<0||c>1114111||t(c)!==c){throw RangeError("Invalid code point: "+c)}if(c<=65535){i.push(c)}else{c-=65536;n=(c>>10)+55296;s=c%1024+56320;i.push(n,s)}if(a+1===o||i.length>r){l+=e.apply(null,i);i.length=0}}return l};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}})(false?0:t)},5911:(e,t)=>{t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var i=256;var n=Number.MAX_SAFE_INTEGER||9007199254740991;var s=16;var a=i-6;var o=t.re=[];var l=t.safeRe=[];var c=t.src=[];var p=t.tokens={};var d=0;function tok(e){p[e]=d++}var A="[a-zA-Z0-9-]";var u=[["\\s",1],["\\d",i],[A,a]];function makeSafeRe(e){for(var t=0;t<u.length;t++){var r=u[t][0];var i=u[t][1];e=e.split(r+"*").join(r+"{0,"+i+"}").split(r+"+").join(r+"{1,"+i+"}")}return e}tok("NUMERICIDENTIFIER");c[p.NUMERICIDENTIFIER]="0|[1-9]\\d*";tok("NUMERICIDENTIFIERLOOSE");c[p.NUMERICIDENTIFIERLOOSE]="\\d+";tok("NONNUMERICIDENTIFIER");c[p.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+A+"*";tok("MAINVERSION");c[p.MAINVERSION]="("+c[p.NUMERICIDENTIFIER]+")\\."+"("+c[p.NUMERICIDENTIFIER]+")\\."+"("+c[p.NUMERICIDENTIFIER]+")";tok("MAINVERSIONLOOSE");c[p.MAINVERSIONLOOSE]="("+c[p.NUMERICIDENTIFIERLOOSE]+")\\."+"("+c[p.NUMERICIDENTIFIERLOOSE]+")\\."+"("+c[p.NUMERICIDENTIFIERLOOSE]+")";tok("PRERELEASEIDENTIFIER");c[p.PRERELEASEIDENTIFIER]="(?:"+c[p.NUMERICIDENTIFIER]+"|"+c[p.NONNUMERICIDENTIFIER]+")";tok("PRERELEASEIDENTIFIERLOOSE");c[p.PRERELEASEIDENTIFIERLOOSE]="(?:"+c[p.NUMERICIDENTIFIERLOOSE]+"|"+c[p.NONNUMERICIDENTIFIER]+")";tok("PRERELEASE");c[p.PRERELEASE]="(?:-("+c[p.PRERELEASEIDENTIFIER]+"(?:\\."+c[p.PRERELEASEIDENTIFIER]+")*))";tok("PRERELEASELOOSE");c[p.PRERELEASELOOSE]="(?:-?("+c[p.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+c[p.PRERELEASEIDENTIFIERLOOSE]+")*))";tok("BUILDIDENTIFIER");c[p.BUILDIDENTIFIER]=A+"+";tok("BUILD");c[p.BUILD]="(?:\\+("+c[p.BUILDIDENTIFIER]+"(?:\\."+c[p.BUILDIDENTIFIER]+")*))";tok("FULL");tok("FULLPLAIN");c[p.FULLPLAIN]="v?"+c[p.MAINVERSION]+c[p.PRERELEASE]+"?"+c[p.BUILD]+"?";c[p.FULL]="^"+c[p.FULLPLAIN]+"$";tok("LOOSEPLAIN");c[p.LOOSEPLAIN]="[v=\\s]*"+c[p.MAINVERSIONLOOSE]+c[p.PRERELEASELOOSE]+"?"+c[p.BUILD]+"?";tok("LOOSE");c[p.LOOSE]="^"+c[p.LOOSEPLAIN]+"$";tok("GTLT");c[p.GTLT]="((?:<|>)?=?)";tok("XRANGEIDENTIFIERLOOSE");c[p.XRANGEIDENTIFIERLOOSE]=c[p.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");c[p.XRANGEIDENTIFIER]=c[p.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");c[p.XRANGEPLAIN]="[v=\\s]*("+c[p.XRANGEIDENTIFIER]+")"+"(?:\\.("+c[p.XRANGEIDENTIFIER]+")"+"(?:\\.("+c[p.XRANGEIDENTIFIER]+")"+"(?:"+c[p.PRERELEASE]+")?"+c[p.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");c[p.XRANGEPLAINLOOSE]="[v=\\s]*("+c[p.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+c[p.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+c[p.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+c[p.PRERELEASELOOSE]+")?"+c[p.BUILD]+"?"+")?)?";tok("XRANGE");c[p.XRANGE]="^"+c[p.GTLT]+"\\s*"+c[p.XRANGEPLAIN]+"$";tok("XRANGELOOSE");c[p.XRANGELOOSE]="^"+c[p.GTLT]+"\\s*"+c[p.XRANGEPLAINLOOSE]+"$";tok("COERCE");c[p.COERCE]="(^|[^\\d])"+"(\\d{1,"+s+"})"+"(?:\\.(\\d{1,"+s+"}))?"+"(?:\\.(\\d{1,"+s+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");o[p.COERCERTL]=new RegExp(c[p.COERCE],"g");l[p.COERCERTL]=new RegExp(makeSafeRe(c[p.COERCE]),"g");tok("LONETILDE");c[p.LONETILDE]="(?:~>?)";tok("TILDETRIM");c[p.TILDETRIM]="(\\s*)"+c[p.LONETILDE]+"\\s+";o[p.TILDETRIM]=new RegExp(c[p.TILDETRIM],"g");l[p.TILDETRIM]=new RegExp(makeSafeRe(c[p.TILDETRIM]),"g");var m="$1~";tok("TILDE");c[p.TILDE]="^"+c[p.LONETILDE]+c[p.XRANGEPLAIN]+"$";tok("TILDELOOSE");c[p.TILDELOOSE]="^"+c[p.LONETILDE]+c[p.XRANGEPLAINLOOSE]+"$";tok("LONECARET");c[p.LONECARET]="(?:\\^)";tok("CARETTRIM");c[p.CARETTRIM]="(\\s*)"+c[p.LONECARET]+"\\s+";o[p.CARETTRIM]=new RegExp(c[p.CARETTRIM],"g");l[p.CARETTRIM]=new RegExp(makeSafeRe(c[p.CARETTRIM]),"g");var h="$1^";tok("CARET");c[p.CARET]="^"+c[p.LONECARET]+c[p.XRANGEPLAIN]+"$";tok("CARETLOOSE");c[p.CARETLOOSE]="^"+c[p.LONECARET]+c[p.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");c[p.COMPARATORLOOSE]="^"+c[p.GTLT]+"\\s*("+c[p.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");c[p.COMPARATOR]="^"+c[p.GTLT]+"\\s*("+c[p.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");c[p.COMPARATORTRIM]="(\\s*)"+c[p.GTLT]+"\\s*("+c[p.LOOSEPLAIN]+"|"+c[p.XRANGEPLAIN]+")";o[p.COMPARATORTRIM]=new RegExp(c[p.COMPARATORTRIM],"g");l[p.COMPARATORTRIM]=new RegExp(makeSafeRe(c[p.COMPARATORTRIM]),"g");var g="$1$2$3";tok("HYPLine truncated
|
||||
/*!
|
||||
* Tmp
|
||||
*
|
||||
@@ -26,7 +26,7 @@ r.exports=s(3765)},3583:(r,i,s)=>{"use strict";
|
||||
*
|
||||
* MIT Licensed
|
||||
*/
|
||||
const a=s(7147);const l=s(2037);const c=s(1017);const p=s(6113);const d={fs:a.constants,os:l.constants};const A=s(4959);const u="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",m=/XXXXXX/,h=3,g=(d.O_CREAT||d.fs.O_CREAT)|(d.O_EXCL||d.fs.O_EXCL)|(d.O_RDWR||d.fs.O_RDWR),E=l.platform()==="win32",y=d.EBADF||d.os.errno.EBADF,C=d.ENOENT||d.os.errno.ENOENT,b=448,v=384,I="exit",B=[],Q=a.rmdirSync.bind(a),w=A.sync;let S=false;function tmpName(r,i){const s=_parseArguments(r,i),l=s[0],c=s[1];try{_assertAndSanitizeOptions(l)}catch(r){return c(r)}let p=l.tries;(function _getUniqueName(){try{const r=_generateTmpName(l);a.stat(r,(function(i){if(!i){if(p-- >0)return _getUniqueName();return c(new Error("Could not get a unique tmp filename, max tries reached "+r))}c(null,r)}))}catch(r){c(r)}})()}function tmpNameSync(r){const i=_parseArguments(r),s=i[0];_assertAndSanitizeOptions(s);let l=s.tries;do{const r=_generateTmpName(s);try{a.statSync(r)}catch(i){return r}}while(l-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function file(r,i){const s=_parseArguments(r,i),l=s[0],c=s[1];tmpName(l,(function _tmpNameCreated(r,i){if(r)return c(r);a.open(i,g,l.mode||v,(function _fileCreated(r,s){if(r)return c(r);if(l.discardDescriptor){return a.close(s,(function _discardCallback(r){return c(r,i,undefined,_prepareTmpFileRemoveCallback(i,-1,l,false))}))}else{const r=l.discardDescriptor||l.detachDescriptor;c(null,i,s,_prepareTmpFileRemoveCallback(i,r?-1:s,l,false))}}))}))}function fileSync(r){const i=_parseArguments(r),s=i[0];const l=s.discardDescriptor||s.detachDescriptor;const c=tmpNameSync(s);var p=a.openSync(c,g,s.mode||v);if(s.discardDescriptor){a.closeSync(p);p=undefined}return{name:c,fd:p,removeCallback:_prepareTmpFileRemoveCallback(c,l?-1:p,s,true)}}function dir(r,i){const s=_parseArguments(r,i),l=s[0],c=s[1];tmpName(l,(function _tmpNameCreated(r,i){if(r)return c(r);a.mkdir(i,l.mode||b,(function _dirCreated(r){if(r)return c(r);c(null,i,_prepareTmpDirRemoveCallback(i,l,false))}))}))}function dirSync(r){const i=_parseArguments(r),s=i[0];const l=tmpNameSync(s);a.mkdirSync(l,s.mode||b);return{name:l,removeCallback:_prepareTmpDirRemoveCallback(l,s,true)}}function _removeFileAsync(r,i){const _handler=function(r){if(r&&!_isENOENT(r)){return i(r)}i()};if(0<=r[0])a.close(r[0],(function(){a.unlink(r[1],_handler)}));else a.unlink(r[1],_handler)}function _removeFileSync(r){let i=null;try{if(0<=r[0])a.closeSync(r[0])}catch(r){if(!_isEBADF(r)&&!_isENOENT(r))throw r}finally{try{a.unlinkSync(r[1])}catch(r){if(!_isENOENT(r))i=r}}if(i!==null){throw i}}function _prepareTmpFileRemoveCallback(r,i,s,a){const l=_prepareRemoveCallback(_removeFileSync,[i,r],a);const c=_prepareRemoveCallback(_removeFileAsync,[i,r],a,l);if(!s.keep)B.unshift(l);return a?l:c}function _prepareTmpDirRemoveCallback(r,i,s){const l=i.unsafeCleanup?A:a.rmdir.bind(a);const c=i.unsafeCleanup?w:Q;const p=_prepareRemoveCallback(c,r,s);const d=_prepareRemoveCallback(l,r,s,p);if(!i.keep)B.unshift(p);return s?p:d}function _prepareRemoveCallback(r,i,s,a){let l=false;return function _cleanupCallback(c){if(!l){const p=a||_cleanupCallback;const d=B.indexOf(p);if(d>=0)B.splice(d,1);l=true;if(s||r===Q||r===w){return r(i)}else{return r(i,c||function(){})}}}}function _garbageCollector(){if(!S)return;while(B.length){try{B[0]()}catch(r){}}}function _randomChars(r){let i=[],s=null;try{s=p.randomBytes(r)}catch(i){s=p.pseudoRandomBytes(r)}for(var a=0;a<r;a++){i.push(u[s[a]%u.length])}return i.join("")}function _isBlank(r){return r===null||_isUndefined(r)||!r.trim()}function _isUndefined(r){return typeof r==="undefined"}function _parseArguments(r,i){if(typeof r==="function"){return[{},r]}if(_isUndefined(r)){return[{},i]}const s={};for(const i of Object.getOwnPropertyNames(r)){s[i]=r[i]}return[s,i]}function _generateTmpName(r){const i=r.tmpdir;if(!_isUndefined(r.name))return c.join(i,r.dir,r.name);if(!_isUndefined(r.template))return c.join(i,r.dir,r.template).replace(m,_randomChars(6));const s=[r.prefix?r.prefix:"tmp","-",process.pid,"-",_randomChars(12),r.postfix?"-"+r.postfix:""].join("");return c.join(i,r.dir,s)}function _assertAndSanitizeOptions(r){r.tmpdir=_getTmpDir(r);const i=r.tmpdir;if(!_isUndefined(r.name))_assertIsRelative(r.name,"name",i);if(!_isUndefined(r.dir))_assertIsRelative(r.dir,"dir",i);if(!_isUndefined(r.template)){_assertIsRelative(r.template,"template",i);if(!r.template.match(m))throw new Error(`Invalid template, found "${r.template}".`)}if(!_isUndefined(r.tries)&&isNaN(r.tries)||r.tries<0)throw new Error(`Invalid tries, found "${r.tries}".`);r.tries=_isUndefined(r.name)?r.tries||h:1;r.keep=!!r.keep;r.detachDescriptor=!!r.detachDescriptor;r.discardDescriptor=!!r.discardDescriptor;r.unsafeCleanup=!!r.unsafeCleanup;r.dir=_isUndefined(r.dir)?"":c.relative(i,_resolvePath(r.dir,i));r.template=_isUndefined(r.template)?undefined:c.relative(i,_resolvePath(r.template,i));r.template=_isBlank(r.template)?undefined:c.relative(r.dir,r.template);r.naLine truncated
|
||||
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */;const escape=r=>r.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22");const normalizeLinefeeds=r=>r.replace(/\r?\n|\r/g,"\r\n");const a=new TextEncoder;const l=[];const c=new Uint8Array([13,10]);h=0;let p=false;for(const[i,d]of r){if(typeof d==="string"){const r=a.encode(s+`; name="${escape(normalizeLinefeeds(i))}"`+`\r\n\r\n${normalizeLinefeeds(d)}\r\n`);l.push(r);h+=r.byteLength}else{const r=a.encode(`${s}; name="${escape(normalizeLinefeeds(i))}"`+(d.name?`; filename="${escape(d.name)}"`:"")+"\r\n"+`Content-Type: ${d.type||"application/octet-stream"}\r\n\r\n`);l.push(r,d,c);if(typeof d.size==="number"){h+=r.byteLength+d.size+c.byteLength}else{p=true}}}const d=a.encode(`--${i}--`);l.push(d);h+=d.byteLength;if(p){h=null}m=r;u=async function*(){for(const r of l){if(r.stream){yield*r.stream()}else{yield r}}};g="multipart/form-data; boundary="+i}else if(p(r)){m=r;h=r.size;if(r.type){g=r.type}}else if(typeof r[Symbol.asyncIterator]==="function"){if(i){throw new TypeError("keepalive")}if(l.isDisturbed(r)||r.locked){throw new TypeError("Response body object should not be disturbed or locked")}a=r instanceof D?r:c(r)}if(typeof m==="string"||l.isBuffer(m)){h=Buffer.byteLength(m)}if(u!=null){let i;a=new D({async start(){i=u(r)[Symbol.asyncIterator]()},async pull(r){const{value:s,done:l}=await i.next();if(l){queueMicrotask((()=>{r.close()}))}else{if(!Q(a)){r.enqueue(new Uint8Array(s))}}return r.desiredSize>0},async cancel(r){await i.return()},type:undefined})}const E={stream:a,source:m,length:h};return[E,g]}function safelyExtractBody(r,i=false){if(!D){D=s(5356).ReadableStream}if(r instanceof D){B(!l.isDisturbed(r),"The body has already been consumed.");B(!r.locked,"The stream is locked.")}return extractBody(r,i)}function cloneBody(r){const[i,s]=r.stream.tee();const a=C(s,{transfer:[s]});const[,l]=a.tee();r.stream=i;return{stream:l,length:r.length,source:r.source}}async function*consumeBody(r){if(r){if(w(r)){yield r}else{const i=r.stream;if(l.isDisturbed(i)){throw new TypeError("The body has already been consumed.")}if(i.locked){throw new TypeError("The stream is locked.")}i[I]=true;yield*i}}}function throwIfAborted(r){if(r.aborted){throw new y("The operation was aborted.","AbortError")}}function bodyMixinMethods(r){const i={blob(){return specConsumeBody(this,(r=>{let i=bodyMimeType(this);if(i==="failure"){i=""}else if(i){i=R(i)}return new b([r],{type:i})}),r)},arrayBuffer(){return specConsumeBody(this,(r=>new Uint8Array(r).buffer),r)},text(){return specConsumeBody(this,utf8DecodeBytes,r)},json(){return specConsumeBody(this,parseJSONFromBytes,r)},async formData(){E.brandCheck(this,r);throwIfAborted(this[g]);const i=this.headers.get("Content-Type");if(/multipart\/form-data/.test(i)){const r={};for(const[i,s]of this.headers)r[i.toLowerCase()]=s;const i=new h;let s;try{s=new a({headers:r,preservePath:true})}catch(r){throw new y(`${r}`,"AbortError")}s.on("field",((r,s)=>{i.append(r,s)}));s.on("file",((r,s,a,l,c)=>{const p=[];if(l==="base64"||l.toLowerCase()==="base64"){let l="";s.on("data",(r=>{l+=r.toString().replace(/[\r\n]/gm,"");const i=l.length-l.length%4;p.push(Buffer.from(l.slice(0,i),"base64"));l=l.slice(i)}));s.on("end",(()=>{p.push(Buffer.from(l,"base64"));i.append(r,new T(p,a,{type:c}))}))}else{s.on("data",(r=>{p.push(r)}));s.on("end",(()=>{i.append(r,new T(p,a,{type:c}))}))}}));const l=new Promise(((r,i)=>{s.on("finish",r);s.on("error",(r=>i(new TypeError(r))))}));if(this.body!==null)for await(const r of consumeBody(this[g].body))s.write(r);s.end();await l;return i}else if(/application\/x-www-form-urlencoded/.test(i)){let r;try{let i="";const s=new TextDecoder("utf-8",{ignoreBOM:true});for await(const r of consumeBody(this[g].body)){if(!w(r)){throw new TypeError("Expected Uint8Array chunk")}i+=s.decode(r,{stream:true})}i+=s.decode();r=new URLSearchParams(i)}catch(r){throw Object.assign(new TypeError,{cause:r})}const i=new h;for(const[s,a]of r){i.append(s,a)}return i}else{await Promise.resolve();throwIfAborted(this[g]);throw E.errors.exception({header:`${r.name}.formData`,message:"Could not parse content as FormData."})}}};return i}function mixinBody(r){Object.assign(r.prototype,bodyMixinMethods(r))}async function specConsumeBody(r,i,s){E.brandCheck(r,s);throwIfAborted(r[g]);if(bodyUnusable(r[g].body)){throw new TypeError("Body is unusable")}const a=u();const errorSteps=r=>a.reject(r);const successSteps=r=>{try{a.resolve(i(r))}catch(r){errorSteps(r)}};if(r[g].body==null){successSteps(new Uint8Array);return a.promise}await m(r[g].body,successSteps,errorSteps);return a.promise}function bodyUnusable(r){return r!=null&&(r.stream.locked||l.isDisturbed(r.stream))}function utf8DecodeBytes(r){if(r.length===0){return""}if(r[0]===239&&r[1]===187&&r[2]===191){r=r.subarray(3)}const i=(new TextDecoder).decode(r);return i}function parseJSONFromBytes(r){return JSON.parse(utf8DecodeBytes(r))}function bodyMimeType(r){const{heaLine truncated
|
||||
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */c[l-4]=this.maskKey[0];c[l-3]=this.maskKey[1];c[l-2]=this.maskKey[2];c[l-1]=this.maskKey[3];c[1]=s;if(s===126){c.writeUInt16BE(i,2)}else if(s===127){c[2]=c[3]=0;c.writeUIntBE(i,4,6)}c[1]|=128;for(let r=0;r<i;r++){c[l+r]=this.frameData[r]^this.maskKey[r%4]}return c}}r.exports={WebsocketFrameSend:WebsocketFrameSend}},1688:(r,i,s)=>{"use strict";const{Writable:a}=s(2781);const l=s(7643);const{parserStates:c,opcodes:p,states:d,emptyBuffer:A}=s(9188);const{kReadyState:u,kSentClose:m,kResponse:h,kReceivedClose:g}=s(7578);const{isValidStatusCode:E,failWebsocketConnection:y,websocketMessageReceived:C}=s(5515);const{WebsocketFrameSend:b}=s(5444);const v={};v.ping=l.channel("undici:websocket:ping");v.pong=l.channel("undici:websocket:pong");class ByteParser extends a{#a=[];#o=0;#l=c.INFO;#c={};#p=[];constructor(r){super();this.ws=r}_write(r,i,s){this.#a.push(r);this.#o+=r.length;this.run(s)}run(r){while(true){if(this.#l===c.INFO){if(this.#o<2){return r()}const i=this.consume(2);this.#c.fin=(i[0]&128)!==0;this.#c.opcode=i[0]&15;this.#c.originalOpcode??=this.#c.opcode;this.#c.fragmented=!this.#c.fin&&this.#c.opcode!==p.CONTINUATION;if(this.#c.fragmented&&this.#c.opcode!==p.BINARY&&this.#c.opcode!==p.TEXT){y(this.ws,"Invalid frame type was fragmented.");return}const s=i[1]&127;if(s<=125){this.#c.payloadLength=s;this.#l=c.READ_DATA}else if(s===126){this.#l=c.PAYLOADLENGTH_16}else if(s===127){this.#l=c.PAYLOADLENGTH_64}if(this.#c.fragmented&&s>125){y(this.ws,"Fragmented frame exceeded 125 bytes.");return}else if((this.#c.opcode===p.PING||this.#c.opcode===p.PONG||this.#c.opcode===p.CLOSE)&&s>125){y(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#c.opcode===p.CLOSE){if(s===1){y(this.ws,"Received close frame with a 1-byte body.");return}const r=this.consume(s);this.#c.closeInfo=this.parseCloseBody(false,r);if(!this.ws[m]){const r=Buffer.allocUnsafe(2);r.writeUInt16BE(this.#c.closeInfo.code,0);const i=new b(r);this.ws[h].socket.write(i.createFrame(p.CLOSE),(r=>{if(!r){this.ws[m]=true}}))}this.ws[u]=d.CLOSING;this.ws[g]=true;this.end();return}else if(this.#c.opcode===p.PING){const i=this.consume(s);if(!this.ws[g]){const r=new b(i);this.ws[h].socket.write(r.createFrame(p.PONG));if(v.ping.hasSubscribers){v.ping.publish({payload:i})}}this.#l=c.INFO;if(this.#o>0){continue}else{r();return}}else if(this.#c.opcode===p.PONG){const i=this.consume(s);if(v.pong.hasSubscribers){v.pong.publish({payload:i})}if(this.#o>0){continue}else{r();return}}}else if(this.#l===c.PAYLOADLENGTH_16){if(this.#o<2){return r()}const i=this.consume(2);this.#c.payloadLength=i.readUInt16BE(0);this.#l=c.READ_DATA}else if(this.#l===c.PAYLOADLENGTH_64){if(this.#o<8){return r()}const i=this.consume(8);const s=i.readUInt32BE(0);if(s>2**31-1){y(this.ws,"Received payload length > 2^31 bytes.");return}const a=i.readUInt32BE(4);this.#c.payloadLength=(s<<8)+a;this.#l=c.READ_DATA}else if(this.#l===c.READ_DATA){if(this.#o<this.#c.payloadLength){return r()}else if(this.#o>=this.#c.payloadLength){const r=this.consume(this.#c.payloadLength);this.#p.push(r);if(!this.#c.fragmented||this.#c.fin&&this.#c.opcode===p.CONTINUATION){const r=Buffer.concat(this.#p);C(this.ws,this.#c.originalOpcode,r);this.#c={};this.#p.length=0}this.#l=c.INFO}}if(this.#o>0){continue}else{r();break}}}consume(r){if(r>this.#o){return null}else if(r===0){return A}if(this.#a[0].length===r){this.#o-=this.#a[0].length;return this.#a.shift()}const i=Buffer.allocUnsafe(r);let s=0;while(s!==r){const a=this.#a[0];const{length:l}=a;if(l+s===r){i.set(this.#a.shift(),s);break}else if(l+s>r){i.set(a.subarray(0,r-s),s);this.#a[0]=a.subarray(r-s);break}else{i.set(this.#a.shift(),s);s+=a.length}}this.#o-=r;return i}parseCloseBody(r,i){let s;if(i.length>=2){s=i.readUInt16BE(0)}if(r){if(!E(s)){return null}return{code:s}}let a=i.subarray(2);if(a[0]===239&&a[1]===187&&a[2]===191){a=a.subarray(3)}if(s!==undefined&&!E(s)){return null}try{a=new TextDecoder("utf-8",{fatal:true}).decode(a)}catch{return null}return{code:s,reason:a}}get closingInfo(){return this.#c.closeInfo}}r.exports={ByteParser:ByteParser}},7578:r=>{"use strict";r.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}},5515:(r,i,s)=>{"use strict";const{kReadyState:a,kController:l,kResponse:c,kBinaryType:p,kWebSocketURL:d}=s(7578);const{states:A,opcodes:u}=s(9188);const{MessageEvent:m,ErrorEvent:h}=s(2611);function isEstablished(r){return r[a]===A.OPEN}function isClosing(r){return r[a]===A.CLOSING}function isClosed(r){return r[a]===A.CLOSED}function fireEvent(r,i,s=Event,a){const l=new s(r,a);i.dispatchEvent(l)}function websocketMessageReceived(r,i,s){if(r[a]!==A.OPEN){return}let l;if(i===u.TEXT){try{l=new TextDecoder("utf-8",{fatal:true}).decode(s)Line truncated
|
||||
const i=r(7147);const n=r(2037);const s=r(1017);const a=r(6113);const o={fs:i.constants,os:n.constants};const l=r(4959);const c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",p=/XXXXXX/,d=3,A=(o.O_CREAT||o.fs.O_CREAT)|(o.O_EXCL||o.fs.O_EXCL)|(o.O_RDWR||o.fs.O_RDWR),u=n.platform()==="win32",m=o.EBADF||o.os.errno.EBADF,h=o.ENOENT||o.os.errno.ENOENT,g=448,E=384,y="exit",C=[],b=i.rmdirSync.bind(i),v=l.sync;let I=false;function tmpName(e,t){const r=_parseArguments(e,t),n=r[0],s=r[1];try{_assertAndSanitizeOptions(n)}catch(e){return s(e)}let a=n.tries;(function _getUniqueName(){try{const e=_generateTmpName(n);i.stat(e,(function(t){if(!t){if(a-- >0)return _getUniqueName();return s(new Error("Could not get a unique tmp filename, max tries reached "+e))}s(null,e)}))}catch(e){s(e)}})()}function tmpNameSync(e){const t=_parseArguments(e),r=t[0];_assertAndSanitizeOptions(r);let n=r.tries;do{const e=_generateTmpName(r);try{i.statSync(e)}catch(t){return e}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function file(e,t){const r=_parseArguments(e,t),n=r[0],s=r[1];tmpName(n,(function _tmpNameCreated(e,t){if(e)return s(e);i.open(t,A,n.mode||E,(function _fileCreated(e,r){if(e)return s(e);if(n.discardDescriptor){return i.close(r,(function _discardCallback(e){return s(e,t,undefined,_prepareTmpFileRemoveCallback(t,-1,n,false))}))}else{const e=n.discardDescriptor||n.detachDescriptor;s(null,t,r,_prepareTmpFileRemoveCallback(t,e?-1:r,n,false))}}))}))}function fileSync(e){const t=_parseArguments(e),r=t[0];const n=r.discardDescriptor||r.detachDescriptor;const s=tmpNameSync(r);var a=i.openSync(s,A,r.mode||E);if(r.discardDescriptor){i.closeSync(a);a=undefined}return{name:s,fd:a,removeCallback:_prepareTmpFileRemoveCallback(s,n?-1:a,r,true)}}function dir(e,t){const r=_parseArguments(e,t),n=r[0],s=r[1];tmpName(n,(function _tmpNameCreated(e,t){if(e)return s(e);i.mkdir(t,n.mode||g,(function _dirCreated(e){if(e)return s(e);s(null,t,_prepareTmpDirRemoveCallback(t,n,false))}))}))}function dirSync(e){const t=_parseArguments(e),r=t[0];const n=tmpNameSync(r);i.mkdirSync(n,r.mode||g);return{name:n,removeCallback:_prepareTmpDirRemoveCallback(n,r,true)}}function _removeFileAsync(e,t){const _handler=function(e){if(e&&!_isENOENT(e)){return t(e)}t()};if(0<=e[0])i.close(e[0],(function(){i.unlink(e[1],_handler)}));else i.unlink(e[1],_handler)}function _removeFileSync(e){let t=null;try{if(0<=e[0])i.closeSync(e[0])}catch(e){if(!_isEBADF(e)&&!_isENOENT(e))throw e}finally{try{i.unlinkSync(e[1])}catch(e){if(!_isENOENT(e))t=e}}if(t!==null){throw t}}function _prepareTmpFileRemoveCallback(e,t,r,i){const n=_prepareRemoveCallback(_removeFileSync,[t,e],i);const s=_prepareRemoveCallback(_removeFileAsync,[t,e],i,n);if(!r.keep)C.unshift(n);return i?n:s}function _prepareTmpDirRemoveCallback(e,t,r){const n=t.unsafeCleanup?l:i.rmdir.bind(i);const s=t.unsafeCleanup?v:b;const a=_prepareRemoveCallback(s,e,r);const o=_prepareRemoveCallback(n,e,r,a);if(!t.keep)C.unshift(a);return r?a:o}function _prepareRemoveCallback(e,t,r,i){let n=false;return function _cleanupCallback(s){if(!n){const a=i||_cleanupCallback;const o=C.indexOf(a);if(o>=0)C.splice(o,1);n=true;if(r||e===b||e===v){return e(t)}else{return e(t,s||function(){})}}}}function _garbageCollector(){if(!I)return;while(C.length){try{C[0]()}catch(e){}}}function _randomChars(e){let t=[],r=null;try{r=a.randomBytes(e)}catch(t){r=a.pseudoRandomBytes(e)}for(var i=0;i<e;i++){t.push(c[r[i]%c.length])}return t.join("")}function _isBlank(e){return e===null||_isUndefined(e)||!e.trim()}function _isUndefined(e){return typeof e==="undefined"}function _parseArguments(e,t){if(typeof e==="function"){return[{},e]}if(_isUndefined(e)){return[{},t]}const r={};for(const t of Object.getOwnPropertyNames(e)){r[t]=e[t]}return[r,t]}function _generateTmpName(e){const t=e.tmpdir;if(!_isUndefined(e.name))return s.join(t,e.dir,e.name);if(!_isUndefined(e.template))return s.join(t,e.dir,e.template).replace(p,_randomChars(6));const r=[e.prefix?e.prefix:"tmp","-",process.pid,"-",_randomChars(12),e.postfix?"-"+e.postfix:""].join("");return s.join(t,e.dir,r)}function _assertAndSanitizeOptions(e){e.tmpdir=_getTmpDir(e);const t=e.tmpdir;if(!_isUndefined(e.name))_assertIsRelative(e.name,"name",t);if(!_isUndefined(e.dir))_assertIsRelative(e.dir,"dir",t);if(!_isUndefined(e.template)){_assertIsRelative(e.template,"template",t);if(!e.template.match(p))throw new Error(`Invalid template, found "${e.template}".`)}if(!_isUndefined(e.tries)&&isNaN(e.tries)||e.tries<0)throw new Error(`Invalid tries, found "${e.tries}".`);e.tries=_isUndefined(e.name)?e.tries||d:1;e.keep=!!e.keep;e.detachDescriptor=!!e.detachDescriptor;e.discardDescriptor=!!e.discardDescriptor;e.unsafeCleanup=!!e.unsafeCleanup;e.dir=_isUndefined(e.dir)?"":s.relative(t,_resolvePath(e.dir,t));e.template=_isUndefined(e.template)?undefined:s.relative(t,_resolvePath(e.template,t));e.template=_isBlank(e.template)?undefined:s.relative(e.dir,e.template);e.naLine truncated
|
||||
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */;const escape=e=>e.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22");const normalizeLinefeeds=e=>e.replace(/\r?\n|\r/g,"\r\n");const i=new TextEncoder;const n=[];const s=new Uint8Array([13,10]);d=0;let a=false;for(const[t,o]of e){if(typeof o==="string"){const e=i.encode(r+`; name="${escape(normalizeLinefeeds(t))}"`+`\r\n\r\n${normalizeLinefeeds(o)}\r\n`);n.push(e);d+=e.byteLength}else{const e=i.encode(`${r}; name="${escape(normalizeLinefeeds(t))}"`+(o.name?`; filename="${escape(o.name)}"`:"")+"\r\n"+`Content-Type: ${o.type||"application/octet-stream"}\r\n\r\n`);n.push(e,o,s);if(typeof o.size==="number"){d+=e.byteLength+o.size+s.byteLength}else{a=true}}}const o=i.encode(`--${t}--`);n.push(o);d+=o.byteLength;if(a){d=null}p=e;c=async function*(){for(const e of n){if(e.stream){yield*e.stream()}else{yield e}}};A="multipart/form-data; boundary="+t}else if(a(e)){p=e;d=e.size;if(e.type){A=e.type}}else if(typeof e[Symbol.asyncIterator]==="function"){if(t){throw new TypeError("keepalive")}if(n.isDisturbed(e)||e.locked){throw new TypeError("Response body object should not be disturbed or locked")}i=e instanceof S?e:s(e)}if(typeof p==="string"||n.isBuffer(p)){d=Buffer.byteLength(p)}if(c!=null){let t;i=new S({async start(){t=c(e)[Symbol.asyncIterator]()},async pull(e){const{value:r,done:n}=await t.next();if(n){queueMicrotask((()=>{e.close()}))}else{if(!b(i)){e.enqueue(new Uint8Array(r))}}return e.desiredSize>0},async cancel(e){await t.return()},type:undefined})}const u={stream:i,source:p,length:d};return[u,A]}function safelyExtractBody(e,t=false){if(!S){S=r(5356).ReadableStream}if(e instanceof S){C(!n.isDisturbed(e),"The body has already been consumed.");C(!e.locked,"The stream is locked.")}return extractBody(e,t)}function cloneBody(e){const[t,r]=e.stream.tee();const i=h(r,{transfer:[r]});const[,n]=i.tee();e.stream=t;return{stream:n,length:e.length,source:e.source}}async function*consumeBody(e){if(e){if(v(e)){yield e}else{const t=e.stream;if(n.isDisturbed(t)){throw new TypeError("The body has already been consumed.")}if(t.locked){throw new TypeError("The stream is locked.")}t[y]=true;yield*t}}}function throwIfAborted(e){if(e.aborted){throw new m("The operation was aborted.","AbortError")}}function bodyMixinMethods(e){const t={blob(){return specConsumeBody(this,(e=>{let t=bodyMimeType(this);if(t==="failure"){t=""}else if(t){t=w(t)}return new g([e],{type:t})}),e)},arrayBuffer(){return specConsumeBody(this,(e=>new Uint8Array(e).buffer),e)},text(){return specConsumeBody(this,utf8DecodeBytes,e)},json(){return specConsumeBody(this,parseJSONFromBytes,e)},async formData(){u.brandCheck(this,e);throwIfAborted(this[A]);const t=this.headers.get("Content-Type");if(/multipart\/form-data/.test(t)){const e={};for(const[t,r]of this.headers)e[t.toLowerCase()]=r;const t=new d;let r;try{r=new i({headers:e,preservePath:true})}catch(e){throw new m(`${e}`,"AbortError")}r.on("field",((e,r)=>{t.append(e,r)}));r.on("file",((e,r,i,n,s)=>{const a=[];if(n==="base64"||n.toLowerCase()==="base64"){let n="";r.on("data",(e=>{n+=e.toString().replace(/[\r\n]/gm,"");const t=n.length-n.length%4;a.push(Buffer.from(n.slice(0,t),"base64"));n=n.slice(t)}));r.on("end",(()=>{a.push(Buffer.from(n,"base64"));t.append(e,new x(a,i,{type:s}))}))}else{r.on("data",(e=>{a.push(e)}));r.on("end",(()=>{t.append(e,new x(a,i,{type:s}))}))}}));const n=new Promise(((e,t)=>{r.on("finish",e);r.on("error",(e=>t(new TypeError(e))))}));if(this.body!==null)for await(const e of consumeBody(this[A].body))r.write(e);r.end();await n;return t}else if(/application\/x-www-form-urlencoded/.test(t)){let e;try{let t="";const r=new TextDecoder("utf-8",{ignoreBOM:true});for await(const e of consumeBody(this[A].body)){if(!v(e)){throw new TypeError("Expected Uint8Array chunk")}t+=r.decode(e,{stream:true})}t+=r.decode();e=new URLSearchParams(t)}catch(e){throw Object.assign(new TypeError,{cause:e})}const t=new d;for(const[r,i]of e){t.append(r,i)}return t}else{await Promise.resolve();throwIfAborted(this[A]);throw u.errors.exception({header:`${e.name}.formData`,message:"Could not parse content as FormData."})}}};return t}function mixinBody(e){Object.assign(e.prototype,bodyMixinMethods(e))}async function specConsumeBody(e,t,r){u.brandCheck(e,r);throwIfAborted(e[A]);if(bodyUnusable(e[A].body)){throw new TypeError("Body is unusable")}const i=c();const errorSteps=e=>i.reject(e);const successSteps=e=>{try{i.resolve(t(e))}catch(e){errorSteps(e)}};if(e[A].body==null){successSteps(new Uint8Array);return i.promise}await p(e[A].body,successSteps,errorSteps);return i.promise}function bodyUnusable(e){return e!=null&&(e.stream.locked||n.isDisturbed(e.stream))}function utf8DecodeBytes(e){if(e.length===0){return""}if(e[0]===239&&e[1]===187&&e[2]===191){e=e.subarray(3)}const t=(new TextDecoder).decode(e);return t}function parseJSONFromBytes(e){return JSON.parse(utf8DecodeBytes(e))}function bodyMimeType(e){const{heaLine truncated
|
||||
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */s[n-4]=this.maskKey[0];s[n-3]=this.maskKey[1];s[n-2]=this.maskKey[2];s[n-1]=this.maskKey[3];s[1]=r;if(r===126){s.writeUInt16BE(t,2)}else if(r===127){s[2]=s[3]=0;s.writeUIntBE(t,4,6)}s[1]|=128;for(let e=0;e<t;e++){s[n+e]=this.frameData[e]^this.maskKey[e%4]}return s}}e.exports={WebsocketFrameSend:WebsocketFrameSend}},1688:(e,t,r)=>{"use strict";const{Writable:i}=r(2781);const n=r(7643);const{parserStates:s,opcodes:a,states:o,emptyBuffer:l}=r(9188);const{kReadyState:c,kSentClose:p,kResponse:d,kReceivedClose:A}=r(7578);const{isValidStatusCode:u,failWebsocketConnection:m,websocketMessageReceived:h}=r(5515);const{WebsocketFrameSend:g}=r(5444);const E={};E.ping=n.channel("undici:websocket:ping");E.pong=n.channel("undici:websocket:pong");class ByteParser extends i{#a=[];#o=0;#l=s.INFO;#c={};#p=[];constructor(e){super();this.ws=e}_write(e,t,r){this.#a.push(e);this.#o+=e.length;this.run(r)}run(e){while(true){if(this.#l===s.INFO){if(this.#o<2){return e()}const t=this.consume(2);this.#c.fin=(t[0]&128)!==0;this.#c.opcode=t[0]&15;this.#c.originalOpcode??=this.#c.opcode;this.#c.fragmented=!this.#c.fin&&this.#c.opcode!==a.CONTINUATION;if(this.#c.fragmented&&this.#c.opcode!==a.BINARY&&this.#c.opcode!==a.TEXT){m(this.ws,"Invalid frame type was fragmented.");return}const r=t[1]&127;if(r<=125){this.#c.payloadLength=r;this.#l=s.READ_DATA}else if(r===126){this.#l=s.PAYLOADLENGTH_16}else if(r===127){this.#l=s.PAYLOADLENGTH_64}if(this.#c.fragmented&&r>125){m(this.ws,"Fragmented frame exceeded 125 bytes.");return}else if((this.#c.opcode===a.PING||this.#c.opcode===a.PONG||this.#c.opcode===a.CLOSE)&&r>125){m(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#c.opcode===a.CLOSE){if(r===1){m(this.ws,"Received close frame with a 1-byte body.");return}const e=this.consume(r);this.#c.closeInfo=this.parseCloseBody(false,e);if(!this.ws[p]){const e=Buffer.allocUnsafe(2);e.writeUInt16BE(this.#c.closeInfo.code,0);const t=new g(e);this.ws[d].socket.write(t.createFrame(a.CLOSE),(e=>{if(!e){this.ws[p]=true}}))}this.ws[c]=o.CLOSING;this.ws[A]=true;this.end();return}else if(this.#c.opcode===a.PING){const t=this.consume(r);if(!this.ws[A]){const e=new g(t);this.ws[d].socket.write(e.createFrame(a.PONG));if(E.ping.hasSubscribers){E.ping.publish({payload:t})}}this.#l=s.INFO;if(this.#o>0){continue}else{e();return}}else if(this.#c.opcode===a.PONG){const t=this.consume(r);if(E.pong.hasSubscribers){E.pong.publish({payload:t})}if(this.#o>0){continue}else{e();return}}}else if(this.#l===s.PAYLOADLENGTH_16){if(this.#o<2){return e()}const t=this.consume(2);this.#c.payloadLength=t.readUInt16BE(0);this.#l=s.READ_DATA}else if(this.#l===s.PAYLOADLENGTH_64){if(this.#o<8){return e()}const t=this.consume(8);const r=t.readUInt32BE(0);if(r>2**31-1){m(this.ws,"Received payload length > 2^31 bytes.");return}const i=t.readUInt32BE(4);this.#c.payloadLength=(r<<8)+i;this.#l=s.READ_DATA}else if(this.#l===s.READ_DATA){if(this.#o<this.#c.payloadLength){return e()}else if(this.#o>=this.#c.payloadLength){const e=this.consume(this.#c.payloadLength);this.#p.push(e);if(!this.#c.fragmented||this.#c.fin&&this.#c.opcode===a.CONTINUATION){const e=Buffer.concat(this.#p);h(this.ws,this.#c.originalOpcode,e);this.#c={};this.#p.length=0}this.#l=s.INFO}}if(this.#o>0){continue}else{e();break}}}consume(e){if(e>this.#o){return null}else if(e===0){return l}if(this.#a[0].length===e){this.#o-=this.#a[0].length;return this.#a.shift()}const t=Buffer.allocUnsafe(e);let r=0;while(r!==e){const i=this.#a[0];const{length:n}=i;if(n+r===e){t.set(this.#a.shift(),r);break}else if(n+r>e){t.set(i.subarray(0,e-r),r);this.#a[0]=i.subarray(e-r);break}else{t.set(this.#a.shift(),r);r+=i.length}}this.#o-=e;return t}parseCloseBody(e,t){let r;if(t.length>=2){r=t.readUInt16BE(0)}if(e){if(!u(r)){return null}return{code:r}}let i=t.subarray(2);if(i[0]===239&&i[1]===187&&i[2]===191){i=i.subarray(3)}if(r!==undefined&&!u(r)){return null}try{i=new TextDecoder("utf-8",{fatal:true}).decode(i)}catch{return null}return{code:r,reason:i}}get closingInfo(){return this.#c.closeInfo}}e.exports={ByteParser:ByteParser}},7578:e=>{"use strict";e.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}},5515:(e,t,r)=>{"use strict";const{kReadyState:i,kController:n,kResponse:s,kBinaryType:a,kWebSocketURL:o}=r(7578);const{states:l,opcodes:c}=r(9188);const{MessageEvent:p,ErrorEvent:d}=r(2611);function isEstablished(e){return e[i]===l.OPEN}function isClosing(e){return e[i]===l.CLOSING}function isClosed(e){return e[i]===l.CLOSED}function fireEvent(e,t,r=Event,i){const n=new r(e,i);t.dispatchEvent(n)}function websocketMessageReceived(e,t,r){if(e[i]!==l.OPEN){return}let n;if(t===c.TEXT){try{n=new TextDecoder("utf-8",{fatal:true}).decode(r)Line truncated
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","names":["__createBinding","this","Object","create","o","m","k","k2","undefined","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__setModuleDefault","v","value","__importStar","mod","result","prototype","hasOwnProperty","call","__awaiter","thisArg","_arguments","P","generator","adopt","resolve","Promise","reject","fulfilled","step","next","e","rejected","done","then","apply","exports","saveCache","restoreCache","isFeatureAvailable","ReserveCacheError","ValidationError","core","__webpack_require__","path","utils","cacheHttpClient","tar_1","Error","constructor","message","super","name","setPrototypeOf","checkPaths","paths","length","checkKey","key","regex","test","process","env","primaryKey","restoreKeys","options","enableCrossOsArchive","keys","debug","JSON","stringify","compressionMethod","getCompressionMethod","archivePath","cacheEntry","getCacheEntry","archiveLocation","lookupOnly","info","cacheKey","join","createTempDirectory","getCacheFileName","downloadCache","isDebug","listTar","archiveFileSize","getArchiveFileSizeInBytes","Math","round","extractTar","error","typedError","warning","unlinkFile","_a","_b","_c","_d","_e","cacheId","cachePaths","resolvePaths","archiveFolder","createTar","fileSizeLimit","isGhes","reserveCacheResponse","reserveCache","cacheSize","statusCode","getCacheVersion","http_client_1","auth_1","crypto","fs","url_1","downloadUtils_1","options_1","requestUtils_1","versionSalt","getCacheApiUrl","resource","baseUrl","url","createAcceptHeader","type","apiVersion","getRequestOptions","requestOptions","headers","Accept","createHttpClient","token","bearerCredentialHandler","BearerCredentialHandler","HttpClient","components","push","platform","createHash","update","digest","httpClient","version","encodeURIComponent","response","retryTypedResponse","getJson","printCachesListForDiagnostics","isSuccessStatusCode","cacheResult","cacheDownloadUrl","setSecret","cacheListResult","totalCount","artifactCaches","cacheVersion","scope","creationTime","archiveUrl","URL","downloadOptions","getDownloadOptions","hostname","endsWith","useAzureSdk","downloadCacheStorageSDK","concurrentBlobDownloads","downloadCacheHttpClientConcurrent","downloadCacheHttpClient","reserveCacheRequest","postJson","getContentRange","start","end","uploadChunk","resourceUrl","openStream","additionalHeaders","uploadChunkResponse","retryHttpClientResponse","sendStream","uploadFile","fileSize","toString","fd","openSync","uploadOptions","getUploadOptions","concurrency","assertDefined","uploadConcurrency","maxChunkSize","uploadChunkSize","parallelUploads","Array","offset","all","map","chunkSize","min","createReadStream","autoClose","on","closeSync","commitCache","filesize","commitCacheRequest","size","commitCacheResponse","__asyncValues","Symbol","asyncIterator","TypeError","i","__values","iterator","verb","n","settle","d","getGnuTarPathOnWindows","exec","glob","io","semver","util","uuid_1","constants_1","IS_WINDOWS","tempDirectory","baseLocation","dest","v4","mkdirP","filePath","statSync","patterns","e_1","workspace","cwd","globber","implicitDescendants","_f","globGenerator","_g","file","relativeFile","relative","replace","RegExp","sep","e_1_1","return","promisify","unlink","getVersion","app","additionalArgs","versionOutput","ignoreReturnCode","silent","listeners","stdout","data","stderr","err","trim","clean","CompressionMethod","Gzip","ZstdWithoutLong","CacheFilename","Zstd","existsSync","GnuTarPathOnWindows","toLowerCase","includes","which","ghUrl","toUpperCase","ManifestFilename","TarFilename","SystemTarPathOnWindows","SocketTimeout","DefaultRetryDelay","DefaultRetryAttempts","ArchiveToolType","DownloadProgress","storage_blob_1","buffer","stream","abort_controller_1","pipeResponseToStream","output","pipeline","contentLength","segmentIndex","segmentSize","segmentOffset","receivedBytes","displayedComplete","startTime","Date","now","nextSegment","setReceivedBytes","getTransferredBytes","isDone","display","transferredBytes","percentage","toFixed","elapsedTime","downloadSpeed","onProgress","progress","loadedBytes","startDisplayTimer","delayInMs","displayCallback","timeoutHandle","setTimeout","stopDisplayTimer","clearTimeout","writeStream","createWriteStream","downloadResponse","socket","destroy","contentLengthHeader","expectedLength","parseInt","actualLength","archiveDescriptor","promises","open","socketTimeout","timeoutInMs","keepAlive","res","request","lengthHeader","Number","isNaN","downloads","blockSize","count","promiseGetter","downloadSegmentRetry","reverse","actives","bytesDownloaded","progressFn","activeDownloads","nextDownload","waitAndWrite","segment","race","values","write","pop","downloadConcurrency","dispose","close","retries","failures","timeout","promiseWithTimeout","downloadSegment","partRes","Range","readBodyBuffer","client","BlockBlobClient","retryOptions","tryTimeoutInMs","properties","getProperties","maxSegmentSize","constants"Line truncated
|
||||
{"version":3,"file":"index.js","names":["__createBinding","this","Object","create","o","m","k","k2","undefined","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__setModuleDefault","v","value","__importStar","mod","result","prototype","hasOwnProperty","call","__awaiter","thisArg","_arguments","P","generator","adopt","resolve","Promise","reject","fulfilled","step","next","e","rejected","done","then","apply","exports","saveCache","restoreCache","isFeatureAvailable","ReserveCacheError","ValidationError","core","__webpack_require__","path","utils","cacheHttpClient","tar_1","Error","constructor","message","super","name","setPrototypeOf","checkPaths","paths","length","checkKey","key","regex","test","process","env","primaryKey","restoreKeys","options","enableCrossOsArchive","keys","debug","JSON","stringify","compressionMethod","getCompressionMethod","archivePath","cacheEntry","getCacheEntry","archiveLocation","lookupOnly","info","cacheKey","join","createTempDirectory","getCacheFileName","downloadCache","isDebug","listTar","archiveFileSize","getArchiveFileSizeInBytes","Math","round","extractTar","error","typedError","warning","unlinkFile","_a","_b","_c","_d","_e","cacheId","cachePaths","resolvePaths","archiveFolder","createTar","fileSizeLimit","isGhes","reserveCacheResponse","reserveCache","cacheSize","statusCode","getCacheVersion","http_client_1","auth_1","crypto","fs","url_1","downloadUtils_1","options_1","requestUtils_1","versionSalt","getCacheApiUrl","resource","baseUrl","url","createAcceptHeader","type","apiVersion","getRequestOptions","requestOptions","headers","Accept","createHttpClient","token","bearerCredentialHandler","BearerCredentialHandler","HttpClient","components","push","platform","createHash","update","digest","httpClient","version","encodeURIComponent","response","retryTypedResponse","getJson","printCachesListForDiagnostics","isSuccessStatusCode","cacheResult","cacheDownloadUrl","setSecret","cacheListResult","totalCount","artifactCaches","cacheVersion","scope","creationTime","archiveUrl","URL","downloadOptions","getDownloadOptions","hostname","endsWith","useAzureSdk","downloadCacheStorageSDK","concurrentBlobDownloads","downloadCacheHttpClientConcurrent","downloadCacheHttpClient","reserveCacheRequest","postJson","getContentRange","start","end","uploadChunk","resourceUrl","openStream","additionalHeaders","uploadChunkResponse","retryHttpClientResponse","sendStream","uploadFile","fileSize","toString","fd","openSync","uploadOptions","getUploadOptions","concurrency","assertDefined","uploadConcurrency","maxChunkSize","uploadChunkSize","parallelUploads","Array","offset","all","map","chunkSize","min","createReadStream","autoClose","on","closeSync","commitCache","filesize","commitCacheRequest","size","commitCacheResponse","__asyncValues","Symbol","asyncIterator","TypeError","i","__values","iterator","verb","n","settle","d","getGnuTarPathOnWindows","exec","glob","io","semver","util","uuid_1","constants_1","IS_WINDOWS","tempDirectory","baseLocation","dest","v4","mkdirP","filePath","statSync","patterns","e_1","workspace","cwd","globber","implicitDescendants","_f","globGenerator","_g","file","relativeFile","relative","replace","RegExp","sep","e_1_1","return","promisify","unlink","getVersion","app","additionalArgs","versionOutput","ignoreReturnCode","silent","listeners","stdout","data","stderr","err","trim","clean","CompressionMethod","Gzip","ZstdWithoutLong","CacheFilename","Zstd","existsSync","GnuTarPathOnWindows","toLowerCase","includes","which","ghUrl","toUpperCase","ManifestFilename","TarFilename","SystemTarPathOnWindows","SocketTimeout","DefaultRetryDelay","DefaultRetryAttempts","ArchiveToolType","DownloadProgress","storage_blob_1","buffer","stream","abort_controller_1","pipeResponseToStream","output","pipeline","contentLength","segmentIndex","segmentSize","segmentOffset","receivedBytes","displayedComplete","startTime","Date","now","nextSegment","setReceivedBytes","getTransferredBytes","isDone","display","transferredBytes","percentage","toFixed","elapsedTime","downloadSpeed","onProgress","progress","loadedBytes","startDisplayTimer","delayInMs","displayCallback","timeoutHandle","setTimeout","stopDisplayTimer","clearTimeout","writeStream","createWriteStream","downloadResponse","socket","destroy","contentLengthHeader","expectedLength","parseInt","actualLength","archiveDescriptor","promises","open","socketTimeout","timeoutInMs","keepAlive","res","request","lengthHeader","Number","isNaN","downloads","blockSize","count","promiseGetter","downloadSegmentRetry","reverse","actives","bytesDownloaded","progressFn","activeDownloads","nextDownload","waitAndWrite","segment","race","values","write","pop","downloadConcurrency","dispose","close","retries","failures","timeout","promiseWithTimeout","downloadSegment","partRes","Range","readBodyBuffer","client","BlockBlobClient","retryOptions","tryTimeoutInMs","properties","getProperties","maxSegmentSize","constants"Line truncated
|
||||
Reference in new issue
Block a user