@klauswuestefeld/jux-web 2024.4.24 → 2024.5.24

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/dist/jux-web.js CHANGED
@@ -193,7 +193,9 @@ var juxWeb = (function (exports) {
193
193
  };
194
194
  let requestRunning = false;
195
195
  const maxRetries = 20;
196
- const timeout = 15000;
196
+ let timeout = 15000;
197
+ // @ts-ignore
198
+ window.setRequestTimeout = (newTimeout) => timeout = newTimeout;
197
199
  const backendRequest = (url_1, options_1, onSuccess_1, onError_1, onRedirect_1, ...args_1) => __awaiter$2(void 0, [url_1, options_1, onSuccess_1, onError_1, onRedirect_1, ...args_1], void 0, function* (url, options, onSuccess, onError, onRedirect, requestType = 'query', handleUnauthorized = defaultHandleUnauthorized, retrial = false, retrialNum = 0) {
198
200
  if (requestRunning && !retrial) { // only allow one request at a time
199
201
  setTimeout(() => backendRequest(url, options, onSuccess, onError, onRedirect, requestType, handleUnauthorized, false), 300);
@@ -273,13 +275,13 @@ var juxWeb = (function (exports) {
273
275
  }
274
276
  }
275
277
  else {
276
- // backend predicted exceptions
278
+ // backend exceptions
277
279
  onError(jsonResponse.error);
278
280
  }
279
281
  }
280
282
  catch (err) {
281
- // json conversion error / json response dealing errors
282
- onError(err);
283
+ // json conversion error / json response dealing errors / onSuccess errors
284
+ console.error(err);
283
285
  }
284
286
  finally {
285
287
  requestRunning = false;
package/dist/main.esm.js CHANGED
@@ -192,7 +192,9 @@ const defaultHandleUnauthorized = () => {
192
192
  };
193
193
  let requestRunning = false;
194
194
  const maxRetries = 20;
195
- const timeout = 15000;
195
+ let timeout = 15000;
196
+ // @ts-ignore
197
+ window.setRequestTimeout = (newTimeout) => timeout = newTimeout;
196
198
  const backendRequest = (url_1, options_1, onSuccess_1, onError_1, onRedirect_1, ...args_1) => __awaiter(void 0, [url_1, options_1, onSuccess_1, onError_1, onRedirect_1, ...args_1], void 0, function* (url, options, onSuccess, onError, onRedirect, requestType = 'query', handleUnauthorized = defaultHandleUnauthorized, retrial = false, retrialNum = 0) {
197
199
  if (requestRunning && !retrial) { // only allow one request at a time
198
200
  setTimeout(() => backendRequest(url, options, onSuccess, onError, onRedirect, requestType, handleUnauthorized, false), 300);
@@ -272,13 +274,13 @@ const backendRequest = (url_1, options_1, onSuccess_1, onError_1, onRedirect_1,
272
274
  }
273
275
  }
274
276
  else {
275
- // backend predicted exceptions
277
+ // backend exceptions
276
278
  onError(jsonResponse.error);
277
279
  }
278
280
  }
279
281
  catch (err) {
280
- // json conversion error / json response dealing errors
281
- onError(err);
282
+ // json conversion error / json response dealing errors / onSuccess errors
283
+ console.error(err);
282
284
  }
283
285
  finally {
284
286
  requestRunning = false;
package/dist/main.js CHANGED
@@ -216,7 +216,9 @@ const defaultHandleUnauthorized = () => {
216
216
  };
217
217
  let requestRunning = false;
218
218
  const maxRetries = 20;
219
- const timeout = 15000;
219
+ let timeout = 15000;
220
+ // @ts-ignore
221
+ window.setRequestTimeout = (newTimeout) => timeout = newTimeout;
220
222
  const backendRequest = (url_1, options_1, onSuccess_1, onError_1, onRedirect_1, ...args_1) => __awaiter(void 0, [url_1, options_1, onSuccess_1, onError_1, onRedirect_1, ...args_1], void 0, function* (url, options, onSuccess, onError, onRedirect, requestType = 'query', handleUnauthorized = defaultHandleUnauthorized, retrial = false, retrialNum = 0) {
221
223
  if (requestRunning && !retrial) { // only allow one request at a time
222
224
  setTimeout(() => backendRequest(url, options, onSuccess, onError, onRedirect, requestType, handleUnauthorized, false), 300);
@@ -296,13 +298,13 @@ const backendRequest = (url_1, options_1, onSuccess_1, onError_1, onRedirect_1,
296
298
  }
297
299
  }
298
300
  else {
299
- // backend predicted exceptions
301
+ // backend exceptions
300
302
  onError(jsonResponse.error);
301
303
  }
302
304
  }
303
305
  catch (err) {
304
- // json conversion error / json response dealing errors
305
- onError(err);
306
+ // json conversion error / json response dealing errors / onSuccess errors
307
+ console.error(err);
306
308
  }
307
309
  finally {
308
310
  requestRunning = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@klauswuestefeld/jux-web",
3
- "version": "2024.4.24",
3
+ "version": "2024.5.24",
4
4
  "author": "Jux.House",
5
5
  "license": "Copyrighted",
6
6
  "description": "",