Browse Source

chore: Fix a couple of TS build errors

Michael Bromley 10 months ago
parent
commit
aae77a1e38

+ 2 - 2
packages/email-plugin/src/sender/nodemailer-email-sender.ts

@@ -133,9 +133,9 @@ export class NodemailerEmailSender implements EmailSender {
         await this.writeStreamToFile(pathWithoutExt + '.txt', result);
     }
 
-    private async writeStreamToFile(filePath: string, info: StreamTransportInfo): Promise<string> {
+    private async writeStreamToFile(filePath: string, info: StreamTransportInfo): Promise<void> {
         const writeStream = fs.createWriteStream(filePath);
-        return new Promise<string>((resolve, reject) => {
+        return new Promise<void>((resolve, reject) => {
             writeStream.on('open', () => {
                 info.message.pipe(writeStream);
                 writeStream.on('close', resolve);

+ 1 - 2
packages/job-queue-plugin/src/bullmq/redis-health-indicator.ts

@@ -2,7 +2,6 @@ import { Inject, Injectable } from '@nestjs/common';
 import { HealthCheckError, HealthIndicator, HealthIndicatorResult } from '@nestjs/terminus';
 import { Logger } from '@vendure/core';
 import { RedisConnection } from 'bullmq';
-import { timer } from 'rxjs';
 
 import { BULLMQ_PLUGIN_OPTIONS, loggerCtx } from './constants';
 import { BullMQPluginOptions } from './types';
@@ -14,7 +13,7 @@ export class RedisHealthIndicator extends HealthIndicator {
         super();
     }
     async isHealthy(key: string, timeoutMs = 5000): Promise<HealthIndicatorResult> {
-        const connection = new RedisConnection(this.options.connection);
+        const connection = new RedisConnection(this.options.connection ?? {});
         const pingResult = await new Promise(async (resolve, reject) => {
             try {
                 connection.on('error', err => {