From: Jérôme Benoit Date: Tue, 30 Nov 2021 08:44:26 +0000 (+0100) Subject: Fix default WS server options handling X-Git-Tag: v1.1.36~10 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=790d76148cb647b5aa61d1e858f127003e6de998;p=e-mobility-charging-stations-simulator.git Fix default WS server options handling Signed-off-by: Jérôme Benoit --- diff --git a/package-lock.json b/package-lock.json index edc1b420..67a07e29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1455,9 +1455,9 @@ "dev": true }, "@jest/types": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.4.0.tgz", - "integrity": "sha512-jIsLdASXMf8GS7P7oGFGwobNse/6Ewq3GBPHoo0i6XRmja+NrUoDqJm4a1ffF2bHGleKJizxokcp1sCqSktP3g==", + "version": "27.4.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.4.1.tgz", + "integrity": "sha512-Uvy+gMBzj6Yak95w1g83AEwhoqzs2letmwKNvb1QgLsqkCxy9NIpNUjrgmra87FVMDsFFgCxcZ6ZaHkQFXJ7Zg==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", @@ -2569,13 +2569,13 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.4.0.tgz", - "integrity": "sha512-9/yPSBlwzsetCsGEn9j24D8vGQgJkOTr4oMLas/w886ZtzKIs1iyoqFrwsX2fqYEeUwsdBpC21gcjRGo57u0eg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.5.0.tgz", + "integrity": "sha512-4bV6fulqbuaO9UMXU0Ia0o6z6if+kmMRW8rMRyfqXj/eGrZZRGedS4n0adeGNnjr8LKAM495hrQ7Tea52UWmQA==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "5.4.0", - "@typescript-eslint/scope-manager": "5.4.0", + "@typescript-eslint/experimental-utils": "5.5.0", + "@typescript-eslint/scope-manager": "5.5.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -2585,9 +2585,9 @@ }, "dependencies": { "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -2626,15 +2626,15 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.4.0.tgz", - "integrity": "sha512-Nz2JDIQUdmIGd6p33A+naQmwfkU5KVTLb/5lTk+tLVTDacZKoGQisj8UCxk7onJcrgjIvr8xWqkYI+DbI3TfXg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.5.0.tgz", + "integrity": "sha512-kjWeeVU+4lQ1SLYErRKV5yDXbWDPkpbzTUUlfAUifPYvpX0qZlrcCZ96/6oWxt3QxtK5WVhXz+KsnwW9cIW+3A==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.4.0", - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/typescript-estree": "5.4.0", + "@typescript-eslint/scope-manager": "5.5.0", + "@typescript-eslint/types": "5.5.0", + "@typescript-eslint/typescript-estree": "5.5.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -2657,21 +2657,21 @@ } }, "@typescript-eslint/parser": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.4.0.tgz", - "integrity": "sha512-JoB41EmxiYpaEsRwpZEYAJ9XQURPFer8hpkIW9GiaspVLX8oqbqNM8P4EP8HOZg96yaALiLEVWllA2E8vwsIKw==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.5.0.tgz", + "integrity": "sha512-JsXBU+kgQOAgzUn2jPrLA+Rd0Y1dswOlX3hp8MuRO1hQDs6xgHtbCXEiAu7bz5hyVURxbXcA2draasMbNqrhmg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.4.0", - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/typescript-estree": "5.4.0", + "@typescript-eslint/scope-manager": "5.5.0", + "@typescript-eslint/types": "5.5.0", + "@typescript-eslint/typescript-estree": "5.5.0", "debug": "^4.3.2" }, "dependencies": { "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -2680,29 +2680,29 @@ } }, "@typescript-eslint/scope-manager": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.4.0.tgz", - "integrity": "sha512-pRxFjYwoi8R+n+sibjgF9iUiAELU9ihPBtHzocyW8v8D8G8KeQvXTsW7+CBYIyTYsmhtNk50QPGLE3vrvhM5KA==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.5.0.tgz", + "integrity": "sha512-0/r656RmRLo7CbN4Mdd+xZyPJ/fPCKhYdU6mnZx+8msAD8nJSP8EyCFkzbd6vNVZzZvWlMYrSNekqGrCBqFQhg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/visitor-keys": "5.4.0" + "@typescript-eslint/types": "5.5.0", + "@typescript-eslint/visitor-keys": "5.5.0" } }, "@typescript-eslint/types": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.4.0.tgz", - "integrity": "sha512-GjXNpmn+n1LvnttarX+sPD6+S7giO+9LxDIGlRl4wK3a7qMWALOHYuVSZpPTfEIklYjaWuMtfKdeByx0AcaThA==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.5.0.tgz", + "integrity": "sha512-OaYTqkW3GnuHxqsxxJ6KypIKd5Uw7bFiQJZRyNi1jbMJnK3Hc/DR4KwB6KJj6PBRkJJoaNwzMNv9vtTk87JhOg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.4.0.tgz", - "integrity": "sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.5.0.tgz", + "integrity": "sha512-pVn8btYUiYrjonhMAO0yG8lm7RApzy2L4RC7Td/mC/qFkyf6vRbGyZozoA94+w6D2Y2GRqpMoCWcwx/EUOzyoQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/visitor-keys": "5.4.0", + "@typescript-eslint/types": "5.5.0", + "@typescript-eslint/visitor-keys": "5.5.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -2717,9 +2717,9 @@ "dev": true }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -2775,12 +2775,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.4.0.tgz", - "integrity": "sha512-PVbax7MeE7tdLfW5SA0fs8NGVVr+buMPrcj+CWYWPXsZCH8qZ1THufDzbXm1xrZ2b2PA1iENJ0sRq5fuUtvsJg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.5.0.tgz", + "integrity": "sha512-4GzJ1kRtsWzHhdM40tv0ZKHNSbkDhF0Woi/TDwVJX6UICwJItvP7ZTXbjTkCdrors7ww0sYe0t+cIKDAJwZ7Kw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/types": "5.5.0", "eslint-visitor-keys": "^3.0.0" } }, @@ -6574,12 +6574,6 @@ } } }, - "eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", - "dev": true - }, "estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", @@ -7083,9 +7077,9 @@ } }, "eslint-visitor-keys": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz", - "integrity": "sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", "dev": true }, "esm": { @@ -7109,12 +7103,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", "dev": true - }, - "eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", - "dev": true } } }, @@ -7373,16 +7361,16 @@ } }, "expect": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.4.0.tgz", - "integrity": "sha512-3V4Nq5E5dS7bzFfinUThG0OnOnNIDdEPC0KG1pBgB1Z7ZTDVuuyvSBTOQewi0z0vaGKWPaJ880tGI+pPm+5aCg==", + "version": "27.4.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-27.4.1.tgz", + "integrity": "sha512-ykhuCRLKtHEo8/+qHX2PV7wjX4HMQY635Pe8+7G8hbssDNy7cfE6t/rHbdzEMVfh2KR3Z6V21MveI86IJ7V1jQ==", "dev": true, "requires": { - "@jest/types": "^27.4.0", + "@jest/types": "^27.4.1", "ansi-styles": "^5.0.0", "jest-get-type": "^27.4.0", - "jest-matcher-utils": "^27.4.0", - "jest-message-util": "^27.4.0", + "jest-matcher-utils": "^27.4.1", + "jest-message-util": "^27.4.1", "jest-regex-util": "^27.4.0" }, "dependencies": { @@ -9816,15 +9804,15 @@ } }, "jest-diff": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.0.tgz", - "integrity": "sha512-fdXgpnyQH4LNSnYgRfHN/g413bqbPspWIAZPlXrdNISehDih1VNDtuRvlzGQJ4Go+fur1HKB2IyI25t6cWi5EA==", + "version": "27.4.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.1.tgz", + "integrity": "sha512-bkDaDwdausD1tai7/7+WLBsI8lX0JnaL+2FwWOxyfbKR2G1iu+OX/R1YQPk4Xe2jwYI/hOAGxkqhGgAAT7/lsw==", "dev": true, "requires": { "chalk": "^4.0.0", "diff-sequences": "^27.4.0", "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.0" + "pretty-format": "^27.4.1" } }, "jest-get-type": { @@ -9834,30 +9822,30 @@ "dev": true }, "jest-matcher-utils": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.0.tgz", - "integrity": "sha512-vBy1tEyuKiItYgV9x9ubccyadOy5xAAmDBgXk8dMppXBXG4glggrGcZvE+8l1r+te477bRcFLB/hRyGm5Tdxzw==", + "version": "27.4.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.1.tgz", + "integrity": "sha512-CG0qQY4NN0Jthr/50jZbDL2cE6p8KZwBRkmVnuKv5QBMwkY6QEVxDQfhA+a5Uz17r7MjUQRWCig7H7IwG+L7qw==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^27.4.0", + "jest-diff": "^27.4.1", "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.0" + "pretty-format": "^27.4.1" } }, "jest-message-util": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.0.tgz", - "integrity": "sha512-2KmfpnxFwt+5CF0YST6U1IwFomX9gx2dmcAV/ZjzF9/4tlmieExl7Ch7D36l94mIxWTXhDuPji4XOvxRBdswrQ==", + "version": "27.4.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.1.tgz", + "integrity": "sha512-oC3sEs5dDHk5ibCrjIkDoe2S+U2bGogI3b8D9bGyKxJu/HSyibG/pWBI27gG3cwXgRyiGXZHuSiVCq7f+PoYcw==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.4.0", + "@jest/types": "^27.4.1", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "micromatch": "^4.0.4", - "pretty-format": "^27.4.0", + "pretty-format": "^27.4.1", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -13336,12 +13324,12 @@ "dev": true }, "pretty-format": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.0.tgz", - "integrity": "sha512-n0QR6hMREfp6nLzfVksXMAfIxk1ffOOfbb/FzKHFmRtn9iJKaZXB8WMzLr8a72IASShEAhqK06nlwp1gVWgqKg==", + "version": "27.4.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.1.tgz", + "integrity": "sha512-JJw4GzG0vP5dHA+D84zryrX3S34B6rZaJj6zsrN/sdNpcUNf1X6aH/7sPSqwtAGNXCxDqMa1wAKX4EH1Tv62aw==", "dev": true, "requires": { - "@jest/types": "^27.4.0", + "@jest/types": "^27.4.1", "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", "react-is": "^17.0.1" @@ -15117,9 +15105,9 @@ } }, "rollup": { - "version": "2.60.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.60.1.tgz", - "integrity": "sha512-akwfnpjY0rXEDSn1UTVfKXJhPsEBu+imi1gqBA1ZkHGydUnkV/fWCC90P7rDaLEW8KTwBcS1G3N4893Ndz+jwg==", + "version": "2.60.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.60.2.tgz", + "integrity": "sha512-1Bgjpq61sPjgoZzuiDSGvbI1tD91giZABgjCQBKM5aYLnzjq52GoDuWVwT/cm/MCxCMPU8gqQvkj8doQ5C8Oqw==", "dev": true, "requires": { "fsevents": "~2.3.2" diff --git a/package.json b/package.json index 918db4e2..2af86b05 100644 --- a/package.json +++ b/package.json @@ -99,8 +99,8 @@ "@types/tar": "^6.1.1", "@types/uuid": "^8.3.3", "@types/ws": "^8.2.1", - "@typescript-eslint/eslint-plugin": "^5.4.0", - "@typescript-eslint/parser": "^5.4.0", + "@typescript-eslint/eslint-plugin": "^5.5.0", + "@typescript-eslint/parser": "^5.5.0", "auto-changelog": "^2.3.0", "clinic": "^10.0.0", "cross-env": "^7.0.3", @@ -108,14 +108,14 @@ "eslint-plugin-import": "^2.25.3", "eslint-plugin-jsdoc": "^37.0.3", "eslint-plugin-node": "^11.1.0", - "expect": "^27.4.0", + "expect": "^27.4.1", "mocha": "^9.1.3", "mochawesome": "^7.0.1", "npm-check": "^5.9.2", "nyc": "^15.1.0", "release-it": "^14.11.8", "robohydra": "^0.6.9", - "rollup": "^2.60.1", + "rollup": "^2.60.2", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-copy": "^3.4.0", "rollup-plugin-delete": "^2.0.0", diff --git a/src/charging-station/WebSocketServer.ts b/src/charging-station/WebSocketServer.ts index 81e57675..e36725ca 100644 --- a/src/charging-station/WebSocketServer.ts +++ b/src/charging-station/WebSocketServer.ts @@ -12,7 +12,7 @@ export default class WebSocketServer extends WebSocket.Server { public constructor(options?: WebSocket.ServerOptions, callback?: () => void) { // Create the WebSocket Server - super({ ...options, port: 80 }, callback); + super(options ?? { port: 80 }, callback); // FIXME: version the instantiation this.webSocketServerService = new UIService(this); }