Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
fix: filter undefined values in config and update build files (#5610)
Mir Arif Hasan92031c84c17c
diff --git a/packages/hoppscotch-backend/package.json b/packages/hoppscotch-backend/package.jsonindex f182dc0d3..56f9f933d 100644--- a/packages/hoppscotch-backend/package.json+++ b/packages/hoppscotch-backend/package.json@@ -7,6 +7,7 @@"license": "UNLICENSED","files": ["prisma",+ "prisma.config.ts","dist","src/mailer/templates"],@@ -22,7 +23,7 @@"start:prod": "node dist/main","lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix","test": "jest",- "postinstall": "prisma generate && pnpm run generate-gql-sdl",+ "postinstall": "cross-env DATABASE_URL=postgresql://placeholder:placeholder@localhost:5432/placeholder prisma generate && pnpm run generate-gql-sdl","test:watch": "jest --watch","test:cov": "jest --coverage","test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",diff --git a/packages/hoppscotch-backend/src/infra-config/infra-config.service.ts b/packages/hoppscotch-backend/src/infra-config/infra-config.service.tsindex 92e9f496f..fa763d77c 100644--- a/packages/hoppscotch-backend/src/infra-config/infra-config.service.ts+++ b/packages/hoppscotch-backend/src/infra-config/infra-config.service.ts@@ -525,10 +525,12 @@ export class InfraConfigService implements OnModuleInit {const onboardingRecoveryToken = crypto.randomUUID();const configEntries: InfraConfigArgs[] = [- ...Object.entries(dto).map(([key, value]) => ({- name: key as InfraConfigEnum,- value,- })),+ ...Object.entries(dto)+ .filter(([_, value]) => value !== undefined)+ .map(([key, value]) => ({+ name: key as InfraConfigEnum,+ value,+ })),{name: InfraConfigEnum.ONBOARDING_COMPLETED,value: 'true',diff --git a/prod.Dockerfile b/prod.Dockerfileindex 560baac09..d0200ce64 100644--- a/prod.Dockerfile+++ b/prod.Dockerfile@@ -83,6 +83,7 @@ RUN apk add --no-cache python3 make g++ zlib-dev brotli-dev c-ares-dev nghttp2-dWORKDIR /usr/src/appENV HOPP_ALLOW_RUNTIME_ENV=true+ENV DATABASE_URL="postgresql://placeholder:placeholder@localhost:5432/placeholder"COPY pnpm-lock.yaml .RUN pnpm fetch@@ -94,6 +95,7 @@ RUN pnpm install -f --prefer-offlineFROM base_builder AS backend_builderWORKDIR /usr/src/app/packages/hoppscotch-backend+ENV DATABASE_URL="postgresql://placeholder:placeholder@localhost:5432/placeholder"RUN pnpm exec prisma generateRUN pnpm run buildRUN pnpm --filter=hoppscotch-backend deploy /dist/backend --prod --legacy