Author SHA1 Message Date
Renovate ac5a1d77a5 chore(deps): lock file maintenance
renovate/stability-days Updates have not met minimum release age requirement
Philipp/Global-Workflows: Pre-commit Lint (Scoped) / pre-commit (pull_request) Successful in 3m38s
Recompile dist/ on Renovate PR / recompile (pull_request) Failing after 3m19s
Test / Run Tests (push) Successful in 7m31s
Test / Run Tests (pull_request) Successful in 7m21s
2026-09-04 21:25:03 +00:00
Philipp c08128c0ef feat: automate dist recompilation on Renovate PRs and configure concurrency limit (#120)
Test / Run Tests (push) Successful in 1m59s
### Summary of Changes

1. **Gitea Workflow (.gitea/workflows/recompile-dist.yaml)**:
   - Automates recompilation of dist/index.js on Renovate PRs.
   - Adds loop-prevention check for [skip compile].
2. **Renovate Configuration (
enovate.json)**:
   - Configures branchConcurrentLimit: 2 and prConcurrentLimit: 2.
   - Adds gitIgnoredAuthors for automated bot commits.
   - Adds rebaseWhen: 'behind-base-branch'.
   - Removes postUpgradeTasks.
3. **Test Workflow (.gitea/workflows/test.yaml)**:
   - Added pull_request trigger.
4. **Gitea-Only Setup**:
   - Removed .github/ workflows to keep workflow execution strictly on Gitea.
5. **Preferences (GEMINI.md)**:
   - Documented strict pnpm/pnpx rule.
6. **Tests**:
   - Added afterEach import in __tests__/index.test.js.

Reviewed-on: #120
Reviewed-by: LLMReview <27+autoreview@noreplay.horstenkamp.eu>
2026-09-04 23:20:17 +02:00
Philipp 7c5cb5ffec ci: delegate pre-commit linting to central global scoped workflow (#119)
Test / Run Tests (push) Failing after 2m59s
This PR removes the redundant local workflow file (`.gitea/workflows/lint.yaml`) in favor of the central **Global Scoped Workflow** hosted in `Global-Workflows` (`.gitea/scoped_workflows/lint.yaml`).

### Checklist
- [ ] I changed the Branch protections to fit the new pipeline setup.

Reviewed-on: #119
Reviewed-by: LLMReview <27+autoreview@noreplay.horstenkamp.eu>
2026-08-31 23:28:52 +02:00
Renovate f5c1ffde37 chore(deps): update pre-commit hook python-jsonschema/check-jsonschema to v0.38.0 (#115)
Lint / pre-commit Linting (push) Successful in 58s
Test / Run Tests (push) Successful in 4m34s
Co-authored-by: Renovate Bot <renovate@horstenkamp.eu>
2026-08-15 00:31:35 +02:00
Renovate a2711f3f40 chore(deps): update pnpm/action-setup action to v6 (#114)
Lint / pre-commit Linting (push) Successful in 46s
Test / Run Tests (push) Successful in 2m20s
Co-authored-by: Renovate Bot <renovate@horstenkamp.eu>
2026-08-11 02:43:32 +02:00
Renovate 7e526aeef3 chore(deps): update pnpm/action-setup action to v4.4.0 (#112)
Lint / pre-commit Linting (push) Successful in 39s
Test / Run Tests (push) Successful in 1m14s
Co-authored-by: Renovate Bot <renovate@horstenkamp.eu>
2026-08-11 01:33:30 +02:00
Renovate c116597f23 chore(deps): pin pnpm/action-setup action to b906aff (#111)
Lint / pre-commit Linting (push) Successful in 50s
Test / Run Tests (push) Failing after 3m14s
Co-authored-by: Renovate Bot <renovate@horstenkamp.eu>
2026-08-11 00:31:23 +02:00
Philipp 0751b1470b chore: migrate package manager from npm to pnpm (#110)
Lint / pre-commit Linting (push) Successful in 45s
Test / Run Tests (push) Successful in 1m20s
This PR migrates the package manager from `npm` to `pnpm`.

### Changes:
- Replaced `package-lock.json` with `pnpm-lock.yaml` and `pnpm-workspace.yaml`.
- Updated `.gitea/workflows/test.yaml` to include `pnpm/action-setup@v4` and use `pnpm install` / `pnpm test`.
- Updated `renovate.json` to match `pnpm` manager and execute `pnpm install --frozen-lockfile` and `pnpm run build`.
- Updated `.pre-commit-config.yaml` to exclude `pnpm-lock.yaml` from `pretty-format-yaml`.
- Updated documentation in `README.md` and `GEMINI.md`.
- Rebuilt `dist/index.js`.Reviewed-on: #110
2026-08-11 00:20:02 +02:00
Renovate 76a263859b chore(deps): update actions/setup-node action to v7 (#108)
Lint / pre-commit Linting (push) Successful in 1m23s
Test / Run Tests (push) Successful in 1m53s
Co-authored-by: Renovate Bot <renovate@horstenkamp.eu>
Co-committed-by: Renovate Bot <renovate@horstenkamp.eu>
2026-07-25 01:50:45 +02:00
13 changed files with 1506 additions and 2381 deletions

No files matched your search

-18
View File
@@ -1,18 +0,0 @@
name: Lint
on:
push:
workflow_dispatch:
jobs:
pre-commit-lint:
name: pre-commit Linting
runs-on: pi
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
- run: pip install pre-commit
shell: bash
- name: Pre Commit
run: SKIP=no-commit-to-branch pre-commit run -a
shell: bash
+55
View File
@@ -0,0 +1,55 @@
name: Recompile dist/ on Renovate PR
on:
pull_request:
types: [opened, synchronize]
paths:
- package.json
- pnpm-lock.yaml
- index.js
- monitor.js
permissions:
contents: write
jobs:
recompile:
runs-on: pi
if: |
(github.actor == 'renovate[bot]' || contains(github.head_ref, 'renovate/')) &&
!contains(github.event.head_commit.message, '[skip compile]')
steps:
- name: Checkout PR Branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '22'
cache: pnpm
- name: Clean Install
run: pnpm install --frozen-lockfile --ignore-scripts
shell: bash
- name: Build
run: pnpm run build
shell: bash
- name: Commit dist/
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add dist/
if git diff --staged --quiet; then
echo "No changes to dist/"
else
git commit -m "chore: compile action bundle [skip compile]"
git push origin HEAD:${{ github.head_ref }}
fi
shell: bash
+5 -2
View File
@@ -2,6 +2,7 @@ name: Test
on:
push:
pull_request:
workflow_dispatch:
jobs:
@@ -10,10 +11,12 @@ jobs:
runs-on: pi
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24'
- run: npm install
cache: pnpm
- run: pnpm install --frozen-lockfile
shell: bash
- run: npm test
- run: pnpm test
shell: bash
+2 -1
View File
@@ -21,6 +21,7 @@ repos:
hooks:
- id: pretty-format-yaml
args: [--autofix]
exclude: ^pnpm-lock\.yaml$
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
@@ -29,7 +30,7 @@ repos:
types_or: [css, javascript]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.4
rev: 0.38.0
hooks:
- id: check-renovate
- id: check-github-actions
+10 -4
View File
@@ -7,6 +7,7 @@ This repository is maintained by Gemini.
* **Test-Driven Development (TDD):** Wherever possible, Test-Driven Development principles should be followed. Write tests before writing the code they are intended to validate.
* **Pre-commit Hooks:** Ensure that `pre-commit` hooks are installed and active before making any commits. This can be done by running `pre-commit install` in your local repository.
* **Note for Gemini:** Git commits trigger pre-commit hooks, which can take several seconds (or minutes) to complete. Checking the command status for git commit is only appropriate every 120s.
* **Package Manager Preferences:** Always use `pnpm` and `pnpx`. Never use `npm` or `npx` under any circumstances. All package management operations, script runs, and tool invocations must use `pnpm` / `pnpx`.
## Repository Comparison
@@ -19,7 +20,7 @@ This project uses [Vitest](https://vitest.dev/) for testing. The tests are locat
To run the tests locally, use the following command:
```bash
npm test
pnpm test
```
### Testing Pipeline
@@ -29,6 +30,11 @@ The tests are automatically run on every push and workflow dispatch using a Gite
The Gitea workflow does the following:
1. Checks out the code.
2. Sets up Node.js.
3. Installs the dependencies using `npm install`.
4. Runs the tests using `npm test`.
2. Sets up Node.js and pnpm.
3. Installs the dependencies using `pnpm install`.
4. Runs the tests using `pnpm test`.
### Automated Recompilation & Permissions
* The automated recompilation workflow (`.gitea/workflows/recompile-dist.yaml`) recompiles `dist/index.js` on Renovate PRs and requires `contents: write` permissions to push back to the branch.
* Ensure that the Gitea repository workflow settings have write permissions enabled (**Settings** ➔ **Actions** ➔ **General** ➔ **Workflow permissions** ➔ **Read and write permissions**).
+3 -3
View File
@@ -84,7 +84,7 @@ This project includes a build step to prepare the action for use.
### Why a Build Step?
We use a build step to compile the JavaScript code and its dependencies into a single, self-contained file (`dist/index.js`). This approach is chosen for the following reasons:
1. **Zero-configuration at Runtime:** By bundling everything, the action runner doesn't need to run `npm install`, which speeds up the action execution.
1. **Zero-configuration at Runtime:** By bundling everything, the action runner doesn't need to run `pnpm install` or `npm install`, which speeds up the action execution.
2. **Reliability:** It guarantees that the exact versions of dependencies tested during development are used in the action, avoiding potential issues with version updates or missing packages.
3. **Standard Practice:** This is a recommended practice for JavaScript-based GitHub/Gitea Actions.
@@ -100,8 +100,8 @@ We chose [`@vercel/ncc`](https://github.com/vercel/ncc) as the compiler because:
If you modify `index.js` or change dependencies, you must rebuild the project before committing:
```bash
npm install
npm run build
pnpm install
pnpm run build
```
This will update the `dist/index.js` file, which should be committed to the repository.
+1 -1
View File
@@ -1,4 +1,4 @@
import { vi, describe, it, expect, beforeEach } from "vitest";
import { vi, describe, it, expect, beforeEach, afterEach } from "vitest";
// Mock @actions/core for all tests in this file
vi.mock("@actions/core", () => ({
+8 -8
View File
@@ -1,20 +1,18 @@
import{createRequire as A}from"module";var i={7884:(A,i,g)=>{var E;E={value:true};i.v=void 0;const p=g(6856);function create(){return p.DefaultArtifactClient.create()}i.v=create},6856:function(A,i,g){var E=this&&this.__createBinding||(Object.create?function(A,i,g,E){if(E===undefined)E=g;var p=Object.getOwnPropertyDescriptor(i,g);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[g]}}}Object.defineProperty(A,E,p)}:function(A,i,g,E){if(E===undefined)E=g;A[E]=i[g]});var p=this&&this.__setModuleDefault||(Object.create?function(A,i){Object.defineProperty(A,"default",{enumerable:true,value:i})}:function(A,i){A["default"]=i});var C=this&&this.__importStar||function(A){if(A&&A.__esModule)return A;var i={};if(A!=null)for(var g in A)if(g!=="default"&&Object.prototype.hasOwnProperty.call(A,g))E(i,A,g);p(i,A);return i};var f=this&&this.__awaiter||function(A,i,g,E){function adopt(A){return A instanceof g?A:new g((function(i){i(A)}))}return new(g||(g=Promise))((function(g,p){function fulfilled(A){try{step(E.next(A))}catch(A){p(A)}}function rejected(A){try{step(E["throw"](A))}catch(A){p(A)}}function step(A){A.done?g(A.value):adopt(A.value).then(fulfilled,rejected)}step((E=E.apply(A,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.DefaultArtifactClient=void 0;const Q=C(g(4086));const B=g(5973);const I=g(6036);const y=g(1631);const b=g(1774);const D=g(809);const R=g(1280);const k=g(9562);const S=g(6928);class DefaultArtifactClient{static create(){return new DefaultArtifactClient}uploadArtifact(A,i,g,E){return f(this,void 0,void 0,(function*(){Q.info(`Starting artifact upload\nFor more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`);(0,b.checkArtifactName)(A);const p=(0,B.getUploadSpecification)(A,g,i);const C={artifactName:A,artifactItems:[],size:0,failedItems:[]};const f=new I.UploadHttpClient;if(p.length===0){Q.warning(`No files found that can be uploaded`)}else{const i=yield f.createArtifactInFileContainer(A,E);if(!i.fileContainerResourceUrl){Q.debug(i.toString());throw new Error("No URL provided by the Artifact Service to upload an artifact to")}Q.debug(`Upload Resource URL: ${i.fileContainerResourceUrl}`);Q.info(`Container for artifact "${A}" successfully created. Starting upload of file(s)`);const g=yield f.uploadArtifactToFileContainer(i.fileContainerResourceUrl,p,E);Q.info(`File upload process has finished. Finalizing the artifact upload`);yield f.patchArtifactSize(g.totalSize,A);if(g.failedItems.length>0){Q.info(`Upload finished. There were ${g.failedItems.length} items that failed to upload`)}else{Q.info(`Artifact has been finalized. All files have been successfully uploaded!`)}Q.info(`\nThe raw size of all the files that were specified for upload is ${g.totalSize} bytes\nThe size of all the files that were uploaded is ${g.uploadSize} bytes. This takes into account any gzip compression used to reduce the upload size, time and storage\n\nNote: The size of downloaded zips can differ significantly from the reported size. For more information see: https://github.com/actions/upload-artifact#zipped-artifact-downloads \r\n`);C.artifactItems=p.map((A=>A.absoluteFilePath));C.size=g.uploadSize;C.failedItems=g.failedItems}return C}))}downloadArtifact(A,i,g){return f(this,void 0,void 0,(function*(){const E=new D.DownloadHttpClient;const p=yield E.listArtifacts();if(p.count===0){throw new Error(`Unable to find any artifacts for the associated workflow`)}const C=p.value.find((i=>i.name===A));if(!C){throw new Error(`Unable to find an artifact with the name: ${A}`)}const f=yield E.getContainerItems(C.name,C.fileContainerResourceUrl);if(!i){i=(0,k.getWorkSpaceDirectory)()}i=(0,S.normalize)(i);i=(0,S.resolve)(i);const B=(0,R.getDownloadSpecification)(A,f.value,i,(g===null||g===void 0?void 0:g.createArtifactFolder)||false);if(B.filesToDownload.length===0){Q.info(`No downloadable files were found for the artifact: ${C.name}`)}else{yield(0,y.createDirectoriesForArtifact)(B.directoryStructure);Q.info("Directory structure has been set up for the artifact");yield(0,y.createEmptyFilesForArtifact)(B.emptyFilesToCreate);yield E.downloadSingleArtifact(B.filesToDownload)}return{artifactName:A,downloadPath:B.rootDownloadLocation}}))}downloadAllArtifacts(A){return f(this,void 0,void 0,(function*(){const i=new D.DownloadHttpClient;const g=[];const E=yield i.listArtifacts();if(E.count===0){Q.info("Unable to find any artifacts for the associated workflow");return g}if(!A){A=(0,k.getWorkSpaceDirectory)()}A=(0,S.normalize)(A);A=(0,S.resolve)(A);let p=0;while(p<E.count){const C=E.value[p];p+=1;Q.info(`starting download of artifact ${C.name} : ${p}/${E.count}`);const f=yield i.getContainerItems(C.name,C.fileContainerResourceUrl);const B=(0,R.getDownloadSpecification)(C.name,f.value,A,true);if(B.filesToDownload.length===0){Q.inLine truncated
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */;const escape=A=>A.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22");const normalizeLinefeeds=A=>A.replace(/\r?\n|\r/g,"\r\n");const E=[];const p=new Uint8Array([13,10]);b=0;let C=false;for(const[i,f]of A){if(typeof f==="string"){const A=P.encode(g+`; name="${escape(normalizeLinefeeds(i))}"`+`\r\n\r\n${normalizeLinefeeds(f)}\r\n`);E.push(A);b+=A.byteLength}else{const A=P.encode(`${g}; name="${escape(normalizeLinefeeds(i))}"`+(f.name?`; filename="${escape(f.name)}"`:"")+"\r\n"+`Content-Type: ${f.type||"application/octet-stream"}\r\n\r\n`);E.push(A,f,p);if(typeof f.size==="number"){b+=A.byteLength+f.size+p.byteLength}else{C=true}}}const f=P.encode(`--${i}--`);E.push(f);b+=f.byteLength;if(C){b=null}y=A;I=async function*(){for(const A of E){if(A.stream){yield*A.stream()}else{yield A}}};D="multipart/form-data; boundary="+i}else if(f(A)){y=A;b=A.size;if(A.type){D=A.type}}else if(typeof A[Symbol.asyncIterator]==="function"){if(i){throw new TypeError("keepalive")}if(p.isDisturbed(A)||A.locked){throw new TypeError("Response body object should not be disturbed or locked")}E=A instanceof _?A:C(A)}if(typeof y==="string"||p.isBuffer(y)){b=Buffer.byteLength(y)}if(I!=null){let i;E=new _({async start(){i=I(A)[Symbol.asyncIterator]()},async pull(A){const{value:g,done:p}=await i.next();if(p){queueMicrotask((()=>{A.close()}))}else{if(!L(E)){A.enqueue(new Uint8Array(g))}}return A.desiredSize>0},async cancel(A){await i.return()},type:undefined})}const R={stream:E,source:y,length:b};return[R,D]}function safelyExtractBody(A,i=false){if(!_){_=g(3774).ReadableStream}if(A instanceof _){U(!p.isDisturbed(A),"The body has already been consumed.");U(!A.locked,"The stream is locked.")}return extractBody(A,i)}function cloneBody(A){const[i,g]=A.stream.tee();const E=S(g,{transfer:[g]});const[,p]=E.tee();A.stream=i;return{stream:p,length:A.length,source:A.source}}async function*consumeBody(A){if(A){if(M(A)){yield A}else{const i=A.stream;if(p.isDisturbed(i)){throw new TypeError("The body has already been consumed.")}if(i.locked){throw new TypeError("The stream is locked.")}i[x]=true;yield*i}}}function throwIfAborted(A){if(A.aborted){throw new k("The operation was aborted.","AbortError")}}function bodyMixinMethods(A){const i={blob(){return specConsumeBody(this,(A=>{let i=bodyMimeType(this);if(i==="failure"){i=""}else if(i){i=Y(i)}return new v([A],{type:i})}),A)},arrayBuffer(){return specConsumeBody(this,(A=>new Uint8Array(A).buffer),A)},text(){return specConsumeBody(this,utf8DecodeBytes,A)},json(){return specConsumeBody(this,parseJSONFromBytes,A)},async formData(){R.brandCheck(this,A);throwIfAborted(this[D]);const i=this.headers.get("Content-Type");if(/multipart\/form-data/.test(i)){const A={};for(const[i,g]of this.headers)A[i.toLowerCase()]=g;const i=new b;let g;try{g=new E({headers:A,preservePath:true})}catch(A){throw new k(`${A}`,"AbortError")}g.on("field",((A,g)=>{i.append(A,g)}));g.on("file",((A,g,E,p,C)=>{const f=[];if(p==="base64"||p.toLowerCase()==="base64"){let p="";g.on("data",(A=>{p+=A.toString().replace(/[\r\n]/gm,"");const i=p.length-p.length%4;f.push(Buffer.from(p.slice(0,i),"base64"));p=p.slice(i)}));g.on("end",(()=>{f.push(Buffer.from(p,"base64"));i.append(A,new V(f,E,{type:C}))}))}else{g.on("data",(A=>{f.push(A)}));g.on("end",(()=>{i.append(A,new V(f,E,{type:C}))}))}}));const p=new Promise(((A,i)=>{g.on("finish",A);g.on("error",(A=>i(new TypeError(A))))}));if(this.body!==null)for await(const A of consumeBody(this[D].body))g.write(A);g.end();await p;return i}else if(/application\/x-www-form-urlencoded/.test(i)){let A;try{let i="";const g=new TextDecoder("utf-8",{ignoreBOM:true});for await(const A of consumeBody(this[D].body)){if(!M(A)){throw new TypeError("Expected Uint8Array chunk")}i+=g.decode(A,{stream:true})}i+=g.decode();A=new URLSearchParams(i)}catch(A){throw Object.assign(new TypeError,{cause:A})}const i=new b;for(const[g,E]of A){i.append(g,E)}return i}else{await Promise.resolve();throwIfAborted(this[D]);throw R.errors.exception({header:`${A.name}.formData`,message:"Could not parse content as FormData."})}}};return i}function mixinBody(A){Object.assign(A.prototype,bodyMixinMethods(A))}async function specConsumeBody(A,i,g){R.brandCheck(A,g);throwIfAborted(A[D]);if(bodyUnusable(A[D].body)){throw new TypeError("Body is unusable")}const E=I();const errorSteps=A=>E.reject(A);const successSteps=A=>{try{E.resolve(i(A))}catch(A){errorSteps(A)}};if(A[D].body==null){successSteps(new Uint8Array);return E.promise}await y(A[D].body,successSteps,errorSteps);return E.promise}function bodyUnusable(A){return A!=null&&(A.stream.locked||p.isDisturbed(A.stream))}function utf8DecodeBytes(A){if(A.length===0){return""}if(A[0]===239&&A[1]===187&&A[2]===191){A=A.subarray(3)}const i=j.decode(A);return i}function parseJSONFromBytes(A){return JSON.parse(utf8DecodeBytes(A))}function bodyMimeType(A){const{headersList:i}=A[D];const g=i.get("content-Line truncated
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */C[p-4]=this.maskKey[0];C[p-3]=this.maskKey[1];C[p-2]=this.maskKey[2];C[p-1]=this.maskKey[3];C[1]=g;if(g===126){C.writeUInt16BE(i,2)}else if(g===127){C[2]=C[3]=0;C.writeUIntBE(i,4,6)}C[1]|=128;for(let A=0;A<i;A++){C[p+A]=this.frameData[A]^this.maskKey[A%4]}return C}}A.exports={WebsocketFrameSend:WebsocketFrameSend}},5553:(A,i,g)=>{const{Writable:E}=g(2203);const p=g(1637);const{parserStates:C,opcodes:f,states:Q,emptyBuffer:B}=g(1859);const{kReadyState:I,kSentClose:y,kResponse:b,kReceivedClose:D}=g(5199);const{isValidStatusCode:R,failWebsocketConnection:k,websocketMessageReceived:S}=g(4604);const{WebsocketFrameSend:v}=g(231);const F={};F.ping=p.channel("undici:websocket:ping");F.pong=p.channel("undici:websocket:pong");class ByteParser extends E{#n=[];#o=0;#a=C.INFO;#c={};#l=[];constructor(A){super();this.ws=A}_write(A,i,g){this.#n.push(A);this.#o+=A.length;this.run(g)}run(A){while(true){if(this.#a===C.INFO){if(this.#o<2){return A()}const i=this.consume(2);this.#c.fin=(i[0]&128)!==0;this.#c.opcode=i[0]&15;this.#c.originalOpcode??=this.#c.opcode;this.#c.fragmented=!this.#c.fin&&this.#c.opcode!==f.CONTINUATION;if(this.#c.fragmented&&this.#c.opcode!==f.BINARY&&this.#c.opcode!==f.TEXT){k(this.ws,"Invalid frame type was fragmented.");return}const g=i[1]&127;if(g<=125){this.#c.payloadLength=g;this.#a=C.READ_DATA}else if(g===126){this.#a=C.PAYLOADLENGTH_16}else if(g===127){this.#a=C.PAYLOADLENGTH_64}if(this.#c.fragmented&&g>125){k(this.ws,"Fragmented frame exceeded 125 bytes.");return}else if((this.#c.opcode===f.PING||this.#c.opcode===f.PONG||this.#c.opcode===f.CLOSE)&&g>125){k(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#c.opcode===f.CLOSE){if(g===1){k(this.ws,"Received close frame with a 1-byte body.");return}const A=this.consume(g);this.#c.closeInfo=this.parseCloseBody(false,A);if(!this.ws[y]){const A=Buffer.allocUnsafe(2);A.writeUInt16BE(this.#c.closeInfo.code,0);const i=new v(A);this.ws[b].socket.write(i.createFrame(f.CLOSE),(A=>{if(!A){this.ws[y]=true}}))}this.ws[I]=Q.CLOSING;this.ws[D]=true;this.end();return}else if(this.#c.opcode===f.PING){const i=this.consume(g);if(!this.ws[D]){const A=new v(i);this.ws[b].socket.write(A.createFrame(f.PONG));if(F.ping.hasSubscribers){F.ping.publish({payload:i})}}this.#a=C.INFO;if(this.#o>0){continue}else{A();return}}else if(this.#c.opcode===f.PONG){const i=this.consume(g);if(F.pong.hasSubscribers){F.pong.publish({payload:i})}if(this.#o>0){continue}else{A();return}}}else if(this.#a===C.PAYLOADLENGTH_16){if(this.#o<2){return A()}const i=this.consume(2);this.#c.payloadLength=i.readUInt16BE(0);this.#a=C.READ_DATA}else if(this.#a===C.PAYLOADLENGTH_64){if(this.#o<8){return A()}const i=this.consume(8);const g=i.readUInt32BE(0);if(g>2**31-1){k(this.ws,"Received payload length > 2^31 bytes.");return}const E=i.readUInt32BE(4);this.#c.payloadLength=(g<<8)+E;this.#a=C.READ_DATA}else if(this.#a===C.READ_DATA){if(this.#o<this.#c.payloadLength){return A()}else if(this.#o>=this.#c.payloadLength){const A=this.consume(this.#c.payloadLength);this.#l.push(A);if(!this.#c.fragmented||this.#c.fin&&this.#c.opcode===f.CONTINUATION){const A=Buffer.concat(this.#l);S(this.ws,this.#c.originalOpcode,A);this.#c={};this.#l.length=0}this.#a=C.INFO}}if(this.#o>0){continue}else{A();break}}}consume(A){if(A>this.#o){return null}else if(A===0){return B}if(this.#n[0].length===A){this.#o-=this.#n[0].length;return this.#n.shift()}const i=Buffer.allocUnsafe(A);let g=0;while(g!==A){const E=this.#n[0];const{length:p}=E;if(p+g===A){i.set(this.#n.shift(),g);break}else if(p+g>A){i.set(E.subarray(0,A-g),g);this.#n[0]=E.subarray(A-g);break}else{i.set(this.#n.shift(),g);g+=E.length}}this.#o-=A;return i}parseCloseBody(A,i){let g;if(i.length>=2){g=i.readUInt16BE(0)}if(A){if(!R(g)){return null}return{code:g}}let E=i.subarray(2);if(E[0]===239&&E[1]===187&&E[2]===191){E=E.subarray(3)}if(g!==undefined&&!R(g)){return null}try{E=new TextDecoder("utf-8",{fatal:true}).decode(E)}catch{return null}return{code:g,reason:E}}get closingInfo(){return this.#c.closeInfo}}A.exports={ByteParser:ByteParser}},5199:A=>{A.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")}},4604:(A,i,g)=>{const{kReadyState:E,kController:p,kResponse:C,kBinaryType:f,kWebSocketURL:Q}=g(5199);const{states:B,opcodes:I}=g(1859);const{MessageEvent:y,ErrorEvent:b}=g(3273);function isEstablished(A){return A[E]===B.OPEN}function isClosing(A){return A[E]===B.CLOSING}function isClosed(A){return A[E]===B.CLOSED}function fireEvent(A,i,g=Event,E){const p=new g(A,E);i.dispatchEvent(p)}function websocketMessageReceived(A,i,g){if(A[E]!==B.OPEN){return}let p;if(i===I.TEXT){try{p=new TextDecoder("utf-8",{fatal:true}).decode(g)}catch{failWebsocketConnection(A,"ReceivLine truncated
import{createRequire as A}from"module";var i={7038:(A,i,g)=>{var E;E={value:true};i.v=void 0;const p=g(918);function create(){return p.DefaultArtifactClient.create()}i.v=create},918:function(A,i,g){var E=this&&this.__createBinding||(Object.create?function(A,i,g,E){if(E===undefined)E=g;var p=Object.getOwnPropertyDescriptor(i,g);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[g]}}}Object.defineProperty(A,E,p)}:function(A,i,g,E){if(E===undefined)E=g;A[E]=i[g]});var p=this&&this.__setModuleDefault||(Object.create?function(A,i){Object.defineProperty(A,"default",{enumerable:true,value:i})}:function(A,i){A["default"]=i});var C=this&&this.__importStar||function(A){if(A&&A.__esModule)return A;var i={};if(A!=null)for(var g in A)if(g!=="default"&&Object.prototype.hasOwnProperty.call(A,g))E(i,A,g);p(i,A);return i};var f=this&&this.__awaiter||function(A,i,g,E){function adopt(A){return A instanceof g?A:new g(function(i){i(A)})}return new(g||(g=Promise))(function(g,p){function fulfilled(A){try{step(E.next(A))}catch(A){p(A)}}function rejected(A){try{step(E["throw"](A))}catch(A){p(A)}}function step(A){A.done?g(A.value):adopt(A.value).then(fulfilled,rejected)}step((E=E.apply(A,i||[])).next())})};Object.defineProperty(i,"__esModule",{value:true});i.DefaultArtifactClient=void 0;const Q=C(g(9910));const B=g(9367);const I=g(8950);const y=g(2669);const b=g(9400);const D=g(3439);const R=g(3886);const k=g(1124);const S=g(6928);class DefaultArtifactClient{static create(){return new DefaultArtifactClient}uploadArtifact(A,i,g,E){return f(this,void 0,void 0,function*(){Q.info(`Starting artifact upload\nFor more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`);(0,b.checkArtifactName)(A);const p=(0,B.getUploadSpecification)(A,g,i);const C={artifactName:A,artifactItems:[],size:0,failedItems:[]};const f=new I.UploadHttpClient;if(p.length===0){Q.warning(`No files found that can be uploaded`)}else{const i=yield f.createArtifactInFileContainer(A,E);if(!i.fileContainerResourceUrl){Q.debug(i.toString());throw new Error("No URL provided by the Artifact Service to upload an artifact to")}Q.debug(`Upload Resource URL: ${i.fileContainerResourceUrl}`);Q.info(`Container for artifact "${A}" successfully created. Starting upload of file(s)`);const g=yield f.uploadArtifactToFileContainer(i.fileContainerResourceUrl,p,E);Q.info(`File upload process has finished. Finalizing the artifact upload`);yield f.patchArtifactSize(g.totalSize,A);if(g.failedItems.length>0){Q.info(`Upload finished. There were ${g.failedItems.length} items that failed to upload`)}else{Q.info(`Artifact has been finalized. All files have been successfully uploaded!`)}Q.info(`\nThe raw size of all the files that were specified for upload is ${g.totalSize} bytes\nThe size of all the files that were uploaded is ${g.uploadSize} bytes. This takes into account any gzip compression used to reduce the upload size, time and storage\n\nNote: The size of downloaded zips can differ significantly from the reported size. For more information see: https://github.com/actions/upload-artifact#zipped-artifact-downloads \r\n`);C.artifactItems=p.map(A=>A.absoluteFilePath);C.size=g.uploadSize;C.failedItems=g.failedItems}return C})}downloadArtifact(A,i,g){return f(this,void 0,void 0,function*(){const E=new D.DownloadHttpClient;const p=yield E.listArtifacts();if(p.count===0){throw new Error(`Unable to find any artifacts for the associated workflow`)}const C=p.value.find(i=>i.name===A);if(!C){throw new Error(`Unable to find an artifact with the name: ${A}`)}const f=yield E.getContainerItems(C.name,C.fileContainerResourceUrl);if(!i){i=(0,k.getWorkSpaceDirectory)()}i=(0,S.normalize)(i);i=(0,S.resolve)(i);const B=(0,R.getDownloadSpecification)(A,f.value,i,(g===null||g===void 0?void 0:g.createArtifactFolder)||false);if(B.filesToDownload.length===0){Q.info(`No downloadable files were found for the artifact: ${C.name}`)}else{yield(0,y.createDirectoriesForArtifact)(B.directoryStructure);Q.info("Directory structure has been set up for the artifact");yield(0,y.createEmptyFilesForArtifact)(B.emptyFilesToCreate);yield E.downloadSingleArtifact(B.filesToDownload)}return{artifactName:A,downloadPath:B.rootDownloadLocation}})}downloadAllArtifacts(A){return f(this,void 0,void 0,function*(){const i=new D.DownloadHttpClient;const g=[];const E=yield i.listArtifacts();if(E.count===0){Q.info("Unable to find any artifacts for the associated workflow");return g}if(!A){A=(0,k.getWorkSpaceDirectory)()}A=(0,S.normalize)(A);A=(0,S.resolve)(A);let p=0;while(p<E.count){const C=E.value[p];p+=1;Q.info(`starting download of artifact ${C.name} : ${p}/${E.count}`);const f=yield i.getContainerItems(C.name,C.fileContainerResourceUrl);const B=(0,R.getDownloadSpecification)(C.name,f.value,A,true);if(B.filesToDownload.length===0){Q.info(`No downloa Line truncated
/*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015-2022 Douglas Christopher Wilson
* MIT Licensed
*/
A.exports=g(1813)},4096:(A,i,g)=>{
A.exports=g(7080)},3674:(A,i,g)=>{
/*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
var E=g(9829);var p=g(6928).extname;var C=/^\s*([^;\s]*)(?:;|\s|$)/;var f=/^text\//i;i.charset=charset;i.charsets={lookup:charset};i.contentType=contentType;i.extension=extension;i.extensions=Object.create(null);i.lookup=lookup;i.types=Object.create(null);populateMaps(i.extensions,i.types);function charset(A){if(!A||typeof A!=="string"){return false}var i=C.exec(A);var g=i&&E[i[1].toLowerCase()];if(g&&g.charset){return g.charset}if(i&&f.test(i[1])){return"UTF-8"}return false}function contentType(A){if(!A||typeof A!=="string"){return false}var g=A.indexOf("/")===-1?i.lookup(A):A;if(!g){return false}if(g.indexOf("charset")===-1){var E=i.charset(g);if(E)g+="; charset="+E.toLowerCase()}return g}function extension(A){if(!A||typeof A!=="string"){return false}var g=C.exec(A);var E=g&&i.extensions[g[1].toLowerCase()];if(!E||!E.length){return false}return E[0]}function lookup(A){if(!A||typeof A!=="string"){return false}var g=p("x."+A).toLowerCase().substr(1);if(!g){return false}return i.types[g]||false}function populateMaps(A,i){var g=["nginx","apache",undefined,"iana"];Object.keys(E).forEach((function forEachMimeType(p){var C=E[p];var f=C.extensions;if(!f||!f.length){return}A[p]=f;for(var Q=0;Q<f.length;Q++){var B=f[Q];if(i[B]){var I=g.indexOf(E[i[B]].source);var y=g.indexOf(C.source);if(i[B]!=="application/octet-stream"&&(I>y||I===y&&i[B].substr(0,12)==="application/")){continue}}i[B]=p}}))}},744:A=>{var i=1e3;var g=i*60;var E=g*60;var p=E*24;var C=p*7;var f=p*365.25;A.exports=function(A,i){i=i||{};var g=typeof A;if(g==="string"&&A.length>0){return parse(A)}else if(g==="number"&&isFinite(A)){return i.long?fmtLong(A):fmtShort(A)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(A))};function parse(A){A=String(A);if(A.length>100){return}var Q=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(A);if(!Q){return}var B=parseFloat(Q[1]);var I=(Q[2]||"ms").toLowerCase();switch(I){case"years":case"year":case"yrs":case"yr":case"y":return B*f;case"weeks":case"week":case"w":return B*C;case"days":case"day":case"d":return B*p;case"hours":case"hour":case"hrs":case"hr":case"h":return B*E;case"minutes":case"minute":case"mins":case"min":case"m":return B*g;case"seconds":case"second":case"secs":case"sec":case"s":return B*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return B;default:return undefined}}function fmtShort(A){var C=Math.abs(A);if(C>=p){return Math.round(A/p)+"d"}if(C>=E){return Math.round(A/E)+"h"}if(C>=g){return Math.round(A/g)+"m"}if(C>=i){return Math.round(A/i)+"s"}return A+"ms"}function fmtLong(A){var C=Math.abs(A);if(C>=p){return plural(A,C,p,"day")}if(C>=E){return plural(A,C,E,"hour")}if(C>=g){return plural(A,C,g,"minute")}if(C>=i){return plural(A,C,i,"second")}return A+" ms"}function plural(A,i,g,E){var p=i>=g*1.5;return Math.round(A/g)+" "+E+(p?"s":"")}},7777:(A,i,g)=>{var E=g(7016).parse;var p={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};var C=String.prototype.endsWith||function(A){return A.length<=this.length&&this.indexOf(A,this.length-A.length)!==-1};function getProxyForUrl(A){var i=typeof A==="string"?E(A):A||{};var g=i.protocol;var C=i.host;var f=i.port;if(typeof C!=="string"||!C||typeof g!=="string"){return""}g=g.split(":",1)[0];C=C.replace(/:\d*$/,"");f=parseInt(f)||p[g]||0;if(!shouldProxy(C,f)){return""}var Q=getEnv("npm_config_"+g+"_proxy")||getEnv(g+"_proxy")||getEnv("npm_config_proxy")||getEnv("all_proxy");if(Q&&Q.indexOf("://")===-1){Q=g+"://"+Q}return Q}function shouldProxy(A,i){var g=(getEnv("npm_config_no_proxy")||getEnv("no_proxy")).toLowerCase();if(!g){return true}if(g==="*"){return false}return g.split(/[,\s]/).every((function(g){if(!g){return true}var E=g.match(/^(.+):(\d+)$/);var p=E?E[1]:g;var f=E?parseInt(E[2]):0;if(f&&f!==i){return true}if(!/^[.*]/.test(p)){return A!==p}if(p.charAt(0)==="*"){p=p.slice(1)}return!C.call(A,p)}))}function getEnv(A){return process.env[A.toLowerCase()]||process.env[A.toUpperCase()]||""}i.T=getProxyForUrl},9546:(A,i,g)=>{var E;E={value:true};const p=g(1354);const C=g(7016);const f=g(4434);const Q=g(2830);const B=g(3106);const I=g(4922);const y=g(9023);const b=g(9896);const D=g(9557);const R=g(6928);function _interopDefaultLegacy(A){return A&&typeof A==="object"&&"default"in A?A:{default:A}}const k=_interopDefaultLegacy(p);const S=_interopDefaultLegacy(C);const v=_interopDefaultLegacy(Q);const F=_interopDefaultLegacy(B);const x=_interopDefaultLegacy(I);const U=_interopDefaultLegacy(y);const L=_interopDefaultLegacy(b);const M=_interopDefaultLegacy(D);const T=_interopDefaultLegacy(R);const H=v["default"]("screepsapi:socket");const G={reconnect:true,resubscribe:true,keepAlive:true,maxRetries:10,maxRetryDelay:60*1e3};class Socket extends f.EventEmitter{constructor(A){super();this.api=A;this.opts=Object.assign({},G);this.on("error",(()=>{}));this.reset();this.on("auth",(A=>{if(A.data.status==="ok"){while(this.__queue.lLine truncated
var E=g(8975);var p=g(6928).extname;var C=/^\s*([^;\s]*)(?:;|\s|$)/;var f=/^text\//i;i.charset=charset;i.charsets={lookup:charset};i.contentType=contentType;i.extension=extension;i.extensions=Object.create(null);i.lookup=lookup;i.types=Object.create(null);populateMaps(i.extensions,i.types);function charset(A){if(!A||typeof A!=="string"){return false}var i=C.exec(A);var g=i&&E[i[1].toLowerCase()];if(g&&g.charset){return g.charset}if(i&&f.test(i[1])){return"UTF-8"}return false}function contentType(A){if(!A||typeof A!=="string"){return false}var g=A.indexOf("/")===-1?i.lookup(A):A;if(!g){return false}if(g.indexOf("charset")===-1){var E=i.charset(g);if(E)g+="; charset="+E.toLowerCase()}return g}function extension(A){if(!A||typeof A!=="string"){return false}var g=C.exec(A);var E=g&&i.extensions[g[1].toLowerCase()];if(!E||!E.length){return false}return E[0]}function lookup(A){if(!A||typeof A!=="string"){return false}var g=p("x."+A).toLowerCase().substr(1);if(!g){return false}return i.types[g]||false}function populateMaps(A,i){var g=["nginx","apache",undefined,"iana"];Object.keys(E).forEach(function forEachMimeType(p){var C=E[p];var f=C.extensions;if(!f||!f.length){return}A[p]=f;for(var Q=0;Q<f.length;Q++){var B=f[Q];if(i[B]){var I=g.indexOf(E[i[B]].source);var y=g.indexOf(C.source);if(i[B]!=="application/octet-stream"&&(I>y||I===y&&i[B].substr(0,12)==="application/")){continue}}i[B]=p}})}},4023:A=>{var i=1e3;var g=i*60;var E=g*60;var p=E*24;var C=p*7;var f=p*365.25;A.exports=function(A,i){i=i||{};var g=typeof A;if(g==="string"&&A.length>0){return parse(A)}else if(g==="number"&&isFinite(A)){return i.long?fmtLong(A):fmtShort(A)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(A))};function parse(A){A=String(A);if(A.length>100){return}var Q=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(A);if(!Q){return}var B=parseFloat(Q[1]);var I=(Q[2]||"ms").toLowerCase();switch(I){case"years":case"year":case"yrs":case"yr":case"y":return B*f;case"weeks":case"week":case"w":return B*C;case"days":case"day":case"d":return B*p;case"hours":case"hour":case"hrs":case"hr":case"h":return B*E;case"minutes":case"minute":case"mins":case"min":case"m":return B*g;case"seconds":case"second":case"secs":case"sec":case"s":return B*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return B;default:return undefined}}function fmtShort(A){var C=Math.abs(A);if(C>=p){return Math.round(A/p)+"d"}if(C>=E){return Math.round(A/E)+"h"}if(C>=g){return Math.round(A/g)+"m"}if(C>=i){return Math.round(A/i)+"s"}return A+"ms"}function fmtLong(A){var C=Math.abs(A);if(C>=p){return plural(A,C,p,"day")}if(C>=E){return plural(A,C,E,"hour")}if(C>=g){return plural(A,C,g,"minute")}if(C>=i){return plural(A,C,i,"second")}return A+" ms"}function plural(A,i,g,E){var p=i>=g*1.5;return Math.round(A/g)+" "+E+(p?"s":"")}},4147:(A,i,g)=>{var E=g(7016).parse;var p={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};var C=String.prototype.endsWith||function(A){return A.length<=this.length&&this.indexOf(A,this.length-A.length)!==-1};function getProxyForUrl(A){var i=typeof A==="string"?E(A):A||{};var g=i.protocol;var C=i.host;var f=i.port;if(typeof C!=="string"||!C||typeof g!=="string"){return""}g=g.split(":",1)[0];C=C.replace(/:\d*$/,"");f=parseInt(f)||p[g]||0;if(!shouldProxy(C,f)){return""}var Q=getEnv("npm_config_"+g+"_proxy")||getEnv(g+"_proxy")||getEnv("npm_config_proxy")||getEnv("all_proxy");if(Q&&Q.indexOf("://")===-1){Q=g+"://"+Q}return Q}function shouldProxy(A,i){var g=(getEnv("npm_config_no_proxy")||getEnv("no_proxy")).toLowerCase();if(!g){return true}if(g==="*"){return false}return g.split(/[,\s]/).every(function(g){if(!g){return true}var E=g.match(/^(.+):(\d+)$/);var p=E?E[1]:g;var f=E?parseInt(E[2]):0;if(f&&f!==i){return true}if(!/^[.*]/.test(p)){return A!==p}if(p.charAt(0)==="*"){p=p.slice(1)}return!C.call(A,p)})}function getEnv(A){return process.env[A.toLowerCase()]||process.env[A.toUpperCase()]||""}i.T=getProxyForUrl},4398:(A,i,g)=>{var E;E={value:true};const p=g(9105);const C=g(7016);const f=g(4434);const Q=g(1141);const B=g(3106);const I=g(6550);const y=g(9023);const b=g(9896);const D=g(7967);const R=g(6928);function _interopDefaultLegacy(A){return A&&typeof A==="object"&&"default"in A?A:{default:A}}const k=_interopDefaultLegacy(p);const S=_interopDefaultLegacy(C);const v=_interopDefaultLegacy(Q);const F=_interopDefaultLegacy(B);const x=_interopDefaultLegacy(I);const U=_interopDefaultLegacy(y);const L=_interopDefaultLegacy(b);const M=_interopDefaultLegacy(D);const T=_interopDefaultLegacy(R);const H=v["default"]("screepsapi:socket");const G={reconnect:true,resubscribe:true,keepAlive:true,maxRetries:10,maxRetryDelay:60*1e3};class Socket extends f.EventEmitter{constructor(A){super();this.api=A;this.opts=Object.assign({},G);this.on("error",()=>{});this.reset();this.on("auth",A=>{if(A.data.status==="ok"){while(this.__queue.length)Line truncated
/*!
* Tmp
*
@@ -22,6 +20,8 @@ var E=g(9829);var p=g(6928).extname;var C=/^\s*([^;\s]*)(?:;|\s|$)/;var f=/^text
*
* MIT Licensed
*/
const E=g(9896);const p=g(857);const C=g(6928);const f=g(6982);const Q={fs:E.constants,os:p.constants};const B="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",I=/XXXXXX/,y=3,b=(Q.O_CREAT||Q.fs.O_CREAT)|(Q.O_EXCL||Q.fs.O_EXCL)|(Q.O_RDWR||Q.fs.O_RDWR),D=p.platform()==="win32",R=Q.EBADF||Q.os.errno.EBADF,k=Q.ENOENT||Q.os.errno.ENOENT,S=448,v=384,F="exit",x=[],U=E.rmdirSync.bind(E);let L=false;function rimraf(A,i){return E.rm(A,{recursive:true},i)}function FN_RIMRAF_SYNC(A){return E.rmSync(A,{recursive:true})}function tmpName(A,i){const g=_parseArguments(A,i),p=g[0],C=g[1];_assertAndSanitizeOptions(p,(function(A,i){if(A)return C(A);let g=i.tries;(function _getUniqueName(){try{const A=_generateTmpName(i);E.stat(A,(function(i){if(!i){if(g-- >0)return _getUniqueName();return C(new Error("Could not get a unique tmp filename, max tries reached "+A))}C(null,A)}))}catch(A){C(A)}})()}))}function tmpNameSync(A){const i=_parseArguments(A),g=i[0];const p=_assertAndSanitizeOptionsSync(g);let C=p.tries;do{const A=_generateTmpName(p);try{E.statSync(A)}catch(i){return A}}while(C-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function file(A,i){const g=_parseArguments(A,i),p=g[0],C=g[1];tmpName(p,(function _tmpNameCreated(A,i){if(A)return C(A);E.open(i,b,p.mode||v,(function _fileCreated(A,g){if(A)return C(A);if(p.discardDescriptor){return E.close(g,(function _discardCallback(A){return C(A,i,undefined,_prepareTmpFileRemoveCallback(i,-1,p,false))}))}else{const A=p.discardDescriptor||p.detachDescriptor;C(null,i,g,_prepareTmpFileRemoveCallback(i,A?-1:g,p,false))}}))}))}function fileSync(A){const i=_parseArguments(A),g=i[0];const p=g.discardDescriptor||g.detachDescriptor;const C=tmpNameSync(g);let f=E.openSync(C,b,g.mode||v);if(g.discardDescriptor){E.closeSync(f);f=undefined}return{name:C,fd:f,removeCallback:_prepareTmpFileRemoveCallback(C,p?-1:f,g,true)}}function dir(A,i){const g=_parseArguments(A,i),p=g[0],C=g[1];tmpName(p,(function _tmpNameCreated(A,i){if(A)return C(A);E.mkdir(i,p.mode||S,(function _dirCreated(A){if(A)return C(A);C(null,i,_prepareTmpDirRemoveCallback(i,p,false))}))}))}function dirSync(A){const i=_parseArguments(A),g=i[0];const p=tmpNameSync(g);E.mkdirSync(p,g.mode||S);return{name:p,removeCallback:_prepareTmpDirRemoveCallback(p,g,true)}}function _removeFileAsync(A,i){const _handler=function(A){if(A&&!_isENOENT(A)){return i(A)}i()};if(0<=A[0])E.close(A[0],(function(){E.unlink(A[1],_handler)}));else E.unlink(A[1],_handler)}function _removeFileSync(A){let i=null;try{if(0<=A[0])E.closeSync(A[0])}catch(A){if(!_isEBADF(A)&&!_isENOENT(A))throw A}finally{try{E.unlinkSync(A[1])}catch(A){if(!_isENOENT(A))i=A}}if(i!==null){throw i}}function _prepareTmpFileRemoveCallback(A,i,g,E){const p=_prepareRemoveCallback(_removeFileSync,[i,A],E);const C=_prepareRemoveCallback(_removeFileAsync,[i,A],E,p);if(!g.keep)x.unshift(p);return E?p:C}function _prepareTmpDirRemoveCallback(A,i,g){const p=i.unsafeCleanup?rimraf:E.rmdir.bind(E);const C=i.unsafeCleanup?FN_RIMRAF_SYNC:U;const f=_prepareRemoveCallback(C,A,g);const Q=_prepareRemoveCallback(p,A,g,f);if(!i.keep)x.unshift(f);return g?f:Q}function _prepareRemoveCallback(A,i,g,E){let p=false;return function _cleanupCallback(C){if(!p){const f=E||_cleanupCallback;const Q=x.indexOf(f);if(Q>=0)x.splice(Q,1);p=true;if(g||A===U||A===FN_RIMRAF_SYNC){return A(i)}else{return A(i,C||function(){})}}}}function _garbageCollector(){if(!L)return;while(x.length){try{x[0]()}catch(A){}}}function _randomChars(A){let i=[],g=null;try{g=f.randomBytes(A)}catch(i){g=f.pseudoRandomBytes(A)}for(let E=0;E<A;E++){i.push(B[g[E]%B.length])}return i.join("")}function _isUndefined(A){return typeof A==="undefined"}function _parseArguments(A,i){if(typeof A==="function"){return[{},A]}if(_isUndefined(A)){return[{},i]}const g={};for(const i of Object.getOwnPropertyNames(A)){g[i]=A[i]}return[g,i]}function _resolvePath(A,i,g){const p=C.isAbsolute(A)?A:C.join(i,A);E.stat(p,(function(A){if(A){E.realpath(C.dirname(p),(function(A,i){if(A)return g(A);g(null,C.join(i,C.basename(p)))}))}else{E.realpath(p,g)}}))}function _resolvePathSync(A,i){const g=C.isAbsolute(A)?A:C.join(i,A);try{E.statSync(g);return E.realpathSync(g)}catch(A){const i=E.realpathSync(C.dirname(g));return C.join(i,C.basename(g))}}function _generateTmpName(A){const i=A.tmpdir;if(!_isUndefined(A.name)){return C.join(i,A.dir,A.name)}if(!_isUndefined(A.template)){return C.join(i,A.dir,A.template).replace(I,_randomChars(6))}const g=[A.prefix?A.prefix:"tmp","-",process.pid,"-",_randomChars(12),A.postfix?"-"+A.postfix:""].join("");return C.join(i,A.dir,g)}function _assertOptionsBase(A){if(!_isUndefined(A.name)){const i=A.name;if(C.isAbsolute(i))throw new Error(`name option must not contain an absolute path, found "${i}".`);const g=C.basename(i);if(g===".."||g==="."||g!==i)throw new Error(`name option must not contain a path, found "${i}".`)}if(!_isUndefined(A.template)&&!A.template.match(I)){throw new Error(`Invalid template, Line truncated
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */;const escape=A=>A.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22");const normalizeLinefeeds=A=>A.replace(/\r?\n|\r/g,"\r\n");const E=[];const p=new Uint8Array([13,10]);y=0;let C=false;for(const[i,f]of A){if(typeof f==="string"){const A=H.encode(g+`; name="${escape(normalizeLinefeeds(i))}"`+`\r\n\r\n${normalizeLinefeeds(f)}\r\n`);E.push(A);y+=A.byteLength}else{const A=H.encode(`${g}; name="${escape(normalizeLinefeeds(i))}"`+(f.name?`; filename="${escape(f.name)}"`:"")+"\r\n"+`Content-Type: ${f.type||"application/octet-stream"}\r\n\r\n`);E.push(A,f,p);if(typeof f.size==="number"){y+=A.byteLength+f.size+p.byteLength}else{C=true}}}const f=H.encode(`--${i}--\r\n`);E.push(f);y+=f.byteLength;if(C){y=null}I=A;B=async function*(){for(const A of E){if(A.stream){yield*A.stream()}else{yield A}}};b=`multipart/form-data; boundary=${i}`}else if(C(A)){I=A;y=A.size;if(A.type){b=A.type}}else if(typeof A[Symbol.asyncIterator]==="function"){if(i){throw new TypeError("keepalive")}if(E.isDisturbed(A)||A.locked){throw new TypeError("Response body object should not be disturbed or locked")}g=A instanceof ReadableStream?A:p(A)}if(typeof I==="string"||E.isBuffer(I)){y=Buffer.byteLength(I)}if(B!=null){let i;g=new ReadableStream({async start(){i=B(A)[Symbol.asyncIterator]()},async pull(A){const{value:E,done:p}=await i.next();if(p){queueMicrotask((()=>{A.close();A.byobRequest?.respond(0)}))}else{if(!F(g)){const i=new Uint8Array(E);if(i.byteLength){A.enqueue(i)}}}return A.desiredSize>0},async cancel(A){await i.return()},type:"bytes"})}const D={stream:g,source:I,length:y};return[D,b]}function safelyExtractBody(A,i=false){if(A instanceof ReadableStream){v(!E.isDisturbed(A),"The body has already been consumed.");v(!A.locked,"The stream is locked.")}return extractBody(A,i)}function cloneBody(A,i){const[g,E]=i.stream.tee();i.stream=g;return{stream:E,length:i.length,source:i.source}}function throwIfAborted(A){if(A.aborted){throw new DOMException("The operation was aborted.","AbortError")}}function bodyMixinMethods(A){const i={blob(){return consumeBody(this,(A=>{let i=bodyMimeType(this);if(i===null){i=""}else if(i){i=L(i)}return new S([A],{type:i})}),A)},arrayBuffer(){return consumeBody(this,(A=>new Uint8Array(A).buffer),A)},text(){return consumeBody(this,b,A)},json(){return consumeBody(this,parseJSONFromBytes,A)},formData(){return consumeBody(this,(A=>{const i=bodyMimeType(this);if(i!==null){switch(i.essence){case"multipart/form-data":{const g=M(A,i);if(g==="failure"){throw new TypeError("Failed to parse body as FormData.")}const E=new D;E[R]=g;return E}case"application/x-www-form-urlencoded":{const i=new URLSearchParams(A.toString());const g=new D;for(const[A,E]of i){g.append(A,E)}return g}}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')}),A)},bytes(){return consumeBody(this,(A=>new Uint8Array(A)),A)}};return i}function mixinBody(A){Object.assign(A.prototype,bodyMixinMethods(A))}async function consumeBody(A,i,g){k.brandCheck(A,g);if(bodyUnusable(A)){throw new TypeError("Body is unusable: Body has already been read")}throwIfAborted(A[R]);const E=B();const errorSteps=A=>E.reject(A);const successSteps=A=>{try{E.resolve(i(A))}catch(A){errorSteps(A)}};if(A[R].body==null){successSteps(Buffer.allocUnsafe(0));return E.promise}await I(A[R].body,successSteps,errorSteps);return E.promise}function bodyUnusable(A){const i=A[R].body;return i!=null&&(i.stream.locked||E.isDisturbed(i.stream))}function parseJSONFromBytes(A){return JSON.parse(b(A))}function bodyMimeType(A){const i=A[R].headersList;const g=y(i);if(g==="failure"){return null}return g}A.exports={extractBody:extractBody,safelyExtractBody:safelyExtractBody,cloneBody:cloneBody,mixinBody:mixinBody,streamRegistry:Y,hasFinalizationRegistry:G,bodyUnusable:bodyUnusable}},4495:A=>{const i=["GET","HEAD","POST"];const g=new Set(i);const E=[101,204,205,304];const p=[301,302,303,307,308];const C=new Set(p);const f=["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 Q=new Set(f);const B=["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"];const I=new Set(B);const y=["follow","manual","error"];const b=["GET","HEAD","OPTIONS","TRACE"];const D=new Set(b);const R=["navigate","same-origin","no-cors","cors"];const k=["omit","same-origin","include"];const S=["default","no-store","reload","no-cache","force-cLine truncated
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */Q[f-4]=g[0];Q[f-3]=g[1];Q[f-2]=g[2];Q[f-1]=g[3];Q[1]=C;if(C===126){Q.writeUInt16BE(p,2)}else if(C===127){Q[2]=Q[3]=0;Q.writeUIntBE(p,4,6)}Q[1]|=128;for(let A=0;A<p;++A){Q[f+A]=i[A]^g[A&3]}return Q}}A.exports={WebsocketFrameSend:WebsocketFrameSend}},9469:(A,i,g)=>{const{createInflateRaw:E,Z_DEFAULT_WINDOWBITS:p}=g(8522);const{isValidClientWindowBits:C}=g(8625);const f=Buffer.from([0,0,255,255]);const Q=Symbol("kBuffer");const B=Symbol("kLength");class PerMessageDeflate{#re;#S={};constructor(A){this.#S.serverNoContextTakeover=A.has("server_no_context_takeover");this.#S.serverMaxWindowBits=A.get("server_max_window_bits")}decompress(A,i,g){if(!this.#re){let A=p;if(this.#S.serverMaxWindowBits){if(!C(this.#S.serverMaxWindowBits)){g(new Error("Invalid server_max_window_bits"));return}A=Number.parseInt(this.#S.serverMaxWindowBits)}this.#re=E({windowBits:A});this.#re[Q]=[];this.#re[B]=0;this.#re.on("data",(A=>{this.#re[Q].push(A);this.#re[B]+=A.length}));this.#re.on("error",(A=>{this.#re=null;g(A)}))}this.#re.write(A);if(i){this.#re.write(f)}this.#re.flush((()=>{const A=Buffer.concat(this.#re[Q],this.#re[B]);this.#re[Q].length=0;this.#re[B]=0;g(null,A)}))}}A.exports={PerMessageDeflate:PerMessageDeflate}},1652:(A,i,g)=>{const{Writable:E}=g(7075);const p=g(4589);const{parserStates:C,opcodes:f,states:Q,emptyBuffer:B,sentCloseFrameState:I}=g(736);const{kReadyState:y,kSentClose:b,kResponse:D,kReceivedClose:R}=g(1216);const{channels:k}=g(2414);const{isValidStatusCode:S,isValidOpcode:v,failWebsocketConnection:F,websocketMessageReceived:x,utf8Decode:U,isControlFrame:L,isTextBinaryFrame:M,isContinuationFrame:T}=g(8625);const{WebsocketFrameSend:H}=g(3264);const{closeWebSocketConnection:G}=g(6897);const{PerMessageDeflate:Y}=g(9469);class ByteParser extends E{#n=[];#o=0;#ie=false;#a=C.INFO;#c={};#l=[];#d;constructor(A,i){super();this.ws=A;this.#d=i==null?new Map:i;if(this.#d.has("permessage-deflate")){this.#d.set("permessage-deflate",new Y(i))}}_write(A,i,g){this.#n.push(A);this.#o+=A.length;this.#ie=true;this.run(g)}run(A){while(this.#ie){if(this.#a===C.INFO){if(this.#o<2){return A()}const i=this.consume(2);const g=(i[0]&128)!==0;const E=i[0]&15;const p=(i[1]&128)===128;const Q=!g&&E!==f.CONTINUATION;const B=i[1]&127;const I=i[0]&64;const y=i[0]&32;const b=i[0]&16;if(!v(E)){F(this.ws,"Invalid opcode received");return A()}if(p){F(this.ws,"Frame cannot be masked");return A()}if(I!==0&&!this.#d.has("permessage-deflate")){F(this.ws,"Expected RSV1 to be clear.");return}if(y!==0||b!==0){F(this.ws,"RSV1, RSV2, RSV3 must be clear");return}if(Q&&!M(E)){F(this.ws,"Invalid frame type was fragmented.");return}if(M(E)&&this.#l.length>0){F(this.ws,"Expected continuation frame");return}if(this.#c.fragmented&&Q){F(this.ws,"Fragmented frame exceeded 125 bytes.");return}if((B>125||Q)&&L(E)){F(this.ws,"Control frame either too large or fragmented");return}if(T(E)&&this.#l.length===0&&!this.#c.compressed){F(this.ws,"Unexpected continuation frame");return}if(B<=125){this.#c.payloadLength=B;this.#a=C.READ_DATA}else if(B===126){this.#a=C.PAYLOADLENGTH_16}else if(B===127){this.#a=C.PAYLOADLENGTH_64}if(M(E)){this.#c.binaryType=E;this.#c.compressed=I!==0}this.#c.opcode=E;this.#c.masked=p;this.#c.fin=g;this.#c.fragmented=Q}else if(this.#a===C.PAYLOADLENGTH_16){if(this.#o<2){return A()}const i=this.consume(2);this.#c.payloadLength=i.readUInt16BE(0);this.#a=C.READ_DATA}else if(this.#a===C.PAYLOADLENGTH_64){if(this.#o<8){return A()}const i=this.consume(8);const g=i.readUInt32BE(0);if(g>2**31-1){F(this.ws,"Received payload length > 2^31 bytes.");return}const E=i.readUInt32BE(4);this.#c.payloadLength=(g<<8)+E;this.#a=C.READ_DATA}else if(this.#a===C.READ_DATA){if(this.#o<this.#c.payloadLength){return A()}const i=this.consume(this.#c.payloadLength);if(L(this.#c.opcode)){this.#ie=this.parseControlFrame(i);this.#a=C.INFO}else{if(!this.#c.compressed){this.#l.push(i);if(!this.#c.fragmented&&this.#c.fin){const A=Buffer.concat(this.#l);x(this.ws,this.#c.binaryType,A);this.#l.length=0}this.#a=C.INFO}else{this.#d.get("permessage-deflate").decompress(i,this.#c.fin,((i,g)=>{if(i){G(this.ws,1007,i.message,i.message.length);return}this.#l.push(g);if(!this.#c.fin){this.#a=C.INFO;this.#ie=true;this.run(A);return}x(this.ws,this.#c.binaryType,Buffer.concat(this.#l));this.#ie=true;this.#a=C.INFO;this.#l.length=0;this.run(A)}));this.#ie=false;break}}}}}consume(A){if(A>this.#o){throw new Error("Called consume() before buffers satiated.")}else if(A===0){return B}if(this.#n[0].length===A){this.#o-=this.#n[0].length;return this.#n.shift()}const i=Buffer.allocUnsafe(A);let g=0;while(g!==A){const E=this.#n[0];const{length:p}=E;if(p+g===A){i.set(this.#n.shift(),g);break}else if(p+g>A){i.set(E.subarray(0,A-g),g);this.#n[0]=E.subarray(A-g);break}else{i.set(this.#n.shift(),g);g+=E.length}}this.#o-=A;return i}parseCloseBody(A){p(A.length!==1);let i;if(A.length>=2){i=A.readUInt16BE(0)}if(i!==undefined&&!S(i)){return{code:1002,Line truncated
const E=g(9896);const p=g(857);const C=g(6928);const f=g(6982);const Q={fs:E.constants,os:p.constants};const B="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",I=/XXXXXX/,y=3,b=(Q.O_CREAT||Q.fs.O_CREAT)|(Q.O_EXCL||Q.fs.O_EXCL)|(Q.O_RDWR||Q.fs.O_RDWR),D=p.platform()==="win32",R=Q.EBADF||Q.os.errno.EBADF,k=Q.ENOENT||Q.os.errno.ENOENT,S=448,v=384,F="exit",x=[],U=E.rmdirSync.bind(E);let L=false;function rimraf(A,i){return E.rm(A,{recursive:true},i)}function FN_RIMRAF_SYNC(A){return E.rmSync(A,{recursive:true})}function tmpName(A,i){const g=_parseArguments(A,i),p=g[0],C=g[1];_assertAndSanitizeOptions(p,function(A,i){if(A)return C(A);let g=i.tries;(function _getUniqueName(){try{const A=_generateTmpName(i);E.stat(A,function(i){if(!i){if(g-- >0)return _getUniqueName();return C(new Error("Could not get a unique tmp filename, max tries reached "+A))}C(null,A)})}catch(A){C(A)}})()})}function tmpNameSync(A){const i=_parseArguments(A),g=i[0];const p=_assertAndSanitizeOptionsSync(g);let C=p.tries;do{const A=_generateTmpName(p);try{E.statSync(A)}catch(i){return A}}while(C-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function file(A,i){const g=_parseArguments(A,i),p=g[0],C=g[1];tmpName(p,function _tmpNameCreated(A,i){if(A)return C(A);E.open(i,b,p.mode||v,function _fileCreated(A,g){if(A)return C(A);if(p.discardDescriptor){return E.close(g,function _discardCallback(A){return C(A,i,undefined,_prepareTmpFileRemoveCallback(i,-1,p,false))})}else{const A=p.discardDescriptor||p.detachDescriptor;C(null,i,g,_prepareTmpFileRemoveCallback(i,A?-1:g,p,false))}})})}function fileSync(A){const i=_parseArguments(A),g=i[0];const p=g.discardDescriptor||g.detachDescriptor;const C=tmpNameSync(g);let f=E.openSync(C,b,g.mode||v);if(g.discardDescriptor){E.closeSync(f);f=undefined}return{name:C,fd:f,removeCallback:_prepareTmpFileRemoveCallback(C,p?-1:f,g,true)}}function dir(A,i){const g=_parseArguments(A,i),p=g[0],C=g[1];tmpName(p,function _tmpNameCreated(A,i){if(A)return C(A);E.mkdir(i,p.mode||S,function _dirCreated(A){if(A)return C(A);C(null,i,_prepareTmpDirRemoveCallback(i,p,false))})})}function dirSync(A){const i=_parseArguments(A),g=i[0];const p=tmpNameSync(g);E.mkdirSync(p,g.mode||S);return{name:p,removeCallback:_prepareTmpDirRemoveCallback(p,g,true)}}function _removeFileAsync(A,i){const _handler=function(A){if(A&&!_isENOENT(A)){return i(A)}i()};if(0<=A[0])E.close(A[0],function(){E.unlink(A[1],_handler)});else E.unlink(A[1],_handler)}function _removeFileSync(A){let i=null;try{if(0<=A[0])E.closeSync(A[0])}catch(A){if(!_isEBADF(A)&&!_isENOENT(A))throw A}finally{try{E.unlinkSync(A[1])}catch(A){if(!_isENOENT(A))i=A}}if(i!==null){throw i}}function _prepareTmpFileRemoveCallback(A,i,g,E){const p=_prepareRemoveCallback(_removeFileSync,[i,A],E);const C=_prepareRemoveCallback(_removeFileAsync,[i,A],E,p);if(!g.keep)x.unshift(p);return E?p:C}function _prepareTmpDirRemoveCallback(A,i,g){const p=i.unsafeCleanup?rimraf:E.rmdir.bind(E);const C=i.unsafeCleanup?FN_RIMRAF_SYNC:U;const f=_prepareRemoveCallback(C,A,g);const Q=_prepareRemoveCallback(p,A,g,f);if(!i.keep)x.unshift(f);return g?f:Q}function _prepareRemoveCallback(A,i,g,E){let p=false;return function _cleanupCallback(C){if(!p){const f=E||_cleanupCallback;const Q=x.indexOf(f);if(Q>=0)x.splice(Q,1);p=true;if(g||A===U||A===FN_RIMRAF_SYNC){return A(i)}else{return A(i,C||function(){})}}}}function _garbageCollector(){if(!L)return;while(x.length){try{x[0]()}catch(A){}}}function _randomChars(A){let i=[],g=null;try{g=f.randomBytes(A)}catch(i){g=f.pseudoRandomBytes(A)}for(let E=0;E<A;E++){i.push(B[g[E]%B.length])}return i.join("")}function _isUndefined(A){return typeof A==="undefined"}function _parseArguments(A,i){if(typeof A==="function"){return[{},A]}if(_isUndefined(A)){return[{},i]}const g={};for(const i of Object.getOwnPropertyNames(A)){g[i]=A[i]}return[g,i]}function _resolvePath(A,i,g){const p=C.isAbsolute(A)?A:C.join(i,A);E.stat(p,function(A){if(A){E.realpath(C.dirname(p),function(A,i){if(A)return g(A);g(null,C.join(i,C.basename(p)))})}else{E.realpath(p,g)}})}function _resolvePathSync(A,i){const g=C.isAbsolute(A)?A:C.join(i,A);try{E.statSync(g);return E.realpathSync(g)}catch(A){const i=E.realpathSync(C.dirname(g));return C.join(i,C.basename(g))}}function _generateTmpName(A){const i=A.tmpdir;if(!_isUndefined(A.name)){return C.join(i,A.dir,A.name)}if(!_isUndefined(A.template)){return C.join(i,A.dir,A.template).replace(I,_randomChars(6))}const g=[A.prefix?A.prefix:"tmp","-",process.pid,"-",_randomChars(12),A.postfix?"-"+A.postfix:""].join("");return C.join(i,A.dir,g)}function _assertPath(A,i){if(typeof i!=="string"){throw new Error(`${A} option must be a string, got "${typeof i}".`)}if(i.includes("..")){throw new Error("Relative value not allowed")}return i}function _assertOptionsBase(A){if(!_isUndefined(A.name)){const i=A.name;if(C.isAbsolute(i))throw new Error(`name option must not contain an absolute path, found "${i}".`);const g=C.basename(i);if(g===".."Line truncated
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */;const escape=A=>A.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22");const normalizeLinefeeds=A=>A.replace(/\r?\n|\r/g,"\r\n");const E=[];const p=new Uint8Array([13,10]);b=0;let C=false;for(const[i,f]of A){if(typeof f==="string"){const A=P.encode(g+`; name="${escape(normalizeLinefeeds(i))}"`+`\r\n\r\n${normalizeLinefeeds(f)}\r\n`);E.push(A);b+=A.byteLength}else{const A=P.encode(`${g}; name="${escape(normalizeLinefeeds(i))}"`+(f.name?`; filename="${escape(f.name)}"`:"")+"\r\n"+`Content-Type: ${f.type||"application/octet-stream"}\r\n\r\n`);E.push(A,f,p);if(typeof f.size==="number"){b+=A.byteLength+f.size+p.byteLength}else{C=true}}}const f=P.encode(`--${i}--`);E.push(f);b+=f.byteLength;if(C){b=null}y=A;I=async function*(){for(const A of E){if(A.stream){yield*A.stream()}else{yield A}}};D="multipart/form-data; boundary="+i}else if(f(A)){y=A;b=A.size;if(A.type){D=A.type}}else if(typeof A[Symbol.asyncIterator]==="function"){if(i){throw new TypeError("keepalive")}if(p.isDisturbed(A)||A.locked){throw new TypeError("Response body object should not be disturbed or locked")}E=A instanceof _?A:C(A)}if(typeof y==="string"||p.isBuffer(y)){b=Buffer.byteLength(y)}if(I!=null){let i;E=new _({async start(){i=I(A)[Symbol.asyncIterator]()},async pull(A){const{value:g,done:p}=await i.next();if(p){queueMicrotask(()=>{A.close()})}else{if(!L(E)){A.enqueue(new Uint8Array(g))}}return A.desiredSize>0},async cancel(A){await i.return()},type:undefined})}const R={stream:E,source:y,length:b};return[R,D]}function safelyExtractBody(A,i=false){if(!_){_=g(3774).ReadableStream}if(A instanceof _){U(!p.isDisturbed(A),"The body has already been consumed.");U(!A.locked,"The stream is locked.")}return extractBody(A,i)}function cloneBody(A){const[i,g]=A.stream.tee();const E=S(g,{transfer:[g]});const[,p]=E.tee();A.stream=i;return{stream:p,length:A.length,source:A.source}}async function*consumeBody(A){if(A){if(M(A)){yield A}else{const i=A.stream;if(p.isDisturbed(i)){throw new TypeError("The body has already been consumed.")}if(i.locked){throw new TypeError("The stream is locked.")}i[x]=true;yield*i}}}function throwIfAborted(A){if(A.aborted){throw new k("The operation was aborted.","AbortError")}}function bodyMixinMethods(A){const i={blob(){return specConsumeBody(this,A=>{let i=bodyMimeType(this);if(i==="failure"){i=""}else if(i){i=Y(i)}return new v([A],{type:i})},A)},arrayBuffer(){return specConsumeBody(this,A=>new Uint8Array(A).buffer,A)},text(){return specConsumeBody(this,utf8DecodeBytes,A)},json(){return specConsumeBody(this,parseJSONFromBytes,A)},async formData(){R.brandCheck(this,A);throwIfAborted(this[D]);const i=this.headers.get("Content-Type");if(/multipart\/form-data/.test(i)){const A={};for(const[i,g]of this.headers)A[i.toLowerCase()]=g;const i=new b;let g;try{g=new E({headers:A,preservePath:true})}catch(A){throw new k(`${A}`,"AbortError")}g.on("field",(A,g)=>{i.append(A,g)});g.on("file",(A,g,E,p,C)=>{const f=[];if(p==="base64"||p.toLowerCase()==="base64"){let p="";g.on("data",A=>{p+=A.toString().replace(/[\r\n]/gm,"");const i=p.length-p.length%4;f.push(Buffer.from(p.slice(0,i),"base64"));p=p.slice(i)});g.on("end",()=>{f.push(Buffer.from(p,"base64"));i.append(A,new V(f,E,{type:C}))})}else{g.on("data",A=>{f.push(A)});g.on("end",()=>{i.append(A,new V(f,E,{type:C}))})}});const p=new Promise((A,i)=>{g.on("finish",A);g.on("error",A=>i(new TypeError(A)))});if(this.body!==null)for await(const A of consumeBody(this[D].body))g.write(A);g.end();await p;return i}else if(/application\/x-www-form-urlencoded/.test(i)){let A;try{let i="";const g=new TextDecoder("utf-8",{ignoreBOM:true});for await(const A of consumeBody(this[D].body)){if(!M(A)){throw new TypeError("Expected Uint8Array chunk")}i+=g.decode(A,{stream:true})}i+=g.decode();A=new URLSearchParams(i)}catch(A){throw Object.assign(new TypeError,{cause:A})}const i=new b;for(const[g,E]of A){i.append(g,E)}return i}else{await Promise.resolve();throwIfAborted(this[D]);throw R.errors.exception({header:`${A.name}.formData`,message:"Could not parse content as FormData."})}}};return i}function mixinBody(A){Object.assign(A.prototype,bodyMixinMethods(A))}async function specConsumeBody(A,i,g){R.brandCheck(A,g);throwIfAborted(A[D]);if(bodyUnusable(A[D].body)){throw new TypeError("Body is unusable")}const E=I();const errorSteps=A=>E.reject(A);const successSteps=A=>{try{E.resolve(i(A))}catch(A){errorSteps(A)}};if(A[D].body==null){successSteps(new Uint8Array);return E.promise}await y(A[D].body,successSteps,errorSteps);return E.promise}function bodyUnusable(A){return A!=null&&(A.stream.locked||p.isDisturbed(A.stream))}function utf8DecodeBytes(A){if(A.length===0){return""}if(A[0]===239&&A[1]===187&&A[2]===191){A=A.subarray(3)}const i=j.decode(A);return i}function parseJSONFromBytes(A){return JSON.parse(utf8DecodeBytes(A))}function bodyMimeType(A){const{headersList:i}=A[D];const g=i.get("content-type");if(g===null){reLine truncated
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */C[p-4]=this.maskKey[0];C[p-3]=this.maskKey[1];C[p-2]=this.maskKey[2];C[p-1]=this.maskKey[3];C[1]=g;if(g===126){C.writeUInt16BE(i,2)}else if(g===127){C[2]=C[3]=0;C.writeUIntBE(i,4,6)}C[1]|=128;for(let A=0;A<i;A++){C[p+A]=this.frameData[A]^this.maskKey[A%4]}return C}}A.exports={WebsocketFrameSend:WebsocketFrameSend}},5080:(A,i,g)=>{const{Writable:E}=g(2203);const p=g(1637);const{parserStates:C,opcodes:f,states:Q,emptyBuffer:B}=g(932);const{kReadyState:I,kSentClose:y,kResponse:b,kReceivedClose:D}=g(327);const{isValidStatusCode:R,failWebsocketConnection:k,websocketMessageReceived:S}=g(1501);const{WebsocketFrameSend:v}=g(9140);const F={};F.ping=p.channel("undici:websocket:ping");F.pong=p.channel("undici:websocket:pong");class ByteParser extends E{#n=[];#o=0;#a=C.INFO;#c={};#l=[];constructor(A){super();this.ws=A}_write(A,i,g){this.#n.push(A);this.#o+=A.length;this.run(g)}run(A){while(true){if(this.#a===C.INFO){if(this.#o<2){return A()}const i=this.consume(2);this.#c.fin=(i[0]&128)!==0;this.#c.opcode=i[0]&15;this.#c.originalOpcode??=this.#c.opcode;this.#c.fragmented=!this.#c.fin&&this.#c.opcode!==f.CONTINUATION;if(this.#c.fragmented&&this.#c.opcode!==f.BINARY&&this.#c.opcode!==f.TEXT){k(this.ws,"Invalid frame type was fragmented.");return}const g=i[1]&127;if(g<=125){this.#c.payloadLength=g;this.#a=C.READ_DATA}else if(g===126){this.#a=C.PAYLOADLENGTH_16}else if(g===127){this.#a=C.PAYLOADLENGTH_64}if(this.#c.fragmented&&g>125){k(this.ws,"Fragmented frame exceeded 125 bytes.");return}else if((this.#c.opcode===f.PING||this.#c.opcode===f.PONG||this.#c.opcode===f.CLOSE)&&g>125){k(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#c.opcode===f.CLOSE){if(g===1){k(this.ws,"Received close frame with a 1-byte body.");return}const A=this.consume(g);this.#c.closeInfo=this.parseCloseBody(false,A);if(!this.ws[y]){const A=Buffer.allocUnsafe(2);A.writeUInt16BE(this.#c.closeInfo.code,0);const i=new v(A);this.ws[b].socket.write(i.createFrame(f.CLOSE),A=>{if(!A){this.ws[y]=true}})}this.ws[I]=Q.CLOSING;this.ws[D]=true;this.end();return}else if(this.#c.opcode===f.PING){const i=this.consume(g);if(!this.ws[D]){const A=new v(i);this.ws[b].socket.write(A.createFrame(f.PONG));if(F.ping.hasSubscribers){F.ping.publish({payload:i})}}this.#a=C.INFO;if(this.#o>0){continue}else{A();return}}else if(this.#c.opcode===f.PONG){const i=this.consume(g);if(F.pong.hasSubscribers){F.pong.publish({payload:i})}if(this.#o>0){continue}else{A();return}}}else if(this.#a===C.PAYLOADLENGTH_16){if(this.#o<2){return A()}const i=this.consume(2);this.#c.payloadLength=i.readUInt16BE(0);this.#a=C.READ_DATA}else if(this.#a===C.PAYLOADLENGTH_64){if(this.#o<8){return A()}const i=this.consume(8);const g=i.readUInt32BE(0);if(g>2**31-1){k(this.ws,"Received payload length > 2^31 bytes.");return}const E=i.readUInt32BE(4);this.#c.payloadLength=(g<<8)+E;this.#a=C.READ_DATA}else if(this.#a===C.READ_DATA){if(this.#o<this.#c.payloadLength){return A()}else if(this.#o>=this.#c.payloadLength){const A=this.consume(this.#c.payloadLength);this.#l.push(A);if(!this.#c.fragmented||this.#c.fin&&this.#c.opcode===f.CONTINUATION){const A=Buffer.concat(this.#l);S(this.ws,this.#c.originalOpcode,A);this.#c={};this.#l.length=0}this.#a=C.INFO}}if(this.#o>0){continue}else{A();break}}}consume(A){if(A>this.#o){return null}else if(A===0){return B}if(this.#n[0].length===A){this.#o-=this.#n[0].length;return this.#n.shift()}const i=Buffer.allocUnsafe(A);let g=0;while(g!==A){const E=this.#n[0];const{length:p}=E;if(p+g===A){i.set(this.#n.shift(),g);break}else if(p+g>A){i.set(E.subarray(0,A-g),g);this.#n[0]=E.subarray(A-g);break}else{i.set(this.#n.shift(),g);g+=E.length}}this.#o-=A;return i}parseCloseBody(A,i){let g;if(i.length>=2){g=i.readUInt16BE(0)}if(A){if(!R(g)){return null}return{code:g}}let E=i.subarray(2);if(E[0]===239&&E[1]===187&&E[2]===191){E=E.subarray(3)}if(g!==undefined&&!R(g)){return null}try{E=new TextDecoder("utf-8",{fatal:true}).decode(E)}catch{return null}return{code:g,reason:E}}get closingInfo(){return this.#c.closeInfo}}A.exports={ByteParser:ByteParser}},327:A=>{A.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")}},1501:(A,i,g)=>{const{kReadyState:E,kController:p,kResponse:C,kBinaryType:f,kWebSocketURL:Q}=g(327);const{states:B,opcodes:I}=g(932);const{MessageEvent:y,ErrorEvent:b}=g(7952);function isEstablished(A){return A[E]===B.OPEN}function isClosing(A){return A[E]===B.CLOSING}function isClosed(A){return A[E]===B.CLOSED}function fireEvent(A,i,g=Event,E){const p=new g(A,E);i.dispatchEvent(p)}function websocketMessageReceived(A,i,g){if(A[E]!==B.OPEN){return}let p;if(i===I.TEXT){try{p=new TextDecoder("utf-8",{fatal:true}).decode(g)}catch{failWebsocketConnection(A,"Received invLine truncated
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */;const escape=A=>A.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22");const normalizeLinefeeds=A=>A.replace(/\r?\n|\r/g,"\r\n");const E=[];const p=new Uint8Array([13,10]);y=0;let C=false;for(const[i,f]of A){if(typeof f==="string"){const A=H.encode(g+`; name="${escape(normalizeLinefeeds(i))}"`+`\r\n\r\n${normalizeLinefeeds(f)}\r\n`);E.push(A);y+=A.byteLength}else{const A=H.encode(`${g}; name="${escape(normalizeLinefeeds(i))}"`+(f.name?`; filename="${escape(f.name)}"`:"")+"\r\n"+`Content-Type: ${f.type||"application/octet-stream"}\r\n\r\n`);E.push(A,f,p);if(typeof f.size==="number"){y+=A.byteLength+f.size+p.byteLength}else{C=true}}}const f=H.encode(`--${i}--\r\n`);E.push(f);y+=f.byteLength;if(C){y=null}I=A;B=async function*(){for(const A of E){if(A.stream){yield*A.stream()}else{yield A}}};b=`multipart/form-data; boundary=${i}`}else if(C(A)){I=A;y=A.size;if(A.type){b=A.type}}else if(typeof A[Symbol.asyncIterator]==="function"){if(i){throw new TypeError("keepalive")}if(E.isDisturbed(A)||A.locked){throw new TypeError("Response body object should not be disturbed or locked")}g=A instanceof ReadableStream?A:p(A)}if(typeof I==="string"||E.isBuffer(I)){y=Buffer.byteLength(I)}if(B!=null){let i;g=new ReadableStream({async start(){i=B(A)[Symbol.asyncIterator]()},async pull(A){const{value:E,done:p}=await i.next();if(p){queueMicrotask(()=>{A.close();A.byobRequest?.respond(0)})}else{if(!F(g)){const i=new Uint8Array(E);if(i.byteLength){A.enqueue(i)}}}return A.desiredSize>0},async cancel(A){await i.return()},type:"bytes"})}const D={stream:g,source:I,length:y};return[D,b]}function safelyExtractBody(A,i=false){if(A instanceof ReadableStream){v(!E.isDisturbed(A),"The body has already been consumed.");v(!A.locked,"The stream is locked.")}return extractBody(A,i)}function cloneBody(A,i){const[g,E]=i.stream.tee();i.stream=g;return{stream:E,length:i.length,source:i.source}}function throwIfAborted(A){if(A.aborted){throw new DOMException("The operation was aborted.","AbortError")}}function bodyMixinMethods(A){const i={blob(){return consumeBody(this,A=>{let i=bodyMimeType(this);if(i===null){i=""}else if(i){i=L(i)}return new S([A],{type:i})},A)},arrayBuffer(){return consumeBody(this,A=>new Uint8Array(A).buffer,A)},text(){return consumeBody(this,b,A)},json(){return consumeBody(this,parseJSONFromBytes,A)},formData(){return consumeBody(this,A=>{const i=bodyMimeType(this);if(i!==null){switch(i.essence){case"multipart/form-data":{const g=M(A,i);if(g==="failure"){throw new TypeError("Failed to parse body as FormData.")}const E=new D;E[R]=g;return E}case"application/x-www-form-urlencoded":{const i=new URLSearchParams(A.toString());const g=new D;for(const[A,E]of i){g.append(A,E)}return g}}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},A)},bytes(){return consumeBody(this,A=>new Uint8Array(A),A)}};return i}function mixinBody(A){Object.assign(A.prototype,bodyMixinMethods(A))}async function consumeBody(A,i,g){k.brandCheck(A,g);if(bodyUnusable(A)){throw new TypeError("Body is unusable: Body has already been read")}throwIfAborted(A[R]);const E=B();const errorSteps=A=>E.reject(A);const successSteps=A=>{try{E.resolve(i(A))}catch(A){errorSteps(A)}};if(A[R].body==null){successSteps(Buffer.allocUnsafe(0));return E.promise}await I(A[R].body,successSteps,errorSteps);return E.promise}function bodyUnusable(A){const i=A[R].body;return i!=null&&(i.stream.locked||E.isDisturbed(i.stream))}function parseJSONFromBytes(A){return JSON.parse(b(A))}function bodyMimeType(A){const i=A[R].headersList;const g=y(i);if(g==="failure"){return null}return g}A.exports={extractBody:extractBody,safelyExtractBody:safelyExtractBody,cloneBody:cloneBody,mixinBody:mixinBody,streamRegistry:Y,hasFinalizationRegistry:G,bodyUnusable:bodyUnusable}},4578:A=>{const i=["GET","HEAD","POST"];const g=new Set(i);const E=[101,204,205,304];const p=[301,302,303,307,308];const C=new Set(p);const f=["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 Q=new Set(f);const B=["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"];const I=new Set(B);const y=["follow","manual","error"];const b=["GET","HEAD","OPTIONS","TRACE"];const D=new Set(b);const R=["navigate","same-origin","no-cors","cors"];const k=["omit","same-origin","include"];const S=["default","no-store","reload","no-cache","force-cache","onlLine truncated
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */Q[f-4]=g[0];Q[f-3]=g[1];Q[f-2]=g[2];Q[f-1]=g[3];Q[1]=C;if(C===126){Q.writeUInt16BE(p,2)}else if(C===127){Q[2]=Q[3]=0;Q.writeUIntBE(p,4,6)}Q[1]|=128;for(let A=0;A<p;++A){Q[f+A]=i[A]^g[A&3]}return Q}}A.exports={WebsocketFrameSend:WebsocketFrameSend}},6286:(A,i,g)=>{const{createInflateRaw:E,Z_DEFAULT_WINDOWBITS:p}=g(8522);const{isValidClientWindowBits:C}=g(8098);const{MessageSizeExceededError:f}=g(6246);const Q=Buffer.from([0,0,255,255]);const B=Symbol("kBuffer");const I=Symbol("kLength");class PerMessageDeflate{#re;#S={};#ie=0;constructor(A,i){this.#S.serverNoContextTakeover=A.has("server_no_context_takeover");this.#S.serverMaxWindowBits=A.get("server_max_window_bits");this.#ie=i.maxPayloadSize}decompress(A,i,g){if(!this.#re){let A=p;if(this.#S.serverMaxWindowBits){if(!C(this.#S.serverMaxWindowBits)){g(new Error("Invalid server_max_window_bits"));return}A=Number.parseInt(this.#S.serverMaxWindowBits)}try{this.#re=E({windowBits:A})}catch(A){g(A);return}this.#re[B]=[];this.#re[I]=0;this.#re.on("data",A=>{this.#re[I]+=A.length;if(this.#ie>0&&this.#re[I]>this.#ie){g(new f);this.#re.removeAllListeners();this.#re=null;return}this.#re[B].push(A)});this.#re.on("error",A=>{this.#re=null;g(A)})}this.#re.write(A);if(i){this.#re.write(Q)}this.#re.flush(()=>{if(!this.#re){return}const A=Buffer.concat(this.#re[B],this.#re[I]);this.#re[B].length=0;this.#re[I]=0;g(null,A)})}}A.exports={PerMessageDeflate:PerMessageDeflate}},5975:(A,i,g)=>{const{Writable:E}=g(7075);const p=g(4589);const{parserStates:C,opcodes:f,states:Q,emptyBuffer:B,sentCloseFrameState:I}=g(8397);const{kReadyState:y,kSentClose:b,kResponse:D,kReceivedClose:R}=g(7609);const{channels:k}=g(9978);const{isValidStatusCode:S,isValidOpcode:v,failWebsocketConnection:F,websocketMessageReceived:x,utf8Decode:U,isControlFrame:L,isTextBinaryFrame:M,isContinuationFrame:T}=g(8098);const{WebsocketFrameSend:H}=g(9321);const{closeWebSocketConnection:G}=g(1874);const{PerMessageDeflate:Y}=g(6286);const{MessageSizeExceededError:J}=g(6246);function failWebsocketConnectionWithCode(A,i,g){G(A,i,g,Buffer.byteLength(g));F(A,g)}class ByteParser extends E{#n=[];#ne=0;#o=0;#oe=false;#a=C.INFO;#c={};#l=[];#d;#ae;#ie;constructor(A,i,g={}){super();this.ws=A;this.#d=i==null?new Map:i;this.#ae=g.maxFragments??0;this.#ie=g.maxPayloadSize??0;if(this.#d.has("permessage-deflate")){this.#d.set("permessage-deflate",new Y(i,g))}}_write(A,i,g){this.#n.push(A);this.#o+=A.length;this.#oe=true;this.run(g)}#ce(){if(this.#ie>0&&!L(this.#c.opcode)&&this.#c.payloadLength+this.#ne>this.#ie){failWebsocketConnectionWithCode(this.ws,1009,"Payload size exceeds maximum allowed size");return false}return true}run(A){while(this.#oe){if(this.#a===C.INFO){if(this.#o<2){return A()}const i=this.consume(2);const g=(i[0]&128)!==0;const E=i[0]&15;const p=(i[1]&128)===128;const Q=!g&&E!==f.CONTINUATION;const B=i[1]&127;const I=i[0]&64;const y=i[0]&32;const b=i[0]&16;if(!v(E)){F(this.ws,"Invalid opcode received");return A()}if(p){F(this.ws,"Frame cannot be masked");return A()}if(I!==0&&!this.#d.has("permessage-deflate")){F(this.ws,"Expected RSV1 to be clear.");return}if(y!==0||b!==0){F(this.ws,"RSV1, RSV2, RSV3 must be clear");return}if(Q&&!M(E)){F(this.ws,"Invalid frame type was fragmented.");return}if(M(E)&&this.#l.length>0){F(this.ws,"Expected continuation frame");return}if(this.#c.fragmented&&Q){F(this.ws,"Fragmented frame exceeded 125 bytes.");return}if((B>125||Q)&&L(E)){F(this.ws,"Control frame either too large or fragmented");return}if(T(E)&&this.#l.length===0&&!this.#c.compressed){F(this.ws,"Unexpected continuation frame");return}if(B<=125){this.#c.payloadLength=B;this.#a=C.READ_DATA;if(!this.#ce()){return}}else if(B===126){this.#a=C.PAYLOADLENGTH_16}else if(B===127){this.#a=C.PAYLOADLENGTH_64}if(M(E)){this.#c.binaryType=E;this.#c.compressed=I!==0}this.#c.opcode=E;this.#c.masked=p;this.#c.fin=g;this.#c.fragmented=Q}else if(this.#a===C.PAYLOADLENGTH_16){if(this.#o<2){return A()}const i=this.consume(2);this.#c.payloadLength=i.readUInt16BE(0);this.#a=C.READ_DATA;if(!this.#ce()){return}}else if(this.#a===C.PAYLOADLENGTH_64){if(this.#o<8){return A()}const i=this.consume(8);const g=i.readUInt32BE(0);const E=i.readUInt32BE(4);if(g!==0||E>2**31-1){F(this.ws,"Received payload length > 2^31 bytes.");return}this.#c.payloadLength=E;this.#a=C.READ_DATA;if(!this.#ce()){return}}else if(this.#a===C.READ_DATA){if(this.#o<this.#c.payloadLength){return A()}const i=this.consume(this.#c.payloadLength);if(L(this.#c.opcode)){this.#oe=this.parseControlFrame(i);this.#a=C.INFO}else{if(!this.#c.compressed){if(!this.writeFragments(i)){return}if(this.#ie>0&&this.#ne>this.#ie){failWebsocketConnectionWithCode(this.ws,1009,(new J).message);return}if(!this.#c.fragmented&&this.#c.fin){x(this.ws,this.#c.binaryType,this.consumeFragments())}this.#a=C.INFO}else{this.#d.get("permessage-deflate").decompress(i,this.#c.fin,(i,g)=>{if(i){const A=i instanceof J?1009:1007;failWebsocketConnectionWithCLine truncated
-2326
View File
File diff suppressed because it is too large. Load diff
+4 -3
View File
@@ -3,6 +3,7 @@
"version": "0.2.1",
"description": "Deploys screeps code to the official game or a private server.",
"type": "module",
"packageManager": "pnpm@11.25.0",
"main": "index.js",
"scripts": {
"start": "node index.js",
@@ -16,8 +17,8 @@
"screeps-api": "^1.7.2"
},
"devDependencies": {
"@vercel/ncc": "^0.38.4",
"@vitest/coverage-v8": "^4.0.16",
"vitest": "^4.0.16"
"@vercel/ncc": "^0.44.1",
"@vitest/coverage-v8": "^4.1.11",
"vitest": "^4.1.11"
}
}
+1409
View File
File diff suppressed because it is too large. Load diff
+3
View File
@@ -0,0 +1,3 @@
allowBuilds:
bufferutil: true
utf-8-validate: true
+6 -15
View File
@@ -5,20 +5,11 @@
"config:recommended",
":automergeLinters"
],
"packageRules": [
{
"matchManagers": [
"npm"
],
"postUpgradeTasks": {
"commands": [
"npm ci",
"npm run build"
],
"fileFilters": [
"dist/index.js"
]
}
}
"rebaseWhen": "behind-base-branch",
"branchConcurrentLimit": 2,
"prConcurrentLimit": 2,
"gitIgnoredAuthors": [
"github-actions[bot]@users.noreply.github.com",
"bot@horstenkamp.eu"
]
}