From 6eb0426acaf80a320d70659d85ab74000a3d0f65 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Mon, 17 Jul 2023 20:06:02 +0530 Subject: [PATCH] chore: correct VITE env prefix to APP --- .../team-invitation.service.ts | 2 +- .../hoppscotch-common/src/modules/sentry.ts | 2 +- packages/hoppscotch-common/src/vite-envs.d.ts | 36 +++++++++---------- .../hoppscotch-selfhost-web/vite.config.ts | 4 +-- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/hoppscotch-backend/src/team-invitation/team-invitation.service.ts b/packages/hoppscotch-backend/src/team-invitation/team-invitation.service.ts index 392d82e97..f60bd8428 100644 --- a/packages/hoppscotch-backend/src/team-invitation/team-invitation.service.ts +++ b/packages/hoppscotch-backend/src/team-invitation/team-invitation.service.ts @@ -150,7 +150,7 @@ export class TeamInvitationService { template: 'team-invitation', variables: { invitee: creator.displayName ?? 'A Hoppscotch User', - action_url: `${process.env.VITE_BASE_URL}/join-team?id=${dbInvitation.id}`, + action_url: `${process.env.APP_BASE_URL}/join-team?id=${dbInvitation.id}`, invite_team_name: team.name, }, }); diff --git a/packages/hoppscotch-common/src/modules/sentry.ts b/packages/hoppscotch-common/src/modules/sentry.ts index cee8a39c9..aad744e80 100644 --- a/packages/hoppscotch-common/src/modules/sentry.ts +++ b/packages/hoppscotch-common/src/modules/sentry.ts @@ -177,7 +177,7 @@ export default { onRouterInit(app, router) { if (!import.meta.env.APP_SENTRY_DSN) { console.log( - "Sentry tracing is not enabled because 'VITE_SENTRY_DSN' env is not defined" + "Sentry tracing is not enabled because 'APP_SENTRY_DSN' env is not defined" ) return } diff --git a/packages/hoppscotch-common/src/vite-envs.d.ts b/packages/hoppscotch-common/src/vite-envs.d.ts index 5b8a2ed45..04ccdaabd 100644 --- a/packages/hoppscotch-common/src/vite-envs.d.ts +++ b/packages/hoppscotch-common/src/vite-envs.d.ts @@ -2,30 +2,30 @@ // Environment Variables Intellisense interface ImportMetaEnv { - readonly VITE_GA_ID: string + readonly APP_GA_ID: string - readonly VITE_GTM_ID: string + readonly APP_GTM_ID: string - readonly VITE_API_KEY: string - readonly VITE_AUTH_DOMAIN: string - readonly VITE_DATABASE_URL: string - readonly VITE_PROJECT_ID: string - readonly VITE_STORAGE_BUCKET: string - readonly VITE_MESSAGING_SENDER_ID: string - readonly VITE_APP_ID: string - readonly VITE_MEASUREMENT_ID: string + readonly APP_API_KEY: string + readonly APP_AUTH_DOMAIN: string + readonly APP_DATABASE_URL: string + readonly APP_PROJECT_ID: string + readonly APP_STORAGE_BUCKET: string + readonly APP_MESSAGING_SENDER_ID: string + readonly APP_APP_ID: string + readonly APP_MEASUREMENT_ID: string - readonly VITE_BASE_URL: string - readonly VITE_SHORTCODE_BASE_URL: string + readonly APP_BASE_URL: string + readonly APP_SHORTCODE_BASE_URL: string - readonly VITE_BACKEND_GQL_URL: string - readonly VITE_BACKEND_WS_URL: string + readonly APP_BACKEND_GQL_URL: string + readonly APP_BACKEND_WS_URL: string - readonly VITE_SENTRY_DSN?: string - readonly VITE_SENTRY_ENVIRONMENT?: string - readonly VITE_SENTRY_RELEASE_TAG?: string + readonly APP_SENTRY_DSN?: string + readonly APP_SENTRY_ENVIRONMENT?: string + readonly APP_SENTRY_RELEASE_TAG?: string - readonly VITE_PROXYSCOTCH_ACCESS_TOKEN?: string + readonly APP_PROXYSCOTCH_ACCESS_TOKEN?: string } interface ImportMeta { diff --git a/packages/hoppscotch-selfhost-web/vite.config.ts b/packages/hoppscotch-selfhost-web/vite.config.ts index 1b9b060e4..8e4f66e85 100644 --- a/packages/hoppscotch-selfhost-web/vite.config.ts +++ b/packages/hoppscotch-selfhost-web/vite.config.ts @@ -85,9 +85,9 @@ export default defineConfig({ nuxtStyle: true, allowRobots: true, dest: ".sitemap-gen", - hostname: ENV.VITE_BASE_URL, + hostname: ENV.APP_BASE_URL, }) - } + }, }), StaticCopy({ targets: [