@thream/socketio-jwt
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -26,3 +26,3 @@ import jwt from 'jsonwebtoken'; | ||
let keySecret = null; | ||
let decodedToken; | ||
let decodedToken = null; | ||
if (typeof secret === 'string') { | ||
@@ -29,0 +29,0 @@ keySecret = secret; |
@@ -14,2 +14,2 @@ export declare class UnauthorizedError extends Error { | ||
} | ||
export declare const isUnauthorizedError: (error: any) => error is UnauthorizedError; | ||
export declare const isUnauthorizedError: (error: unknown) => error is UnauthorizedError; |
export class UnauthorizedError extends Error { | ||
inner; | ||
data; | ||
constructor(code, error){ | ||
@@ -15,3 +17,3 @@ super(error.message); | ||
export const isUnauthorizedError = (error)=>{ | ||
return error.data.type === 'UnauthorizedError'; | ||
return error instanceof UnauthorizedError && error.data.type === 'UnauthorizedError'; | ||
}; |
{ | ||
"name": "@thream/socketio-jwt", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"type": "module", | ||
@@ -56,36 +56,36 @@ "public": true, | ||
"devDependencies": { | ||
"@commitlint/cli": "17.4.1", | ||
"@commitlint/config-conventional": "17.4.0", | ||
"@swc/cli": "0.1.57", | ||
"@swc/core": "1.3.25", | ||
"@tsconfig/strictest": "1.0.2", | ||
"@types/jsonwebtoken": "9.0.0", | ||
"@types/node": "18.11.18", | ||
"@types/tap": "15.0.7", | ||
"@typescript-eslint/eslint-plugin": "5.48.1", | ||
"@typescript-eslint/parser": "5.48.1", | ||
"axios": "1.2.2", | ||
"c8": "7.12.0", | ||
"editorconfig-checker": "4.0.2", | ||
"eslint": "8.31.0", | ||
"eslint-config-conventions": "6.0.0", | ||
"eslint-config-prettier": "8.6.0", | ||
"eslint-plugin-import": "2.26.0", | ||
"@commitlint/cli": "17.5.1", | ||
"@commitlint/config-conventional": "17.4.4", | ||
"@swc/cli": "0.1.62", | ||
"@swc/core": "1.3.44", | ||
"@tsconfig/strictest": "2.0.0", | ||
"@types/jsonwebtoken": "9.0.1", | ||
"@types/node": "18.15.11", | ||
"@types/tap": "15.0.8", | ||
"@typescript-eslint/eslint-plugin": "5.57.0", | ||
"@typescript-eslint/parser": "5.57.0", | ||
"axios": "1.3.4", | ||
"c8": "7.13.0", | ||
"editorconfig-checker": "5.0.1", | ||
"eslint": "8.37.0", | ||
"eslint-config-conventions": "8.0.0", | ||
"eslint-config-prettier": "8.8.0", | ||
"eslint-plugin-import": "2.27.5", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"eslint-plugin-promise": "6.1.1", | ||
"eslint-plugin-unicorn": "45.0.2", | ||
"fastify": "4.11.0", | ||
"eslint-plugin-unicorn": "46.0.0", | ||
"fastify": "4.15.0", | ||
"husky": "8.0.3", | ||
"lint-staged": "13.1.0", | ||
"lint-staged": "13.2.0", | ||
"markdownlint-cli2": "0.6.0", | ||
"markdownlint-rule-relative-links": "1.1.1", | ||
"markdownlint-rule-relative-links": "1.1.2", | ||
"pinst": "3.0.0", | ||
"prettier": "2.8.2", | ||
"rimraf": "3.0.2", | ||
"semantic-release": "20.0.2", | ||
"socket.io": "4.5.4", | ||
"socket.io-client": "4.5.4", | ||
"tap": "16.3.3", | ||
"typescript": "4.9.4" | ||
"prettier": "2.8.7", | ||
"rimraf": "4.4.1", | ||
"semantic-release": "21.0.1", | ||
"socket.io": "4.6.1", | ||
"socket.io-client": "4.6.1", | ||
"tap": "16.3.4", | ||
"typescript": "5.0.3" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26347
516