-
-
Notifications
You must be signed in to change notification settings - Fork 40
Update env #715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Update env #715
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
80525f0
mv found API keys to .env
AnilKumar3494 9aac547
all hardcoded ones are verfided and moved
AnilKumar3494 b6e95d7
final mv
AnilKumar3494 c7d9b10
mv verification pwd
AnilKumar3494 c5c530e
mv verification pwd
AnilKumar3494 cd52af8
add missing msg
AnilKumar3494 74b8a0b
moe yelling
AnilKumar3494 8ad514c
added yelling in dev env for all keys and imports if missing
AnilKumar3494 2ca51bf
add: secerts workflow to test injections
AnilKumar3494 bf8ec0b
Merge branch 'develop' into update-env
AnilKumar3494 506b34c
add: secerts workflow to test injections
AnilKumar3494 ebc392f
should work -- clean up after
AnilKumar3494 69ef167
another try to make it work -- clean up after
AnilKumar3494 3c5652d
another try to make it work -- clean up after
AnilKumar3494 ca3c34b
try 4 to make it work -- clean up after
AnilKumar3494 fb7d2fb
try 5 to make it work -- clean up after
AnilKumar3494 9010d32
try 6 to make it work -- clean up after
AnilKumar3494 dc7fee3
try 7 debug missing key ugg
AnilKumar3494 2fb5fec
try 7 debug missing key ugg
AnilKumar3494 1897422
try 8 should work
AnilKumar3494 a447e9f
working cleaup done
AnilKumar3494 a4d16e2
testing something -- need to add more secret keys
AnilKumar3494 5c451eb
just need to add one more key to GH secrets and should work
AnilKumar3494 96ab60f
zod env config
AnilKumar3494 fd9fb46
zod env config
AnilKumar3494 1fd809f
Update config.ts
AnilKumar3494 cc89900
simplfy
AnilKumar3494 d5f20fb
Adds vite preflight check to ensure environment variables are set and…
gcardonag File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,3 +15,4 @@ jobs: | |
| secrets: inherit | ||
| cypress-testing: | ||
| uses: ./.github/workflows/cypress_testing.yml | ||
| secrets: inherit | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Below is how your .env file should look. Make sure to replace the placeholder values with your actual API keys. | ||
| # To get these details please message us in the #phlask-data channel on Slack | ||
|
|
||
| VITE_DB_API_KEY=db_api_key_here | ||
| VITE_REACT_GOOGLE_MAPS_API_KEY=google_maps_api_key_here | ||
| VITE_OPEN_ROUTE_SERVICE_API_KEY=open_route_service_api_key_here | ||
| VITE_PUBLIC_POSTHOG_KEY=posthog_api_key_here | ||
| VITE_VERIFICATION_PASSWORD=verification_password_here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import { z } from 'zod'; | ||
|
|
||
| const envSchema = z.object({ | ||
| VITE_DB_API_KEY: z.string().min(1), | ||
| VITE_REACT_GOOGLE_MAPS_API_KEY: z.string().min(1), | ||
| VITE_OPEN_ROUTE_SERVICE_API_KEY: z.string().min(1), | ||
| VITE_PUBLIC_POSTHOG_KEY: z.string().min(1), | ||
| VITE_VERIFICATION_PASSWORD: z.string().min(1) | ||
| }); | ||
|
|
||
| const result = envSchema.safeParse(import.meta.env); | ||
|
|
||
| if (!result.success) { | ||
| console.error(result.error); | ||
| throw new Error( | ||
| `Environment variables are missing or invalid in your .env file. Check the error details above.` | ||
| ); | ||
| } | ||
|
|
||
| export const env = result.data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.