mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
➕ add-dep: add jsonwebtoken to mana-core-auth dependencies
This commit is contained in:
parent
c0117b2699
commit
075051a1d4
3 changed files with 15 additions and 13 deletions
|
|
@ -1290,6 +1290,7 @@ volumes:
|
|||
name: mana-redis-data
|
||||
minio_data:
|
||||
name: mana-minio-data
|
||||
external: true
|
||||
victoriametrics_data:
|
||||
name: mana-victoria-data
|
||||
grafana_data:
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
"duckdb-async": "^1.1.1",
|
||||
"helmet": "^8.0.0",
|
||||
"jose": "^6.1.2",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"nanoid": "^5.0.9",
|
||||
"nodemailer": "^7.0.12",
|
||||
"postgres": "^3.4.5",
|
||||
|
|
@ -63,6 +64,7 @@
|
|||
"@types/cookie-parser": "^1.4.7",
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/jsonwebtoken": "^9.0.7",
|
||||
"@types/node": "^22.10.2",
|
||||
"@types/nodemailer": "^7.0.5",
|
||||
"@types/supertest": "^6.0.2",
|
||||
|
|
|
|||
|
|
@ -1,20 +1,19 @@
|
|||
/**
|
||||
* Jose Mock - Re-exports the real module functions
|
||||
* Jose Mock - Uses jest.requireActual to get the real module
|
||||
*
|
||||
* We use the real jose library for JWT validation tests
|
||||
* since we're testing actual JWT creation and verification.
|
||||
*
|
||||
* Note: We need to explicitly require and re-export because
|
||||
* jest module mocking doesn't handle ESM re-exports well.
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
const jose = require('jose');
|
||||
// Use jest.requireActual to bypass the mock and get the real module
|
||||
const actualJose = jest.requireActual('jose');
|
||||
|
||||
export const SignJWT = jose.SignJWT;
|
||||
export const jwtVerify = jose.jwtVerify;
|
||||
export const createRemoteJWKSet = jose.createRemoteJWKSet;
|
||||
export const errors = jose.errors;
|
||||
export const generateKeyPair = jose.generateKeyPair;
|
||||
export const exportJWK = jose.exportJWK;
|
||||
export const importJWK = jose.importJWK;
|
||||
export const SignJWT = actualJose.SignJWT;
|
||||
export const jwtVerify = actualJose.jwtVerify;
|
||||
export const createRemoteJWKSet = actualJose.createRemoteJWKSet;
|
||||
export const errors = actualJose.errors;
|
||||
export const generateKeyPair = actualJose.generateKeyPair;
|
||||
export const exportJWK = actualJose.exportJWK;
|
||||
export const importJWK = actualJose.importJWK;
|
||||
export const decodeJwt = actualJose.decodeJwt;
|
||||
export const decodeProtectedHeader = actualJose.decodeProtectedHeader;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue