chore(server): use fs to read package.json (#6692)

use fs readsync instead of js import for reading package json
This commit is contained in:
Daniel Dietzler 2024-01-27 23:39:33 +01:00 committed by GitHub
parent 9422359b51
commit e9333837bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,9 @@
import { AssetType } from '@app/infra/entities';
import { Duration } from 'luxon';
import { readFileSync } from 'node:fs';
import { extname, join } from 'node:path';
import pkg from 'src/../../package.json';
const pkg = JSON.parse(readFileSync('./package.json', 'utf-8'));
export const AUDIT_LOG_MAX_DURATION = Duration.fromObject({ days: 100 });
export const ONE_HOUR = Duration.fromObject({ hours: 1 });