Add hybrid versioning scripts, version shown in app footer
This commit is contained in:
@@ -8,8 +8,28 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import packageJson from '../../package.json';
|
||||
// Direct import of version.json - Vite handles this natively with import assertions
|
||||
// This file is generated by prebuild script with git info
|
||||
// @ts-ignore
|
||||
import versionJsonDefault from '../version.json' assert { type: 'json' };
|
||||
|
||||
// Use the imported version.json, or fall back to -dev version
|
||||
const versionInfo = versionJsonDefault && Object.keys(versionJsonDefault).length > 0 && versionJsonDefault.version && !versionJsonDefault.version.includes('unknown')
|
||||
? versionJsonDefault
|
||||
: {
|
||||
version: `${packageJson.version}-dev`,
|
||||
semver: packageJson.version,
|
||||
commit: 'unknown',
|
||||
branch: 'unknown',
|
||||
buildDate: new Date().toISOString(),
|
||||
gitDate: 'unknown',
|
||||
};
|
||||
|
||||
export const LOCAL_STORAGE_KEY = 'medPlanAssistantState_v7';
|
||||
export const PROJECT_REPOSITORY_URL = 'https://git.11001001.org/cbaoth/med-plan-assistant';
|
||||
export const APP_VERSION = versionInfo.version;
|
||||
export const BUILD_INFO = versionInfo;
|
||||
|
||||
// Pharmacokinetic Constants (from research literature)
|
||||
// MW ratio: 135.21 (d-amphetamine) / 455.60 (LDX dimesylate) = 0.29677
|
||||
|
||||
Reference in New Issue
Block a user