@loaders.gl/wms 4.2.0-alpha.4 → 4.2.0-alpha.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.
- package/dist/csw-capabilities-loader.d.ts +1 -1
- package/dist/csw-capabilities-loader.d.ts.map +1 -1
- package/dist/csw-capabilities-loader.js +24 -16
- package/dist/csw-domain-loader.d.ts +1 -1
- package/dist/csw-domain-loader.d.ts.map +1 -1
- package/dist/csw-domain-loader.js +24 -16
- package/dist/csw-records-loader.d.ts +1 -1
- package/dist/csw-records-loader.d.ts.map +1 -1
- package/dist/csw-records-loader.js +24 -16
- package/dist/gml-loader.d.ts +1 -1
- package/dist/gml-loader.d.ts.map +1 -1
- package/dist/gml-loader.js +24 -16
- package/dist/index.cjs +76 -65
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +30 -30
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/lib/parsers/csw/parse-csw-capabilities.js +18 -13
- package/dist/lib/parsers/csw/parse-csw-domain.js +26 -18
- package/dist/lib/parsers/csw/parse-csw-records.js +47 -36
- package/dist/lib/parsers/csw/parse-exception-report.js +26 -8
- package/dist/lib/parsers/gml/deep-strict-equal.js +107 -39
- package/dist/lib/parsers/gml/parse-gml.js +299 -280
- package/dist/lib/parsers/wms/parse-wms-capabilities.js +207 -187
- package/dist/lib/parsers/wms/parse-wms-error.js +17 -6
- package/dist/lib/parsers/wms/parse-wms-features.js +20 -19
- package/dist/lib/parsers/wms/parse-wms-layer-description.js +10 -4
- package/dist/lib/parsers/xml/parse-xml-helpers.js +54 -45
- package/dist/lib/services/create-image-service.d.ts +1 -1
- package/dist/lib/services/create-image-service.d.ts.map +1 -1
- package/dist/lib/services/create-image-service.js +31 -19
- package/dist/lib/services/image-service.js +40 -33
- package/dist/services/arcgis/arcgis-image-service.d.ts +2 -2
- package/dist/services/arcgis/arcgis-image-service.d.ts.map +1 -1
- package/dist/services/arcgis/arcgis-image-service.js +92 -55
- package/dist/services/arcgis/arcgis-server.js +35 -28
- package/dist/services/create-image-source.d.ts +3 -3
- package/dist/services/create-image-source.d.ts.map +1 -1
- package/dist/services/create-image-source.js +11 -2
- package/dist/services/ogc/csw-service.d.ts +3 -3
- package/dist/services/ogc/csw-service.d.ts.map +1 -1
- package/dist/services/ogc/csw-service.js +159 -143
- package/dist/services/ogc/wms-service.d.ts +4 -4
- package/dist/services/ogc/wms-service.d.ts.map +1 -1
- package/dist/services/ogc/wms-service.js +306 -242
- package/dist/wip/data-source.js +58 -1
- package/dist/wip/lib/wcs/parse-wcs-capabilities.js +8 -11
- package/dist/wip/lib/wfs/parse-wfs-capabilities.js +12 -12
- package/dist/wip/lib/wfs/parse-wfs.js +20 -20
- package/dist/wip/lib/wmts/parse-wmts-capabilities.js +70 -12
- package/dist/wip/lib/wmts/parse-wmts.js +23 -20
- package/dist/wip/services/arcgis-feature-service.js +25 -22
- package/dist/wip/wcs-capabilities-loader.d.ts +1 -1
- package/dist/wip/wcs-capabilities-loader.d.ts.map +1 -1
- package/dist/wip/wcs-capabilities-loader.js +22 -16
- package/dist/wip/wfs-capabilities-loader.d.ts +1 -1
- package/dist/wip/wfs-capabilities-loader.d.ts.map +1 -1
- package/dist/wip/wfs-capabilities-loader.js +22 -16
- package/dist/wip/wms-feature-info-loader.d.ts +1 -1
- package/dist/wip/wms-feature-info-loader.d.ts.map +1 -1
- package/dist/wip/wms-feature-info-loader.js +10 -6
- package/dist/wip/wms-layer-description-loader.d.ts +1 -1
- package/dist/wip/wms-layer-description-loader.d.ts.map +1 -1
- package/dist/wip/wms-layer-description-loader.js +9 -6
- package/dist/wip/wmts-capabilities-loader.js +23 -16
- package/dist/wms-capabilities-loader.d.ts +2 -2
- package/dist/wms-capabilities-loader.d.ts.map +1 -1
- package/dist/wms-capabilities-loader.js +28 -16
- package/dist/wms-error-loader.js +34 -29
- package/package.json +10 -8
- package/dist/csw-capabilities-loader.js.map +0 -1
- package/dist/csw-domain-loader.js.map +0 -1
- package/dist/csw-records-loader.js.map +0 -1
- package/dist/gml-loader.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/parsers/csw/parse-csw-capabilities.js.map +0 -1
- package/dist/lib/parsers/csw/parse-csw-domain.js.map +0 -1
- package/dist/lib/parsers/csw/parse-csw-records.js.map +0 -1
- package/dist/lib/parsers/csw/parse-exception-report.js.map +0 -1
- package/dist/lib/parsers/gml/deep-strict-equal.js.map +0 -1
- package/dist/lib/parsers/gml/parse-gml.js.map +0 -1
- package/dist/lib/parsers/wms/parse-wms-capabilities.js.map +0 -1
- package/dist/lib/parsers/wms/parse-wms-error.js.map +0 -1
- package/dist/lib/parsers/wms/parse-wms-features.js.map +0 -1
- package/dist/lib/parsers/wms/parse-wms-layer-description.js.map +0 -1
- package/dist/lib/parsers/xml/parse-xml-helpers.js.map +0 -1
- package/dist/lib/services/create-image-service.js.map +0 -1
- package/dist/lib/services/image-service.js.map +0 -1
- package/dist/services/arcgis/arcgis-image-service.js.map +0 -1
- package/dist/services/arcgis/arcgis-server.js.map +0 -1
- package/dist/services/create-image-source.js.map +0 -1
- package/dist/services/ogc/csw-service.js.map +0 -1
- package/dist/services/ogc/wms-service.js.map +0 -1
- package/dist/wip/data-source.js.map +0 -1
- package/dist/wip/lib/wcs/parse-wcs-capabilities.js.map +0 -1
- package/dist/wip/lib/wfs/parse-wfs-capabilities.js.map +0 -1
- package/dist/wip/lib/wfs/parse-wfs.js.map +0 -1
- package/dist/wip/lib/wmts/parse-wmts-capabilities.js.map +0 -1
- package/dist/wip/lib/wmts/parse-wmts.js.map +0 -1
- package/dist/wip/services/arcgis-feature-service.js.map +0 -1
- package/dist/wip/services/wmts-service.ts.disabled +0 -348
- package/dist/wip/wcs-capabilities-loader.js.map +0 -1
- package/dist/wip/wfs-capabilities-loader.js.map +0 -1
- package/dist/wip/wms-feature-info-loader.js.map +0 -1
- package/dist/wip/wms-layer-description-loader.js.map +0 -1
- package/dist/wip/wms-layer-description-loader.md.disabled.md +0 -47
- package/dist/wip/wmts-capabilities-loader.js.map +0 -1
- package/dist/wms-capabilities-loader.js.map +0 -1
- package/dist/wms-error-loader.js.map +0 -1
|
@@ -1,48 +1,116 @@
|
|
|
1
|
+
// https://github.com/nodejs/node/commit/c1d82ac2ff15594840e2a1b9531b506ae067ed27;
|
|
2
|
+
// http://wiki.commonjs.org/wiki/Unit_Testing/1.0
|
|
3
|
+
//
|
|
4
|
+
// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
|
|
5
|
+
//
|
|
6
|
+
// Originally from narwhal.js (http://narwhaljs.org)
|
|
7
|
+
// Copyright (c) 2009 Thomas Robinson <280north.com>
|
|
8
|
+
//
|
|
9
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
// of this software and associated documentation files (the 'Software'), to
|
|
11
|
+
// deal in the Software without restriction, including without limitation the
|
|
12
|
+
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
13
|
+
// sell copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
// furnished to do so, subject to the following conditions:
|
|
15
|
+
//
|
|
16
|
+
// The above copyright notice and this permission notice shall be included in
|
|
17
|
+
// all copies or substantial portions of the Software.
|
|
18
|
+
//
|
|
19
|
+
// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
23
|
+
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
24
|
+
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
|
+
/** @todo replace this ridiculous choice of deepStrictEqual */
|
|
26
|
+
// eslint-disable-next-line complexity
|
|
1
27
|
export function deepStrictEqual(actual, expected, strict) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
28
|
+
// 7.1. All identical values are equivalent, as determined by ===.
|
|
29
|
+
if (actual === expected) {
|
|
30
|
+
return true;
|
|
31
|
+
// } else if (actual instanceof Buffer && expected instanceof Buffer) {
|
|
32
|
+
// return compare(actual, expected) === 0;
|
|
33
|
+
// // 7.2. If the expected value is a Date object, the actual value is
|
|
34
|
+
// // equivalent if it is also a Date object that refers to the same time.
|
|
35
|
+
}
|
|
36
|
+
else if (actual instanceof Date && expected instanceof Date) {
|
|
37
|
+
return actual.getTime() === expected.getTime();
|
|
38
|
+
// 7.3 If the expected value is a RegExp object, the actual value is
|
|
39
|
+
// equivalent if it is also a RegExp object with the same source and
|
|
40
|
+
// properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).
|
|
41
|
+
}
|
|
42
|
+
else if (actual instanceof RegExp && expected instanceof RegExp) {
|
|
43
|
+
return (actual.source === expected.source &&
|
|
44
|
+
actual.global === expected.global &&
|
|
45
|
+
actual.multiline === expected.multiline &&
|
|
46
|
+
actual.lastIndex === expected.lastIndex &&
|
|
47
|
+
actual.ignoreCase === expected.ignoreCase);
|
|
48
|
+
// 7.4. Other pairs that do not both pass typeof value == 'object',
|
|
49
|
+
// equivalence is determined by ==.
|
|
50
|
+
}
|
|
51
|
+
else if ((actual === null || typeof actual !== 'object') &&
|
|
52
|
+
(expected === null || typeof expected !== 'object')) {
|
|
53
|
+
// eslint-disable-next-line eqeqeq
|
|
54
|
+
return strict ? actual === expected : actual == expected;
|
|
55
|
+
// 7.5 For all other Object pairs, including Array objects, equivalence is
|
|
56
|
+
// determined by having the same number of owned properties (as verified
|
|
57
|
+
// with Object.prototype.hasOwnProperty.call), the same set of keys
|
|
58
|
+
// (although not necessarily the same order), equivalent values for every
|
|
59
|
+
// corresponding key, and an identical 'prototype' property. Note: this
|
|
60
|
+
// accounts for both named and indexed properties on Arrays.
|
|
61
|
+
}
|
|
62
|
+
return objEquiv(actual, expected, strict);
|
|
12
63
|
}
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
13
65
|
const pSlice = Array.prototype.slice;
|
|
14
66
|
function isPrimitive(arg) {
|
|
15
|
-
|
|
67
|
+
return arg === null || (typeof arg !== 'object' && typeof arg !== 'function');
|
|
16
68
|
}
|
|
17
69
|
function isArguments(object) {
|
|
18
|
-
|
|
70
|
+
// eslint-disable-next-line eqeqeq
|
|
71
|
+
return Object.prototype.toString.call(object) == '[object Arguments]';
|
|
19
72
|
}
|
|
73
|
+
// eslint-disable-next-line complexity
|
|
20
74
|
function objEquiv(a, b, strict) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
75
|
+
if (a === null || a === undefined || b === null || b === undefined)
|
|
76
|
+
return false;
|
|
77
|
+
// if one is a primitive, the other must be same
|
|
78
|
+
if (isPrimitive(a) || isPrimitive(b))
|
|
79
|
+
return a === b;
|
|
80
|
+
if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b))
|
|
81
|
+
return false;
|
|
82
|
+
const aIsArgs = isArguments(a);
|
|
83
|
+
const bIsArgs = isArguments(b);
|
|
84
|
+
if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs))
|
|
85
|
+
return false;
|
|
86
|
+
if (aIsArgs) {
|
|
87
|
+
a = pSlice.call(a);
|
|
88
|
+
b = pSlice.call(b);
|
|
89
|
+
return deepStrictEqual(a, b, strict);
|
|
90
|
+
}
|
|
91
|
+
const ka = Object.keys(a);
|
|
92
|
+
const kb = Object.keys(b);
|
|
93
|
+
let key;
|
|
94
|
+
let i;
|
|
95
|
+
// having the same number of owned properties (keys incorporates
|
|
96
|
+
// hasOwnProperty)
|
|
97
|
+
if (ka.length !== kb.length)
|
|
98
|
+
return false;
|
|
99
|
+
// the same set of keys (although not necessarily the same order),
|
|
100
|
+
ka.sort();
|
|
101
|
+
kb.sort();
|
|
102
|
+
// ~~~cheap key test
|
|
103
|
+
for (i = ka.length - 1; i >= 0; i--) {
|
|
104
|
+
if (ka[i] !== kb[i])
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
// equivalent values for every corresponding key, and
|
|
108
|
+
// ~~~possibly expensive deep test
|
|
109
|
+
for (i = ka.length - 1; i >= 0; i--) {
|
|
110
|
+
key = ka[i];
|
|
111
|
+
// @ts-ignore
|
|
112
|
+
if (!deepStrictEqual(a[key], b[key], strict))
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
return true;
|
|
47
116
|
}
|
|
48
|
-
//# sourceMappingURL=deep-strict-equal.js.map
|