@loaders.gl/wms 4.2.0-alpha.4 → 4.2.0-alpha.5

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.
Files changed (109) hide show
  1. package/dist/csw-capabilities-loader.d.ts +1 -1
  2. package/dist/csw-capabilities-loader.d.ts.map +1 -1
  3. package/dist/csw-capabilities-loader.js +23 -15
  4. package/dist/csw-domain-loader.d.ts +1 -1
  5. package/dist/csw-domain-loader.d.ts.map +1 -1
  6. package/dist/csw-domain-loader.js +23 -15
  7. package/dist/csw-records-loader.d.ts +1 -1
  8. package/dist/csw-records-loader.d.ts.map +1 -1
  9. package/dist/csw-records-loader.js +23 -15
  10. package/dist/gml-loader.d.ts +1 -1
  11. package/dist/gml-loader.d.ts.map +1 -1
  12. package/dist/gml-loader.js +23 -15
  13. package/dist/index.cjs +49 -58
  14. package/dist/index.cjs.map +7 -0
  15. package/dist/index.d.ts +30 -30
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +8 -1
  18. package/dist/lib/parsers/csw/parse-csw-capabilities.js +18 -13
  19. package/dist/lib/parsers/csw/parse-csw-domain.js +26 -18
  20. package/dist/lib/parsers/csw/parse-csw-records.js +47 -36
  21. package/dist/lib/parsers/csw/parse-exception-report.js +26 -8
  22. package/dist/lib/parsers/gml/deep-strict-equal.js +107 -39
  23. package/dist/lib/parsers/gml/parse-gml.js +299 -280
  24. package/dist/lib/parsers/wms/parse-wms-capabilities.js +207 -187
  25. package/dist/lib/parsers/wms/parse-wms-error.js +17 -6
  26. package/dist/lib/parsers/wms/parse-wms-features.js +20 -19
  27. package/dist/lib/parsers/wms/parse-wms-layer-description.js +10 -4
  28. package/dist/lib/parsers/xml/parse-xml-helpers.js +54 -45
  29. package/dist/lib/services/create-image-service.d.ts +1 -1
  30. package/dist/lib/services/create-image-service.d.ts.map +1 -1
  31. package/dist/lib/services/create-image-service.js +31 -19
  32. package/dist/lib/services/image-service.js +39 -32
  33. package/dist/services/arcgis/arcgis-image-service.d.ts +2 -2
  34. package/dist/services/arcgis/arcgis-image-service.d.ts.map +1 -1
  35. package/dist/services/arcgis/arcgis-image-service.js +91 -55
  36. package/dist/services/arcgis/arcgis-server.js +35 -28
  37. package/dist/services/create-image-source.d.ts +3 -3
  38. package/dist/services/create-image-source.d.ts.map +1 -1
  39. package/dist/services/create-image-source.js +11 -2
  40. package/dist/services/ogc/csw-service.d.ts +3 -3
  41. package/dist/services/ogc/csw-service.d.ts.map +1 -1
  42. package/dist/services/ogc/csw-service.js +156 -142
  43. package/dist/services/ogc/wms-service.d.ts +4 -4
  44. package/dist/services/ogc/wms-service.d.ts.map +1 -1
  45. package/dist/services/ogc/wms-service.js +295 -242
  46. package/dist/wip/data-source.js +58 -1
  47. package/dist/wip/lib/wcs/parse-wcs-capabilities.js +8 -11
  48. package/dist/wip/lib/wfs/parse-wfs-capabilities.js +12 -12
  49. package/dist/wip/lib/wfs/parse-wfs.js +20 -20
  50. package/dist/wip/lib/wmts/parse-wmts-capabilities.js +70 -12
  51. package/dist/wip/lib/wmts/parse-wmts.js +23 -20
  52. package/dist/wip/services/arcgis-feature-service.js +22 -22
  53. package/dist/wip/wcs-capabilities-loader.d.ts +1 -1
  54. package/dist/wip/wcs-capabilities-loader.d.ts.map +1 -1
  55. package/dist/wip/wcs-capabilities-loader.js +21 -15
  56. package/dist/wip/wfs-capabilities-loader.d.ts +1 -1
  57. package/dist/wip/wfs-capabilities-loader.d.ts.map +1 -1
  58. package/dist/wip/wfs-capabilities-loader.js +21 -15
  59. package/dist/wip/wms-feature-info-loader.d.ts +1 -1
  60. package/dist/wip/wms-feature-info-loader.d.ts.map +1 -1
  61. package/dist/wip/wms-feature-info-loader.js +10 -6
  62. package/dist/wip/wms-layer-description-loader.d.ts +1 -1
  63. package/dist/wip/wms-layer-description-loader.d.ts.map +1 -1
  64. package/dist/wip/wms-layer-description-loader.js +9 -6
  65. package/dist/wip/wmts-capabilities-loader.js +22 -15
  66. package/dist/wms-capabilities-loader.d.ts +2 -2
  67. package/dist/wms-capabilities-loader.d.ts.map +1 -1
  68. package/dist/wms-capabilities-loader.js +27 -15
  69. package/dist/wms-error-loader.js +33 -28
  70. package/package.json +10 -8
  71. package/dist/csw-capabilities-loader.js.map +0 -1
  72. package/dist/csw-domain-loader.js.map +0 -1
  73. package/dist/csw-records-loader.js.map +0 -1
  74. package/dist/gml-loader.js.map +0 -1
  75. package/dist/index.js.map +0 -1
  76. package/dist/lib/parsers/csw/parse-csw-capabilities.js.map +0 -1
  77. package/dist/lib/parsers/csw/parse-csw-domain.js.map +0 -1
  78. package/dist/lib/parsers/csw/parse-csw-records.js.map +0 -1
  79. package/dist/lib/parsers/csw/parse-exception-report.js.map +0 -1
  80. package/dist/lib/parsers/gml/deep-strict-equal.js.map +0 -1
  81. package/dist/lib/parsers/gml/parse-gml.js.map +0 -1
  82. package/dist/lib/parsers/wms/parse-wms-capabilities.js.map +0 -1
  83. package/dist/lib/parsers/wms/parse-wms-error.js.map +0 -1
  84. package/dist/lib/parsers/wms/parse-wms-features.js.map +0 -1
  85. package/dist/lib/parsers/wms/parse-wms-layer-description.js.map +0 -1
  86. package/dist/lib/parsers/xml/parse-xml-helpers.js.map +0 -1
  87. package/dist/lib/services/create-image-service.js.map +0 -1
  88. package/dist/lib/services/image-service.js.map +0 -1
  89. package/dist/services/arcgis/arcgis-image-service.js.map +0 -1
  90. package/dist/services/arcgis/arcgis-server.js.map +0 -1
  91. package/dist/services/create-image-source.js.map +0 -1
  92. package/dist/services/ogc/csw-service.js.map +0 -1
  93. package/dist/services/ogc/wms-service.js.map +0 -1
  94. package/dist/wip/data-source.js.map +0 -1
  95. package/dist/wip/lib/wcs/parse-wcs-capabilities.js.map +0 -1
  96. package/dist/wip/lib/wfs/parse-wfs-capabilities.js.map +0 -1
  97. package/dist/wip/lib/wfs/parse-wfs.js.map +0 -1
  98. package/dist/wip/lib/wmts/parse-wmts-capabilities.js.map +0 -1
  99. package/dist/wip/lib/wmts/parse-wmts.js.map +0 -1
  100. package/dist/wip/services/arcgis-feature-service.js.map +0 -1
  101. package/dist/wip/services/wmts-service.ts.disabled +0 -348
  102. package/dist/wip/wcs-capabilities-loader.js.map +0 -1
  103. package/dist/wip/wfs-capabilities-loader.js.map +0 -1
  104. package/dist/wip/wms-feature-info-loader.js.map +0 -1
  105. package/dist/wip/wms-layer-description-loader.js.map +0 -1
  106. package/dist/wip/wms-layer-description-loader.md.disabled.md +0 -47
  107. package/dist/wip/wmts-capabilities-loader.js.map +0 -1
  108. package/dist/wms-capabilities-loader.js.map +0 -1
  109. 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
