chore(deps): update dependency @actions/core to v2.0.3 (#67)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@actions/core](https://github.com/actions/toolkit/tree/main/packages/core) ([source](https://github.com/actions/toolkit/tree/HEAD/packages/core)) | [`2.0.2` → `2.0.3`](https://renovatebot.com/diffs/npm/@actions%2fcore/2.0.2/2.0.3) |  |  | --- ### Release Notes <details> <summary>actions/toolkit (@​actions/core)</summary> ### [`v2.0.3`](https://github.com/actions/toolkit/blob/HEAD/packages/core/RELEASES.md#203) - Bump `@actions/http-client` to `3.0.2` </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45My4wIiwidXBkYXRlZEluVmVyIjoiNDIuOTMuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiQXV0b21hdGlvbiJdfQ==--> Reviewed-on: #67 Co-authored-by: Renovate Bot <renovate@horstenkamp.eu> Co-committed-by: Renovate Bot <renovate@horstenkamp.eu>
This commit was merged in pull request #67.
This commit is contained in:
1 parent
c07372bfa5
commit
684cc88afb
2 files changed
+16
-28
No files matched your search
Vendored
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
(()=>{var __webpack_modules__={6136:(module,__unused_webpack_exports,__nccwpck_require__)=>{const{ScreepsAPI:ScreepsAPI}=__nccwpck_require__(9546);const core=__nccwpck_require__(7484);const fs=__nccwpck_require__(9896);const{glob:glob}=__nccwpck_require__(1363);const path=__nccwpck_require__(6928);function replacePlaceholders(e,t){const s=(new Date).toISOString();return e.replace(/{{gitHash}}/g,process.env.GITHUB_SHA).replace(/{{gitRef}}/g,process.env.GITHUB_REF).replace(/{{deployTime}}/g,s).replace(/{{hostname}}/g,t)}async function readReplaceAndWriteFiles(e,t,s){const i=t?path.join(t,e):e;const n=await glob(i);let r=n.map((e=>fs.promises.readFile(e,"utf8").then((t=>{t=replacePlaceholders(t,s);return fs.promises.writeFile(e,t)}))));await Promise.all(r);return n}async function readFilesIntoDict(e,t){const s=t?path.join(t,e):e;const i=await glob(s);let n={};let r=i.map((e=>fs.promises.readFile(e,"utf8").then((s=>{let i=e;if(t&&e.startsWith(t)){i=i.slice(t.length)}i=path.basename(i,path.extname(i));n[i]=s}))));await Promise.all(r);return n}function validateAuthentication(e,t,s){if(e){if(t||s){return"Token is defined along with username and/or password."}}else{if(!t&&!s){return"Neither token nor password and username are defined."}if(t&&!s){return"Username is defined but no password is provided."}if(!t&&s){return"Password is defined but no username is provided."}}return null}async function postCode(){const e=core.getInput("protocol")||"https";const t=core.getInput("hostname")||"screeps.com";const s=core.getInput("port")||"443";const i=core.getInput("path")||"/";const n=core.getInput("token")||undefined;const r=core.getInput("username")||undefined;const A=core.getInput("password")||undefined;const o=core.getInput("source-prefix");const a=core.getInput("pattern")||"*.js";const c=core.getInput("branch")||"default";const l=core.getInput("git-replace")||null;if(l){await readReplaceAndWriteFiles(l,o,t)}const u=await readFilesIntoDict(a,o);core.info(`Trying to upload the following files to ${c}:`);Object.keys(u).forEach((e=>{core.info(`Key: ${e}`)}));const h={token:n,username:r,password:A,protocol:e,hostname:t,port:s,path:i};core.info("login_arguments:");core.info(JSON.stringify(h,null,2));const p=validateAuthentication(n,r,A);if(p){core.error(p);return}let d=new ScreepsAPI(h);if(n){const e=await d.code.set(c,u);core.info(JSON.stringify(e,null,2));console.log(`Code set successfully to ${c}`)}else{core.info(`Logging in as user ${r}`);await Promise.resolve().then((()=>d.auth(r,A,h))).then((()=>{d.code.set(c,u)})).then((()=>{console.log(`Code set successfully to ${c}`)})).catch((e=>{console.error("Error:",e)}))}}if(require.main===require.cache[eval("__filename")]){postCode()}module.exports={validateAuthentication:validateAuthentication,replacePlaceholders:replacePlaceholders,postCode:postCode,readReplaceAndWriteFiles:readReplaceAndWriteFiles,readFilesIntoDict:readFilesIntoDict}},4914:function(e,t,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,s,i){if(i===undefined)i=s;var n=Object.getOwnPropertyDescriptor(t,s);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,i,n)}:function(e,t,s,i){if(i===undefined)i=s;e[i]=t[s]});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 r=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s))t[t.length]=s;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s=ownKeys(e),r=0;r<s.length;r++)if(s[r]!=="default")i(t,e,s[r]);n(t,e);return t}}();Object.defineProperty(t,"__esModule",{value:true});t.issueCommand=issueCommand;t.issue=issue;const A=r(s(857));const o=s(302);function issueCommand(e,t,s){const i=new Command(e,t,s);process.stdout.write(i.toString()+A.EOL)}function issue(e,t=""){issueCommand(e,{},t)}const a="::";class Command{constructor(e,t,s){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=s}toString(){let e=a+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const i=this.properties[s];if(i){if(t){t=false}else{e+=","}e+=`${s}=${escapeProperty(i)}`}}}}e+=`${a}${escapeData(this.message)}`;return e}}function escapeData(e){return(0,o.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(0,o.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},7484:function(e,t,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,s,i){if(i===undefined)i=s;var n=Object.getOwnPropertyDescriptor(t,s);if(!n||("get"in n?!t.__esModule:nLine truncated
|
(()=>{var __webpack_modules__={6136:(module,__unused_webpack_exports,__nccwpck_require__)=>{const{ScreepsAPI:ScreepsAPI}=__nccwpck_require__(9546);const core=__nccwpck_require__(7484);const fs=__nccwpck_require__(9896);const{glob:glob}=__nccwpck_require__(1363);const path=__nccwpck_require__(6928);function replacePlaceholders(e,t){const s=(new Date).toISOString();return e.replace(/{{gitHash}}/g,process.env.GITHUB_SHA).replace(/{{gitRef}}/g,process.env.GITHUB_REF).replace(/{{deployTime}}/g,s).replace(/{{hostname}}/g,t)}async function readReplaceAndWriteFiles(e,t,s){const i=t?path.join(t,e):e;const n=await glob(i);let r=n.map((e=>fs.promises.readFile(e,"utf8").then((t=>{t=replacePlaceholders(t,s);return fs.promises.writeFile(e,t)}))));await Promise.all(r);return n}async function readFilesIntoDict(e,t){const s=t?path.join(t,e):e;const i=await glob(s);let n={};let r=i.map((e=>fs.promises.readFile(e,"utf8").then((s=>{let i=e;if(t&&e.startsWith(t)){i=i.slice(t.length)}i=path.basename(i,path.extname(i));n[i]=s}))));await Promise.all(r);return n}function validateAuthentication(e,t,s){if(e){if(t||s){return"Token is defined along with username and/or password."}}else{if(!t&&!s){return"Neither token nor password and username are defined."}if(t&&!s){return"Username is defined but no password is provided."}if(!t&&s){return"Password is defined but no username is provided."}}return null}async function postCode(){const e=core.getInput("protocol")||"https";const t=core.getInput("hostname")||"screeps.com";const s=core.getInput("port")||"443";const i=core.getInput("path")||"/";const n=core.getInput("token")||undefined;const r=core.getInput("username")||undefined;const o=core.getInput("password")||undefined;const a=core.getInput("source-prefix");const A=core.getInput("pattern")||"*.js";const c=core.getInput("branch")||"default";const l=core.getInput("git-replace")||null;if(l){await readReplaceAndWriteFiles(l,a,t)}const u=await readFilesIntoDict(A,a);core.info(`Trying to upload the following files to ${c}:`);Object.keys(u).forEach((e=>{core.info(`Key: ${e}`)}));const p={token:n,username:r,password:o,protocol:e,hostname:t,port:s,path:i};core.info("login_arguments:");core.info(JSON.stringify(p,null,2));const h=validateAuthentication(n,r,o);if(h){core.error(h);return}let d=new ScreepsAPI(p);if(n){const e=await d.code.set(c,u);core.info(JSON.stringify(e,null,2));console.log(`Code set successfully to ${c}`)}else{core.info(`Logging in as user ${r}`);await Promise.resolve().then((()=>d.auth(r,o,p))).then((()=>{d.code.set(c,u)})).then((()=>{console.log(`Code set successfully to ${c}`)})).catch((e=>{console.error("Error:",e)}))}}if(require.main===require.cache[eval("__filename")]){postCode()}module.exports={validateAuthentication:validateAuthentication,replacePlaceholders:replacePlaceholders,postCode:postCode,readReplaceAndWriteFiles:readReplaceAndWriteFiles,readFilesIntoDict:readFilesIntoDict}},4914:function(e,t,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,s,i){if(i===undefined)i=s;var n=Object.getOwnPropertyDescriptor(t,s);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,i,n)}:function(e,t,s,i){if(i===undefined)i=s;e[i]=t[s]});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 r=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s))t[t.length]=s;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s=ownKeys(e),r=0;r<s.length;r++)if(s[r]!=="default")i(t,e,s[r]);n(t,e);return t}}();Object.defineProperty(t,"__esModule",{value:true});t.issueCommand=issueCommand;t.issue=issue;const o=r(s(857));const a=s(302);function issueCommand(e,t,s){const i=new Command(e,t,s);process.stdout.write(i.toString()+o.EOL)}function issue(e,t=""){issueCommand(e,{},t)}const A="::";class Command{constructor(e,t,s){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=s}toString(){let e=A+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const i=this.properties[s];if(i){if(t){t=false}else{e+=","}e+=`${s}=${escapeProperty(i)}`}}}}e+=`${A}${escapeData(this.message)}`;return e}}function escapeData(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},7484:function(e,t,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,s,i){if(i===undefined)i=s;var n=Object.getOwnPropertyDescriptor(t,s);if(!n||("get"in n?!t.__esModule:nLine truncated
|
||||||
/*!
|
/*!
|
||||||
* mime-db
|
* mime-db
|
||||||
* Copyright(c) 2014 Jonathan Ong
|
* Copyright(c) 2014 Jonathan Ong
|
||||||
@@ -11,6 +11,6 @@ e.exports=s(1813)},4096:(e,t,s)=>{"use strict";
|
|||||||
* Copyright(c) 2014 Jonathan Ong
|
* Copyright(c) 2014 Jonathan Ong
|
||||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/var i=s(9829);var n=s(6928).extname;var r=/^\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=r.exec(e);var s=t&&i[t[1].toLowerCase()];if(s&&s.charset){return s.charset}if(t&&A.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 A=r.extensions;if(!A||!A.length){return}e[n]=A;for(var o=0;o<A.length;o++){var a=A[o];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 A=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 o=/^(-?(?:\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(!o){return}var a=parseFloat(o[1]);var c=(o[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return a*A;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 A=t.port;if(typeof r!=="string"||!r||typeof s!=="string"){return""}s=s.split(":",1)[0];r=r.replace(/:\d*$/,"");A=parseInt(A)||n[s]||0;if(!shouldProxy(r,A)){return""}var o=getEnv("npm_config_"+s+"_proxy")||getEnv(s+"_proxy")||getEnv("npm_config_proxy")||getEnv("all_proxy");if(o&&o.indexOf("://")===-1){o=s+"://"+o}return o}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 A=i?parseInt(i[2]):0;if(A&&A!==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 A=s(2830);const o=s(3106);const a=s(4922);const c=s(9023);const l=s(9896);const u=s(9557);const h=s(6928);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}const p=_interopDefaultLegacy(i);const d=_interopDefaultLegacy(n);const g=_interopDefaultLegacy(A);const f=_interopDefaultLegacy(o);const E=_interopDefaultLegacy(a);const C=_interopDefaultLegacy(c);const Q=_interopDefaultLegacy(l);const B=_interopDefaultLegacy(u);const I=_interopDefaultLegacy(h);const y=g["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
|
*/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]);u=0;let r=false;for(const[t,A]of e){if(typeof A==="string"){const e=D.encode(s+`; name="${escape(normalizeLinefeeds(t))}"`+`\r\n\r\n${normalizeLinefeeds(A)}\r\n`);i.push(e);u+=e.byteLength}else{const e=D.encode(`${s}; name="${escape(normalizeLinefeeds(t))}"`+(A.name?`; filename="${escape(A.name)}"`:"")+"\r\n"+`Content-Type: ${A.type||"application/octet-stream"}\r\n\r\n`);i.push(e,A,n);if(typeof A.size==="number"){u+=e.byteLength+A.size+n.byteLength}else{r=true}}}const A=D.encode(`--${t}--`);i.push(A);u+=A.byteLength;if(r){u=null}l=e;c=async function*(){for(const e of i){if(e.stream){yield*e.stream()}else{yield e}}};h="multipart/form-data; boundary="+t}else if(A(e)){l=e;u=e.size;if(e.type){h=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 R?e:r(e)}if(typeof l==="string"||n.isBuffer(l)){u=Buffer.byteLength(l)}if(c!=null){let t;i=new R({async start(){t=c(e)[Symbol.asyncIterator]()},async pull(e){const{value:s,done:n}=await t.next();if(n){queueMicrotask((()=>{e.close()}))}else{if(!B(i)){e.enqueue(new Uint8Array(s))}}return e.desiredSize>0},async cancel(e){await t.return()},type:undefined})}const p={stream:i,source:l,length:u};return[p,h]}function safelyExtractBody(e,t=false){if(!R){R=s(3774).ReadableStream}if(e instanceof R){Q(!n.isDisturbed(e),"The body has already been consumed.");Q(!e.locked,"The stream is locked.")}return extractBody(e,t)}function cloneBody(e){const[t,s]=e.stream.tee();const i=g(s,{transfer:[s]});const[,n]=i.tee();e.stream=t;return{stream:n,length:e.length,source:e.source}}async function*consumeBody(e){if(e){if(I(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[C]=true;yield*t}}}function throwIfAborted(e){if(e.aborted){throw new d("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=v(t)}return new f([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(){p.brandCheck(this,e);throwIfAborted(this[h]);const t=this.headers.get("Content-Type");if(/multipart\/form-data/.test(t)){const e={};for(const[t,s]of this.headers)e[t.toLowerCase()]=s;const t=new u;let s;try{s=new i({headers:e,preservePath:true})}catch(e){throw new d(`${e}`,"AbortError")}s.on("field",((e,s)=>{t.append(e,s)}));s.on("file",((e,s,i,n,r)=>{const A=[];if(n==="base64"||n.toLowerCase()==="base64"){let n="";s.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)}));s.on("end",(()=>{A.push(Buffer.from(n,"base64"));t.append(e,new k(A,i,{type:r}))}))}else{s.on("data",(e=>{A.push(e)}));s.on("end",(()=>{t.append(e,new k(A,i,{type:r}))}))}}));const n=new Promise(((e,t)=>{s.on("finish",e);s.on("error",(e=>t(new TypeError(e))))}));if(this.body!==null)for await(const e of consumeBody(this[h].body))s.write(e);s.end();await n;return t}else if(/application\/x-www-form-urlencoded/.test(t)){let e;try{let t="";const s=new TextDecoder("utf-8",{ignoreBOM:true});for await(const e of consumeBody(this[h].body)){if(!I(e)){throw new TypeError("Expected Uint8Array chunk")}t+=s.decode(e,{stream:true})}t+=s.decode();e=new URLSearchParams(t)}catch(e){throw Object.assign(new TypeError,{cause:e})}const t=new u;for(const[s,i]of e){t.append(s,i)}return t}else{await Promise.resolve();throwIfAborted(this[h]);throw p.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,s){p.brandCheck(e,s);throwIfAborted(e[h]);if(bodyUnusable(e[h].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[h].body==null){successSteps(new Uint8Array);return i.promise}await l(e[h].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=S.decode(e);return t}function parseJSONFromBytes(e){return JSON.parse(utf8DecodeBytes(e))}function bodyMimeType(e){const{headersList:t}=e[h];const s=t.get("content-Line 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> */r[n-4]=this.maskKey[0];r[n-3]=this.maskKey[1];r[n-2]=this.maskKey[2];r[n-1]=this.maskKey[3];r[1]=s;if(s===126){r.writeUInt16BE(t,2)}else if(s===127){r[2]=r[3]=0;r.writeUIntBE(t,4,6)}r[1]|=128;for(let e=0;e<t;e++){r[n+e]=this.frameData[e]^this.maskKey[e%4]}return r}}e.exports={WebsocketFrameSend:WebsocketFrameSend}},3171:(e,t,s)=>{"use strict";const{Writable:i}=s(2203);const n=s(1637);const{parserStates:r,opcodes:A,states:o,emptyBuffer:a}=s(5913);const{kReadyState:c,kSentClose:l,kResponse:u,kReceivedClose:h}=s(2933);const{isValidStatusCode:p,failWebsocketConnection:d,websocketMessageReceived:g}=s(3574);const{WebsocketFrameSend:f}=s(1237);const E={};E.ping=n.channel("undici:websocket:ping");E.pong=n.channel("undici:websocket:pong");class ByteParser extends i{#A=[];#o=0;#a=r.INFO;#c={};#l=[];constructor(e){super();this.ws=e}_write(e,t,s){this.#A.push(e);this.#o+=e.length;this.run(s)}run(e){while(true){if(this.#a===r.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){d(this.ws,"Invalid frame type was fragmented.");return}const s=t[1]&127;if(s<=125){this.#c.payloadLength=s;this.#a=r.READ_DATA}else if(s===126){this.#a=r.PAYLOADLENGTH_16}else if(s===127){this.#a=r.PAYLOADLENGTH_64}if(this.#c.fragmented&&s>125){d(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)&&s>125){d(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#c.opcode===A.CLOSE){if(s===1){d(this.ws,"Received close frame with a 1-byte body.");return}const e=this.consume(s);this.#c.closeInfo=this.parseCloseBody(false,e);if(!this.ws[l]){const e=Buffer.allocUnsafe(2);e.writeUInt16BE(this.#c.closeInfo.code,0);const t=new f(e);this.ws[u].socket.write(t.createFrame(A.CLOSE),(e=>{if(!e){this.ws[l]=true}}))}this.ws[c]=o.CLOSING;this.ws[h]=true;this.end();return}else if(this.#c.opcode===A.PING){const t=this.consume(s);if(!this.ws[h]){const e=new f(t);this.ws[u].socket.write(e.createFrame(A.PONG));if(E.ping.hasSubscribers){E.ping.publish({payload:t})}}this.#a=r.INFO;if(this.#o>0){continue}else{e();return}}else if(this.#c.opcode===A.PONG){const t=this.consume(s);if(E.pong.hasSubscribers){E.pong.publish({payload:t})}if(this.#o>0){continue}else{e();return}}}else if(this.#a===r.PAYLOADLENGTH_16){if(this.#o<2){return e()}const t=this.consume(2);this.#c.payloadLength=t.readUInt16BE(0);this.#a=r.READ_DATA}else if(this.#a===r.PAYLOADLENGTH_64){if(this.#o<8){return e()}const t=this.consume(8);const s=t.readUInt32BE(0);if(s>2**31-1){d(this.ws,"Received payload length > 2^31 bytes.");return}const i=t.readUInt32BE(4);this.#c.payloadLength=(s<<8)+i;this.#a=r.READ_DATA}else if(this.#a===r.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.#l.push(e);if(!this.#c.fragmented||this.#c.fin&&this.#c.opcode===A.CONTINUATION){const e=Buffer.concat(this.#l);g(this.ws,this.#c.originalOpcode,e);this.#c={};this.#l.length=0}this.#a=r.INFO}}if(this.#o>0){continue}else{e();break}}}consume(e){if(e>this.#o){return null}else if(e===0){return a}if(this.#A[0].length===e){this.#o-=this.#A[0].length;return this.#A.shift()}const t=Buffer.allocUnsafe(e);let s=0;while(s!==e){const i=this.#A[0];const{length:n}=i;if(n+s===e){t.set(this.#A.shift(),s);break}else if(n+s>e){t.set(i.subarray(0,e-s),s);this.#A[0]=i.subarray(e-s);break}else{t.set(this.#A.shift(),s);s+=i.length}}this.#o-=e;return t}parseCloseBody(e,t){let s;if(t.length>=2){s=t.readUInt16BE(0)}if(e){if(!p(s)){return null}return{code:s}}let i=t.subarray(2);if(i[0]===239&&i[1]===187&&i[2]===191){i=i.subarray(3)}if(s!==undefined&&!p(s)){return null}try{i=new TextDecoder("utf-8",{fatal:true}).decode(i)}catch{return null}return{code:s,reason:i}}get closingInfo(){return this.#c.closeInfo}}e.exports={ByteParser:ByteParser}},2933: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")}},3574:(e,t,s)=>{"use strict";const{kReadyState:i,kController:n,kResponse:r,kBinaryType:A,kWebSocketURL:o}=s(2933);const{states:a,opcodes:c}=s(5913);const{MessageEvent:l,ErrorEvent:u}=s(6255);function isEstablished(e){return e[i]===a.OPEN}function isClosing(e){return e[i]===a.CLOSING}function isClosed(e){return e[i]===a.CLOSED}function fireEvent(e,t,s=Event,i){const n=new s(e,i);t.dispatchEvent(n)}function websocketMessageReceived(e,t,s){if(e[i]!==a.OPEN){return}let n;if(t===c.TEXT){try{n=new TextDecoder("utf-8",{fatal:true}).decode(s)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
|
||||||
Generated
+12
-24
@@ -19,13 +19,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/core": {
|
"node_modules/@actions/core": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/core/-/core-2.0.3.tgz",
|
||||||
"integrity": "sha512-Ast1V7yHbGAhplAsuVlnb/5J8Mtr/Zl6byPPL+Qjq3lmfIgWF1ak1iYfF/079cRERiuTALTXkSuEUdZeDCfGtA==",
|
"integrity": "sha512-Od9Thc3T1mQJYddvVPM4QGiLUewdh+3txmDYHHxoNdkqysR1MbCT+rFOtNUxYAz+7+6RIsqipVahY2GJqGPyxA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/exec": "^2.0.0",
|
"@actions/exec": "^2.0.0",
|
||||||
"@actions/http-client": "^3.0.1"
|
"@actions/http-client": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/exec": {
|
"node_modules/@actions/exec": {
|
||||||
@@ -38,13 +38,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/http-client": {
|
"node_modules/@actions/http-client": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz",
|
||||||
"integrity": "sha512-SbGS8c/vySbNO3kjFgSW77n83C4MQx/Yoe+b1hAdpuvfHxnkHzDq2pWljUpAA56Si1Gae/7zjeZsV0CYjmLo/w==",
|
"integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tunnel": "^0.0.6",
|
"tunnel": "^0.0.6",
|
||||||
"undici": "^5.28.5"
|
"undici": "^6.23.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/io": {
|
"node_modules/@actions/io": {
|
||||||
@@ -555,15 +555,6 @@
|
|||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@fastify/busboy": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
|
|
||||||
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@isaacs/balanced-match": {
|
"node_modules/@isaacs/balanced-match": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz",
|
||||||
@@ -2112,15 +2103,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
"version": "5.29.0",
|
"version": "6.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz",
|
||||||
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
|
"integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
|
||||||
"@fastify/busboy": "^2.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.0"
|
"node": ">=18.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vite": {
|
"node_modules/vite": {
|
||||||
|
|||||||
Reference in new issue
Block a user