@opengeoweb/api 12.4.1 → 12.5.0
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/index.esm.js +7 -4
- package/package.json +3 -3
package/index.esm.js
CHANGED
|
@@ -355,7 +355,9 @@ var handleResponse = function handleResponse(response) {
|
|
|
355
355
|
if (json) {
|
|
356
356
|
var message = json.message;
|
|
357
357
|
if (message) {
|
|
358
|
-
throw new Error(message
|
|
358
|
+
throw new Error(message, {
|
|
359
|
+
cause: response.status
|
|
360
|
+
});
|
|
359
361
|
}
|
|
360
362
|
var result = JSON.stringify(json);
|
|
361
363
|
throw new Error(result);
|
|
@@ -430,7 +432,6 @@ var makeMockApiCall = function makeMockApiCall(response, responseInit, delayDura
|
|
|
430
432
|
if (delayDuration === void 0) {
|
|
431
433
|
delayDuration = 0;
|
|
432
434
|
}
|
|
433
|
-
var result = HttpResponse.json(response, responseInit);
|
|
434
435
|
if (delayDuration) {
|
|
435
436
|
return jest.fn().mockImplementation( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
436
437
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -439,7 +440,7 @@ var makeMockApiCall = function makeMockApiCall(response, responseInit, delayDura
|
|
|
439
440
|
_context.next = 2;
|
|
440
441
|
return delay(delayDuration);
|
|
441
442
|
case 2:
|
|
442
|
-
return _context.abrupt("return",
|
|
443
|
+
return _context.abrupt("return", HttpResponse.json(response, responseInit));
|
|
443
444
|
case 3:
|
|
444
445
|
case "end":
|
|
445
446
|
return _context.stop();
|
|
@@ -447,7 +448,9 @@ var makeMockApiCall = function makeMockApiCall(response, responseInit, delayDura
|
|
|
447
448
|
}, _callee);
|
|
448
449
|
})));
|
|
449
450
|
}
|
|
450
|
-
return jest.fn().
|
|
451
|
+
return jest.fn().mockImplementation(function () {
|
|
452
|
+
return Promise.resolve(HttpResponse.json(response, responseInit));
|
|
453
|
+
});
|
|
451
454
|
};
|
|
452
455
|
|
|
453
456
|
/* *
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/api",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.5.0",
|
|
4
4
|
"description": "GeoWeb API library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/authentication": "12.
|
|
12
|
-
"@opengeoweb/store": "12.
|
|
11
|
+
"@opengeoweb/authentication": "12.5.0",
|
|
12
|
+
"@opengeoweb/store": "12.5.0",
|
|
13
13
|
"lodash": "^4.17.21",
|
|
14
14
|
"@tanstack/react-query": "^5.69.2"
|
|
15
15
|
},
|