From 52be44d110f8afc569302a8e0f45f88c30b280e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A7=81Ash=C3=BB=EA=A7=82?= <30575805+Ashu11-A@users.noreply.github.com> Date: Tue, 18 Jun 2024 12:31:57 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20Package=20eiows,=20and=20?= =?UTF-8?q?specific=20node=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-test.yml | 2 +- .github/workflows/release.yaml | 4 +- core/package-lock.json | 76 +++++++++----------------------- core/package.json | 8 ++-- core/src/controller/socket.ts | 2 +- 5 files changed, 30 insertions(+), 62 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 939a7a54..f4ab07ff 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -41,7 +41,7 @@ jobs: needs: prepare strategy: matrix: - node-version: [20.x] + node-version: [20.11.1] path: ${{ fromJson(needs.prepare.outputs.paths) }} # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index de17f9f0..1e7eadbc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - node-version: [20.x] + node-version: [20.11.1] steps: - name: Checkout repository uses: actions/checkout@v4 @@ -46,7 +46,7 @@ jobs: matrix: distro: [ubuntu-22.04] arch: [aarch64, x64] - node-version: [20.x] + node-version: [20.11.1] steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/core/package-lock.json b/core/package-lock.json index 8e413ead..c3a1c342 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -9,8 +9,6 @@ "version": "1.0.0", "license": "LSC", "dependencies": { - "@types/cron": "^2.4.0", - "@types/node-forge": "^1.3.11", "argon2": "^0.40.3", "check-password-strength": "^2.0.10", "chokidar": "^3.6.0", @@ -18,7 +16,7 @@ "crypto-js": "^4.2.0", "discord.js": "^14.15.3", "dotenv": "^16.4.5", - "eiows": "^7.0.3", + "eiows": "^7.1.0", "express": "^4.19.2", "glob": "^10.4.1", "isbinaryfile": "^5.0.2", @@ -34,10 +32,12 @@ "yargs": "^17.7.2" }, "devDependencies": { + "@types/cron": "^2.4.0", "@types/crypto-js": "^4.2.2", "@types/express": "^4.17.21", "@types/marked-terminal": "^6.1.1", "@types/node-fetch": "^2.6.11", + "@types/node-forge": "^1.3.11", "@types/prompts": "^2.4.9", "@types/signale": "^1.4.7", "@types/socket.io": "^3.0.2", @@ -967,6 +967,7 @@ "resolved": "https://registry.npmjs.org/@types/cron/-/cron-2.4.0.tgz", "integrity": "sha512-5bBaAkqvSFBX8JMi/xCofNzG5E594TNsApMz68dLd/sQYz/HGQqgcxGHTRjOvD4G3Y+YF1Oo3S7QdCvKt1KAJQ==", "deprecated": "This is a stub types definition. cron provides its own type definitions, so you do not need this installed.", + "dev": true, "dependencies": { "cron": "*" } @@ -1088,6 +1089,7 @@ "version": "1.3.11", "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", + "dev": true, "dependencies": { "@types/node": "*" } @@ -2808,10 +2810,16 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/eiows": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/eiows/-/eiows-7.0.3.tgz", - "integrity": "sha512-g8q8L8Awm9/lHF3sMBofSXb108Rt7rcokLKwSYAZHwQaGZe+mAyyFEnjmErCMAttnGyUBRblZr1BU3+aU8V2tQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eiows/-/eiows-7.1.0.tgz", + "integrity": "sha512-Jq0Z5+aYHiYK6KZXBH4AVOcJ86vh3BGDlMPDkgrNjoRbYV4zRCVGKIvjZcJk1kU4UvMfhxK5iR6HNN+rlyo1yQ==", "hasInstallScript": true, + "os": [ + "!win32", + "linux", + "freebsd", + "darwin" + ], "engines": { "node": ">=16 <23.0" } @@ -2845,9 +2853,9 @@ } }, "node_modules/engine.io": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.5.4.tgz", - "integrity": "sha512-KdVSDKhVKyOi+r5uEabrDLZw2qXStVvCsEB/LN3mw4WFi6Gx50jTyuxYVCwAAC0U46FdnzP/ScKRBTXb/NiEOg==", + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.5.5.tgz", + "integrity": "sha512-C5Pn8Wk+1vKBoHghJODM63yk8MvrO9EWZUfkAt5HAqIgPE4/8FF0PEGHXtEd40l223+cE5ABWuPzm38PHFXfMA==", "dependencies": { "@types/cookie": "^0.4.1", "@types/cors": "^2.8.12", @@ -2858,7 +2866,7 @@ "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.2.1", - "ws": "~8.11.0" + "ws": "~8.17.1" }, "engines": { "node": ">=10.2.0" @@ -2872,26 +2880,6 @@ "node": ">=10.0.0" } }, - "node_modules/engine.io/node_modules/ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/enhanced-resolve": { "version": "5.16.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz", @@ -6725,32 +6713,12 @@ } }, "node_modules/socket.io-adapter": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.4.tgz", - "integrity": "sha512-wDNHGXGewWAjQPt3pyeYBtpWSq9cLE5UW1ZUPL/2eGK9jtse/FpXib7epSTsz0Q0m+6sg6Y4KtcFTlah1bdOVg==", + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz", + "integrity": "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==", "dependencies": { "debug": "~4.3.4", - "ws": "~8.11.0" - } - }, - "node_modules/socket.io-adapter/node_modules/ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "ws": "~8.17.1" } }, "node_modules/socket.io-parser": { diff --git a/core/package.json b/core/package.json index 5fd36550..2c217547 100644 --- a/core/package.json +++ b/core/package.json @@ -4,6 +4,7 @@ "description": "Controler dos modulos do PaymentBot", "main": "dist/app.js", "type": "module", + "private": true, "scripts": { "start": "node .", "build": "tsc && tsc-alias", @@ -11,7 +12,6 @@ "lint": "eslint --ext .tsx,.ts --fix ./src -c .eslintrc.json" }, "author": "Ashu11-a", - "key": "8QW|DZ]#1z&/Cw:[lH1jd1Fo,c=VzD.$!o;~?de*`uzvJ2K2Oj", "api": "http://node.seventyhost.net:24398", "license": "LSC", "imports": { @@ -20,10 +20,12 @@ ] }, "devDependencies": { + "@types/cron": "^2.4.0", "@types/crypto-js": "^4.2.2", "@types/express": "^4.17.21", "@types/marked-terminal": "^6.1.1", "@types/node-fetch": "^2.6.11", + "@types/node-forge": "^1.3.11", "@types/prompts": "^2.4.9", "@types/signale": "^1.4.7", "@types/socket.io": "^3.0.2", @@ -40,8 +42,6 @@ "typescript": "^5.4.5" }, "dependencies": { - "@types/cron": "^2.4.0", - "@types/node-forge": "^1.3.11", "argon2": "^0.40.3", "check-password-strength": "^2.0.10", "chokidar": "^3.6.0", @@ -49,7 +49,7 @@ "crypto-js": "^4.2.0", "discord.js": "^14.15.3", "dotenv": "^16.4.5", - "eiows": "^7.0.3", + "eiows": "^7.1.0", "express": "^4.19.2", "glob": "^10.4.1", "isbinaryfile": "^5.0.2", diff --git a/core/src/controller/socket.ts b/core/src/controller/socket.ts index ea756a1c..b3179488 100644 --- a/core/src/controller/socket.ts +++ b/core/src/controller/socket.ts @@ -3,7 +3,7 @@ import { createServer } from 'http' import { Server } from 'socket.io' import ws from 'ws' import { Event } from './events.js' -import eiows from '../../node_modules/eiows/dist/eiows.js' +import eiows from 'eiows' export class SocketController { protected readonly app: Application