mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor(server): version logic (#9615)
* refactor(server): version * test: better version and log checks
This commit is contained in:
parent
5f25f28c42
commit
1df7be8436
19 changed files with 404 additions and 509 deletions
|
|
@ -1,7 +1,11 @@
|
|||
import { Duration } from 'luxon';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { Version } from 'src/utils/version';
|
||||
import { SemVer } from 'semver';
|
||||
|
||||
export const POSTGRES_VERSION_RANGE = '>=14.0.0';
|
||||
export const VECTORS_VERSION_RANGE = '0.2.x';
|
||||
export const VECTOR_VERSION_RANGE = '>=0.5 <1';
|
||||
|
||||
export const NEXT_RELEASE = 'NEXT_RELEASE';
|
||||
export const LIFECYCLE_EXTENSION = 'x-immich-lifecycle';
|
||||
|
|
@ -11,7 +15,7 @@ export const ADDED_IN_PREFIX = 'This property was added in ';
|
|||
export const SALT_ROUNDS = 10;
|
||||
|
||||
const { version } = JSON.parse(readFileSync('./package.json', 'utf8'));
|
||||
export const serverVersion = Version.fromString(version);
|
||||
export const serverVersion = new SemVer(version);
|
||||
|
||||
export const AUDIT_LOG_MAX_DURATION = Duration.fromObject({ days: 100 });
|
||||
export const ONE_HOUR = Duration.fromObject({ hours: 1 });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue