chore(deps): update dependency glob to v13.0.1
This commit is contained in:
1 parent
684cc88afb
commit
519d79275e
2 files changed
+12
-12
No files matched your search
Vendored
+1
-1
@@ -13,4 +13,4 @@ e.exports=s(1813)},4096:(e,t,s)=>{"use strict";
|
||||
* MIT Licensed
|
||||
*/var i=s(9829);var n=s(6928).extname;var r=/^\s*([^;\s]*)(?:;|\s|$)/;var o=/^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=r.exec(e);var s=t&&i[t[1].toLowerCase()];if(s&&s.charset){return s.charset}if(t&&o.test(t[1])){return"UTF-8"}return false}function contentType(e){if(!e||typeof e!=="string"){return false}var s=e.indexOf("/")===-1?t.lookup(e):e;if(!s){return false}if(s.indexOf("charset")===-1){var i=t.charset(s);if(i)s+="; charset="+i.toLowerCase()}return s}function extension(e){if(!e||typeof e!=="string"){return false}var s=r.exec(e);var i=s&&t.extensions[s[1].toLowerCase()];if(!i||!i.length){return false}return i[0]}function lookup(e){if(!e||typeof e!=="string"){return false}var s=n("x."+e).toLowerCase().substr(1);if(!s){return false}return t.types[s]||false}function populateMaps(e,t){var s=["nginx","apache",undefined,"iana"];Object.keys(i).forEach((function forEachMimeType(n){var r=i[n];var o=r.extensions;if(!o||!o.length){return}e[n]=o;for(var a=0;a<o.length;a++){var A=o[a];if(t[A]){var c=s.indexOf(i[t[A]].source);var l=s.indexOf(r.source);if(t[A]!=="application/octet-stream"&&(c>l||c===l&&t[A].substr(0,12)==="application/")){continue}}t[A]=n}}))}},744:e=>{var t=1e3;var s=t*60;var i=s*60;var n=i*24;var r=n*7;var o=n*365.25;e.exports=function(e,t){t=t||{};var s=typeof e;if(s==="string"&&e.length>0){return parse(e)}else if(s==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a){return}var A=parseFloat(a[1]);var c=(a[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return A*o;case"weeks":case"week":case"w":return A*r;case"days":case"day":case"d":return A*n;case"hours":case"hour":case"hrs":case"hr":case"h":return A*i;case"minutes":case"minute":case"mins":case"min":case"m":return A*s;case"seconds":case"second":case"secs":case"sec":case"s":return A*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return A;default:return undefined}}function fmtShort(e){var r=Math.abs(e);if(r>=n){return Math.round(e/n)+"d"}if(r>=i){return Math.round(e/i)+"h"}if(r>=s){return Math.round(e/s)+"m"}if(r>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var r=Math.abs(e);if(r>=n){return plural(e,r,n,"day")}if(r>=i){return plural(e,r,i,"hour")}if(r>=s){return plural(e,r,s,"minute")}if(r>=t){return plural(e,r,t,"second")}return e+" ms"}function plural(e,t,s,i){var n=t>=s*1.5;return Math.round(e/s)+" "+i+(n?"s":"")}},7777:(e,t,s)=>{"use strict";var i=s(7016).parse;var n={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};var r=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function getProxyForUrl(e){var t=typeof e==="string"?i(e):e||{};var s=t.protocol;var r=t.host;var o=t.port;if(typeof r!=="string"||!r||typeof s!=="string"){return""}s=s.split(":",1)[0];r=r.replace(/:\d*$/,"");o=parseInt(o)||n[s]||0;if(!shouldProxy(r,o)){return""}var a=getEnv("npm_config_"+s+"_proxy")||getEnv(s+"_proxy")||getEnv("npm_config_proxy")||getEnv("all_proxy");if(a&&a.indexOf("://")===-1){a=s+"://"+a}return a}function shouldProxy(e,t){var s=(getEnv("npm_config_no_proxy")||getEnv("no_proxy")).toLowerCase();if(!s){return true}if(s==="*"){return false}return s.split(/[,\s]/).every((function(s){if(!s){return true}var i=s.match(/^(.+):(\d+)$/);var n=i?i[1]:s;var o=i?parseInt(i[2]):0;if(o&&o!==t){return true}if(!/^[.*]/.test(n)){return e!==n}if(n.charAt(0)==="*"){n=n.slice(1)}return!r.call(e,n)}))}function getEnv(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}t.T=getProxyForUrl},9546:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const i=s(1354);const n=s(7016);const r=s(4434);const o=s(2830);const a=s(3106);const A=s(4922);const c=s(9023);const l=s(9896);const u=s(9557);const p=s(6928);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}const h=_interopDefaultLegacy(i);const d=_interopDefaultLegacy(n);const f=_interopDefaultLegacy(o);const g=_interopDefaultLegacy(a);const E=_interopDefaultLegacy(A);const C=_interopDefaultLegacy(c);const Q=_interopDefaultLegacy(l);const B=_interopDefaultLegacy(u);const I=_interopDefaultLegacy(p);const y=f["default"]("screepsapi:socket");const b={reconnect:true,resubscribe:true,keepAlive:true,maxRetries:10,maxRetryDelay:60*1e3};class Socket extends r.EventEmitter{constructor(e){super();this.api=e;this.opts=Object.assign({},b);this.on("error",(()=>{}));this.reset();this.oLine 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=[];const n=new Uint8Array([13,10]);l=0;let r=false;for(const[t,o]of e){if(typeof o==="string"){const e=b.encode(s+`; name="${escape(normalizeLinefeeds(t))}"`+`\r\n\r\n${normalizeLinefeeds(o)}\r\n`);i.push(e);l+=e.byteLength}else{const e=b.encode(`${s}; name="${escape(normalizeLinefeeds(t))}"`+(o.name?`; filename="${escape(o.name)}"`:"")+"\r\n"+`Content-Type: ${o.type||"application/octet-stream"}\r\n\r\n`);i.push(e,o,n);if(typeof o.size==="number"){l+=e.byteLength+o.size+n.byteLength}else{r=true}}}const o=b.encode(`--${t}--\r\n`);i.push(o);l+=o.byteLength;if(r){l=null}c=e;A=async function*(){for(const e of i){if(e.stream){yield*e.stream()}else{yield e}}};u=`multipart/form-data; boundary=${t}`}else if(r(e)){c=e;l=e.size;if(e.type){u=e.type}}else if(typeof e[Symbol.asyncIterator]==="function"){if(t){throw new TypeError("keepalive")}if(i.isDisturbed(e)||e.locked){throw new TypeError("Response body object should not be disturbed or locked")}s=e instanceof ReadableStream?e:n(e)}if(typeof c==="string"||i.isBuffer(c)){l=Buffer.byteLength(c)}if(A!=null){let t;s=new ReadableStream({async start(){t=A(e)[Symbol.asyncIterator]()},async pull(e){const{value:i,done:n}=await t.next();if(n){queueMicrotask((()=>{e.close();e.byobRequest?.respond(0)}))}else{if(!E(s)){const t=new Uint8Array(i);if(t.byteLength){e.enqueue(t)}}}return e.desiredSize>0},async cancel(e){await t.return()},type:"bytes"})}const p={stream:s,source:c,length:l};return[p,u]}function safelyExtractBody(e,t=false){if(e instanceof ReadableStream){g(!i.isDisturbed(e),"The body has already been consumed.");g(!e.locked,"The stream is locked.")}return extractBody(e,t)}function cloneBody(e,t){const[s,i]=t.stream.tee();t.stream=s;return{stream:i,length:t.length,source:t.source}}function throwIfAborted(e){if(e.aborted){throw new DOMException("The operation was aborted.","AbortError")}}function bodyMixinMethods(e){const t={blob(){return consumeBody(this,(e=>{let t=bodyMimeType(this);if(t===null){t=""}else if(t){t=B(t)}return new f([e],{type:t})}),e)},arrayBuffer(){return consumeBody(this,(e=>new Uint8Array(e).buffer),e)},text(){return consumeBody(this,u,e)},json(){return consumeBody(this,parseJSONFromBytes,e)},formData(){return consumeBody(this,(e=>{const t=bodyMimeType(this);if(t!==null){switch(t.essence){case"multipart/form-data":{const s=I(e,t);if(s==="failure"){throw new TypeError("Failed to parse body as FormData.")}const i=new p;i[h]=s;return i}case"application/x-www-form-urlencoded":{const t=new URLSearchParams(e.toString());const s=new p;for(const[e,i]of t){s.append(e,i)}return s}}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')}),e)},bytes(){return consumeBody(this,(e=>new Uint8Array(e)),e)}};return t}function mixinBody(e){Object.assign(e.prototype,bodyMixinMethods(e))}async function consumeBody(e,t,s){d.brandCheck(e,s);if(bodyUnusable(e)){throw new TypeError("Body is unusable: Body has already been read")}throwIfAborted(e[h]);const i=A();const errorSteps=e=>i.reject(e);const successSteps=e=>{try{i.resolve(t(e))}catch(e){errorSteps(e)}};if(e[h].body==null){successSteps(Buffer.allocUnsafe(0));return i.promise}await c(e[h].body,successSteps,errorSteps);return i.promise}function bodyUnusable(e){const t=e[h].body;return t!=null&&(t.stream.locked||i.isDisturbed(t.stream))}function parseJSONFromBytes(e){return JSON.parse(u(e))}function bodyMimeType(e){const t=e[h].headersList;const s=l(t);if(s==="failure"){return null}return s}e.exports={extractBody:extractBody,safelyExtractBody:safelyExtractBody,cloneBody:cloneBody,mixinBody:mixinBody,streamRegistry:v,hasFinalizationRegistry:w,bodyUnusable:bodyUnusable}},4495:e=>{"use strict";const t=["GET","HEAD","POST"];const s=new Set(t);const i=[101,204,205,304];const n=[301,302,303,307,308];const r=new Set(n);const o=["1","7","9","11","13","15","17","19","20","21","22","23","25","37","42","43","53","69","77","79","87","95","101","102","103","104","109","110","111","113","115","117","119","123","135","137","139","143","161","179","389","427","465","512","513","514","515","526","530","531","532","540","548","554","556","563","587","601","636","989","990","993","995","1719","1720","1723","2049","3659","4045","4190","5060","5061","6000","6566","6665","6666","6667","6668","6669","6679","6697","10080"];const a=new Set(o);const A=["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"];const c=new Set(A);const l=["follow","manual","error"];const u=["GET","HEAD","OPTIONS","TRACE"];const p=new Set(u);const h=["navigate","same-origin","no-cors","cors"];const d=["omit","same-origin","include"];const f=["default","no-store","reload","no-caLine truncated
|
||||
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */a[o-4]=s[0];a[o-3]=s[1];a[o-2]=s[2];a[o-1]=s[3];a[1]=r;if(r===126){a.writeUInt16BE(n,2)}else if(r===127){a[2]=a[3]=0;a.writeUIntBE(n,4,6)}a[1]|=128;for(let e=0;e<n;++e){a[o+e]=t[e]^s[e&3]}return a}}e.exports={WebsocketFrameSend:WebsocketFrameSend}},9469:(e,t,s)=>{"use strict";const{createInflateRaw:i,Z_DEFAULT_WINDOWBITS:n}=s(8522);const{isValidClientWindowBits:r}=s(8625);const o=Buffer.from([0,0,255,255]);const a=Symbol("kBuffer");const A=Symbol("kLength");class PerMessageDeflate{#Z;#h={};constructor(e){this.#h.serverNoContextTakeover=e.has("server_no_context_takeover");this.#h.serverMaxWindowBits=e.get("server_max_window_bits")}decompress(e,t,s){if(!this.#Z){let e=n;if(this.#h.serverMaxWindowBits){if(!r(this.#h.serverMaxWindowBits)){s(new Error("Invalid server_max_window_bits"));return}e=Number.parseInt(this.#h.serverMaxWindowBits)}this.#Z=i({windowBits:e});this.#Z[a]=[];this.#Z[A]=0;this.#Z.on("data",(e=>{this.#Z[a].push(e);this.#Z[A]+=e.length}));this.#Z.on("error",(e=>{this.#Z=null;s(e)}))}this.#Z.write(e);if(t){this.#Z.write(o)}this.#Z.flush((()=>{const e=Buffer.concat(this.#Z[a],this.#Z[A]);this.#Z[a].length=0;this.#Z[A]=0;s(null,e)}))}}e.exports={PerMessageDeflate:PerMessageDeflate}},1652:(e,t,s)=>{"use strict";const{Writable:i}=s(7075);const n=s(4589);const{parserStates:r,opcodes:o,states:a,emptyBuffer:A,sentCloseFrameState:c}=s(736);const{kReadyState:l,kSentClose:u,kResponse:p,kReceivedClose:h}=s(1216);const{channels:d}=s(2414);const{isValidStatusCode:f,isValidOpcode:g,failWebsocketConnection:E,websocketMessageReceived:C,utf8Decode:Q,isControlFrame:B,isTextBinaryFrame:I,isContinuationFrame:y}=s(8625);const{WebsocketFrameSend:b}=s(3264);const{closeWebSocketConnection:w}=s(6897);const{PerMessageDeflate:v}=s(9469);class ByteParser extends i{#K=[];#X=0;#$=false;#Q=r.INFO;#ee={};#te=[];#se;constructor(e,t){super();this.ws=e;this.#se=t==null?new Map:t;if(this.#se.has("permessage-deflate")){this.#se.set("permessage-deflate",new v(t))}}_write(e,t,s){this.#K.push(e);this.#X+=e.length;this.#$=true;this.run(s)}run(e){while(this.#$){if(this.#Q===r.INFO){if(this.#X<2){return e()}const t=this.consume(2);const s=(t[0]&128)!==0;const i=t[0]&15;const n=(t[1]&128)===128;const a=!s&&i!==o.CONTINUATION;const A=t[1]&127;const c=t[0]&64;const l=t[0]&32;const u=t[0]&16;if(!g(i)){E(this.ws,"Invalid opcode received");return e()}if(n){E(this.ws,"Frame cannot be masked");return e()}if(c!==0&&!this.#se.has("permessage-deflate")){E(this.ws,"Expected RSV1 to be clear.");return}if(l!==0||u!==0){E(this.ws,"RSV1, RSV2, RSV3 must be clear");return}if(a&&!I(i)){E(this.ws,"Invalid frame type was fragmented.");return}if(I(i)&&this.#te.length>0){E(this.ws,"Expected continuation frame");return}if(this.#ee.fragmented&&a){E(this.ws,"Fragmented frame exceeded 125 bytes.");return}if((A>125||a)&&B(i)){E(this.ws,"Control frame either too large or fragmented");return}if(y(i)&&this.#te.length===0&&!this.#ee.compressed){E(this.ws,"Unexpected continuation frame");return}if(A<=125){this.#ee.payloadLength=A;this.#Q=r.READ_DATA}else if(A===126){this.#Q=r.PAYLOADLENGTH_16}else if(A===127){this.#Q=r.PAYLOADLENGTH_64}if(I(i)){this.#ee.binaryType=i;this.#ee.compressed=c!==0}this.#ee.opcode=i;this.#ee.masked=n;this.#ee.fin=s;this.#ee.fragmented=a}else if(this.#Q===r.PAYLOADLENGTH_16){if(this.#X<2){return e()}const t=this.consume(2);this.#ee.payloadLength=t.readUInt16BE(0);this.#Q=r.READ_DATA}else if(this.#Q===r.PAYLOADLENGTH_64){if(this.#X<8){return e()}const t=this.consume(8);const s=t.readUInt32BE(0);if(s>2**31-1){E(this.ws,"Received payload length > 2^31 bytes.");return}const i=t.readUInt32BE(4);this.#ee.payloadLength=(s<<8)+i;this.#Q=r.READ_DATA}else if(this.#Q===r.READ_DATA){if(this.#X<this.#ee.payloadLength){return e()}const t=this.consume(this.#ee.payloadLength);if(B(this.#ee.opcode)){this.#$=this.parseControlFrame(t);this.#Q=r.INFO}else{if(!this.#ee.compressed){this.#te.push(t);if(!this.#ee.fragmented&&this.#ee.fin){const e=Buffer.concat(this.#te);C(this.ws,this.#ee.binaryType,e);this.#te.length=0}this.#Q=r.INFO}else{this.#se.get("permessage-deflate").decompress(t,this.#ee.fin,((t,s)=>{if(t){w(this.ws,1007,t.message,t.message.length);return}this.#te.push(s);if(!this.#ee.fin){this.#Q=r.INFO;this.#$=true;this.run(e);return}C(this.ws,this.#ee.binaryType,Buffer.concat(this.#te));this.#$=true;this.#Q=r.INFO;this.#te.length=0;this.run(e)}));this.#$=false;break}}}}}consume(e){if(e>this.#X){throw new Error("Called consume() before buffers satiated.")}else if(e===0){return A}if(this.#K[0].length===e){this.#X-=this.#K[0].length;return this.#K.shift()}const t=Buffer.allocUnsafe(e);let s=0;while(s!==e){const i=this.#K[0];const{length:n}=i;if(n+s===e){t.set(this.#K.shift(),s);break}else if(n+s>e){t.set(i.subarray(0,e-s),s);this.#K[0]=i.subarray(e-s);break}else{t.set(this.#K.shift(),s);s+=i.length}}this.#X-=e;return t}parseCloseBody(e){n(e.length!==1);let t;if(e.length>=2){t=e.readUInt16BE(0)}if(Line truncated
|
||||
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */a[o-4]=s[0];a[o-3]=s[1];a[o-2]=s[2];a[o-1]=s[3];a[1]=r;if(r===126){a.writeUInt16BE(n,2)}else if(r===127){a[2]=a[3]=0;a.writeUIntBE(n,4,6)}a[1]|=128;for(let e=0;e<n;++e){a[o+e]=t[e]^s[e&3]}return a}}e.exports={WebsocketFrameSend:WebsocketFrameSend}},9469:(e,t,s)=>{"use strict";const{createInflateRaw:i,Z_DEFAULT_WINDOWBITS:n}=s(8522);const{isValidClientWindowBits:r}=s(8625);const o=Buffer.from([0,0,255,255]);const a=Symbol("kBuffer");const A=Symbol("kLength");class PerMessageDeflate{#Z;#h={};constructor(e){this.#h.serverNoContextTakeover=e.has("server_no_context_takeover");this.#h.serverMaxWindowBits=e.get("server_max_window_bits")}decompress(e,t,s){if(!this.#Z){let e=n;if(this.#h.serverMaxWindowBits){if(!r(this.#h.serverMaxWindowBits)){s(new Error("Invalid server_max_window_bits"));return}e=Number.parseInt(this.#h.serverMaxWindowBits)}this.#Z=i({windowBits:e});this.#Z[a]=[];this.#Z[A]=0;this.#Z.on("data",(e=>{this.#Z[a].push(e);this.#Z[A]+=e.length}));this.#Z.on("error",(e=>{this.#Z=null;s(e)}))}this.#Z.write(e);if(t){this.#Z.write(o)}this.#Z.flush((()=>{const e=Buffer.concat(this.#Z[a],this.#Z[A]);this.#Z[a].length=0;this.#Z[A]=0;s(null,e)}))}}e.exports={PerMessageDeflate:PerMessageDeflate}},1652:(e,t,s)=>{"use strict";const{Writable:i}=s(7075);const n=s(4589);const{parserStates:r,opcodes:o,states:a,emptyBuffer:A,sentCloseFrameState:c}=s(736);const{kReadyState:l,kSentClose:u,kResponse:p,kReceivedClose:h}=s(1216);const{channels:d}=s(2414);const{isValidStatusCode:f,isValidOpcode:g,failWebsocketConnection:E,websocketMessageReceived:C,utf8Decode:Q,isControlFrame:B,isTextBinaryFrame:I,isContinuationFrame:y}=s(8625);const{WebsocketFrameSend:b}=s(3264);const{closeWebSocketConnection:w}=s(6897);const{PerMessageDeflate:v}=s(9469);class ByteParser extends i{#K=[];#X=0;#$=false;#Q=r.INFO;#ee={};#te=[];#se;constructor(e,t){super();this.ws=e;this.#se=t==null?new Map:t;if(this.#se.has("permessage-deflate")){this.#se.set("permessage-deflate",new v(t))}}_write(e,t,s){this.#K.push(e);this.#X+=e.length;this.#$=true;this.run(s)}run(e){while(this.#$){if(this.#Q===r.INFO){if(this.#X<2){return e()}const t=this.consume(2);const s=(t[0]&128)!==0;const i=t[0]&15;const n=(t[1]&128)===128;const a=!s&&i!==o.CONTINUATION;const A=t[1]&127;const c=t[0]&64;const l=t[0]&32;const u=t[0]&16;if(!g(i)){E(this.ws,"Invalid opcode received");return e()}if(n){E(this.ws,"Frame cannot be masked");return e()}if(c!==0&&!this.#se.has("permessage-deflate")){E(this.ws,"Expected RSV1 to be clear.");return}if(l!==0||u!==0){E(this.ws,"RSV1, RSV2, RSV3 must be clear");return}if(a&&!I(i)){E(this.ws,"Invalid frame type was fragmented.");return}if(I(i)&&this.#te.length>0){E(this.ws,"Expected continuation frame");return}if(this.#ee.fragmented&&a){E(this.ws,"Fragmented frame exceeded 125 bytes.");return}if((A>125||a)&&B(i)){E(this.ws,"Control frame either too large or fragmented");return}if(y(i)&&this.#te.length===0&&!this.#ee.compressed){E(this.ws,"Unexpected continuation frame");return}if(A<=125){this.#ee.payloadLength=A;this.#Q=r.READ_DATA}else if(A===126){this.#Q=r.PAYLOADLENGTH_16}else if(A===127){this.#Q=r.PAYLOADLENGTH_64}if(I(i)){this.#ee.binaryType=i;this.#ee.compressed=c!==0}this.#ee.opcode=i;this.#ee.masked=n;this.#ee.fin=s;this.#ee.fragmented=a}else if(this.#Q===r.PAYLOADLENGTH_16){if(this.#X<2){return e()}const t=this.consume(2);this.#ee.payloadLength=t.readUInt16BE(0);this.#Q=r.READ_DATA}else if(this.#Q===r.PAYLOADLENGTH_64){if(this.#X<8){return e()}const t=this.consume(8);const s=t.readUInt32BE(0);if(s>2**31-1){E(this.ws,"Received payload length > 2^31 bytes.");return}const i=t.readUInt32BE(4);this.#ee.payloadLength=(s<<8)+i;this.#Q=r.READ_DATA}else if(this.#Q===r.READ_DATA){if(this.#X<this.#ee.payloadLength){return e()}const t=this.consume(this.#ee.payloadLength);if(B(this.#ee.opcode)){this.#$=this.parseControlFrame(t);this.#Q=r.INFO}else{if(!this.#ee.compressed){this.#te.push(t);if(!this.#ee.fragmented&&this.#ee.fin){const e=Buffer.concat(this.#te);C(this.ws,this.#ee.binaryType,e);this.#te.length=0}this.#Q=r.INFO}else{this.#se.get("permessage-deflate").decompress(t,this.#ee.fin,((t,s)=>{if(t){w(this.ws,1007,t.message,t.message.length);return}this.#te.push(s);if(!this.#ee.fin){this.#Q=r.INFO;this.#$=true;this.run(e);return}C(this.ws,this.#ee.binaryType,Buffer.concat(this.#te));this.#$=true;this.#Q=r.INFO;this.#te.length=0;this.run(e)}));this.#$=false;break}}}}}consume(e){if(e>this.#X){throw new Error("Called consume() before buffers satiated.")}else if(e===0){return A}if(this.#K[0].length===e){this.#X-=this.#K[0].length;return this.#K.shift()}const t=Buffer.allocUnsafe(e);let s=0;while(s!==e){const i=this.#K[0];const{length:n}=i;if(n+s===e){t.set(this.#K.shift(),s);break}else if(n+s>e){t.set(i.subarray(0,e-s),s);this.#K[0]=i.subarray(e-s);break}else{t.set(this.#K.shift(),s);s+=i.length}}this.#X-=e;return t}parseCloseBody(e){n(e.length!==1);let t;if(e.length>=2){t=e.readUInt16BE(0)}if(Line truncated
|
||||
Reference in new issue
Block a user