Skip to content

Commit d109608

Browse files
committed
fix: issue where version is not defined in api
1 parent f9746a0 commit d109608

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

apps/api/src/setup/setup.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { ForbiddenException, Injectable, ServiceUnavailableException } from '@nestjs/common';
2-
import { getReleaseInfo } from '@opendatacapture/release-info';
32
import { type CreateAdminData } from '@opendatacapture/schemas/setup';
43
import type { InitAppOptions, SetupState, UpdateSetupStateData } from '@opendatacapture/schemas/setup';
54

@@ -31,7 +30,7 @@ export class SetupService {
3130
isExperimentalFeaturesEnabled: Boolean(savedOptions?.isExperimentalFeaturesEnabled),
3231
isGatewayEnabled: this.configurationService.get('GATEWAY_ENABLED'),
3332
isSetup: Boolean(savedOptions?.isSetup),
34-
release: import.meta.release ?? (await getReleaseInfo()),
33+
release: __RELEASE__,
3534
uptime: Math.round(process.uptime())
3635
} satisfies SetupState;
3736
}

apps/api/src/typings/global.d.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
/* eslint-disable @typescript-eslint/consistent-type-definitions */
2-
31
import type { ReleaseInfo } from '@opendatacapture/schemas/setup';
42

53
declare global {
6-
interface ImportMeta {
7-
readonly release?: ReleaseInfo;
8-
}
4+
const __RELEASE__: ReleaseInfo;
95
}

0 commit comments

Comments
 (0)