diff --git a/apps/attestation-manager/src/common/constants.ts b/apps/attestation-manager/src/common/constants.ts index 98b288fb5b0a68e9601d328c939e4e53859b92ec..08eeddaa9188bc0f1f0215aac61b50114320008c 100644 --- a/apps/attestation-manager/src/common/constants.ts +++ b/apps/attestation-manager/src/common/constants.ts @@ -1,6 +1,6 @@ export enum LoggerConfig { FILE_PATH = 'logs/log.json', - lOG_DIR = './logs', + LOG_DIR = './logs', } export enum Connection { diff --git a/apps/attestation-manager/src/credentialDef/controller/controller.ts b/apps/attestation-manager/src/credentialDef/controller/controller.ts index c644d0f908d1d4c02ea69c16f0fdafddbb365144..d653197d695902a4545b8ddcc9dcae1d4469d6d9 100644 --- a/apps/attestation-manager/src/credentialDef/controller/controller.ts +++ b/apps/attestation-manager/src/credentialDef/controller/controller.ts @@ -1,5 +1,7 @@ import type { ResponseType } from '../../common/response.js'; import type CredentialDefLedgerDto from '../entities/credentialDefLedger-entity.js'; +// eslint-disable-next-line @typescript-eslint/consistent-type-imports +import type { Response } from 'express'; import { Body, @@ -22,7 +24,6 @@ import { ApiTags, } from '@nestjs/swagger'; import { Prisma } from '@prisma/client'; -import { Response } from 'express'; import logger from '../../utils/logger.js'; import CredentialDefDto from '../entities/credentialDef-entity.js'; diff --git a/apps/attestation-manager/src/issue-credential/controller/controller.ts b/apps/attestation-manager/src/issue-credential/controller/controller.ts index c3fb6968a6e54b442b6030cb8e7af08f501b9336..a7830f8c95a9f0b2350c507263ce8fc4d9b5c99c 100644 --- a/apps/attestation-manager/src/issue-credential/controller/controller.ts +++ b/apps/attestation-manager/src/issue-credential/controller/controller.ts @@ -1,6 +1,8 @@ import type { ResponseType } from '../../common/response.js'; import type CredentialDto from '../entities/credential.entity.js'; import type CredentialStateDto from '../entities/credential.state.entity.js'; +// eslint-disable-next-line @typescript-eslint/consistent-type-imports +import type { Response } from 'express'; import { BadRequestException, @@ -30,7 +32,6 @@ import { ApiTags, } from '@nestjs/swagger'; import { Prisma } from '@prisma/client'; -import { Response } from 'express'; import { Abstraction, diff --git a/apps/attestation-manager/src/schemas/controller/controller.ts b/apps/attestation-manager/src/schemas/controller/controller.ts index 22861042e15f9657cbb003e532158f58c77f4973..c24f4eeeb2dadd1ba2f9320096af6a5052698383 100644 --- a/apps/attestation-manager/src/schemas/controller/controller.ts +++ b/apps/attestation-manager/src/schemas/controller/controller.ts @@ -1,4 +1,6 @@ import type { ResponseType } from '../../common/response.js'; +// eslint-disable-next-line @typescript-eslint/consistent-type-imports +import type { Response } from 'express'; import { Body, @@ -21,7 +23,6 @@ import { ApiTags, } from '@nestjs/swagger'; import { Prisma } from '@prisma/client'; -import { Response } from 'express'; import { VersionRegex } from '../../common/constants.js'; import logger from '../../utils/logger.js'; diff --git a/apps/attestation-manager/src/schemas/tests/controller.spec.ts b/apps/attestation-manager/src/schemas/tests/controller.spec.ts index dbda0e886464490091c4f8b642bba5562b2223a9..7093ae8bb37b6bdc06fcf39c0f6f0ba5672167e0 100644 --- a/apps/attestation-manager/src/schemas/tests/controller.spec.ts +++ b/apps/attestation-manager/src/schemas/tests/controller.spec.ts @@ -1,5 +1,6 @@ import type SchemaDto from '../entities/schema-entity.js'; import type { TestingModule } from '@nestjs/testing'; +import type { Response } from 'express'; import { HttpStatus } from '@nestjs/common'; import { Test } from '@nestjs/testing'; diff --git a/apps/attestation-manager/src/userInfo/controller/controller.ts b/apps/attestation-manager/src/userInfo/controller/controller.ts index 741b6fd22c9537eef986792559a5d2d13490a1a8..7d30099b580a029ff6fc6dad178c583d7982517f 100644 --- a/apps/attestation-manager/src/userInfo/controller/controller.ts +++ b/apps/attestation-manager/src/userInfo/controller/controller.ts @@ -1,3 +1,6 @@ +// eslint-disable-next-line @typescript-eslint/consistent-type-imports +import type { Response } from 'express'; + import { BadRequestException, Body, @@ -12,7 +15,6 @@ import { import { ApiBody, ApiOperation, ApiTags } from '@nestjs/swagger'; import { Prisma } from '@prisma/client'; import { isUUID } from 'class-validator'; -import { Response } from 'express'; import { AutoAcceptCredential } from '../../common/constants.js'; import logger from '../../utils/logger.js'; diff --git a/apps/attestation-manager/src/utils/logger.ts b/apps/attestation-manager/src/utils/logger.ts index 218005edbf37055390ecbc10049f29bb85ba1348..d69767a595fc974f0123aec9788e4b62729b6ba0 100644 --- a/apps/attestation-manager/src/utils/logger.ts +++ b/apps/attestation-manager/src/utils/logger.ts @@ -1,20 +1,9 @@ import { ecsFormat } from '@elastic/ecs-winston-format'; -import { mkdirSync } from 'fs'; import { createLogger, transports, type Logger } from 'winston'; -import { LoggerConfig } from '../common/constants.js'; - -mkdirSync(LoggerConfig.lOG_DIR, { recursive: true }); - const logger: Logger = createLogger({ format: ecsFormat({ convertReqRes: true }), - transports: [ - new transports.Console(), - new transports.File({ - filename: LoggerConfig.FILE_PATH, - }), - // esTransport, - ], + transports: [new transports.Console()], }); logger.on('error', (error) => { diff --git a/apps/attestation-manager/src/utils/tests/pagination.spec.ts b/apps/attestation-manager/src/utils/tests/pagination.spec.ts index d4e7879811a519c4d1577c17fe77fde202cfaa26..2fe06f7ef15bc77da47e72b6829cf07f8fd71838 100644 --- a/apps/attestation-manager/src/utils/tests/pagination.spec.ts +++ b/apps/attestation-manager/src/utils/tests/pagination.spec.ts @@ -1,4 +1,4 @@ -import pagination from '../pagination'; +import pagination from '../pagination.js'; describe('Pagination', () => { let pageSize: number;