mirror of
https://github.com/pnpm/action-setup
synced 2026-11-06 20:47:58 +01:00
update
This commit is contained in:
1 file changed
+4
-4
Vendored
+4
-4
@@ -1,10 +1,10 @@
|
||||
(()=>{var __webpack_modules__={64928:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.restoreCache=restoreCache;const i=n(18715);const o=n(59999);const d=n(93573);async function restoreCache(e){if(!e.cache)return;if(!(0,i.isFeatureAvailable)()){(0,o.warning)("Cache is not available, skipping cache restoration");return}(0,o.startGroup)("Restoring cache...");await(0,d.runRestoreCache)(e);(0,o.endGroup)()}t["default"]=restoreCache},93573:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.runRestoreCache=runRestoreCache;const o=n(18715);const d=n(59999);const p=n(58872);const f=n(8505);const y=i(n(70857));async function runRestoreCache(e){const t=await getCacheDirectory();(0,d.saveState)("cache_path",t);const n=await(0,f.hashFiles)(e.cacheDependencyPath);if(!n){throw new Error("Some specified paths were not resolved, unable to cache dependencies.")}const i=`pnpm-cache-${process.env.RUNNER_OS}-${y.default.arch()}-${n}`;(0,d.debug)(`Primary key is ${i}`);(0,d.saveState)("cache_primary_key",i);let p=await(0,o.restoreCache)([t],i);(0,d.setOutput)("cache-hit",Boolean(p));if(!p){(0,d.info)(`Cache is not found`);return}(0,d.saveState)("cache_restored_key",p);(0,d.info)(`Cache restored from key: ${p}`)}async function getCacheDirectory(){const{stdout:e}=await(0,p.getExecOutput)("pnpm store path --silent");const t=e.trim();(0,d.debug)(`Cache folder is set to "${t}"`);return t}},26171:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.saveCache=saveCache;const i=n(59999);const o=n(98086);async function saveCache(e){if(!e.cache)return;try{await(0,o.runSaveCache)()}catch(e){(0,i.setFailed)(e.message)}}t["default"]=saveCache},98086:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runSaveCache=runSaveCache;const i=n(18715);const o=n(59999);async function runSaveCache(){const e=(0,o.getState)("cache_restored_key");const t=(0,o.getState)("cache_primary_key");const n=(0,o.getState)("cache_path");if(t===e){(0,o.info)(`Cache hit occurred on the primary key ${t}, not saving cache.`);return}const d=await(0,i.saveCache)([n],t);if(d==-1)return;(0,o.info)(`Cache saved with the key: ${t}`)}},21046:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const o=n(59999);const d=i(n(64928));const p=i(n(26171));const f=i(n(66414));const y=i(n(13144));const v=i(n(9596));const D=i(n(4728));const M=i(n(96879));async function main(){const e=(0,f.default)();if((0,o.getState)("is_post")==="true"){await runPost(e)}else{await runMain(e)}}async function runMain(e){(0,o.saveState)("is_post","true");await(0,y.default)(e);console.log("Installation Completed!");(0,v.default)(e);await(0,d.default)(e);(0,D.default)(e)}async function runPost(e){(0,M.default)(e);await(0,p.default)(e)}main().catch((e=>{console.error(e);(0,o.setFailed)(e)}))},66414:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=void 0;const o=n(59999);const d=i(n(66746));const p=n(9065);const f={required:true};const parseInputPath=e=>(0,d.default)((0,o.getInput)(e,f));const getInputs=()=>({version:(0,o.getInput)("version"),dest:parseInputPath("dest"),cache:(0,o.getBooleanInput)("cache"),cacheDependencyPath:parseInputPath("cache_dependency_path"),runInstall:(0,p.parseRunInstall)("run_install"),packageJsonFile:parseInputPath("package_json_file"),standalone:(0,o.getBooleanInput)("standalone")});t.getInputs=getInputs;t["default"]=t.getInputs},9065:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.parseRunInstall=parseRunInstall;const i=n(59999);const o=n(87669);const d=n(66516);const p=d.z.object({recursive:d.z.boolean().optional(),cwd:d.z.string().optional(),args:d.z.array(d.z.string()).optional()});const f=d.z.union([d.z.null(),d.z.boolean(),p,d.z.array(p)]);function parseRunInstall(e){const t=(0,i.getInput)(e,{required:true});const n=(0,o.parse)(t);try{const e=f.parse(n);if(!e)return[];if(e===true)return[{recursive:true}];if(Array.isArray(e))return e;return[e]}catch(n){(0,i.error)(`Error for input "${e}" = ${t}`);if(n instanceof d.ZodError){(0,i.error)(`Errors: ${n.errors}`)}else{(0,i.error)(`Exception: ${n}`)}process.exit(1)}}},13144:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.runSelfInstaller=void 0;t.install=install;const o=n(59999);const d=i(n(77053));t.runSelfInstaller=d.default;async function install(e){(0,o.startGroup)("Running self-installer...");const t=await(0,d.default)(e);(0,o.endGroup)();if(t){return(0,o.setFailed)(`Something went wrong, self-installer exits with code ${t}`)}}t["default"]=install},77053:functioLine truncated
|
||||
(()=>{var __webpack_modules__={88559:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){if(i===undefined)i=n;var o=Object.getOwnPropertyDescriptor(t,n);if(!o||("get"in o?!t.__esModule:o.writable||o.configurable)){o={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,i,o)}:function(e,t,n,i){if(i===undefined)i=n;e[i]=t[n]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))i(t,e,n);o(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.req=t.json=t.toBuffer=void 0;const p=d(n(58611));const f=d(n(65692));async function toBuffer(e){let t=0;const n=[];for await(const i of e){t+=i.length;n.push(i)}return Buffer.concat(n,t)}t.toBuffer=toBuffer;async function json(e){const t=await toBuffer(e);const n=t.toString("utf8");try{return JSON.parse(n)}catch(e){const t=e;t.message+=` (input: ${n})`;throw t}}t.json=json;function req(e,t={}){const n=typeof e==="string"?e:e.href;const i=(n.startsWith("https:")?f:p).request(e,t);const o=new Promise(((e,t)=>{i.once("response",e).once("error",t).end()}));i.then=o.then.bind(o);return i}t.req=req},50222:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){if(i===undefined)i=n;var o=Object.getOwnPropertyDescriptor(t,n);if(!o||("get"in o?!t.__esModule:o.writable||o.configurable)){o={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,i,o)}:function(e,t,n,i){if(i===undefined)i=n;e[i]=t[n]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))i(t,e,n);o(t,e);return t};var p=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))i(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});t.Agent=void 0;const f=d(n(69278));const y=d(n(58611));const v=n(65692);p(n(88559),t);const D=Symbol("AgentBaseInternalState");class Agent extends y.Agent{constructor(e){super(e);this[D]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==="boolean"){return e.secureEndpoint}if(typeof e.protocol==="string"){return e.protocol==="https:"}}const{stack:t}=new Error;if(typeof t!=="string")return false;return t.split("\n").some((e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1))}incrementSockets(e){if(this.maxSockets===Infinity&&this.maxTotalSockets===Infinity){return null}if(!this.sockets[e]){this.sockets[e]=[]}const t=new f.Socket({writable:false});this.sockets[e].push(t);this.totalSocketCount++;return t}decrementSockets(e,t){if(!this.sockets[e]||t===null){return}const n=this.sockets[e];const i=n.indexOf(t);if(i!==-1){n.splice(i,1);this.totalSocketCount--;if(n.length===0){delete this.sockets[e]}}}getName(e){const t=this.isSecureEndpoint(e);if(t){return v.Agent.prototype.getName.call(this,e)}return super.getName(e)}createSocket(e,t,n){const i={...t,secureEndpoint:this.isSecureEndpoint(t)};const o=this.getName(i);const d=this.incrementSockets(o);Promise.resolve().then((()=>this.connect(e,i))).then((p=>{this.decrementSockets(o,d);if(p instanceof y.Agent){try{return p.addRequest(e,i)}catch(e){return n(e)}}this[D].currentSocket=p;super.createSocket(e,t,n)}),(e=>{this.decrementSockets(o,d);n(e)}))}createConnection(){const e=this[D].currentSocket;this[D].currentSocket=undefined;if(!e){throw new Error("No socket was returned in the `connect()` function")}return e}get defaultPort(){return this[D].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){if(this[D]){this[D].defaultPort=e}}get protocol(){return this[D].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){if(this[D]){this[D].protocol=e}}}t.Agent=Agent},88278:e=>{"use strict";e.exports=balanced;function balanced(e,t,n){if(e instanceof RegExp)e=maybeMatch(e,n);if(t instanceof RegExp)t=maybeMatch(t,n);var i=range(e,t,n);return i&&{start:i[0],end:i[1],pre:n.slice(0,i[0]),body:n.slice(i[0]+e.length,i[1]),post:n.slice(i[1]+t.length)}}function maybeMatch(e,t){var n=t.match(e);return n?n[0]:null}balanced.range=range;function range(e,t,n){var i,o,d,p,f;var y=n.indexOf(e);var v=n.indexOf(t,y+1);var D=y;if(y>=0&&v>0){if(e===t){return[y,v]}i=[];d=n.length;while(D>=0&&!f){if(D==y){i.push(D);y=n.indexOf(e,D+1)}else if(i.length==1){f=[i.pop(),v]}else{o=i.pop();if(o<d){d=o;p=v}v=n.indexOf(t,D+1)}D=y<v&&y>=0?y:v}if(i.length){f=[d,p]}}return f}},19138:(e,t,n)=>{var i=n(24201);var o=n(88278);e.exports=expandTop;var d="\0SLASH"+Math.random()+"\0";var p="\0OPEN"+Math.random()+"\0";var f="\0CLOSE"+MLine truncated
|
||||
/*!
|
||||
* expand-tilde <https://github.com/jonschlinkert/expand-tilde>
|
||||
*
|
||||
* Copyright (c) 2015 Jon Schlinkert.
|
||||
* Licensed under the MIT license.
|
||||
*/
|
||||
var i=n(39048);var o=n(16928);e.exports=function expandTilde(e){var t=i();if(e.charCodeAt(0)===126){if(e.charCodeAt(1)===43){return o.join(process.cwd(),e.slice(2))}return t?o.join(t,e.slice(1)):e}return e}},39048:(e,t,n)=>{"use strict";var i=n(70857);if(typeof i.homedir!=="undefined"){e.exports=i.homedir}else{e.exports=n(58873)}},58873:(e,t,n)=>{"use strict";var i=n(79896);var o=n(37393);function homedir(){if(process.platform==="win32"){if(process.env.USERPROFILE){return process.env.USERPROFILE}if(process.env.HOMEDRIVE&&process.env.HOMEPATH){return process.env.HOMEDRIVE+process.env.HOMEPATH}if(process.env.HOME){return process.env.HOME}return null}if(process.env.HOME){return process.env.HOME}var e=tryReadFileSync("/etc/passwd");var t=find(o(e),getuid());if(t){return t}var n=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;if(!n){return null}if(process.platform==="darwin"){return"/Users/"+n}return"/home/"+n}function find(e,t){var n=e.length;for(var i=0;i<n;i++){if(+e[i].uid===t){return e[i].homedir}}}function getuid(){if(typeof process.geteuid==="function"){return process.geteuid()}return process.getuid()}function tryReadFileSync(e){try{return i.readFileSync(e,"utf8")}catch(e){return""}}e.exports=homedir},64702:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){if(i===undefined)i=n;var o=Object.getOwnPropertyDescriptor(t,n);if(!o||("get"in o?!t.__esModule:o.writable||o.configurable)){o={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,i,o)}:function(e,t,n,i){if(i===undefined)i=n;e[i]=t[n]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))i(t,e,n);o(t,e);return t};var p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.HttpProxyAgent=void 0;const f=d(n(69278));const y=d(n(64756));const v=p(n(69592));const D=n(24434);const M=n(83249);const U=n(87016);const j=(0,v.default)("http-proxy-agent");class HttpProxyAgent extends M.Agent{constructor(e,t){super(t);this.proxy=typeof e==="string"?new U.URL(e):e;this.proxyHeaders=t?.headers??{};j("Creating new HttpProxyAgent instance: %o",this.proxy.href);const n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,"");const i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...t?omit(t,"headers"):null,host:n,port:i}}addRequest(e,t){e._header=null;this.setRequestProps(e,t);super.addRequest(e,t)}setRequestProps(e,t){const{proxy:n}=this;const i=t.secureEndpoint?"https:":"http:";const o=e.getHeader("host")||"localhost";const d=`${i}//${o}`;const p=new U.URL(e.path,d);if(t.port!==80){p.port=String(t.port)}e.path=String(p);const f=typeof this.proxyHeaders==="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){const e=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;f["Proxy-Authorization"]=`Basic ${Buffer.from(e).toString("base64")}`}if(!f["Proxy-Connection"]){f["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close"}for(const t of Object.keys(f)){const n=f[t];if(n){e.setHeader(t,n)}}}async connect(e,t){e._header=null;if(!e.path.includes("://")){this.setRequestProps(e,t)}let n;let i;j("Regenerating stored HTTP header string for request");e._implicitHeader();if(e.outputData&&e.outputData.length>0){j("Patching connection write() output buffer with updated header");n=e.outputData[0].data;i=n.indexOf("\r\n\r\n")+4;e.outputData[0].data=e._header+n.substring(i);j("Output buffer: %o",e.outputData[0].data)}let o;if(this.proxy.protocol==="https:"){j("Creating `tls.Socket`: %o",this.connectOpts);o=y.connect(this.connectOpts)}else{j("Creating `net.Socket`: %o",this.connectOpts);o=f.connect(this.connectOpts)}await(0,D.once)(o,"connect");return o}}HttpProxyAgent.protocols=["http","https"];t.HttpProxyAgent=HttpProxyAgent;function omit(e,...t){const n={};let i;for(i in e){if(!t.includes(i)){n[i]=e[i]}}return n}},84708:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){if(i===undefined)i=n;var o=Object.getOwnPropertyDescriptor(t,n);if(!o||("get"in o?!t.__esModule:o.writable||o.configurable)){o={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,i,o)}:function(e,t,n,i){if(i===undefined)i=n;e[i]=t[n]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))i(t,e,n);o(t,e);return t};var p=this&&this.__importDefault||functLine 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 o=new Uint8Array([13,10]);M=0;let d=false;for(const[t,p]of e){if(typeof p==="string"){const e=pe.encode(n+`; name="${escape(normalizeLinefeeds(t))}"`+`\r\n\r\n${normalizeLinefeeds(p)}\r\n`);i.push(e);M+=e.byteLength}else{const e=pe.encode(`${n}; name="${escape(normalizeLinefeeds(t))}"`+(p.name?`; filename="${escape(p.name)}"`:"")+"\r\n"+`Content-Type: ${p.type||"application/octet-stream"}\r\n\r\n`);i.push(e,p,o);if(typeof p.size==="number"){M+=e.byteLength+p.size+o.byteLength}else{d=true}}}const p=pe.encode(`--${t}--`);i.push(p);M+=p.byteLength;if(d){M=null}D=e;v=async function*(){for(const e of i){if(e.stream){yield*e.stream()}else{yield e}}};U="multipart/form-data; boundary="+t}else if(p(e)){D=e;M=e.size;if(e.type){U=e.type}}else if(typeof e[Symbol.asyncIterator]==="function"){if(t){throw new TypeError("keepalive")}if(o.isDisturbed(e)||e.locked){throw new TypeError("Response body object should not be disturbed or locked")}i=e instanceof ue?e:d(e)}if(typeof D==="string"||o.isBuffer(D)){M=Buffer.byteLength(D)}if(v!=null){let t;i=new ue({async start(){t=v(e)[Symbol.asyncIterator]()},async pull(e){const{value:n,done:o}=await t.next();if(o){queueMicrotask((()=>{e.close()}))}else{if(!se(i)){e.enqueue(new Uint8Array(n))}}return e.desiredSize>0},async cancel(e){await t.return()},type:undefined})}const j={stream:i,source:D,length:M};return[j,U]}function safelyExtractBody(e,t=false){if(!ue){ue=n(63774).ReadableStream}if(e instanceof ue){ne(!o.isDisturbed(e),"The body has already been consumed.");ne(!e.locked,"The stream is locked.")}return extractBody(e,t)}function cloneBody(e){const[t,n]=e.stream.tee();const i=K(n,{transfer:[n]});const[,o]=i.tee();e.stream=t;return{stream:o,length:e.length,source:e.source}}async function*consumeBody(e){if(e){if(ie(e)){yield e}else{const t=e.stream;if(o.isDisturbed(t)){throw new TypeError("The body has already been consumed.")}if(t.locked){throw new TypeError("The stream is locked.")}t[re]=true;yield*t}}}function throwIfAborted(e){if(e.aborted){throw new V("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=ce(t)}return new ee([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(){j.brandCheck(this,e);throwIfAborted(this[U]);const t=this.headers.get("Content-Type");if(/multipart\/form-data/.test(t)){const e={};for(const[t,n]of this.headers)e[t.toLowerCase()]=n;const t=new M;let n;try{n=new i({headers:e,preservePath:true})}catch(e){throw new V(`${e}`,"AbortError")}n.on("field",((e,n)=>{t.append(e,n)}));n.on("file",((e,n,i,o,d)=>{const p=[];if(o==="base64"||o.toLowerCase()==="base64"){let o="";n.on("data",(e=>{o+=e.toString().replace(/[\r\n]/gm,"");const t=o.length-o.length%4;p.push(Buffer.from(o.slice(0,t),"base64"));o=o.slice(t)}));n.on("end",(()=>{p.push(Buffer.from(o,"base64"));t.append(e,new de(p,i,{type:d}))}))}else{n.on("data",(e=>{p.push(e)}));n.on("end",(()=>{t.append(e,new de(p,i,{type:d}))}))}}));const o=new Promise(((e,t)=>{n.on("finish",e);n.on("error",(e=>t(new TypeError(e))))}));if(this.body!==null)for await(const e of consumeBody(this[U].body))n.write(e);n.end();await o;return t}else if(/application\/x-www-form-urlencoded/.test(t)){let e;try{let t="";const n=new TextDecoder("utf-8",{ignoreBOM:true});for await(const e of consumeBody(this[U].body)){if(!ie(e)){throw new TypeError("Expected Uint8Array chunk")}t+=n.decode(e,{stream:true})}t+=n.decode();e=new URLSearchParams(t)}catch(e){throw Object.assign(new TypeError,{cause:e})}const t=new M;for(const[n,i]of e){t.append(n,i)}return t}else{await Promise.resolve();throwIfAborted(this[U]);throw j.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,n){j.brandCheck(e,n);throwIfAborted(e[U]);if(bodyUnusable(e[U].body)){throw new TypeError("Body is unusable")}const i=v();const errorSteps=e=>i.reject(e);const successSteps=e=>{try{i.resolve(t(e))}catch(e){errorSteps(e)}};if(e[U].body==null){successSteps(new Uint8Array);return i.promise}await D(e[U].body,successSteps,errorSteps);return i.promise}function bodyUnusable(e){return e!=null&&(e.stream.locked||o.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=ge.decode(e);return t}function parseJSONFromBytes(e){return JSON.parse(utf8DecodeBytes(e))}function bodyMimeType(e){const{headersList:t}=e[U];conLine truncated
|
||||
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */d[o-4]=this.maskKey[0];d[o-3]=this.maskKey[1];d[o-2]=this.maskKey[2];d[o-1]=this.maskKey[3];d[1]=n;if(n===126){d.writeUInt16BE(t,2)}else if(n===127){d[2]=d[3]=0;d.writeUIntBE(t,4,6)}d[1]|=128;for(let e=0;e<t;e++){d[o+e]=this.frameData[e]^this.maskKey[e%4]}return d}}e.exports={WebsocketFrameSend:WebsocketFrameSend}},60833:(e,t,n)=>{"use strict";const{Writable:i}=n(2203);const o=n(31637);const{parserStates:d,opcodes:p,states:f,emptyBuffer:y}=n(67875);const{kReadyState:v,kSentClose:D,kResponse:M,kReceivedClose:U}=n(16063);const{isValidStatusCode:j,failWebsocketConnection:V,websocketMessageReceived:K}=n(10588);const{WebsocketFrameSend:ee}=n(54391);const te={};te.ping=o.channel("undici:websocket:ping");te.pong=o.channel("undici:websocket:pong");class ByteParser extends i{#o=[];#a=0;#A=d.INFO;#c={};#l=[];constructor(e){super();this.ws=e}_write(e,t,n){this.#o.push(e);this.#a+=e.length;this.run(n)}run(e){while(true){if(this.#A===d.INFO){if(this.#a<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!==p.CONTINUATION;if(this.#c.fragmented&&this.#c.opcode!==p.BINARY&&this.#c.opcode!==p.TEXT){V(this.ws,"Invalid frame type was fragmented.");return}const n=t[1]&127;if(n<=125){this.#c.payloadLength=n;this.#A=d.READ_DATA}else if(n===126){this.#A=d.PAYLOADLENGTH_16}else if(n===127){this.#A=d.PAYLOADLENGTH_64}if(this.#c.fragmented&&n>125){V(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)&&n>125){V(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#c.opcode===p.CLOSE){if(n===1){V(this.ws,"Received close frame with a 1-byte body.");return}const e=this.consume(n);this.#c.closeInfo=this.parseCloseBody(false,e);if(!this.ws[D]){const e=Buffer.allocUnsafe(2);e.writeUInt16BE(this.#c.closeInfo.code,0);const t=new ee(e);this.ws[M].socket.write(t.createFrame(p.CLOSE),(e=>{if(!e){this.ws[D]=true}}))}this.ws[v]=f.CLOSING;this.ws[U]=true;this.end();return}else if(this.#c.opcode===p.PING){const t=this.consume(n);if(!this.ws[U]){const e=new ee(t);this.ws[M].socket.write(e.createFrame(p.PONG));if(te.ping.hasSubscribers){te.ping.publish({payload:t})}}this.#A=d.INFO;if(this.#a>0){continue}else{e();return}}else if(this.#c.opcode===p.PONG){const t=this.consume(n);if(te.pong.hasSubscribers){te.pong.publish({payload:t})}if(this.#a>0){continue}else{e();return}}}else if(this.#A===d.PAYLOADLENGTH_16){if(this.#a<2){return e()}const t=this.consume(2);this.#c.payloadLength=t.readUInt16BE(0);this.#A=d.READ_DATA}else if(this.#A===d.PAYLOADLENGTH_64){if(this.#a<8){return e()}const t=this.consume(8);const n=t.readUInt32BE(0);if(n>2**31-1){V(this.ws,"Received payload length > 2^31 bytes.");return}const i=t.readUInt32BE(4);this.#c.payloadLength=(n<<8)+i;this.#A=d.READ_DATA}else if(this.#A===d.READ_DATA){if(this.#a<this.#c.payloadLength){return e()}else if(this.#a>=this.#c.payloadLength){const e=this.consume(this.#c.payloadLength);this.#l.push(e);if(!this.#c.fragmented||this.#c.fin&&this.#c.opcode===p.CONTINUATION){const e=Buffer.concat(this.#l);K(this.ws,this.#c.originalOpcode,e);this.#c={};this.#l.length=0}this.#A=d.INFO}}if(this.#a>0){continue}else{e();break}}}consume(e){if(e>this.#a){return null}else if(e===0){return y}if(this.#o[0].length===e){this.#a-=this.#o[0].length;return this.#o.shift()}const t=Buffer.allocUnsafe(e);let n=0;while(n!==e){const i=this.#o[0];const{length:o}=i;if(o+n===e){t.set(this.#o.shift(),n);break}else if(o+n>e){t.set(i.subarray(0,e-n),n);this.#o[0]=i.subarray(e-n);break}else{t.set(this.#o.shift(),n);n+=i.length}}this.#a-=e;return t}parseCloseBody(e,t){let n;if(t.length>=2){n=t.readUInt16BE(0)}if(e){if(!j(n)){return null}return{code:n}}let i=t.subarray(2);if(i[0]===239&&i[1]===187&&i[2]===191){i=i.subarray(3)}if(n!==undefined&&!j(n)){return null}try{i=new TextDecoder("utf-8",{fatal:true}).decode(i)}catch{return null}return{code:n,reason:i}}get closingInfo(){return this.#c.closeInfo}}e.exports={ByteParser:ByteParser}},16063: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")}},10588:(e,t,n)=>{"use strict";const{kReadyState:i,kController:o,kResponse:d,kBinaryType:p,kWebSocketURL:f}=n(16063);const{states:y,opcodes:v}=n(67875);const{MessageEvent:D,ErrorEvent:M}=n(43897);function isEstablished(e){return e[i]===y.OPEN}function isClosing(e){return e[i]===y.CLOSING}function isClosed(e){return e[i]===y.CLOSED}function fireEvent(e,t,n=Event,i){const o=new n(e,i);t.dispatchEvent(o)}function websocketMessageReceived(e,t,n){if(e[i]!==y.OPEN){return}let o;if(t===v.TEXT){try{o=new TextDecoder("utf-8",{fLine truncated
|
||||
var i=n(95115);var o=n(16928);e.exports=function expandTilde(e){var t=i();if(e.charCodeAt(0)===126){if(e.charCodeAt(1)===43){return o.join(process.cwd(),e.slice(2))}return t?o.join(t,e.slice(1)):e}return e}},95115:(e,t,n)=>{"use strict";var i=n(70857);if(typeof i.homedir!=="undefined"){e.exports=i.homedir}else{e.exports=n(62600)}},62600:(e,t,n)=>{"use strict";var i=n(79896);var o=n(51500);function homedir(){if(process.platform==="win32"){if(process.env.USERPROFILE){return process.env.USERPROFILE}if(process.env.HOMEDRIVE&&process.env.HOMEPATH){return process.env.HOMEDRIVE+process.env.HOMEPATH}if(process.env.HOME){return process.env.HOME}return null}if(process.env.HOME){return process.env.HOME}var e=tryReadFileSync("/etc/passwd");var t=find(o(e),getuid());if(t){return t}var n=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;if(!n){return null}if(process.platform==="darwin"){return"/Users/"+n}return"/home/"+n}function find(e,t){var n=e.length;for(var i=0;i<n;i++){if(+e[i].uid===t){return e[i].homedir}}}function getuid(){if(typeof process.geteuid==="function"){return process.geteuid()}return process.getuid()}function tryReadFileSync(e){try{return i.readFileSync(e,"utf8")}catch(e){return""}}e.exports=homedir},51933:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){if(i===undefined)i=n;var o=Object.getOwnPropertyDescriptor(t,n);if(!o||("get"in o?!t.__esModule:o.writable||o.configurable)){o={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,i,o)}:function(e,t,n,i){if(i===undefined)i=n;e[i]=t[n]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))i(t,e,n);o(t,e);return t};var p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.HttpProxyAgent=void 0;const f=d(n(69278));const y=d(n(64756));const v=p(n(66433));const D=n(24434);const M=n(50222);const U=n(87016);const j=(0,v.default)("http-proxy-agent");class HttpProxyAgent extends M.Agent{constructor(e,t){super(t);this.proxy=typeof e==="string"?new U.URL(e):e;this.proxyHeaders=t?.headers??{};j("Creating new HttpProxyAgent instance: %o",this.proxy.href);const n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,"");const i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...t?omit(t,"headers"):null,host:n,port:i}}addRequest(e,t){e._header=null;this.setRequestProps(e,t);super.addRequest(e,t)}setRequestProps(e,t){const{proxy:n}=this;const i=t.secureEndpoint?"https:":"http:";const o=e.getHeader("host")||"localhost";const d=`${i}//${o}`;const p=new U.URL(e.path,d);if(t.port!==80){p.port=String(t.port)}e.path=String(p);const f=typeof this.proxyHeaders==="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){const e=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;f["Proxy-Authorization"]=`Basic ${Buffer.from(e).toString("base64")}`}if(!f["Proxy-Connection"]){f["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close"}for(const t of Object.keys(f)){const n=f[t];if(n){e.setHeader(t,n)}}}async connect(e,t){e._header=null;if(!e.path.includes("://")){this.setRequestProps(e,t)}let n;let i;j("Regenerating stored HTTP header string for request");e._implicitHeader();if(e.outputData&&e.outputData.length>0){j("Patching connection write() output buffer with updated header");n=e.outputData[0].data;i=n.indexOf("\r\n\r\n")+4;e.outputData[0].data=e._header+n.substring(i);j("Output buffer: %o",e.outputData[0].data)}let o;if(this.proxy.protocol==="https:"){j("Creating `tls.Socket`: %o",this.connectOpts);o=y.connect(this.connectOpts)}else{j("Creating `net.Socket`: %o",this.connectOpts);o=f.connect(this.connectOpts)}await(0,D.once)(o,"connect");return o}}HttpProxyAgent.protocols=["http","https"];t.HttpProxyAgent=HttpProxyAgent;function omit(e,...t){const n={};let i;for(i in e){if(!t.includes(i)){n[i]=e[i]}}return n}},24999:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){if(i===undefined)i=n;var o=Object.getOwnPropertyDescriptor(t,n);if(!o||("get"in o?!t.__esModule:o.writable||o.configurable)){o={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,i,o)}:function(e,t,n,i){if(i===undefined)i=n;e[i]=t[n]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))i(t,e,n);o(t,e);return t};var p=this&&this.__importDefault||functLine 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 o=new Uint8Array([13,10]);M=0;let d=false;for(const[t,p]of e){if(typeof p==="string"){const e=pe.encode(n+`; name="${escape(normalizeLinefeeds(t))}"`+`\r\n\r\n${normalizeLinefeeds(p)}\r\n`);i.push(e);M+=e.byteLength}else{const e=pe.encode(`${n}; name="${escape(normalizeLinefeeds(t))}"`+(p.name?`; filename="${escape(p.name)}"`:"")+"\r\n"+`Content-Type: ${p.type||"application/octet-stream"}\r\n\r\n`);i.push(e,p,o);if(typeof p.size==="number"){M+=e.byteLength+p.size+o.byteLength}else{d=true}}}const p=pe.encode(`--${t}--`);i.push(p);M+=p.byteLength;if(d){M=null}D=e;v=async function*(){for(const e of i){if(e.stream){yield*e.stream()}else{yield e}}};U="multipart/form-data; boundary="+t}else if(p(e)){D=e;M=e.size;if(e.type){U=e.type}}else if(typeof e[Symbol.asyncIterator]==="function"){if(t){throw new TypeError("keepalive")}if(o.isDisturbed(e)||e.locked){throw new TypeError("Response body object should not be disturbed or locked")}i=e instanceof ue?e:d(e)}if(typeof D==="string"||o.isBuffer(D)){M=Buffer.byteLength(D)}if(v!=null){let t;i=new ue({async start(){t=v(e)[Symbol.asyncIterator]()},async pull(e){const{value:n,done:o}=await t.next();if(o){queueMicrotask((()=>{e.close()}))}else{if(!se(i)){e.enqueue(new Uint8Array(n))}}return e.desiredSize>0},async cancel(e){await t.return()},type:undefined})}const j={stream:i,source:D,length:M};return[j,U]}function safelyExtractBody(e,t=false){if(!ue){ue=n(63774).ReadableStream}if(e instanceof ue){ne(!o.isDisturbed(e),"The body has already been consumed.");ne(!e.locked,"The stream is locked.")}return extractBody(e,t)}function cloneBody(e){const[t,n]=e.stream.tee();const i=K(n,{transfer:[n]});const[,o]=i.tee();e.stream=t;return{stream:o,length:e.length,source:e.source}}async function*consumeBody(e){if(e){if(ie(e)){yield e}else{const t=e.stream;if(o.isDisturbed(t)){throw new TypeError("The body has already been consumed.")}if(t.locked){throw new TypeError("The stream is locked.")}t[re]=true;yield*t}}}function throwIfAborted(e){if(e.aborted){throw new V("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=ce(t)}return new ee([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(){j.brandCheck(this,e);throwIfAborted(this[U]);const t=this.headers.get("Content-Type");if(/multipart\/form-data/.test(t)){const e={};for(const[t,n]of this.headers)e[t.toLowerCase()]=n;const t=new M;let n;try{n=new i({headers:e,preservePath:true})}catch(e){throw new V(`${e}`,"AbortError")}n.on("field",((e,n)=>{t.append(e,n)}));n.on("file",((e,n,i,o,d)=>{const p=[];if(o==="base64"||o.toLowerCase()==="base64"){let o="";n.on("data",(e=>{o+=e.toString().replace(/[\r\n]/gm,"");const t=o.length-o.length%4;p.push(Buffer.from(o.slice(0,t),"base64"));o=o.slice(t)}));n.on("end",(()=>{p.push(Buffer.from(o,"base64"));t.append(e,new de(p,i,{type:d}))}))}else{n.on("data",(e=>{p.push(e)}));n.on("end",(()=>{t.append(e,new de(p,i,{type:d}))}))}}));const o=new Promise(((e,t)=>{n.on("finish",e);n.on("error",(e=>t(new TypeError(e))))}));if(this.body!==null)for await(const e of consumeBody(this[U].body))n.write(e);n.end();await o;return t}else if(/application\/x-www-form-urlencoded/.test(t)){let e;try{let t="";const n=new TextDecoder("utf-8",{ignoreBOM:true});for await(const e of consumeBody(this[U].body)){if(!ie(e)){throw new TypeError("Expected Uint8Array chunk")}t+=n.decode(e,{stream:true})}t+=n.decode();e=new URLSearchParams(t)}catch(e){throw Object.assign(new TypeError,{cause:e})}const t=new M;for(const[n,i]of e){t.append(n,i)}return t}else{await Promise.resolve();throwIfAborted(this[U]);throw j.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,n){j.brandCheck(e,n);throwIfAborted(e[U]);if(bodyUnusable(e[U].body)){throw new TypeError("Body is unusable")}const i=v();const errorSteps=e=>i.reject(e);const successSteps=e=>{try{i.resolve(t(e))}catch(e){errorSteps(e)}};if(e[U].body==null){successSteps(new Uint8Array);return i.promise}await D(e[U].body,successSteps,errorSteps);return i.promise}function bodyUnusable(e){return e!=null&&(e.stream.locked||o.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=ge.decode(e);return t}function parseJSONFromBytes(e){return JSON.parse(utf8DecodeBytes(e))}function bodyMimeType(e){const{headersList:t}=e[U];conLine truncated
|
||||
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */d[o-4]=this.maskKey[0];d[o-3]=this.maskKey[1];d[o-2]=this.maskKey[2];d[o-1]=this.maskKey[3];d[1]=n;if(n===126){d.writeUInt16BE(t,2)}else if(n===127){d[2]=d[3]=0;d.writeUIntBE(t,4,6)}d[1]|=128;for(let e=0;e<t;e++){d[o+e]=this.frameData[e]^this.maskKey[e%4]}return d}}e.exports={WebsocketFrameSend:WebsocketFrameSend}},67823:(e,t,n)=>{"use strict";const{Writable:i}=n(2203);const o=n(31637);const{parserStates:d,opcodes:p,states:f,emptyBuffer:y}=n(9717);const{kReadyState:v,kSentClose:D,kResponse:M,kReceivedClose:U}=n(14209);const{isValidStatusCode:j,failWebsocketConnection:V,websocketMessageReceived:K}=n(82570);const{WebsocketFrameSend:ee}=n(81697);const te={};te.ping=o.channel("undici:websocket:ping");te.pong=o.channel("undici:websocket:pong");class ByteParser extends i{#o=[];#a=0;#A=d.INFO;#c={};#l=[];constructor(e){super();this.ws=e}_write(e,t,n){this.#o.push(e);this.#a+=e.length;this.run(n)}run(e){while(true){if(this.#A===d.INFO){if(this.#a<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!==p.CONTINUATION;if(this.#c.fragmented&&this.#c.opcode!==p.BINARY&&this.#c.opcode!==p.TEXT){V(this.ws,"Invalid frame type was fragmented.");return}const n=t[1]&127;if(n<=125){this.#c.payloadLength=n;this.#A=d.READ_DATA}else if(n===126){this.#A=d.PAYLOADLENGTH_16}else if(n===127){this.#A=d.PAYLOADLENGTH_64}if(this.#c.fragmented&&n>125){V(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)&&n>125){V(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#c.opcode===p.CLOSE){if(n===1){V(this.ws,"Received close frame with a 1-byte body.");return}const e=this.consume(n);this.#c.closeInfo=this.parseCloseBody(false,e);if(!this.ws[D]){const e=Buffer.allocUnsafe(2);e.writeUInt16BE(this.#c.closeInfo.code,0);const t=new ee(e);this.ws[M].socket.write(t.createFrame(p.CLOSE),(e=>{if(!e){this.ws[D]=true}}))}this.ws[v]=f.CLOSING;this.ws[U]=true;this.end();return}else if(this.#c.opcode===p.PING){const t=this.consume(n);if(!this.ws[U]){const e=new ee(t);this.ws[M].socket.write(e.createFrame(p.PONG));if(te.ping.hasSubscribers){te.ping.publish({payload:t})}}this.#A=d.INFO;if(this.#a>0){continue}else{e();return}}else if(this.#c.opcode===p.PONG){const t=this.consume(n);if(te.pong.hasSubscribers){te.pong.publish({payload:t})}if(this.#a>0){continue}else{e();return}}}else if(this.#A===d.PAYLOADLENGTH_16){if(this.#a<2){return e()}const t=this.consume(2);this.#c.payloadLength=t.readUInt16BE(0);this.#A=d.READ_DATA}else if(this.#A===d.PAYLOADLENGTH_64){if(this.#a<8){return e()}const t=this.consume(8);const n=t.readUInt32BE(0);if(n>2**31-1){V(this.ws,"Received payload length > 2^31 bytes.");return}const i=t.readUInt32BE(4);this.#c.payloadLength=(n<<8)+i;this.#A=d.READ_DATA}else if(this.#A===d.READ_DATA){if(this.#a<this.#c.payloadLength){return e()}else if(this.#a>=this.#c.payloadLength){const e=this.consume(this.#c.payloadLength);this.#l.push(e);if(!this.#c.fragmented||this.#c.fin&&this.#c.opcode===p.CONTINUATION){const e=Buffer.concat(this.#l);K(this.ws,this.#c.originalOpcode,e);this.#c={};this.#l.length=0}this.#A=d.INFO}}if(this.#a>0){continue}else{e();break}}}consume(e){if(e>this.#a){return null}else if(e===0){return y}if(this.#o[0].length===e){this.#a-=this.#o[0].length;return this.#o.shift()}const t=Buffer.allocUnsafe(e);let n=0;while(n!==e){const i=this.#o[0];const{length:o}=i;if(o+n===e){t.set(this.#o.shift(),n);break}else if(o+n>e){t.set(i.subarray(0,e-n),n);this.#o[0]=i.subarray(e-n);break}else{t.set(this.#o.shift(),n);n+=i.length}}this.#a-=e;return t}parseCloseBody(e,t){let n;if(t.length>=2){n=t.readUInt16BE(0)}if(e){if(!j(n)){return null}return{code:n}}let i=t.subarray(2);if(i[0]===239&&i[1]===187&&i[2]===191){i=i.subarray(3)}if(n!==undefined&&!j(n)){return null}try{i=new TextDecoder("utf-8",{fatal:true}).decode(i)}catch{return null}return{code:n,reason:i}}get closingInfo(){return this.#c.closeInfo}}e.exports={ByteParser:ByteParser}},14209: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")}},82570:(e,t,n)=>{"use strict";const{kReadyState:i,kController:o,kResponse:d,kBinaryType:p,kWebSocketURL:f}=n(14209);const{states:y,opcodes:v}=n(9717);const{MessageEvent:D,ErrorEvent:M}=n(29907);function isEstablished(e){return e[i]===y.OPEN}function isClosing(e){return e[i]===y.CLOSING}function isClosed(e){return e[i]===y.CLOSED}function fireEvent(e,t,n=Event,i){const o=new n(e,i);t.dispatchEvent(o)}function websocketMessageReceived(e,t,n){if(e[i]!==y.OPEN){return}let o;if(t===v.TEXT){try{o=new TextDecoder("utf-8",{fatLine truncated
|
||||
Reference in new issue
Block a user