@nextgis/geocoder 3.0.0-alpha.13 → 3.0.0-alpha.15
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/lib/geocoder.cjs.js +1 -1
- package/lib/geocoder.esm-browser.js +19 -12
- package/lib/geocoder.esm-browser.js.map +1 -1
- package/lib/geocoder.esm-browser.prod.js +1 -1
- package/lib/geocoder.esm-browser.prod.js.map +1 -1
- package/lib/geocoder.esm-bundler.js +1 -1
- package/lib/geocoder.global.js +19 -12
- package/lib/geocoder.global.js.map +1 -1
- package/lib/geocoder.global.prod.js +1 -1
- package/lib/geocoder.global.prod.js.map +1 -1
- package/package.json +4 -4
package/lib/geocoder.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/geocoder; version: 3.0.0-alpha.
|
|
1
|
+
/** Bundle of @nextgis/geocoder; version: 3.0.0-alpha.14; author: NextGIS */
|
|
2
2
|
function defined(val) {
|
|
3
3
|
return val !== void 0 && val !== null;
|
|
4
4
|
}
|
|
@@ -1017,7 +1017,7 @@ function unwrapListeners(arr) {
|
|
|
1017
1017
|
|
|
1018
1018
|
var pkg = {
|
|
1019
1019
|
name: "@nextgis/ngw-connector",
|
|
1020
|
-
version: "3.0.0-alpha.
|
|
1020
|
+
version: "3.0.0-alpha.14",
|
|
1021
1021
|
_priority: 12,
|
|
1022
1022
|
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
1023
1023
|
main: "index.js",
|
|
@@ -1413,7 +1413,7 @@ function generateUrl(path, query) {
|
|
|
1413
1413
|
}
|
|
1414
1414
|
function request(path, options, cacheEngine) {
|
|
1415
1415
|
return __async$5(this, null, function* () {
|
|
1416
|
-
var _b;
|
|
1416
|
+
var _b, _c;
|
|
1417
1417
|
const defaults = {
|
|
1418
1418
|
method: "GET",
|
|
1419
1419
|
credentials: "same-origin",
|
|
@@ -1438,6 +1438,7 @@ function request(path, options, cacheEngine) {
|
|
|
1438
1438
|
"query",
|
|
1439
1439
|
"json"
|
|
1440
1440
|
]);
|
|
1441
|
+
opt.method = (_b = opt.method) == null ? void 0 : _b.toUpperCase();
|
|
1441
1442
|
if (withCredentials) {
|
|
1442
1443
|
opt.credentials = "include";
|
|
1443
1444
|
}
|
|
@@ -1495,15 +1496,21 @@ function request(path, options, cacheEngine) {
|
|
|
1495
1496
|
}
|
|
1496
1497
|
return body;
|
|
1497
1498
|
});
|
|
1498
|
-
if (cacheEngine
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1499
|
+
if (cacheEngine) {
|
|
1500
|
+
if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
|
|
1501
|
+
if (cache !== false) {
|
|
1502
|
+
const props = cacheProps ? cacheProps : __spreadValues$6({}, objectRemoveEmpty({
|
|
1503
|
+
withCredentials,
|
|
1504
|
+
responseType
|
|
1505
|
+
}));
|
|
1506
|
+
return cacheEngine.add(cacheName || url, makeRequest, {
|
|
1507
|
+
props,
|
|
1508
|
+
expirationTime: cache ? void 0 : 500
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
} else {
|
|
1512
|
+
cacheEngine.clean();
|
|
1513
|
+
}
|
|
1507
1514
|
}
|
|
1508
1515
|
return makeRequest();
|
|
1509
1516
|
});
|