@nextgis/ngw-connector 3.0.0 → 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 +6 -61
- 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 +10 -63
- 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 +7 -62
- 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 +10 -63
- 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
package/lib/index.d.ts
CHANGED
|
@@ -665,7 +665,7 @@ interface BasemapWebmap {
|
|
|
665
665
|
interface LookupTableResource {
|
|
666
666
|
items: Record<string, string>;
|
|
667
667
|
}
|
|
668
|
-
type VectorFieldDatatype = 'STRING' | 'REAL' | 'DATE' | 'TIME' | 'DATETIME' | 'BIGINT' | 'INTEGER' | 'BOOLEAN';
|
|
668
|
+
type VectorFieldDatatype = 'STRING' | 'REAL' | 'DATE' | 'TIME' | 'DATETIME' | 'BIGINT' | 'INTEGER' | 'BOOLEAN' | 'JSON';
|
|
669
669
|
/** @deprecated - use {@link VectorFieldDatatype} instead */
|
|
670
670
|
type ResourceItemDatatype = VectorFieldDatatype;
|
|
671
671
|
interface FeatureLayerField {
|
|
@@ -681,7 +681,7 @@ interface FeatureLayerField {
|
|
|
681
681
|
interface FeatureResource {
|
|
682
682
|
fields: FeatureLayerField[];
|
|
683
683
|
}
|
|
684
|
-
type GeometryType = 'POINT' | 'LINESTRING' | 'POLYGON' | 'MULTIPOINT' | 'MULTILINESTRING' | 'MULTIPOLYGON' | 'POINTZ' | 'LINESTRINGZ' | 'POLYGONZ' | 'MULTIPOINTZ' | 'MULTILINESTRINGZ' | 'MULTIPOLYGONZ';
|
|
684
|
+
type GeometryType = 'POINT' | 'LINESTRING' | 'POLYGON' | 'MULTIPOINT' | 'MULTILINESTRING' | 'MULTIPOLYGON' | 'POINTZ' | 'LINESTRINGZ' | 'POLYGONZ' | 'MULTIPOINTZ' | 'MULTILINESTRINGZ' | 'MULTIPOLYGONZ' | 'NONE';
|
|
685
685
|
/** @deprecated use VectorLayerRead from '@nextgisweb/resource/type/api' instead */
|
|
686
686
|
interface VectorLayer {
|
|
687
687
|
srs: {
|
package/lib/ngw-connector.cjs.js
CHANGED
|
@@ -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
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var utils = require('@nextgis/utils');
|
|
@@ -69,63 +69,7 @@ async function apiRequest(opt) {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
var pkg = {
|
|
72
|
-
|
|
73
|
-
version: "3.0.0",
|
|
74
|
-
_priority: 12,
|
|
75
|
-
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
76
|
-
main: "index.js",
|
|
77
|
-
module: "lib/ngw-connector.esm-bundler.js",
|
|
78
|
-
unpkg: "lib/ngw-connector.global.prod.js",
|
|
79
|
-
jsdelivr: "lib/ngw-connector.global.prod.js",
|
|
80
|
-
types: "lib/index.d.ts",
|
|
81
|
-
dependencies: {
|
|
82
|
-
"@nextgis/cache": "3.0.0",
|
|
83
|
-
"@nextgis/cancelable-promise": "3.0.0",
|
|
84
|
-
"@nextgis/utils": "3.0.0",
|
|
85
|
-
"@types/events": "^3.0.0",
|
|
86
|
-
events: "*",
|
|
87
|
-
"form-data": "^4.0.0"
|
|
88
|
-
},
|
|
89
|
-
devDependencies: {
|
|
90
|
-
"@nextgis/build-tools": "3.0.0"
|
|
91
|
-
},
|
|
92
|
-
scripts: {
|
|
93
|
-
clean: "rimraf ./lib",
|
|
94
|
-
dev: "node ../build-tools/lib/build.js",
|
|
95
|
-
prod: "npm run dev -- --release",
|
|
96
|
-
lint: "eslint ./src/**/*.ts --fix --c ../../.eslintrc",
|
|
97
|
-
watch: "npm run dev -- --watch",
|
|
98
|
-
"gen:types": "node ./scripts/generator"
|
|
99
|
-
},
|
|
100
|
-
buildOptions: {
|
|
101
|
-
name: "NgwConnector",
|
|
102
|
-
formats: [
|
|
103
|
-
"esm-bundler",
|
|
104
|
-
"esm-browser",
|
|
105
|
-
"cjs",
|
|
106
|
-
"global"
|
|
107
|
-
]
|
|
108
|
-
},
|
|
109
|
-
keywords: [
|
|
110
|
-
"NextGIS",
|
|
111
|
-
"MAP"
|
|
112
|
-
],
|
|
113
|
-
author: "NextGIS",
|
|
114
|
-
files: [
|
|
115
|
-
"index.js",
|
|
116
|
-
"lib"
|
|
117
|
-
],
|
|
118
|
-
license: "MIT",
|
|
119
|
-
homepage: "https://github.com/nextgis/nextgis_frontend/tree/master/packages/ngw-connector#readme",
|
|
120
|
-
repository: {
|
|
121
|
-
type: "git",
|
|
122
|
-
url: "git://github.com/nextgis/nextgis_frontend.git"
|
|
123
|
-
},
|
|
124
|
-
engines: {
|
|
125
|
-
node: ">=18.20.4"
|
|
126
|
-
},
|
|
127
|
-
gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
|
|
128
|
-
};
|
|
72
|
+
version: "3.1.1"};
|
|
129
73
|
|
|
130
74
|
class AbortError extends Error {
|
|
131
75
|
constructor(message = "AbortError") {
|
|
@@ -883,7 +827,7 @@ class NgwConnector {
|
|
|
883
827
|
credentials = credentials || this.options.auth;
|
|
884
828
|
if (credentials) {
|
|
885
829
|
const { login, password } = credentials;
|
|
886
|
-
const encodedStr =
|
|
830
|
+
const encodedStr = `${login}:${password}`;
|
|
887
831
|
{
|
|
888
832
|
return Buffer.from(encodedStr).toString("base64");
|
|
889
833
|
}
|
|
@@ -1171,8 +1115,9 @@ class ResourcesControl {
|
|
|
1171
1115
|
serialization: "full",
|
|
1172
1116
|
...query
|
|
1173
1117
|
}
|
|
1174
|
-
}).then((
|
|
1175
|
-
|
|
1118
|
+
}).then((response) => {
|
|
1119
|
+
const resources = Array.isArray(response) ? response : response.items;
|
|
1120
|
+
if (requestOptions == null ? void 0 : requestOptions.cache) {
|
|
1176
1121
|
for (const x of resources) {
|
|
1177
1122
|
this.cache.add("resource.item", Promise.resolve(x), {
|
|
1178
1123
|
id: x.resource.id
|