From 05e22606959afbe51a8a2470f4cefd0a36aaa7a9 Mon Sep 17 00:00:00 2001 From: zhangtao25 Date: Sat, 23 Nov 2024 15:11:31 +0800 Subject: [PATCH] chore: repo overall update --- .../canyon-collect/src/apps/collect/collect.controller.ts | 4 ++++ .../src/apps/collect/services/coverage-client.service.ts | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/canyon-collect/src/apps/collect/collect.controller.ts b/packages/canyon-collect/src/apps/collect/collect.controller.ts index ff4c32f2..230c42c8 100644 --- a/packages/canyon-collect/src/apps/collect/collect.controller.ts +++ b/packages/canyon-collect/src/apps/collect/collect.controller.ts @@ -45,6 +45,10 @@ export class CollectController { @UploadedFile() cov: any, @Body() coverageClientDto: CoverageClientDto, ) { + // console.log(coverageClientDto.coverage) + if (coverageClientDto.coverage) { + return this.coverageClientService.invoke(coverageClientDto); + } let coverage = {}; if (cov.mimetype === 'application/octet-stream') { coverage = await decompressData(cov.buffer).then((jsonString: any) => diff --git a/packages/canyon-collect/src/apps/collect/services/coverage-client.service.ts b/packages/canyon-collect/src/apps/collect/services/coverage-client.service.ts index 8b0fb761..a913f3c9 100755 --- a/packages/canyon-collect/src/apps/collect/services/coverage-client.service.ts +++ b/packages/canyon-collect/src/apps/collect/services/coverage-client.service.ts @@ -13,7 +13,6 @@ import { genSummaryMapByCoverageMap, mergeCoverageMap } from 'canyon-data'; export class CoverageClientService { constructor(private readonly prisma: PrismaService) {} async invoke({ sha, projectID, coverage, instrumentCwd }) { - console.log(coverage, 'coverage'); // 1. 检查是否上传map // coverage const coverageDb = await this.prisma.coverage.findFirst({ @@ -52,8 +51,6 @@ export class CoverageClientService { const formatCoverageHit = IstanbulHitMapSchema.parse(formartCOv); - // console.log(coverageMapCount111, formatCoverage); - // ********* 合并 const mergeCoveHit = mergeCoverageMap(coverageDbHit, formatCoverageHit); // *********