@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
|
@@ -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
|
import { objectAssign, fixUrlStr } from '@nextgis/utils';
|
|
3
3
|
import NgwConnector from '@nextgis/ngw-connector';
|
|
4
4
|
import { fetchNgwLayerItems } from '@nextgis/ngw-kit';
|
package/lib/geocoder.global.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
|
var Geocoder = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -1020,7 +1020,7 @@ var Geocoder = (function (exports) {
|
|
|
1020
1020
|
|
|
1021
1021
|
var pkg = {
|
|
1022
1022
|
name: "@nextgis/ngw-connector",
|
|
1023
|
-
version: "3.0.0-alpha.
|
|
1023
|
+
version: "3.0.0-alpha.14",
|
|
1024
1024
|
_priority: 12,
|
|
1025
1025
|
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
1026
1026
|
main: "index.js",
|
|
@@ -1416,7 +1416,7 @@ var Geocoder = (function (exports) {
|
|
|
1416
1416
|
}
|
|
1417
1417
|
function request(path, options, cacheEngine) {
|
|
1418
1418
|
return __async$5(this, null, function* () {
|
|
1419
|
-
var _b;
|
|
1419
|
+
var _b, _c;
|
|
1420
1420
|
const defaults = {
|
|
1421
1421
|
method: "GET",
|
|
1422
1422
|
credentials: "same-origin",
|
|
@@ -1441,6 +1441,7 @@ var Geocoder = (function (exports) {
|
|
|
1441
1441
|
"query",
|
|
1442
1442
|
"json"
|
|
1443
1443
|
]);
|
|
1444
|
+
opt.method = (_b = opt.method) == null ? void 0 : _b.toUpperCase();
|
|
1444
1445
|
if (withCredentials) {
|
|
1445
1446
|
opt.credentials = "include";
|
|
1446
1447
|
}
|
|
@@ -1498,15 +1499,21 @@ var Geocoder = (function (exports) {
|
|
|
1498
1499
|
}
|
|
1499
1500
|
return body;
|
|
1500
1501
|
});
|
|
1501
|
-
if (cacheEngine
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1502
|
+
if (cacheEngine) {
|
|
1503
|
+
if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
|
|
1504
|
+
if (cache !== false) {
|
|
1505
|
+
const props = cacheProps ? cacheProps : __spreadValues$6({}, objectRemoveEmpty({
|
|
1506
|
+
withCredentials,
|
|
1507
|
+
responseType
|
|
1508
|
+
}));
|
|
1509
|
+
return cacheEngine.add(cacheName || url, makeRequest, {
|
|
1510
|
+
props,
|
|
1511
|
+
expirationTime: cache ? void 0 : 500
|
|
1512
|
+
});
|
|
1513
|
+
}
|
|
1514
|
+
} else {
|
|
1515
|
+
cacheEngine.clean();
|
|
1516
|
+
}
|
|
1510
1517
|
}
|
|
1511
1518
|
return makeRequest();
|
|
1512
1519
|
});
|