@nextgis/geocoder 1.19.2 → 1.19.6

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.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/geocoder; version: 1.19.2; author: NextGIS */
1
+ /** Bundle of @nextgis/geocoder; version: 1.19.6; author: NextGIS */
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/geocoder; version: 1.19.2; author: NextGIS */
1
+ /** Bundle of @nextgis/geocoder; version: 1.19.6; author: NextGIS */
2
2
  class CancelError extends Error {
3
3
  constructor() {
4
4
  super();
@@ -1258,6 +1258,62 @@ Cache$1.instance = {};
1258
1258
  */
1259
1259
  var Cache = Cache$1;
1260
1260
 
1261
+ var pkg = {
1262
+ name: "@nextgis/ngw-connector",
1263
+ version: "1.19.6",
1264
+ _priority: 12,
1265
+ description: "A lightweight HTTP client optimized for use with NextGIS Web API",
1266
+ main: "index.js",
1267
+ module: "lib/ngw-connector.esm-bundler.js",
1268
+ unpkg: "lib/ngw-connector.global.prod.js",
1269
+ jsdelivr: "lib/ngw-connector.global.prod.js",
1270
+ types: "lib/index.d.ts",
1271
+ dependencies: {
1272
+ "@nextgis/cache": "^1.19.0",
1273
+ "@nextgis/cancelable-promise": "^1.19.0",
1274
+ "@nextgis/utils": "^1.19.0",
1275
+ "@types/events": "^3.0.0",
1276
+ events: "^3.3.0",
1277
+ "form-data": "^4.0.0"
1278
+ },
1279
+ devDependencies: {
1280
+ "@nextgis/build-tools": "^1.19.0"
1281
+ },
1282
+ scripts: {
1283
+ clean: "rimraf ./lib",
1284
+ dev: "node ../build-tools/lib/build.js",
1285
+ prod: "npm run dev -- --release",
1286
+ lint: "eslint ./src/**/*.ts --fix --c ../../.eslintrc",
1287
+ watch: "npm run dev -- --watch",
1288
+ "gen:types": "node ./scripts/generator"
1289
+ },
1290
+ buildOptions: {
1291
+ name: "NgwConnector",
1292
+ formats: [
1293
+ "esm-bundler",
1294
+ "esm-browser",
1295
+ "cjs",
1296
+ "global"
1297
+ ]
1298
+ },
1299
+ keywords: [
1300
+ "NextGIS",
1301
+ "MAP"
1302
+ ],
1303
+ author: "NextGIS",
1304
+ files: [
1305
+ "index.js",
1306
+ "lib"
1307
+ ],
1308
+ license: "MIT",
1309
+ homepage: "https://github.com/nextgis/nextgis_frontend/tree/master/packages/ngw-connector#readme",
1310
+ repository: {
1311
+ type: "git",
1312
+ url: "git://github.com/nextgis/nextgis_frontend.git"
1313
+ },
1314
+ gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
1315
+ };
1316
+
1261
1317
  /**
1262
1318
  * Thrown when...
1263
1319
  */
@@ -1803,6 +1859,7 @@ class NgwConnector$1 {
1803
1859
  this.options = options;
1804
1860
  this.id = ID++;
1805
1861
  this.emitter = new events.exports.EventEmitter();
1862
+ this.client = `NextGIS-NGW-Connector/${pkg.version}`;
1806
1863
  this.routeStr = '/api/component/pyramid/route';
1807
1864
  this.activeRequests = [];
1808
1865
  const exist = findConnector(options);
@@ -1854,7 +1911,8 @@ class NgwConnector$1 {
1854
1911
  const auth = this.options.auth;
1855
1912
  const makeConnect = () => new CancelablePromise((resolve, reject) => {
1856
1913
  const makeQuery = () => {
1857
- return this.makeQuery(this.routeStr, {}, {})
1914
+ const routeUrl = `${this.routeStr}?client=${this.client}`;
1915
+ return this.makeQuery(routeUrl.toString(), {}, {})
1858
1916
  .then((route) => {
1859
1917
  resolve(route);
1860
1918
  })
@@ -2339,7 +2397,7 @@ function updateItemRequestParam(params, options) {
2339
2397
  if (extensionsStr !== '*') {
2340
2398
  params.extensions = extensionsStr;
2341
2399
  }
2342
- if (fields !== undefined) {
2400
+ if (fields !== undefined && fields !== null) {
2343
2401
  params.fields = Array.isArray(fields) ? fields.join(',') : '';
2344
2402
  }
2345
2403
  if (geom !== undefined) {