@onlineapps/conn-infra-mq 1.1.54 → 1.1.56

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 CHANGED
@@ -1,97 +1,97 @@
1
1
  {
2
- "name": "@onlineapps/conn-infra-mq",
3
- "version": "1.1.54",
4
- "description": "A promise-based, broker-agnostic client for sending and receiving messages via RabbitMQ",
5
- "main": "src/index.js",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/onlineapps/connector-mq-client.git"
2
+ "name": "@onlineapps/conn-infra-mq",
3
+ "version": "1.1.56",
4
+ "description": "A promise-based, broker-agnostic client for sending and receiving messages via RabbitMQ",
5
+ "main": "src/index.js",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/onlineapps/connector-mq-client.git"
9
+ },
10
+ "files": [
11
+ "src/",
12
+ "README.md",
13
+ "LICENSE",
14
+ "CHANGELOG.md"
15
+ ],
16
+ "scripts": {
17
+ "test": "jest --coverage",
18
+ "test:unit": "jest --testPathPattern=unit --coverage",
19
+ "test:component": "jest --testPathPattern=component --coverage",
20
+ "test:integration": "jest --config=jest.integration.config.js",
21
+ "test:integration:required": "REQUIRE_SERVICES=true jest --config=jest.integration.config.js",
22
+ "test:watch": "jest --watch",
23
+ "test:coverage": "jest --coverage --coverageReporters=text-lcov html",
24
+ "lint": "eslint \"src/**/*.js\" \"tests/**/*.js\"",
25
+ "prettier:check": "prettier --check \"src/**/*.js\" \"tests/**/*.js\"",
26
+ "prettier:fix": "prettier --write \"src/**/*.js\" \"tests/**/*.js\""
27
+ },
28
+ "keywords": [
29
+ "connector",
30
+ "mq",
31
+ "rabbitmq",
32
+ "kafka",
33
+ "message-queue",
34
+ "microservice",
35
+ "client",
36
+ "async"
37
+ ],
38
+ "author": "OnlineApps Team <dev@onlineapps.io>",
39
+ "license": "MIT",
40
+ "bugs": {
41
+ "url": "https://github.com/onlineapps/connector-mq-client/issues"
42
+ },
43
+ "homepage": "https://github.com/onlineapps/connector-mq-client#readme",
44
+ "dependencies": {
45
+ "@onlineapps/mq-client-core": "1.0.62",
46
+ "ajv": "^8.11.0",
47
+ "amqplib": "^0.10.3",
48
+ "lodash.merge": "^4.6.2"
49
+ },
50
+ "devDependencies": {
51
+ "@semantic-release/changelog": "^6.0.3",
52
+ "@semantic-release/commit-analyzer": "^11.1.0",
53
+ "@semantic-release/git": "^10.0.1",
54
+ "@semantic-release/github": "^9.2.6",
55
+ "@semantic-release/npm": "^11.0.3",
56
+ "@semantic-release/release-notes-generator": "^12.1.0",
57
+ "dotenv": "^17.2.2",
58
+ "eslint": "^8.30.0",
59
+ "eslint-config-prettier": "^8.5.0",
60
+ "jest": "^29.5.0",
61
+ "prettier": "^2.8.0",
62
+ "sinon": "^15.0.0",
63
+ "uuid": "^13.0.0"
64
+ },
65
+ "engines": {
66
+ "node": ">=12"
67
+ },
68
+ "eslintConfig": {
69
+ "env": {
70
+ "node": true,
71
+ "jest": true,
72
+ "es2021": true
9
73
  },
10
- "files": [
11
- "src/",
12
- "README.md",
13
- "LICENSE",
14
- "CHANGELOG.md"
74
+ "extends": [
75
+ "eslint:recommended",
76
+ "prettier"
15
77
  ],
16
- "scripts": {
17
- "test": "jest --coverage",
18
- "test:unit": "jest --testPathPattern=unit --coverage",
19
- "test:component": "jest --testPathPattern=component --coverage",
20
- "test:integration": "jest --config=jest.integration.config.js",
21
- "test:integration:required": "REQUIRE_SERVICES=true jest --config=jest.integration.config.js",
22
- "test:watch": "jest --watch",
23
- "test:coverage": "jest --coverage --coverageReporters=text-lcov html",
24
- "lint": "eslint \"src/**/*.js\" \"tests/**/*.js\"",
25
- "prettier:check": "prettier --check \"src/**/*.js\" \"tests/**/*.js\"",
26
- "prettier:fix": "prettier --write \"src/**/*.js\" \"tests/**/*.js\""
78
+ "parserOptions": {
79
+ "ecmaVersion": 12,
80
+ "sourceType": "script"
27
81
  },
28
- "keywords": [
29
- "connector",
30
- "mq",
31
- "rabbitmq",
32
- "kafka",
33
- "message-queue",
34
- "microservice",
35
- "client",
36
- "async"
37
- ],
38
- "author": "OnlineApps Team <dev@onlineapps.io>",
39
- "license": "MIT",
40
- "bugs": {
41
- "url": "https://github.com/onlineapps/connector-mq-client/issues"
42
- },
43
- "homepage": "https://github.com/onlineapps/connector-mq-client#readme",
44
- "dependencies": {
45
- "@onlineapps/mq-client-core": "^1.0.0",
46
- "ajv": "^8.11.0",
47
- "amqplib": "^0.10.3",
48
- "lodash.merge": "^4.6.2"
49
- },
50
- "devDependencies": {
51
- "@semantic-release/changelog": "^6.0.3",
52
- "@semantic-release/commit-analyzer": "^11.1.0",
53
- "@semantic-release/git": "^10.0.1",
54
- "@semantic-release/github": "^9.2.6",
55
- "@semantic-release/npm": "^11.0.3",
56
- "@semantic-release/release-notes-generator": "^12.1.0",
57
- "dotenv": "^17.2.2",
58
- "eslint": "^8.30.0",
59
- "eslint-config-prettier": "^8.5.0",
60
- "jest": "^29.5.0",
61
- "prettier": "^2.8.0",
62
- "sinon": "^15.0.0",
63
- "uuid": "^13.0.0"
64
- },
65
- "engines": {
66
- "node": ">=12"
67
- },
68
- "eslintConfig": {
69
- "env": {
70
- "node": true,
71
- "jest": true,
72
- "es2021": true
73
- },
74
- "extends": [
75
- "eslint:recommended",
76
- "prettier"
77
- ],
78
- "parserOptions": {
79
- "ecmaVersion": 12,
80
- "sourceType": "script"
81
- },
82
- "rules": {
83
- "no-console": "off",
84
- "strict": [
85
- "error",
86
- "global"
87
- ]
88
- }
89
- },
90
- "prettier": {
91
- "printWidth": 100,
92
- "singleQuote": true,
93
- "trailingComma": "es5",
94
- "tabWidth": 2,
95
- "endOfLine": "lf"
82
+ "rules": {
83
+ "no-console": "off",
84
+ "strict": [
85
+ "error",
86
+ "global"
87
+ ]
96
88
  }
89
+ },
90
+ "prettier": {
91
+ "printWidth": 100,
92
+ "singleQuote": true,
93
+ "trailingComma": "es5",
94
+ "tabWidth": 2,
95
+ "endOfLine": "lf"
96
+ }
97
97
  }
@@ -3,46 +3,15 @@
3
3
  /**
4
4
  * defaultConfig.js
5
5
  *
6
- * Provides default configuration values for AgentMQClient.
7
- * Users can override any of these by passing a custom config object
8
- * or by supplying overrides to connect().
6
+ * Re-exports defaultConfig from @onlineapps/mq-client-core.
7
+ *
8
+ * Ownership rule:
9
+ * - MQ client defaults belong to mq-client-core (the owning module)
10
+ * - conn-infra-mq keeps this file only for backward compatibility
11
+ *
12
+ * NOTE:
13
+ * - This avoids duplicating defaults across modules
14
+ * - Any overrides should be provided via explicit config or ENV (handled in mq-client-core BaseClient)
9
15
  */
10
16
 
11
- module.exports = {
12
- // Transport type: currently only 'rabbitmq' is fully supported.
13
- type: 'rabbitmq',
14
-
15
- // RabbitMQ connection URI or hostname (e.g., 'amqp://localhost:5672').
16
- host: 'amqp://localhost:5672',
17
-
18
- // Default queue name; can be overridden per call to publish/consume.
19
- queue: '',
20
-
21
- // Default exchange name (empty string → default direct exchange).
22
- exchange: '',
23
-
24
- // Declare queues/exchanges as durable by default.
25
- durable: true,
26
-
27
- // Default prefetch count for consumers.
28
- prefetch: 1,
29
-
30
- // Default auto-acknowledge setting for consumers.
31
- noAck: false,
32
-
33
- // Custom logger object (if not provided, console.* will be used).
34
- // Expected interface: { info(), warn(), error(), debug() }.
35
- logger: null,
36
-
37
- // Retry policy for reconnect attempts (not fully implemented in current version).
38
- // - retries: maximum number of reconnection attempts
39
- // - initialDelayMs: starting backoff delay
40
- // - maxDelayMs: maximum backoff delay
41
- // - factor: exponential backoff multiplier
42
- retryPolicy: {
43
- retries: 5,
44
- initialDelayMs: 1000,
45
- maxDelayMs: 30000,
46
- factor: 2,
47
- },
48
- };
17
+ module.exports = require('@onlineapps/mq-client-core/src/config/defaultConfig');