@onlineapps/service-common 2.0.0 → 2.0.1

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,12 +1,13 @@
1
1
  {
2
2
  "name": "@onlineapps/service-common",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Common utilities for both infrastructure services and business services (JWT auth, Redis client, business errors, runtime config)",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
7
7
  "test": "jest",
8
8
  "test:unit": "jest tests/unit",
9
- "test:integration": "jest tests/integration"
9
+ "test:integration": "jest --config=jest.integration.config.js",
10
+ "test:all": "npm run test && npm run test:integration"
10
11
  },
11
12
  "keywords": [
12
13
  "microservices",
@@ -17,7 +18,7 @@
17
18
  "author": "OA Drive Team",
18
19
  "license": "MIT",
19
20
  "dependencies": {
20
- "@onlineapps/runtime-config": "1.0.2",
21
+ "@onlineapps/runtime-config": "1.0.3",
21
22
  "jsonwebtoken": "^9.0.3",
22
23
  "nodemailer": "^6.9.8",
23
24
  "redis": "^4.6.0"
@@ -29,7 +29,7 @@ const runtimeCfg = require('../config');
29
29
  * @param {string} [options.redisUrl] - Redis URL (default: REDIS_URL env or redis://api_node_cache:6379)
30
30
  * @param {number} [options.maxWait] - Maximum wait time in ms (default: 60000 = 1 minute)
31
31
  * @param {number} [options.checkInterval] - Check interval in ms (default: 2000 = 2 seconds)
32
- * @param {Object} [options.logger] - Logger instance (default: console)
32
+ * @param {Object} options.logger - Logger instance (required; no console fallback)
33
33
  * @returns {Promise<boolean>} - True if queue is ready
34
34
  * @throws {Error} - If timeout is reached
35
35
  */
@@ -37,7 +37,7 @@ const runtimeCfg = require('../config');
37
37
  * @param {string} [options.redisUrl] - Redis URL (default: REDIS_URL env or redis://api_node_cache:6379)
38
38
  * @param {number} [options.maxWait] - Maximum wait time in ms (default: INFRASTRUCTURE_HEALTH_WAIT_MAX_TIME env or 60000 = 1 minute)
39
39
  * @param {number} [options.checkInterval] - Check interval in ms (default: INFRASTRUCTURE_HEALTH_WAIT_CHECK_INTERVAL env or 2000 = 2 seconds)
40
- * @param {Object} [options.logger] - Logger instance (default: console)
40
+ * @param {Object} options.logger - Logger instance (required; no console fallback)
41
41
  * @returns {Promise<boolean>} - True if all infrastructure services are ready
42
42
  * @throws {Error} - If timeout is reached
43
43
  *