From 9274eba823221f6d5e41fc4b07cd79d28816b72e Mon Sep 17 00:00:00 2001 From: stuyk Date: Fri, 15 Mar 2024 07:50:54 -0600 Subject: [PATCH 1/2] fix: environment variable parsing --- .env.example | 6 +++--- src/composables/useConfig.ts | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index e714164..39e030c 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -ENDPOINT=http://localhost:3000 -STORAGE_KEY=github-comment-jwt -REPO=stuyk/giscus +VITE_ENDPOINT=http://localhost:3000 +VITE_STORAGE_KEY=github-comment-jwt +VITE_REPO=stuyk/giscus VITE_GRAPHQL_ENDPOINT=http://164.92.143.81:8080/v1/graphql \ No newline at end of file diff --git a/src/composables/useConfig.ts b/src/composables/useConfig.ts index b878182..23da8ae 100644 --- a/src/composables/useConfig.ts +++ b/src/composables/useConfig.ts @@ -1,9 +1,9 @@ export const useConfig = () => { return { - ENDPOINT: import.meta.env.ENDPOINT ? import.meta.env.ENDPOINT : "http://localhost:3000", - STORAGE_KEY: import.meta.env.STORAGE_KEY ? import.meta.env.STORAGE_KEY : "github-comment-jwt", - PREVIOUS_LINK_KEY: import.meta.env.PREVIOUS_LINK_KEY ? import.meta.env.PREVIOUS_LINK_KEY : "previous-link", - REPO: import.meta.env.REPO ? import.meta.env.REPO : "stuyk/giscus-test", - DISCUSSION_REFRESH_TIME: import.meta.env.DISCUSSION_REFRESH_TIME ? import.meta.env.DISCUSSION_REFRESH_TIME : 5000, + ENDPOINT: import.meta.env.VITE_ENDPOINT ?? "http://localhost:3000", + STORAGE_KEY: import.meta.env.VITE_STORAGE_KEY ?? "github-comment-jwt", + PREVIOUS_LINK_KEY: import.meta.env.VITE_PREVIOUS_LINK_KEY ?? "previous-link", + REPO: import.meta.env.VITE_REPO ?? "stuyk/giscus-test", + DISCUSSION_REFRESH_TIME: import.meta.env.VITE_DISCUSSION_REFRESH_TIME ?? 5000, }; }; From 3fbe1a89a1b77e8cac2aea57f307a00028e39e6c Mon Sep 17 00:00:00 2001 From: stuyk Date: Fri, 15 Mar 2024 07:51:37 -0600 Subject: [PATCH 2/2] fix: lint --- src/gql/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gql/index.ts b/src/gql/index.ts index f515991..0ea4a91 100644 --- a/src/gql/index.ts +++ b/src/gql/index.ts @@ -1,2 +1,2 @@ export * from "./fragment-masking"; -export * from "./gql"; \ No newline at end of file +export * from "./gql";