forked from OpenWF/SpaceNinjaServer
		
	chore: replace 'websocket' with 'undici' (#2253)
This is a lot more lightweight Reviewed-on: OpenWF/SpaceNinjaServer#2253 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									cfd50e7402
								
							
						
					
					
						commit
						f61d15b496
					
				@ -1,6 +1,6 @@
 | 
				
			|||||||
FROM node:24-alpine3.21
 | 
					FROM node:24-alpine3.21
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN apk add --no-cache bash jq python3 make gcc alpine-sdk
 | 
					RUN apk add --no-cache bash jq
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY . /app
 | 
					COPY . /app
 | 
				
			||||||
WORKDIR /app
 | 
					WORKDIR /app
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										173
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										173
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -20,9 +20,9 @@
 | 
				
			|||||||
        "morgan": "^1.10.0",
 | 
					        "morgan": "^1.10.0",
 | 
				
			||||||
        "ncp": "^2.0.0",
 | 
					        "ncp": "^2.0.0",
 | 
				
			||||||
        "typescript": "^5.5",
 | 
					        "typescript": "^5.5",
 | 
				
			||||||
 | 
					        "undici": "^7.10.0",
 | 
				
			||||||
        "warframe-public-export-plus": "^0.5.68",
 | 
					        "warframe-public-export-plus": "^0.5.68",
 | 
				
			||||||
        "warframe-riven-info": "^0.1.2",
 | 
					        "warframe-riven-info": "^0.1.2",
 | 
				
			||||||
        "websocket": "^1.0.35",
 | 
					 | 
				
			||||||
        "winston": "^3.17.0",
 | 
					        "winston": "^3.17.0",
 | 
				
			||||||
        "winston-daily-rotate-file": "^5.0.0",
 | 
					        "winston-daily-rotate-file": "^5.0.0",
 | 
				
			||||||
        "ws": "^8.18.2"
 | 
					        "ws": "^8.18.2"
 | 
				
			||||||
@ -927,6 +927,8 @@
 | 
				
			|||||||
      "integrity": "sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw==",
 | 
					      "integrity": "sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw==",
 | 
				
			||||||
      "hasInstallScript": true,
 | 
					      "hasInstallScript": true,
 | 
				
			||||||
      "license": "MIT",
 | 
					      "license": "MIT",
 | 
				
			||||||
 | 
					      "optional": true,
 | 
				
			||||||
 | 
					      "peer": true,
 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "node-gyp-build": "^4.3.0"
 | 
					        "node-gyp-build": "^4.3.0"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
@ -1152,19 +1154,6 @@
 | 
				
			|||||||
        "node": ">= 8"
 | 
					        "node": ">= 8"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/d": {
 | 
					 | 
				
			||||||
      "version": "1.0.2",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==",
 | 
					 | 
				
			||||||
      "license": "ISC",
 | 
					 | 
				
			||||||
      "dependencies": {
 | 
					 | 
				
			||||||
        "es5-ext": "^0.10.64",
 | 
					 | 
				
			||||||
        "type": "^2.7.2"
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      "engines": {
 | 
					 | 
				
			||||||
        "node": ">=0.12"
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/debug": {
 | 
					    "node_modules/debug": {
 | 
				
			||||||
      "version": "4.4.0",
 | 
					      "version": "4.4.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
 | 
				
			||||||
@ -1276,46 +1265,6 @@
 | 
				
			|||||||
        "node": ">= 0.4"
 | 
					        "node": ">= 0.4"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/es5-ext": {
 | 
					 | 
				
			||||||
      "version": "0.10.64",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==",
 | 
					 | 
				
			||||||
      "hasInstallScript": true,
 | 
					 | 
				
			||||||
      "license": "ISC",
 | 
					 | 
				
			||||||
      "dependencies": {
 | 
					 | 
				
			||||||
        "es6-iterator": "^2.0.3",
 | 
					 | 
				
			||||||
        "es6-symbol": "^3.1.3",
 | 
					 | 
				
			||||||
        "esniff": "^2.0.1",
 | 
					 | 
				
			||||||
        "next-tick": "^1.1.0"
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      "engines": {
 | 
					 | 
				
			||||||
        "node": ">=0.10"
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/es6-iterator": {
 | 
					 | 
				
			||||||
      "version": "2.0.3",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==",
 | 
					 | 
				
			||||||
      "license": "MIT",
 | 
					 | 
				
			||||||
      "dependencies": {
 | 
					 | 
				
			||||||
        "d": "1",
 | 
					 | 
				
			||||||
        "es5-ext": "^0.10.35",
 | 
					 | 
				
			||||||
        "es6-symbol": "^3.1.1"
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/es6-symbol": {
 | 
					 | 
				
			||||||
      "version": "3.1.4",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==",
 | 
					 | 
				
			||||||
      "license": "ISC",
 | 
					 | 
				
			||||||
      "dependencies": {
 | 
					 | 
				
			||||||
        "d": "^1.0.2",
 | 
					 | 
				
			||||||
        "ext": "^1.7.0"
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      "engines": {
 | 
					 | 
				
			||||||
        "node": ">=0.12"
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/escape-html": {
 | 
					    "node_modules/escape-html": {
 | 
				
			||||||
      "version": "1.0.3",
 | 
					      "version": "1.0.3",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
 | 
				
			||||||
@ -1477,21 +1426,6 @@
 | 
				
			|||||||
        "node": "*"
 | 
					        "node": "*"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/esniff": {
 | 
					 | 
				
			||||||
      "version": "2.0.1",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==",
 | 
					 | 
				
			||||||
      "license": "ISC",
 | 
					 | 
				
			||||||
      "dependencies": {
 | 
					 | 
				
			||||||
        "d": "^1.0.1",
 | 
					 | 
				
			||||||
        "es5-ext": "^0.10.62",
 | 
					 | 
				
			||||||
        "event-emitter": "^0.3.5",
 | 
					 | 
				
			||||||
        "type": "^2.7.2"
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      "engines": {
 | 
					 | 
				
			||||||
        "node": ">=0.10"
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/espree": {
 | 
					    "node_modules/espree": {
 | 
				
			||||||
      "version": "9.6.1",
 | 
					      "version": "9.6.1",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
 | 
				
			||||||
@ -1565,16 +1499,6 @@
 | 
				
			|||||||
        "node": ">= 0.6"
 | 
					        "node": ">= 0.6"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/event-emitter": {
 | 
					 | 
				
			||||||
      "version": "0.3.5",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==",
 | 
					 | 
				
			||||||
      "license": "MIT",
 | 
					 | 
				
			||||||
      "dependencies": {
 | 
					 | 
				
			||||||
        "d": "1",
 | 
					 | 
				
			||||||
        "es5-ext": "~0.10.14"
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/express": {
 | 
					    "node_modules/express": {
 | 
				
			||||||
      "version": "5.1.0",
 | 
					      "version": "5.1.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz",
 | 
				
			||||||
@ -1617,15 +1541,6 @@
 | 
				
			|||||||
        "url": "https://opencollective.com/express"
 | 
					        "url": "https://opencollective.com/express"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/ext": {
 | 
					 | 
				
			||||||
      "version": "1.7.0",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==",
 | 
					 | 
				
			||||||
      "license": "ISC",
 | 
					 | 
				
			||||||
      "dependencies": {
 | 
					 | 
				
			||||||
        "type": "^2.7.2"
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/fast-deep-equal": {
 | 
					    "node_modules/fast-deep-equal": {
 | 
				
			||||||
      "version": "3.1.3",
 | 
					      "version": "3.1.3",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
 | 
				
			||||||
@ -2155,12 +2070,6 @@
 | 
				
			|||||||
        "url": "https://github.com/sponsors/sindresorhus"
 | 
					        "url": "https://github.com/sponsors/sindresorhus"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/is-typedarray": {
 | 
					 | 
				
			||||||
      "version": "1.0.0",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==",
 | 
					 | 
				
			||||||
      "license": "MIT"
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/isexe": {
 | 
					    "node_modules/isexe": {
 | 
				
			||||||
      "version": "2.0.0",
 | 
					      "version": "2.0.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
 | 
				
			||||||
@ -2566,17 +2475,13 @@
 | 
				
			|||||||
        "node": ">= 0.6"
 | 
					        "node": ">= 0.6"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/next-tick": {
 | 
					 | 
				
			||||||
      "version": "1.1.0",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==",
 | 
					 | 
				
			||||||
      "license": "ISC"
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/node-gyp-build": {
 | 
					    "node_modules/node-gyp-build": {
 | 
				
			||||||
      "version": "4.8.4",
 | 
					      "version": "4.8.4",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz",
 | 
				
			||||||
      "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==",
 | 
					      "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==",
 | 
				
			||||||
      "license": "MIT",
 | 
					      "license": "MIT",
 | 
				
			||||||
 | 
					      "optional": true,
 | 
				
			||||||
 | 
					      "peer": true,
 | 
				
			||||||
      "bin": {
 | 
					      "bin": {
 | 
				
			||||||
        "node-gyp-build": "bin.js",
 | 
					        "node-gyp-build": "bin.js",
 | 
				
			||||||
        "node-gyp-build-optional": "optional.js",
 | 
					        "node-gyp-build-optional": "optional.js",
 | 
				
			||||||
@ -3373,12 +3278,6 @@
 | 
				
			|||||||
      "dev": true,
 | 
					      "dev": true,
 | 
				
			||||||
      "license": "0BSD"
 | 
					      "license": "0BSD"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/type": {
 | 
					 | 
				
			||||||
      "version": "2.7.3",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==",
 | 
					 | 
				
			||||||
      "license": "ISC"
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/type-check": {
 | 
					    "node_modules/type-check": {
 | 
				
			||||||
      "version": "0.4.0",
 | 
					      "version": "0.4.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
 | 
				
			||||||
@ -3419,15 +3318,6 @@
 | 
				
			|||||||
        "node": ">= 0.6"
 | 
					        "node": ">= 0.6"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/typedarray-to-buffer": {
 | 
					 | 
				
			||||||
      "version": "3.1.5",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
 | 
					 | 
				
			||||||
      "license": "MIT",
 | 
					 | 
				
			||||||
      "dependencies": {
 | 
					 | 
				
			||||||
        "is-typedarray": "^1.0.0"
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/typescript": {
 | 
					    "node_modules/typescript": {
 | 
				
			||||||
      "version": "5.8.3",
 | 
					      "version": "5.8.3",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
 | 
				
			||||||
@ -3441,6 +3331,15 @@
 | 
				
			|||||||
        "node": ">=14.17"
 | 
					        "node": ">=14.17"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "node_modules/undici": {
 | 
				
			||||||
 | 
					      "version": "7.10.0",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/undici/-/undici-7.10.0.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-u5otvFBOBZvmdjWLVW+5DAc9Nkq8f24g0O9oY7qw2JVIF1VocIFoyz9JFkuVOS2j41AufeO0xnlweJ2RLT8nGw==",
 | 
				
			||||||
 | 
					      "license": "MIT",
 | 
				
			||||||
 | 
					      "engines": {
 | 
				
			||||||
 | 
					        "node": ">=20.18.1"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "node_modules/undici-types": {
 | 
					    "node_modules/undici-types": {
 | 
				
			||||||
      "version": "6.21.0",
 | 
					      "version": "6.21.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
 | 
				
			||||||
@ -3472,6 +3371,8 @@
 | 
				
			|||||||
      "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==",
 | 
					      "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==",
 | 
				
			||||||
      "hasInstallScript": true,
 | 
					      "hasInstallScript": true,
 | 
				
			||||||
      "license": "MIT",
 | 
					      "license": "MIT",
 | 
				
			||||||
 | 
					      "optional": true,
 | 
				
			||||||
 | 
					      "peer": true,
 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "node-gyp-build": "^4.3.0"
 | 
					        "node-gyp-build": "^4.3.0"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
@ -3513,38 +3414,6 @@
 | 
				
			|||||||
        "node": ">=12"
 | 
					        "node": ">=12"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/websocket": {
 | 
					 | 
				
			||||||
      "version": "1.0.35",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.35.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-/REy6amwPZl44DDzvRCkaI1q1bIiQB0mEFQLUrhz3z2EK91cp3n72rAjUlrTP0zV22HJIUOVHQGPxhFRjxjt+Q==",
 | 
					 | 
				
			||||||
      "license": "Apache-2.0",
 | 
					 | 
				
			||||||
      "dependencies": {
 | 
					 | 
				
			||||||
        "bufferutil": "^4.0.1",
 | 
					 | 
				
			||||||
        "debug": "^2.2.0",
 | 
					 | 
				
			||||||
        "es5-ext": "^0.10.63",
 | 
					 | 
				
			||||||
        "typedarray-to-buffer": "^3.1.5",
 | 
					 | 
				
			||||||
        "utf-8-validate": "^5.0.2",
 | 
					 | 
				
			||||||
        "yaeti": "^0.0.6"
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      "engines": {
 | 
					 | 
				
			||||||
        "node": ">=4.0.0"
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/websocket/node_modules/debug": {
 | 
					 | 
				
			||||||
      "version": "2.6.9",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
 | 
					 | 
				
			||||||
      "license": "MIT",
 | 
					 | 
				
			||||||
      "dependencies": {
 | 
					 | 
				
			||||||
        "ms": "2.0.0"
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/websocket/node_modules/ms": {
 | 
					 | 
				
			||||||
      "version": "2.0.0",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
 | 
					 | 
				
			||||||
      "license": "MIT"
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/whatwg-url": {
 | 
					    "node_modules/whatwg-url": {
 | 
				
			||||||
      "version": "14.2.0",
 | 
					      "version": "14.2.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz",
 | 
				
			||||||
@ -3665,16 +3534,6 @@
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/yaeti": {
 | 
					 | 
				
			||||||
      "version": "0.0.6",
 | 
					 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz",
 | 
					 | 
				
			||||||
      "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==",
 | 
					 | 
				
			||||||
      "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
 | 
					 | 
				
			||||||
      "license": "MIT",
 | 
					 | 
				
			||||||
      "engines": {
 | 
					 | 
				
			||||||
        "node": ">=0.10.32"
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "node_modules/yocto-queue": {
 | 
					    "node_modules/yocto-queue": {
 | 
				
			||||||
      "version": "0.1.0",
 | 
					      "version": "0.1.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
 | 
				
			||||||
 | 
				
			|||||||
@ -32,9 +32,9 @@
 | 
				
			|||||||
    "morgan": "^1.10.0",
 | 
					    "morgan": "^1.10.0",
 | 
				
			||||||
    "ncp": "^2.0.0",
 | 
					    "ncp": "^2.0.0",
 | 
				
			||||||
    "typescript": "^5.5",
 | 
					    "typescript": "^5.5",
 | 
				
			||||||
 | 
					    "undici": "^7.10.0",
 | 
				
			||||||
    "warframe-public-export-plus": "^0.5.68",
 | 
					    "warframe-public-export-plus": "^0.5.68",
 | 
				
			||||||
    "warframe-riven-info": "^0.1.2",
 | 
					    "warframe-riven-info": "^0.1.2",
 | 
				
			||||||
    "websocket": "^1.0.35",
 | 
					 | 
				
			||||||
    "winston": "^3.17.0",
 | 
					    "winston": "^3.17.0",
 | 
				
			||||||
    "winston-daily-rotate-file": "^5.0.0",
 | 
					    "winston-daily-rotate-file": "^5.0.0",
 | 
				
			||||||
    "ws": "^8.18.2"
 | 
					    "ws": "^8.18.2"
 | 
				
			||||||
 | 
				
			|||||||
@ -10,7 +10,7 @@ import { Account } from "../models/loginModel";
 | 
				
			|||||||
import { createAccount, createNonce, getUsernameFromEmail, isCorrectPassword } from "./loginService";
 | 
					import { createAccount, createNonce, getUsernameFromEmail, isCorrectPassword } from "./loginService";
 | 
				
			||||||
import { IDatabaseAccountJson } from "../types/loginTypes";
 | 
					import { IDatabaseAccountJson } from "../types/loginTypes";
 | 
				
			||||||
import { HydratedDocument } from "mongoose";
 | 
					import { HydratedDocument } from "mongoose";
 | 
				
			||||||
import websocket from "websocket";
 | 
					import { Agent, WebSocket } from "undici";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
let httpServer: http.Server | undefined;
 | 
					let httpServer: http.Server | undefined;
 | 
				
			||||||
let httpsServer: https.Server | undefined;
 | 
					let httpsServer: https.Server | undefined;
 | 
				
			||||||
@ -67,21 +67,14 @@ export const startWebServer = (): void => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const runWsSelfTest = (protocol: "ws" | "wss", port: number): Promise<boolean> => {
 | 
					const runWsSelfTest = (protocol: "ws" | "wss", port: number): Promise<boolean> => {
 | 
				
			||||||
    return new Promise(resolve => {
 | 
					    return new Promise(resolve => {
 | 
				
			||||||
        const client = new websocket.client({ tlsOptions: { rejectUnauthorized: false } });
 | 
					        const agent = new Agent({ connect: { rejectUnauthorized: false } });
 | 
				
			||||||
        client.connect(`${protocol}://localhost:${port}/custom/selftest`);
 | 
					        const client = new WebSocket(`${protocol}://localhost:${port}/custom/selftest`, { dispatcher: agent });
 | 
				
			||||||
        client.on("connect", connection => {
 | 
					        client.onmessage = (e): void => {
 | 
				
			||||||
            connection.on("message", msg => {
 | 
					            resolve(e.data == "SpaceNinjaServer");
 | 
				
			||||||
                if (msg.type == "utf8" && msg.utf8Data == "SpaceNinjaServer") {
 | 
					        };
 | 
				
			||||||
                    resolve(true);
 | 
					        client.onerror = client.onclose = (): void => {
 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
            connection.on("close", () => {
 | 
					 | 
				
			||||||
                resolve(false);
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
        client.on("connectFailed", () => {
 | 
					 | 
				
			||||||
            resolve(false);
 | 
					            resolve(false);
 | 
				
			||||||
        });
 | 
					        };
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user