@open-xchange/soap-client 0.0.8 → 0.0.10
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 +6 -6
- package/soap.js +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-xchange/soap-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "SOAP client for OX App Suite",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"author": "",
|
|
21
21
|
"license": "AGPL-3.0-or-later",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"commander": "^14.0.
|
|
24
|
-
"dotenv": "^17.2.
|
|
25
|
-
"p-retry": "^7.
|
|
26
|
-
"soap": "^1.
|
|
23
|
+
"commander": "^14.0.2",
|
|
24
|
+
"dotenv": "^17.2.3",
|
|
25
|
+
"p-retry": "^7.1.1",
|
|
26
|
+
"soap": "^1.6.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@open-xchange/lint": "0.2.
|
|
29
|
+
"@open-xchange/lint": "0.2.1"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"lint": "eslint .",
|
package/soap.js
CHANGED
|
@@ -167,6 +167,9 @@ async function createClientAsync (type) {
|
|
|
167
167
|
try {
|
|
168
168
|
const result = await pRetry(() => origMethod.apply(this, [soapOptions, { timeout: 30000, ...clientOptions }, ...args]), {
|
|
169
169
|
retries: 3,
|
|
170
|
+
minTimeout: 1000, // Start with 1 second delay between retries
|
|
171
|
+
maxTimeout: 10000, // Cap retry delay at 10 seconds
|
|
172
|
+
randomize: true, // Add jitter to spread out concurrent retries
|
|
170
173
|
onFailedAttempt: async error => {
|
|
171
174
|
if (shouldAbortRetry(error)) throw new AbortError(error)
|
|
172
175
|
console.log(`Retrying ${String(prop)} in ${error.retriesLeft} attempts (${error.message})`)
|