- if (actual === expected) {
3
- return true;
4
- } else if (actual instanceof Date && expected instanceof Date) {
5
- return actual.getTime() === expected.getTime();
6
- } else if (actual instanceof RegExp && expected instanceof RegExp) {
7
- return actual.source === expected.source && actual.global === expected.global && actual.multiline === expected.multiline && actual.lastIndex === expected.lastIndex && actual.ignoreCase === expected.ignoreCase;
8
- } else if ((actual === null || typeof actual !== 'object') && (expected === null || typeof expected !== 'object')) {
9
- return strict ? actual === expected : actual == expected;
10
- }
11
- return objEquiv(actual, expected, strict);
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
- return arg === null || typeof arg !== 'object' && typeof arg !== 'function';
67
+ return arg === null || (typeof arg !== 'object' && typeof arg !== 'function');
16
68
  }
17
69
  function isArguments(object) {
18
- return Object.prototype.toString.call(object) == '[object Arguments]';
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
- if (a === null || a === undefined || b === null || b === undefined) return false;
22
- if (isPrimitive(a) || isPrimitive(b)) return a === b;
23
- if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) return false;
24
- const aIsArgs = isArguments(a);
25
- const bIsArgs = isArguments(b);
26
- if (aIsArgs && !bIsArgs || !aIsArgs && bIsArgs) return false;
27
- if (aIsArgs) {
28
- a = pSlice.call(a);
29
- b = pSlice.call(b);
30
- return deepStrictEqual(a, b, strict);
31
- }
32
- const ka = Object.keys(a);
33
- const kb = Object.keys(b);
34
- let key;
35
- let i;
36
- if (ka.length !== kb.length) return false;
37
- ka.sort();
38
- kb.sort();
39
- for (i = ka.length - 1; i >= 0; i--) {
40
- if (ka[i] !== kb[i]) return false;
41
- }
42
- for (i = ka.length - 1; i >= 0; i--) {
43
- key = ka[i];
44
- if (!deepStrictEqual(a[key], b[key], strict)) return false;
45
- }
46
- return true;
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