From edc48bdaa21f2c715cb1242ddef6f5a4ed3af31f Mon Sep 17 00:00:00 2001 From: Igor Savin Date: Sat, 12 Oct 2024 23:42:28 +0300 Subject: [PATCH] fix build --- packages/amqp/lib/AbstractAmqpQueuePublisher.ts | 7 ++++++- packages/amqp/package.json | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/amqp/lib/AbstractAmqpQueuePublisher.ts b/packages/amqp/lib/AbstractAmqpQueuePublisher.ts index 9a28b72d..e4535484 100644 --- a/packages/amqp/lib/AbstractAmqpQueuePublisher.ts +++ b/packages/amqp/lib/AbstractAmqpQueuePublisher.ts @@ -32,9 +32,14 @@ export abstract class AbstractAmqpQueuePublisher< options: AMQPPublisherOptions, ) { super(dependencies, options) + + if (!options.locatorConfig?.queueName && !options.creationConfig?.queueName) { + throw new Error('Either locatorConfig or creationConfig must provide queueName') + } + this.queueName = options.locatorConfig ? options.locatorConfig.queueName - : options.creationConfig.queueName + : options.creationConfig!.queueName } protected publishInternal(message: Buffer, options: AmqpQueueMessageOptions): void { diff --git a/packages/amqp/package.json b/packages/amqp/package.json index b97b7ecb..92dd7daf 100644 --- a/packages/amqp/package.json +++ b/packages/amqp/package.json @@ -25,7 +25,7 @@ "prepublishOnly": "npm run build:release" }, "dependencies": { - "@lokalise/node-core": "^12.0.0", + "@lokalise/node-core": "^13.0.1", "zod": "^3.23.8" }, "peerDependencies": { @@ -38,14 +38,14 @@ "@kibertoad/biome-config": "^1.2.1", "@message-queue-toolkit/core": "*", "@types/amqplib": "^0.10.5", - "@types/node": "^22.0.0", - "@vitest/coverage-v8": "^2.0.4", + "@types/node": "^22.7.5", + "@vitest/coverage-v8": "^2.1.2", "amqplib": "^0.10.4", "awilix": "^12.0.1", "awilix-manager": "^5.4.0", "del-cli": "^6.0.0", - "typescript": "^5.5.2", - "vitest": "^2.0.4" + "typescript": "^5.6.3", + "vitest": "^2.1.2" }, "homepage": "https://github.com/kibertoad/message-queue-toolkit", "repository": {