@sap/audit-logging
Advanced tools
+10
-0
@@ -8,2 +8,12 @@ # Change Log | ||
| ## 6.6.0 - 2025-12-03 | ||
| ### Added | ||
| - Request timeout functionality with editable env variable: 'REQ_TIMEOUT_MS' - working with milliseconds. | ||
| ### Closed | ||
| - NGPBUG-427809 | ||
| - NGPBUG-413403 | ||
| - Github issue: #297 | ||
| ## 6.5.0 - 2025-27-01 | ||
@@ -10,0 +20,0 @@ |
@@ -72,9 +72,18 @@ 'use strict'; | ||
| return getAuthHeader.call(this) | ||
| .then((header) => { | ||
| .then(async(header) => { | ||
| headers['Content-Type'] = 'application/json;charset=UTF-8'; | ||
| headers['Authorization'] = header; | ||
| const controller = new AbortController(); | ||
| const timeout = process.env.REQ_TIMEOUT_MS || 5000; | ||
| const id = setTimeout(() => { | ||
| controller.abort(); | ||
| console.log('Request aborted due to timeout exceeded.'); | ||
| }, timeout); | ||
| const options = { | ||
| method: method, | ||
| retryDelay: 3000, | ||
| signal: controller.signal, | ||
| retryOn: function (attempt, error, res) { | ||
@@ -94,3 +103,9 @@ // retry on any network error, or 429 or 5xx status codes | ||
| }; | ||
| return fetch(url, options); | ||
| try { | ||
| return fetch(url, options); | ||
| } catch (e) { | ||
| console.log(e); | ||
| } finally { | ||
| clearTimeout(id); | ||
| } | ||
| }) | ||
@@ -97,0 +112,0 @@ .then((res) => { |
+2
-2
| { | ||
| "name": "@sap/audit-logging", | ||
| "description": "Provides audit logging functionalities for Node.js applications", | ||
| "version": "6.5.0", | ||
| "version": "6.6.0", | ||
| "license": "SEE LICENSE IN LICENSE file", | ||
@@ -37,3 +37,3 @@ "main": "index.js", | ||
| "overrides": { | ||
| "axios": "^1.7.4" | ||
| "axios": "^1.7.9" | ||
| }, | ||
@@ -40,0 +40,0 @@ "devDependencies": { |
+2
-2
@@ -734,3 +734,3 @@ # @sap/audit-logging | ||
| * `update` - takes a JavaScript object which identifies the object which contains the data being updated. Should have `type` and `id` properties. | ||
| * `attribute(attribute)` - takes an object which describes an attribute. Should have a `name` property and optionally - `old` and `new` properties. It is **mandatory** to provide at least one attribute. | ||
| * `attribute(attribute)` - takes an object which describes an attribute. Should have a `name`, `old` and `new` properties. It is **mandatory** to provide at least one attribute. | ||
| * `dataSubject` - takes an object describing the owner of the personal data. Should have `type` and `id` properties. The `role` property is optional. `dataSubject` is **mandatory**. | ||
@@ -779,3 +779,3 @@ * `tenant` - takes a string which specifies the tenant id. | ||
| * `update` - takes a JavaScript object which identifies the object which contains the data being updated. Should have `type` and `id` properties. | ||
| * `attribute(attribute)` - takes an object which describes an attribute. Should have a `name` property and optionally - `old` and `new` properties. It is **mandatory** to provide at least one attribute. | ||
| * `attribute(attribute)` - takes an object which describes an attribute. Should have a `name`, `old` and `new` properties. It is **mandatory** to provide at least one attribute. | ||
| * `dataSubject` - takes an object describing the owner of the personal data. Should have `type` and `id` properties. The `role` property is optional. `dataSubject` is **mandatory**. | ||
@@ -782,0 +782,0 @@ * `by` - takes a fixed string '$USER' that is a placeholder replaced by the service. This is **mandatory**. |
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
95830
0.59%819
1.61%4
33.33%