فهرست منبع

resolve lint error

ryosei-f 3 هفته پیش
والد
کامیت
79810907db

+ 1 - 1
apps/app/src/features/audit-log-bulk-export/server/service/audit-log-bulk-export-job-cron/audit-log-bulk-export-job-cron-service.integ.ts

@@ -219,7 +219,7 @@ describe('AuditLogBulkExportJobCronService Integration Test', () => {
 
   beforeEach(async () => {
     crowi = createMockCrowi();
-    instanciateAuditLogBulkExportJobCronService(crowi as Crowi);
+    instanciateAuditLogBulkExportJobCronService(crowi as unknown as Crowi);
     if (!auditLogBulkExportJobCronService) {
       throw new Error('auditLogBulkExportJobCronService was not initialized');
     }

+ 1 - 1
apps/app/src/features/audit-log-bulk-export/server/service/audit-log-bulk-export-job-cron/index.ts

@@ -90,7 +90,7 @@ class AuditLogBulkExportJobCronService
   constructor(crowi: Crowi) {
     super();
     this.crowi = crowi;
-    this.activityEvent = crowi.event('activity');
+    this.activityEvent = crowi.events.activity;
     this.parallelExecLimit = 1;
   }
 

+ 2 - 1
apps/app/src/features/audit-log-bulk-export/server/service/audit-log-bulk-export-job-cron/steps/exportAuditLogsToFsAsync.ts

@@ -1,5 +1,6 @@
 import fs from 'node:fs';
 import path from 'node:path';
+import type { Readable } from 'node:stream';
 import { pipeline, Writable } from 'node:stream';
 import type { FilterQuery } from 'mongoose';
 
@@ -130,7 +131,7 @@ export async function exportAuditLogsToFsAsync(
 
   const writable = getAuditLogWritable.bind(this)(job);
 
-  this.setStreamInExecution(job._id, logsCursor);
+  this.setStreamInExecution(job._id, logsCursor as unknown as Readable);
 
   pipeline(logsCursor, writable, (err) => {
     this.handleError(err, job);