-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: optionally trigger frontend reload on bundle rebuild
Set VITE_BUNDLE_SSE to cause the frontend to subscribe to server sent events from the VITE_BUNDLE_HOST at /sse.
- Loading branch information
1 parent
6f5e378
commit cc6ac44
Showing
10 changed files
with
76 additions
and
97 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 |
---|---|---|
@@ -1,19 +1,23 @@ | ||
import { bundle } from '@pi-base/core' | ||
import { dev } from '$app/environment' | ||
import * as envPublic from '$env/static/public' | ||
|
||
export const mainBranch = 'main' | ||
export const contributingUrl = `https://github.com/pi-base/data/wiki/Contributing` | ||
let _defaultHost = bundle.defaultHost | ||
try { | ||
_defaultHost = dev ? envPublic.PUBLIC_DATA_URL : bundle.defaultHost | ||
} catch {} | ||
export const defaultHost = _defaultHost | ||
const { | ||
VITE_BUNDLE_HOST = bundle.defaultHost, | ||
VITE_BUNDLE_SSE = 'false', | ||
VITE_BRANCH = 'unknown', | ||
VITE_MAIN_BRANCH = 'main', | ||
VITE_VERSION = 'unknown', | ||
} = import.meta.env | ||
|
||
export const mainBranch = VITE_MAIN_BRANCH | ||
export const defaultHost = VITE_BUNDLE_HOST | ||
|
||
export const build = { | ||
branch: import.meta.env.VITE_BRANCH || 'unknown', | ||
version: import.meta.env.VITE_VERSION || 'unknown', | ||
branch: VITE_BRANCH, | ||
version: VITE_VERSION, | ||
} | ||
|
||
export const bundleSse = VITE_BUNDLE_SSE === 'true' | ||
|
||
export const contributingUrl = `https://github.com/pi-base/data/wiki/Contributing` | ||
export const sentryIngest = | ||
'https://[email protected]/5251960' |
This file contains 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 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 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 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 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.