zudello-integration-sdk 1.0.34 → 1.0.36
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/utils/apiInstance.js +1 -3
- package/src/utils/logger.js +10 -10
package/package.json
CHANGED
package/src/utils/apiInstance.js
CHANGED
|
@@ -18,11 +18,9 @@ class ApiInstance {
|
|
|
18
18
|
this.axiosInstance = axios.create({
|
|
19
19
|
httpsAgent: new https.Agent({
|
|
20
20
|
keepAlive: true,
|
|
21
|
-
timeout: 60000, // 60 seconds timeout
|
|
22
21
|
maxSockets: 100,
|
|
23
22
|
maxFreeSockets: 10,
|
|
24
|
-
})
|
|
25
|
-
timeout: 30000, // 30 seconds timeout for the request itself
|
|
23
|
+
})
|
|
26
24
|
})
|
|
27
25
|
|
|
28
26
|
this.axiosInstance.interceptors.request.use((config) => {
|
package/src/utils/logger.js
CHANGED
|
@@ -33,17 +33,17 @@ class Logger {
|
|
|
33
33
|
|
|
34
34
|
if (this.mode === this.productionMode) {
|
|
35
35
|
this.logs.push(logEntry)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Output the log message
|
|
39
|
-
if (content instanceof Error) {
|
|
40
|
-
console.log(`[${status.toUpperCase()}] ${title}:`)
|
|
41
|
-
console.error(content.stack)
|
|
42
|
-
} else if (Array.isArray(content) || (typeof content === 'object' && content !== null)) {
|
|
43
|
-
console.log(`[${status.toUpperCase()}] ${title}:`)
|
|
44
|
-
console.log(JSON.stringify(content, null, 2))
|
|
45
36
|
} else {
|
|
46
|
-
|
|
37
|
+
// Output the log message
|
|
38
|
+
if (content instanceof Error) {
|
|
39
|
+
console.log(`[${status.toUpperCase()}] ${title}:`)
|
|
40
|
+
console.error(content.stack)
|
|
41
|
+
} else if (Array.isArray(content) || (typeof content === 'object' && content !== null)) {
|
|
42
|
+
console.log(`[${status.toUpperCase()}] ${title}:`)
|
|
43
|
+
console.log(JSON.stringify(content, null, 2))
|
|
44
|
+
} else {
|
|
45
|
+
console.log(`[${status.toUpperCase()}] ${title}: ${content}`)
|
|
46
|
+
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|