Browse Source

chore(core): Fix build errors

Michael Bromley 2 years ago
parent
commit
39a9125b77

+ 0 - 1
packages/core/src/config/default-config.ts

@@ -175,7 +175,6 @@ export const defaultConfig: RuntimeVendureConfig = {
         jobQueueStrategy: new InMemoryJobQueueStrategy(),
         jobBufferStorageStrategy: new InMemoryJobBufferStorageStrategy(),
         activeQueues: [],
-        enableWorkerHealthCheck: false,
         prefix: '',
     },
     customFields: {

+ 2 - 2
packages/core/src/config/promotion/conditions/customer-group-condition.ts

@@ -5,7 +5,7 @@ import { Subscription } from 'rxjs';
 import { TtlCache } from '../../../common/ttl-cache';
 import { idsAreEqual } from '../../../common/utils';
 import { EventBus } from '../../../event-bus/event-bus';
-import { CustomerGroupEvent } from '../../../event-bus/events/customer-group-change-event';
+import { CustomerGroupChangeEvent } from '../../../event-bus/index';
 import { PromotionCondition } from '../promotion-condition';
 
 let customerService: import('../../../service/services/customer.service').CustomerService;
@@ -30,7 +30,7 @@ export const customerGroup = new PromotionCondition({
         customerService = injector.get(CustomerService);
         subscription = injector
             .get(EventBus)
-            .ofType(CustomerGroupEvent)
+            .ofType(CustomerGroupChangeEvent)
             .subscribe(event => {
                 // When a customer is added to or removed from a group, we need
                 // to invalidate the cache for that customer id

+ 2 - 1
packages/core/src/service/services/channel.service.ts

@@ -237,7 +237,8 @@ export class ChannelService {
         const channel = new Channel({
             ...input,
             defaultCurrencyCode: input.currencyCode,
-            availableCurrencyCodes: input.availableCurrencyCodes ?? [input.currencyCode],
+            availableCurrencyCodes:
+                input.availableCurrencyCodes ?? (input.currencyCode ? [input.currencyCode] : []),
             availableLanguageCodes: input.availableLanguageCodes ?? [input.defaultLanguageCode],
         });
         const defaultLanguageValidationResult = await this.validateDefaultLanguageCode(ctx, input);

+ 0 - 1
packages/core/src/service/services/shipping-method.service.ts

@@ -22,7 +22,6 @@ import { assertFound, idsAreEqual } from '../../common/utils';
 import { ConfigService } from '../../config/config.service';
 import { Logger } from '../../config/logger/vendure-logger';
 import { TransactionalConnection } from '../../connection/transactional-connection';
-import { ShippingMethod } from '../../entity/index';
 import { ShippingMethodTranslation } from '../../entity/shipping-method/shipping-method-translation.entity';
 import { ShippingMethod } from '../../entity/shipping-method/shipping-method.entity';
 import { EventBus } from '../../event-bus';