Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cb4ad87
feat(common): platform ui definition for team edit and invite (#5037)
anwarulislam May 2, 2025
609aaa4
chore: merge `main` into `next`
jamesgeorge007 May 7, 2025
f26d32c
refactor: rename enum `TeamMemberRole` to `TeamAccessRole` (#5053)
g3Bg2 May 7, 2025
c28e410
chore: merge `hoppscotch/main` into `hoppscotch/next`
jamesgeorge007 May 8, 2025
46e5792
chore: `hoppscotch-backend` code formatting, minor lint fixes, and re…
mirarifhasan May 9, 2025
9b0e1af
chore(backend): configure CORS for development and production environ…
ZenMachina16 May 14, 2025
3bf4463
chore: improve healthcheck configuration for AIO container (#4595)
progprnv May 14, 2025
7ee33ab
HSB-514 refactor: remove unused `CollType` GQL enum (#5074)
mirarifhasan May 16, 2025
2232f02
feat(common): add support for registering and merging additional loca…
anwarulislam May 16, 2025
3980847
feat(common): enhance HAWK authentication with payload hash calculati…
anwarulislam May 20, 2025
2ecc60a
feat(desktop): complete lifecycle logs (#5044)
CuriousCorrelation May 21, 2025
d14a3c7
fix(desktop): verbatim path handling in disk resolution (#5049)
CuriousCorrelation May 21, 2025
1da961c
fix(desktop): extend file-write permissions (#5070)
CuriousCorrelation May 21, 2025
d213bec
feat(kernel): multi-instance support for `store` (#5083)
CuriousCorrelation May 21, 2025
130facb
fix: include request body to AWS V4 signer in effective request funct…
anwarulislam May 21, 2025
9371457
chore: display platform links in app header (#5091)
nivedin May 21, 2025
e7aba8a
chore(backend): update dependencies (#5085)
mirarifhasan May 22, 2025
01d96fa
feat: initial and current value for environment variables (#5055)
nivedin May 23, 2025
656a15a
feat: migrate to a unified scripting system based on `faraday-cage` (…
jamesgeorge007 May 23, 2025
935bc10
docs(desktop): add minimum system requirements (#5096)
CuriousCorrelation May 26, 2025
aab2924
feat: extend platform API support for experimental scripting sandbox …
jamesgeorge007 May 26, 2025
b414496
chore(common): improved i18n strings (#5099)
anwarulislam May 27, 2025
cf442c5
feat(common): support importing OpenAPI YAML definitions from URL (#5…
anwarulislam May 27, 2025
a805736
chore: bump version to `2025.5.0`
jamesgeorge007 May 27, 2025
0212eba
fix: update id while syncing and gist import bug (#5100)
nivedin May 27, 2025
ad59690
chore: bump vulnerable dependencies
AndrewBastin May 27, 2025
fea6d8c
fix: correct import order for HoppRESTAuth (#5101)
anwarulislam May 28, 2025
40c1c20
feat(lenses): enhance content type detection and lens selection logic…
Phaired May 28, 2025
e1f78b1
chore: remove support for `fetch` from experimental scripting sandbox
jamesgeorge007 May 28, 2025
82d9367
feat: add JWT authentication support (#5079)
anwarulislam May 28, 2025
052dc17
test: update CLI test suite
jamesgeorge007 May 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions docker-compose.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
test:
[
"CMD-SHELL",
"sh -c 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'"
"sh -c 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'",
]
interval: 5s
timeout: 5s
Expand All @@ -28,21 +28,32 @@ services:
environment:
# DATABASE_URL is read from the .env file to allow the backend to connect with an external database.
# This allows the backend to retain existing data and prevents database resets during deployments.
# DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch
# - DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch
- ENABLE_SUBPATH_BASED_ACCESS=true
env_file:
- ./.env
depends_on:
hoppscotch-db:
condition: service_healthy
command: ["sh", "-c", "pnpm exec prisma migrate deploy && node /usr/src/app/aio_run.mjs"]
command:
[
"sh",
"-c",
"pnpm exec prisma migrate deploy && node /usr/src/app/aio_run.mjs",
]
healthcheck:
test:
- CMD
- curl
- '-f'
- 'http://localhost:80'
[
"CMD",
"curl",
"-f",
"-s",
"-o",
"/dev/null",
"-w",
"%{http_code}",
"http://localhost:80",
]
interval: 2s
timeout: 10s
retries: 30

11 changes: 10 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,16 @@ services:
# you are using an external postgres instance
# This will be exposed at port 5432
hoppscotch-db:
profiles: ["default", "database", "just-backend", "backend", "app", "admin", "deprecated"]
profiles:
[
"default",
"database",
"just-backend",
"backend",
"app",
"admin",
"deprecated",
]
image: postgres:15
ports:
- "5432:5432"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"execa@0.10.0": "2.0.0",
"@babel/runtime@<7.26.10": "7.26.10",
"apiconnect-wsdl": "2.0.36",
"@xmldom/xmldom": "0.8.10"
"@xmldom/xmldom": "0.8.10",
"multer@1.4.5-lts.2": "2.0.0"
},
"packageExtensions": {
"@hoppscotch/httpsnippet": {
Expand Down
27 changes: 0 additions & 27 deletions packages/hoppscotch-backend/.eslintrc.js

This file was deleted.

50 changes: 50 additions & 0 deletions packages/hoppscotch-backend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
const { defineConfig, globalIgnores } = require('eslint/config');
const tsParser = require('@typescript-eslint/parser');
const typescriptEslintEslintPlugin = require('@typescript-eslint/eslint-plugin');
const globals = require('globals');
const js = require('@eslint/js');

const { FlatCompat } = require('@eslint/eslintrc');

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

module.exports = defineConfig([
{
languageOptions: {
parser: tsParser,
sourceType: 'module',

parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
},

globals: {
...globals.node,
...globals.jest,
},
},

plugins: {
'@typescript-eslint': typescriptEslintEslintPlugin,
},

extends: compat.extends(
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
),

rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': 'error',
},
},
globalIgnores(['**/.eslintrc.js']),
]);
109 changes: 55 additions & 54 deletions packages/hoppscotch-backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hoppscotch-backend",
"version": "2025.4.2",
"version": "2025.5.0",
"description": "",
"author": "",
"private": true,
Expand Down Expand Up @@ -30,86 +30,87 @@
"do-test": "pnpm run test"
},
"dependencies": {
"@apollo/server": "4.11.0",
"@apollo/server": "4.12.1",
"@nestjs-modules/mailer": "2.0.2",
"@nestjs/apollo": "12.2.0",
"@nestjs/common": "10.4.16",
"@nestjs/config": "3.2.3",
"@nestjs/core": "10.4.4",
"@nestjs/graphql": "12.2.0",
"@nestjs/jwt": "10.2.0",
"@nestjs/passport": "10.0.3",
"@nestjs/platform-express": "10.4.4",
"@nestjs/schedule": "4.1.1",
"@nestjs/swagger": "7.4.2",
"@nestjs/terminus": "10.2.3",
"@nestjs/throttler": "6.2.1",
"@prisma/client": "5.20.0",
"argon2": "0.41.1",
"bcrypt": "5.1.1",
"@nestjs/apollo": "13.1.0",
"@nestjs/common": "11.1.1",
"@nestjs/config": "4.0.2",
"@nestjs/core": "11.1.1",
"@nestjs/graphql": "13.1.0",
"@nestjs/jwt": "11.0.0",
"@nestjs/passport": "11.0.0",
"@nestjs/platform-express": "11.1.1",
"@nestjs/schedule": "6.0.0",
"@nestjs/swagger": "11.2.0",
"@nestjs/terminus": "11.0.0",
"@nestjs/throttler": "6.4.0",
"@prisma/client": "6.8.2",
"argon2": "0.43.0",
"bcrypt": "6.0.0",
"class-transformer": "0.5.1",
"class-validator": "0.14.1",
"cookie": "1.0.0",
"class-validator": "0.14.2",
"cookie": "1.0.2",
"cookie-parser": "1.4.7",
"cron": "3.1.7",
"express": "4.21.1",
"cron": "4.3.0",
"express": "5.1.0",
"express-session": "1.18.1",
"fp-ts": "2.16.9",
"graphql": "16.9.0",
"graphql-query-complexity": "1.0.0",
"graphql-redis-subscriptions": "2.6.1",
"graphql-subscriptions": "2.0.0",
"fp-ts": "2.16.10",
"graphql": "16.11.0",
"graphql-query-complexity": "1.1.0",
"graphql-redis-subscriptions": "2.7.0",
"graphql-subscriptions": "3.0.0",
"handlebars": "4.7.8",
"io-ts": "2.2.21",
"luxon": "3.5.0",
"nodemailer": "6.9.15",
"io-ts": "2.2.22",
"luxon": "3.6.1",
"nodemailer": "7.0.3",
"passport": "0.7.0",
"passport-github2": "0.1.12",
"passport-google-oauth20": "2.0.0",
"passport-jwt": "4.0.1",
"passport-local": "1.0.0",
"passport-microsoft": "2.1.0",
"posthog-node": "4.2.0",
"prisma": "5.20.0",
"posthog-node": "4.17.1",
"prisma": "6.8.2",
"reflect-metadata": "0.2.2",
"rimraf": "6.0.1",
"rxjs": "7.8.1"
"rxjs": "7.8.2"
},
"devDependencies": {
"@nestjs/cli": "10.4.5",
"@nestjs/schematics": "10.1.4",
"@nestjs/testing": "10.4.4",
"@eslint/eslintrc": "3.3.1",
"@eslint/js": "9.27.0",
"@nestjs/cli": "11.0.7",
"@nestjs/schematics": "11.0.5",
"@nestjs/testing": "11.1.1",
"@relmify/jest-fp-ts": "2.1.1",
"@types/bcrypt": "5.0.2",
"@types/cookie": "0.6.0",
"@types/cookie-parser": "1.4.7",
"@types/express": "5.0.0",
"@types/jest": "29.5.13",
"@types/luxon": "3.4.2",
"@types/node": "22.7.5",
"@types/nodemailer": "6.4.16",
"@types/cookie-parser": "1.4.8",
"@types/express": "5.0.2",
"@types/jest": "29.5.14",
"@types/luxon": "3.6.2",
"@types/node": "22.15.19",
"@types/nodemailer": "6.4.17",
"@types/passport-github2": "1.2.9",
"@types/passport-google-oauth20": "2.0.16",
"@types/passport-jwt": "4.0.1",
"@types/passport-microsoft": "1.0.3",
"@types/supertest": "6.0.2",
"@typescript-eslint/eslint-plugin": "8.8.1",
"@typescript-eslint/parser": "8.8.1",
"@types/supertest": "6.0.3",
"@typescript-eslint/eslint-plugin": "8.32.1",
"@typescript-eslint/parser": "8.32.1",
"cross-env": "7.0.3",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.2.1",
"eslint": "9.27.0",
"eslint-config-prettier": "10.1.5",
"eslint-plugin-prettier": "5.4.0",
"globals": "16.1.0",
"jest": "29.7.0",
"jest-mock-extended": "4.0.0-beta1",
"jwt": "link:@types/nestjs/jwt",
"prettier": "3.3.3",
"prettier": "3.5.3",
"source-map-support": "0.5.21",
"supertest": "7.0.0",
"ts-jest": "29.2.5",
"ts-loader": "9.5.1",
"supertest": "7.1.1",
"ts-jest": "29.3.4",
"ts-loader": "9.5.2",
"ts-node": "10.9.2",
"tsconfig-paths": "4.2.0",
"typescript": "5.5.4"
"typescript": "5.8.3"
},
"jest": {
"moduleFileExtensions": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Alter the enum type "TeamMemberRole" to "TeamAccessRole"
ALTER TYPE "TeamMemberRole" RENAME TO "TeamAccessRole";
6 changes: 3 additions & 3 deletions packages/hoppscotch-backend/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ model Team {

model TeamMember {
id String @id @default(uuid()) // Membership ID
role TeamMemberRole
role TeamAccessRole
userUid String
teamID String
team Team @relation(fields: [teamID], references: [id], onDelete: Cascade)
Expand All @@ -34,7 +34,7 @@ model TeamInvitation {
team Team @relation(fields: [teamID], references: [id], onDelete: Cascade)
creatorUid String
inviteeEmail String
inviteeRole TeamMemberRole
inviteeRole TeamAccessRole

@@unique([teamID, inviteeEmail])
@@index([teamID])
Expand Down Expand Up @@ -207,7 +207,7 @@ model UserCollection {
updatedOn DateTime @updatedAt @db.Timestamp(3)
}

enum TeamMemberRole {
enum TeamAccessRole {
OWNER
VIEWER
EDITOR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
Controller,
Delete,
Get,
HttpStatus,
Param,
ParseIntPipe,
Post,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import { Module } from '@nestjs/common';
import { AccessTokenController } from './access-token.controller';
import { PrismaModule } from 'src/prisma/prisma.module';
import { AccessTokenService } from './access-token.service';
import { TeamCollectionModule } from 'src/team-collection/team-collection.module';
import { TeamEnvironmentsModule } from 'src/team-environments/team-environments.module';
import { TeamModule } from 'src/team/team.module';

@Module({
imports: [
PrismaModule,
TeamCollectionModule,
TeamEnvironmentsModule,
TeamModule,
],
imports: [TeamCollectionModule, TeamEnvironmentsModule, TeamModule],
controllers: [AccessTokenController],
providers: [AccessTokenService],
exports: [AccessTokenService],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
import { CreateAccessTokenResponse } from './helper';
import { PersonalAccessToken } from '@prisma/client';
import { AccessToken } from 'src/types/AccessToken';

@Injectable()
export class AccessTokenService {
constructor(private readonly prisma: PrismaService) {}
Expand Down
4 changes: 0 additions & 4 deletions packages/hoppscotch-backend/src/admin/admin.module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { Module } from '@nestjs/common';
import { AdminResolver } from './admin.resolver';
import { AdminService } from './admin.service';
import { PrismaModule } from '../prisma/prisma.module';
import { PubSubModule } from '../pubsub/pubsub.module';
import { UserModule } from '../user/user.module';
import { TeamModule } from '../team/team.module';
import { TeamInvitationModule } from '../team-invitation/team-invitation.module';
Expand All @@ -16,8 +14,6 @@ import { UserHistoryModule } from 'src/user-history/user-history.module';

@Module({
imports: [
PrismaModule,
PubSubModule,
UserModule,
TeamModule,
TeamInvitationModule,
Expand Down
Loading
Loading