Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

Merge branch 'main' into feat/user-authentication

Balu Babua188ad68eda9
diff --cc packages/hoppscotch-backend/package.json
index ace0efd85,bc94a0706..5a1d87096
--- a/packages/hoppscotch-backend/package.json
+++ b/packages/hoppscotch-backend/package.json
@@@ -60,26 -47,17 +60,26 @@@
"@nestjs/schematics": "^9.0.3",
"@nestjs/testing": "^9.2.1",
"@relmify/jest-fp-ts": "^2.0.2",
+ "@types/argon2": "^0.15.0",
+ "@types/bcrypt": "^5.0.0",
+ "@types/cookie-parser": "^1.4.3",
"@types/express": "^4.17.14",
- "@types/jest": "^27.5.2",
+ "@types/luxon": "^3.2.0",
+ "@types/jest": "^29.4.0",
"@types/node": "^18.11.10",
+ "@types/passport-github2": "^1.2.5",
+ "@types/passport-google-oauth20": "^2.0.11",
+ "@types/passport-jwt": "^3.0.8",
+ "@types/passport-microsoft": "^0.0.0",
"@types/supertest": "^2.0.12",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"eslint": "^8.29.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
- "jest": "^29.3.1",
+ "jest": "^29.4.1",
"jest-mock-extended": "^3.0.1",
+ "jwt": "link:@types/nestjs/jwt",
"prettier": "^2.8.0",
"source-map-support": "^0.5.21",
"supertest": "^6.3.2",
@@@ -90,14 -68,12 +90,20 @@@
"typescript": "^4.9.3"
},
"jest": {
+ "moduleFileExtensions": [
+ "js",
+ "json",
+ "ts"
+ ],
+ "setupFilesAfterEnv": [
+ "@relmify/jest-fp-ts"
+ ],
+ "preset": "ts-jest",
+ "clearMocks": true,
+ "collectCoverage": true,
+ "coverageDirectory": "coverage",
+ "coverageProvider": "v8",
+ "rootDir": "src",
"moduleNameMapper": {
"^src/(.*)$": "<rootDir>/$1"
},
diff --cc pnpm-lock.yaml
index 20e7e81b2,fb6fdd8d5..59ab6c556
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@@ -56,11 -54,9 +56,11 @@@ importers
'@nestjs/testing': ^9.2.1
'@prisma/client': ^4.7.1
'@relmify/jest-fp-ts': ^2.0.2
+ '@types/bcrypt': ^5.0.0
'@types/express': ^4.17.14
- '@types/jest': ^27.5.2
+ '@types/jest': ^29.4.0
'@types/node': ^18.11.10
+ '@types/passport-jwt': ^3.0.8
'@types/supertest': ^2.0.12
'@typescript-eslint/eslint-plugin': ^5.45.0
'@typescript-eslint/parser': ^5.45.0
@@@ -79,12 -73,8 +79,13 @@@
graphql-subscriptions: ^2.0.0
io-ts: ^2.2.16
ioredis: ^5.2.4
- jest: ^29.3.1
+ jest-mock-extended: ^3.0.1
+ luxon: ^3.2.1
+ passport: ^0.6.0
+ passport-jwt: ^4.0.1
+ postmark: ^3.0.15
+ jest: ^29.4.1
+ jest-mock-extended: ^3.0.1
prettier: ^2.8.0
prisma: ^4.7.1
reflect-metadata: ^0.1.13
@@@ -102,15 -92,10 +103,15 @@@
'@nestjs/common': 9.2.1_whg6pvy6vwu66ypq7idiq2suxq
'@nestjs/core': 9.2.1_ajc4cvdydchgvxyi4xnoij5t4i
'@nestjs/graphql': 10.1.6_2khsk5ahlt4vlkrgib4soffmwu
+ '@nestjs/jwt': 10.0.1_@[email protected]
+ '@nestjs/passport': 9.0.0_6o47igfla2pj7yzh7agpvpttka
'@nestjs/platform-express': 9.2.1_hjcqpoaebdr7gdo5hgc22hthbe
- '@prisma/client': [email protected]
- '@prisma/client': [email protected]
+ '@types/bcrypt': 5.0.0
apollo-server-express: 3.11.1_4mq2c443wwzwcb6dpxnwkfvrzm
apollo-server-plugin-base: [email protected]
+ argon2: 0.30.3
+ bcrypt: 5.1.0
++ '@prisma/client': [email protected]
express: 4.18.2
fp-ts: 2.13.1
graphql: 15.8.0
@@@ -118,12 -103,8 +119,12 @@@
graphql-redis-subscriptions: 2.5.0_nsv4zbviaf54hk5nfhl4slig7i
graphql-subscriptions: [email protected]
-- ioredis: 5.2.4
++ ioredis: 5.2.
+ luxon: 3.2.1
+ passport: 0.6.0
+ passport-jwt: 4.0.1
+ postmark: 3.0.15
- prisma: 4.8.1
+ prisma: 4.9.0
reflect-metadata: 0.1.13
rimraf: 3.0.2
rxjs: 7.6.0
@@@ -133,9 -114,8 +134,9 @@@
'@nestjs/testing': 9.2.1_wdbvfsxfdwzlwdfiyh2gynjl4m
'@relmify/jest-fp-ts': [email protected][email protected]
'@types/express': 4.17.14
- '@types/jest': 27.5.2
+ '@types/jest': 29.4.0
'@types/node': 18.11.10
+ '@types/passport-jwt': 3.0.8
'@types/supertest': 2.0.12
'@typescript-eslint/eslint-plugin': 5.45.0_yjegg5cyoezm3fzsmuszzhetym
'@typescript-eslint/parser': 5.45.0_s5ps7njkmjlaqajutnox5ntcla
@@@ -4205,14 -4422,14 +4443,14 @@@ packages
chalk: 4.1.2
dev: true
- /@jest/types/28.1.1:
- resolution: {integrity: sha512-vRXVqSg1VhDnB8bWcmvLzmg0Bt9CRKVgHPXqYwvWMX3TvAjeO+nRuK6+VdTKCtWOvYlmkF/HqNAL/z+N3B53Kw==}
+ /@jest/types/28.1.3:
+ resolution: {integrity: sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==}
engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0}
dependencies:
- '@jest/schemas': 28.0.2
+ '@jest/schemas': 28.1.3
'@types/istanbul-lib-coverage': 2.0.4
'@types/istanbul-reports': 3.0.1
- '@types/node': 17.0.45
+ '@types/node': 18.11.10
'@types/yargs': 17.0.10
chalk: 4.1.2
dev: true
@@@ -4676,9 -4848,9 +4912,8 @@@
/@popperjs/core/2.11.5:
resolution: {integrity: sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==}
dev: false
--
- /@prisma/client/[email protected]:
- resolution: {integrity: sha512-d4xhZhETmeXK/yZ7K0KcVOzEfI5YKGGEr4F5SBV04/MU4ncN/HcE28sy3e4Yt8UFW0ZuImKFQJE+9rWt9WbGSQ==}
+ /@prisma/client/[email protected]:
+ resolution: {integrity: sha512-bz6QARw54sWcbyR1lLnF2QHvRW5R/Jxnbbmwh3u+969vUKXtBkXgSgjDA85nji31ZBlf7+FrHDy5x+5ydGyQDg==}
engines: {node: '>=14.17'}
requiresBuild: true
peerDependencies:
@@@ -5302,11 -5488,10 +5557,15 @@@
'@types/node': 17.0.45
dev: true
+ /@types/jsonwebtoken/8.5.9:
+ resolution: {integrity: sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==}
+ dependencies:
+ '@types/node': 18.11.10
+
+ /@types/linkify-it/3.0.2:
+ resolution: {integrity: sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==}
+ dev: true
+
/@types/lodash-es/4.17.6:
resolution: {integrity: sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==}
dependencies:
@@@ -7237,18 -7553,10 +7684,22 @@@
safe-buffer: 5.1.2
dev: true
+ /bcrypt/5.1.0:
+ resolution: {integrity: sha512-RHBS7HI5N5tEnGTmtR/pppX0mmDSBpQ4aCBsj7CEQfYXDcO74A8sIBYcJMuCsis2E81zDxeENYhv66oZwLiA+Q==}
+ engines: {node: '>= 10.0.0'}
+ requiresBuild: true
+ dependencies:
+ '@mapbox/node-pre-gyp': 1.0.10
+ node-addon-api: 5.0.0
+ transitivePeerDependencies:
+ - encoding
+ - supports-color
+ dev: false
+
+ /big.js/5.2.2:
+ resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==}
+ dev: true
+
/binary-extensions/2.2.0:
resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==}
engines: {node: '>=8'}
@@@ -8269,9 -8606,10 +8771,9 @@@
resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==}
dependencies:
safe-buffer: 5.2.1
- dev: true
/ee-first/1.1.1:
- resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}
+ resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=}
/ejs/3.1.8:
resolution: {integrity: sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==}
@@@ -11692,8 -12120,8 +12309,8 @@@
peerDependencies:
jest: ^24.0.0 || ^25.0.0 || ^26.0.0 || ^27.0.0 || ^28.0.0 || ^29.0.0
typescript: ^3.0.0 || ^4.0.0
-- dependencies:
- jest: 29.3.1_j5wyyouvf5aixckc7ltaxrydha
++
+ jest: 29.4.1_j5wyyouvf5aixckc7ltaxrydha
ts-essentials: [email protected]
typescript: 4.9.3
dev: true
@@@ -12884,7 -13379,17 +13602,16 @@@
resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==}
engines: {node: '>=10'}
hasBin: true
- dev: true
+ /mlly/1.1.0:
+ resolution: {integrity: sha512-cwzBrBfwGC1gYJyfcy8TcZU1f+dbH/T+TuOhtYP2wLv/Fb51/uV7HJQfBPtEupZ2ORLRU1EKFS/QfS3eo9+kBQ==}
+ dependencies:
+ acorn: 8.8.2
+ pathe: 1.1.0
+ pkg-types: 1.0.1
+ ufo: 1.0.1
+ dev: true
+
/mocha/9.2.2:
resolution: {integrity: sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==}
engines: {node: '>= 12.0.0'}