@nextgis/ngw-connector 3.0.1 → 3.1.1
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/index.d.ts +2 -2
- package/lib/ngw-connector.cjs.js +5 -60
- package/lib/ngw-connector.cjs.js.map +1 -1
- package/lib/ngw-connector.cjs.prod.js +1 -1
- package/lib/ngw-connector.cjs.prod.js.map +1 -1
- package/lib/ngw-connector.esm-browser.js +9 -62
- package/lib/ngw-connector.esm-browser.js.map +1 -1
- package/lib/ngw-connector.esm-browser.prod.js +1 -1
- package/lib/ngw-connector.esm-browser.prod.js.map +1 -1
- package/lib/ngw-connector.esm-bundler.js +6 -61
- package/lib/ngw-connector.esm-bundler.js.map +1 -1
- package/lib/ngw-connector.esm-bundler.prod.js +1 -1
- package/lib/ngw-connector.esm-bundler.prod.js.map +1 -1
- package/lib/ngw-connector.global.js +9 -62
- package/lib/ngw-connector.global.js.map +1 -1
- package/lib/ngw-connector.global.prod.js +1 -1
- package/lib/ngw-connector.global.prod.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-connector; version: 3.
|
|
1
|
+
/** Bundle of @nextgis/ngw-connector; version: 3.1.1; author: NextGIS */
|
|
2
2
|
function defined(val) {
|
|
3
3
|
return val !== void 0 && val !== null;
|
|
4
4
|
}
|
|
@@ -329,7 +329,9 @@ EventEmitter.init = function() {
|
|
|
329
329
|
this.domain = null;
|
|
330
330
|
if (EventEmitter.usingDomains) {
|
|
331
331
|
// if there is an active domain, then attach to it.
|
|
332
|
-
if (domain.active)
|
|
332
|
+
if (domain.active && !(this instanceof domain.Domain)) {
|
|
333
|
+
this.domain = domain.active;
|
|
334
|
+
}
|
|
333
335
|
}
|
|
334
336
|
|
|
335
337
|
if (!this._events || this._events === Object.getPrototypeOf(this)._events) {
|
|
@@ -772,63 +774,7 @@ function unwrapListeners(arr) {
|
|
|
772
774
|
}
|
|
773
775
|
|
|
774
776
|
var pkg = {
|
|
775
|
-
|
|
776
|
-
version: "3.0.1",
|
|
777
|
-
_priority: 12,
|
|
778
|
-
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
779
|
-
main: "index.js",
|
|
780
|
-
module: "lib/ngw-connector.esm-bundler.js",
|
|
781
|
-
unpkg: "lib/ngw-connector.global.prod.js",
|
|
782
|
-
jsdelivr: "lib/ngw-connector.global.prod.js",
|
|
783
|
-
types: "lib/index.d.ts",
|
|
784
|
-
dependencies: {
|
|
785
|
-
"@nextgis/cache": "3.0.0",
|
|
786
|
-
"@nextgis/cancelable-promise": "3.0.0",
|
|
787
|
-
"@nextgis/utils": "3.0.0",
|
|
788
|
-
"@types/events": "^3.0.0",
|
|
789
|
-
events: "*",
|
|
790
|
-
"form-data": "^4.0.0"
|
|
791
|
-
},
|
|
792
|
-
devDependencies: {
|
|
793
|
-
"@nextgis/build-tools": "3.0.0"
|
|
794
|
-
},
|
|
795
|
-
scripts: {
|
|
796
|
-
clean: "rimraf ./lib",
|
|
797
|
-
dev: "node ../build-tools/lib/build.js",
|
|
798
|
-
prod: "npm run dev -- --release",
|
|
799
|
-
lint: "eslint ./src/**/*.ts --fix --c ../../.eslintrc",
|
|
800
|
-
watch: "npm run dev -- --watch",
|
|
801
|
-
"gen:types": "node ./scripts/generator"
|
|
802
|
-
},
|
|
803
|
-
buildOptions: {
|
|
804
|
-
name: "NgwConnector",
|
|
805
|
-
formats: [
|
|
806
|
-
"esm-bundler",
|
|
807
|
-
"esm-browser",
|
|
808
|
-
"cjs",
|
|
809
|
-
"global"
|
|
810
|
-
]
|
|
811
|
-
},
|
|
812
|
-
keywords: [
|
|
813
|
-
"NextGIS",
|
|
814
|
-
"MAP"
|
|
815
|
-
],
|
|
816
|
-
author: "NextGIS",
|
|
817
|
-
files: [
|
|
818
|
-
"index.js",
|
|
819
|
-
"lib"
|
|
820
|
-
],
|
|
821
|
-
license: "MIT",
|
|
822
|
-
homepage: "https://github.com/nextgis/nextgis_frontend/tree/master/packages/ngw-connector#readme",
|
|
823
|
-
repository: {
|
|
824
|
-
type: "git",
|
|
825
|
-
url: "git://github.com/nextgis/nextgis_frontend.git"
|
|
826
|
-
},
|
|
827
|
-
engines: {
|
|
828
|
-
node: ">=18.20.4"
|
|
829
|
-
},
|
|
830
|
-
gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
|
|
831
|
-
};
|
|
777
|
+
version: "3.1.1"};
|
|
832
778
|
|
|
833
779
|
class AbortError extends Error {
|
|
834
780
|
constructor(message = "AbortError") {
|
|
@@ -1739,7 +1685,7 @@ class NgwConnector {
|
|
|
1739
1685
|
throw new Error("Empty `url` not allowed");
|
|
1740
1686
|
}
|
|
1741
1687
|
if (params) {
|
|
1742
|
-
const _a = params, restParams = __objRest(_a, ["paramList"]);
|
|
1688
|
+
const _a = params, { paramList } = _a, restParams = __objRest(_a, ["paramList"]);
|
|
1743
1689
|
url = template(url, restParams);
|
|
1744
1690
|
}
|
|
1745
1691
|
url = encodeURI(fixUrlStr(url));
|
|
@@ -2029,8 +1975,9 @@ class ResourcesControl {
|
|
|
2029
1975
|
query: __spreadValues({
|
|
2030
1976
|
serialization: "full"
|
|
2031
1977
|
}, query)
|
|
2032
|
-
})).then((
|
|
2033
|
-
|
|
1978
|
+
})).then((response) => {
|
|
1979
|
+
const resources = Array.isArray(response) ? response : response.items;
|
|
1980
|
+
if (requestOptions == null ? void 0 : requestOptions.cache) {
|
|
2034
1981
|
for (const x of resources) {
|
|
2035
1982
|
this.cache.add("resource.item", Promise.resolve(x), {
|
|
2036
1983
|
id: x.resource.id
|