From 73947f0ba4031cb0f9aff78f8a7e3316a36d59b4 Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Sun, 22 May 2022 16:20:06 +0200 Subject: [PATCH] feat: add vite-plugin sentry --- .drone.yml | 6 +++++ env.d.ts | 25 +++++++++++++++----- index.html | 4 ++-- package.json | 4 +++- src/composables/useOnline.ts | 2 +- src/main.ts | 9 ++++--- src/sentry.ts | 11 +++++---- tsconfig.app.json | 4 ++++ vite.config.ts | 46 ++++++++++++++++++++++++++++++++---- 9 files changed, 89 insertions(+), 22 deletions(-) diff --git a/.drone.yml b/.drone.yml index 71b7be40..aea9141e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -70,6 +70,12 @@ steps: pull: always environment: PNPM_CACHE_FOLDER: .cache/pnpm + SENTRY_AUTH_TOKEN: + from_secret: sentry_auth_token + SENTRY_ORG: vikunja + SENTRY_PROJECT: frontend-oss + SENTRY_RELEASE: + from_secret: sentry_release commands: - corepack enable && pnpm config set store-dir .cache/pnpm - pnpm run build diff --git a/env.d.ts b/env.d.ts index 1c43ec1e..c9b45113 100644 --- a/env.d.ts +++ b/env.d.ts @@ -4,19 +4,32 @@ /// declare module 'postcss-focus-within/browser' { - import focusWithinInit from 'postcss-focus-within/browser' - export default focusWithinInit + import focusWithinInit from 'postcss-focus-within/browser' + export default focusWithinInit } declare module 'css-has-pseudo/browser' { - import cssHasPseudo from 'css-has-pseudo/browser' - export default cssHasPseudo + import cssHasPseudo from 'css-has-pseudo/browser' + export default cssHasPseudo } interface ImportMetaEnv { - readonly VITE_IS_ONLINE: boolean + readonly VIKUNJA_API_URL?: string + readonly VIKUNJA_HTTP_PORT?: number + readonly VIKUNJA_HTTPS_PORT?: number + + readonly VIKUNJA_SENTRY_ENABLED?: boolean + readonly VIKUNJA_SENTRY_DSN?: string + + readonly SENTRY_AUTH_TOKEN?: string + readonly SENTRY_ORG?: string + readonly SENTRY_PROJECT?: string + readonly SENTRY_RELEASE?: string + + readonly VITE_WORKBOX_DEBUG?: boolean + readonly VITE_IS_ONLINE: boolean } interface ImportMeta { - readonly env: ImportMetaEnv + readonly env: ImportMetaEnv } \ No newline at end of file diff --git a/index.html b/index.html index 5c1c2c70..c89f02cf 100644 --- a/index.html +++ b/index.html @@ -18,12 +18,12 @@