File tree Expand file tree Collapse file tree 6 files changed +13
-6
lines changed
Expand file tree Collapse file tree 6 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import _ from 'underscore'
88import { public_dir } from '../../lib'
99import staticServe from 'koa-static'
1010import { logger } from '../../logging'
11+ import { PackageInfo } from '../../coreSystem'
1112
1213declare module 'http' {
1314 interface IncomingMessage {
@@ -55,8 +56,13 @@ Meteor.startup(() => {
5556
5657 // Serve the meteor runtime config
5758 rootRouter . get ( '/meteor-runtime-config.js' , async ( ctx ) => {
58- // @ts -expect-error missing types for internal meteor detail
59- ctx . body = `window.__meteor_runtime_config__ = (${ JSON . stringify ( __meteor_runtime_config__ ) } )`
59+ const versionExtended : string = PackageInfo . versionExtended || PackageInfo . version // package version
60+
61+ ctx . body = `window.__meteor_runtime_config__ = (${ JSON . stringify ( {
62+ // @ts -expect-error missing types for internal meteor detail
63+ ...__meteor_runtime_config__ ,
64+ sofieVersionExtended : versionExtended ,
65+ } ) } )`
6066 } )
6167
6268 koaApp . use ( rootRouter . routes ( ) ) . use ( rootRouter . allowedMethods ( ) )
Original file line number Diff line number Diff line change @@ -17,3 +17,5 @@ const MeteorInjectedSettings: any = window.__meteor_runtime_config__
1717if ( MeteorInjectedSettings ?. PUBLIC_SETTINGS ) {
1818 Settings = _ . extend ( Settings , MeteorInjectedSettings . PUBLIC_SETTINGS )
1919}
20+
21+ export const APP_VERSION_EXTENDED : string | undefined = MeteorInjectedSettings ?. sofieVersionExtended
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ export function catchError(context: string): (...errs: any[]) => void {
231231}
232232
233233export function hashSingleUseToken ( token : string ) : string {
234- // nocommit - a hack because the crypto polyfill doesn't work for some reason
234+ // Future: it would be nice for this to use a better webcrypto/better library, but this works
235235 return shajs ( 'sha1' )
236236 . update ( SINGLE_USE_TOKEN_SALT + token )
237237 . digest ( 'base64' )
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { TOOLTIP_DEFAULT_DELAY } from '../../lib/lib'
66import { useTranslation } from 'react-i18next'
77import { MeteorCall } from '../../lib/meteorApi'
88import { NoticeLevel , Notification , NotificationCenter } from '../../lib/notifications/notifications'
9+ import { APP_VERSION_EXTENDED } from '../../lib/Settings'
910
1011export function RundownListFooter ( ) : JSX . Element {
1112 const { t } = useTranslation ( )
@@ -40,7 +41,7 @@ export function RundownListFooter(): JSX.Element {
4041 } , [ ] )
4142
4243 const version = __APP_VERSION__ || 'UNSTABLE'
43- const versionExtended = __APP_VERSION_EXTENDED__ || version
44+ const versionExtended = APP_VERSION_EXTENDED || version
4445
4546 return (
4647 < div className = "mtl gutter version-info" >
Original file line number Diff line number Diff line change 11/// <reference types="vite/client" />
22
33declare const __APP_VERSION__ : string
4- declare const __APP_VERSION_EXTENDED__ : string
Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ export default defineConfig({
5252
5353 define : {
5454 __APP_VERSION__ : JSON . stringify ( process . env . npm_package_version ) ,
55- __APP_VERSION_EXTENDED__ : JSON . stringify ( process . env . npm_package_version ) , // nocommit do this properly
5655 } ,
5756
5857 server : {
You can’t perform that action at this time.
0 commit comments