@onlineapps/mq-client-core 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +20 -10
- package/src/utils/initInfrastructureQueues.js +5 -9
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -19,15 +19,25 @@ const {
|
|
|
19
19
|
const { initInfrastructureQueues } = require('./utils/initInfrastructureQueues');
|
|
20
20
|
|
|
21
21
|
// Export BaseClient as default, with additional exports
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
// NOTE: When destructuring, use: const { initInfrastructureQueues } = require('@onlineapps/mq-client-core');
|
|
23
|
+
// When using default, use: const BaseClient = require('@onlineapps/mq-client-core');
|
|
24
|
+
const exports = {
|
|
25
|
+
BaseClient,
|
|
26
|
+
RabbitMQClient,
|
|
27
|
+
initInfrastructureQueues,
|
|
28
|
+
errors: {
|
|
29
|
+
ValidationError,
|
|
30
|
+
ConnectionError,
|
|
31
|
+
PublishError,
|
|
32
|
+
ConsumeError,
|
|
33
|
+
SerializationError,
|
|
34
|
+
}
|
|
32
35
|
};
|
|
33
36
|
|
|
37
|
+
// Set default export to BaseClient (for backward compatibility)
|
|
38
|
+
Object.setPrototypeOf(exports, BaseClient);
|
|
39
|
+
Object.assign(exports, BaseClient);
|
|
40
|
+
|
|
41
|
+
// Export as both default and named exports
|
|
42
|
+
module.exports = exports;
|
|
43
|
+
|
|
@@ -21,15 +21,11 @@
|
|
|
21
21
|
async function initInfrastructureQueues(channel, options = {}) {
|
|
22
22
|
const logger = options.logger || console;
|
|
23
23
|
|
|
24
|
-
// Load queueConfig
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} catch (requireError) {
|
|
30
|
-
throw new Error(`Cannot load queueConfig. Either provide queueConfig in options, or ensure @onlineapps/conn-infra-mq is installed: ${requireError.message}`);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
24
|
+
// Load queueConfig from mq-client-core (spodní vrstva)
|
|
25
|
+
// NOTE: queueConfig is part of mq-client-core because it's used by both:
|
|
26
|
+
// - Infrastructure services (via mq-client-core)
|
|
27
|
+
// - Business services (via conn-infra-mq connector)
|
|
28
|
+
const queueConfig = options.queueConfig || require('../config/queueConfig');
|
|
33
29
|
|
|
34
30
|
const queuesToCreate = options.queues || [
|
|
35
31
|
// Workflow infrastructure queues
|