feat: wip server folder structure (#4573)

* feat: wip server folder structure

* fix: merge

* fix: wrong merge

* fix: remove unused file

* fix: comment

* fix: lint

* fix: merge

* fix: remove console.log

* fix: metadata graphql arguments broken
This commit is contained in:
Jérémy M
2024-03-20 16:23:46 +01:00
committed by GitHub
parent da12710fe9
commit e5c1309e8c
461 changed files with 1396 additions and 1322 deletions

View File

@ -11,6 +11,8 @@ import {
IsBoolean,
IsNumber,
IsDefined,
Min,
Max,
} from 'class-validator';
import { EmailDriver } from 'src/engine/integrations/email/interfaces/email.interface';
@ -38,6 +40,13 @@ export class EnvironmentVariables {
@IsBoolean()
DEBUG_MODE: boolean = false;
@CastToPositiveNumber()
@IsOptional()
@IsNumber()
@Min(0)
@Max(65535)
DEBUG_PORT: number = 9000;
@CastToBoolean()
@IsOptional()
@IsBoolean()
@ -130,11 +139,12 @@ export class EnvironmentVariables {
LOGIN_TOKEN_EXPIRES_IN: string = '15m';
@IsString()
FILE_TOKEN_SECRET: string;
@IsOptional()
FILE_TOKEN_SECRET: string = 'random_string';
@IsDuration()
@IsOptional()
FILE_TOKEN_EXPIRES_IN: string;
FILE_TOKEN_EXPIRES_IN: string = '1d';
// Auth
@IsUrl({ require_tld: false })
@ -197,6 +207,11 @@ export class EnvironmentVariables {
@IsOptional()
LOGGER_DRIVER: LoggerDriverType = LoggerDriverType.Console;
@CastToBoolean()
@IsBoolean()
@IsOptional()
LOGGER_IS_BUFFER_ENABLED: boolean = true;
@IsEnum(ExceptionHandlerDriver)
@IsOptional()
EXCEPTION_HANDLER_DRIVER: ExceptionHandlerDriver =
@ -288,8 +303,6 @@ export class EnvironmentVariables {
CALENDAR_PROVIDER_GOOGLE_ENABLED: boolean = false;
AUTH_GOOGLE_APIS_CALLBACK_URL: string;
LOGGER_IS_BUFFER_ENABLED: boolean = true;
}
export const validate = (config: Record<string, unknown>) => {