build(deps-dev): bump typescript from 4.3.5 to 4.4.2 (#201)
Co-authored-by: Divlo <contact@divlo.fr>
This commit is contained in:
parent
5a7d281798
commit
596d6a82c9
@ -1,8 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
preset: 'ts-jest',
|
|
||||||
testEnvironment: 'node',
|
|
||||||
rootDir: './src',
|
|
||||||
setupFilesAfterEnv: ['<rootDir>/__test__/setup.ts'],
|
|
||||||
collectCoverage: true,
|
|
||||||
coverageDirectory: '../coverage/'
|
|
||||||
}
|
|
7
jest.config.json
Normal file
7
jest.config.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"preset": "ts-jest",
|
||||||
|
"testEnvironment": "node",
|
||||||
|
"rootDir": "./src",
|
||||||
|
"collectCoverage": true,
|
||||||
|
"coverageDirectory": "../coverage/"
|
||||||
|
}
|
4316
package-lock.json
generated
4316
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -61,13 +61,13 @@
|
|||||||
"@types/express": "4.17.13",
|
"@types/express": "4.17.13",
|
||||||
"@types/jest": "27.0.1",
|
"@types/jest": "27.0.1",
|
||||||
"@types/jsonwebtoken": "8.5.5",
|
"@types/jsonwebtoken": "8.5.5",
|
||||||
"@types/node": "16.7.2",
|
"@types/node": "16.7.3",
|
||||||
"@types/server-destroy": "1.0.1",
|
"@types/server-destroy": "1.0.1",
|
||||||
"axios": "0.21.1",
|
"axios": "0.21.1",
|
||||||
"editorconfig-checker": "4.0.2",
|
"editorconfig-checker": "4.0.2",
|
||||||
"express": "4.17.1",
|
"express": "4.17.1",
|
||||||
"husky": "7.0.2",
|
"husky": "7.0.2",
|
||||||
"jest": "27.0.6",
|
"jest": "27.1.0",
|
||||||
"markdownlint-cli": "0.28.1",
|
"markdownlint-cli": "0.28.1",
|
||||||
"pinst": "2.1.6",
|
"pinst": "2.1.6",
|
||||||
"rimraf": "3.0.2",
|
"rimraf": "3.0.2",
|
||||||
@ -77,6 +77,6 @@
|
|||||||
"socket.io-client": "4.1.3",
|
"socket.io-client": "4.1.3",
|
||||||
"ts-jest": "27.0.5",
|
"ts-jest": "27.0.5",
|
||||||
"ts-standard": "10.0.0",
|
"ts-standard": "10.0.0",
|
||||||
"typescript": "4.3.5"
|
"typescript": "4.4.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +0,0 @@
|
|||||||
jest.setTimeout(15_000)
|
|
@ -19,7 +19,7 @@ interface ExtendedSocket {
|
|||||||
|
|
||||||
type SocketIOMiddleware = (
|
type SocketIOMiddleware = (
|
||||||
socket: Socket,
|
socket: Socket,
|
||||||
next: (err?: ExtendedError) => void
|
next: (error?: ExtendedError) => void
|
||||||
) => void
|
) => void
|
||||||
|
|
||||||
interface CompleteDecodedToken {
|
interface CompleteDecodedToken {
|
||||||
@ -83,8 +83,8 @@ export const authorize = (options: AuthorizeOptions): SocketIOMiddleware => {
|
|||||||
if (onAuthentication != null) {
|
if (onAuthentication != null) {
|
||||||
try {
|
try {
|
||||||
socket.user = await onAuthentication(decodedToken)
|
socket.user = await onAuthentication(decodedToken)
|
||||||
} catch (err) {
|
} catch (error: any) {
|
||||||
return next(err)
|
return next(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return next()
|
return next()
|
||||||
|
Reference in New Issue
Block a user