@panoramax/web-viewer 3.2.0-develop-1b7c7072 → 3.2.0-develop-c020028b
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/CHANGELOG.md +8 -1
- package/build/index.css +1 -1
- package/build/index.js +3 -3
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/src/utils/API.js +2 -2
- package/tests/utils/API.test.js +1 -1
package/package.json
CHANGED
package/src/utils/API.js
CHANGED
|
@@ -116,8 +116,8 @@ export default class API {
|
|
|
116
116
|
throw new Error("API Landing page doesn't contain 'links' list");
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
if(!landing.stac_version.startsWith("1.
|
|
120
|
-
throw new Error(`API is not in a supported STAC version (Panoramax viewer supports only 1.
|
|
119
|
+
if(!landing.stac_version.startsWith("1.")) {
|
|
120
|
+
throw new Error(`API is not in a supported STAC version (Panoramax viewer supports only 1.x, API is ${landing.stac_version})`);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
// Read metadata
|
package/tests/utils/API.test.js
CHANGED
|
@@ -180,7 +180,7 @@ describe("_parseLanding", () => {
|
|
|
180
180
|
it("fails if API version is not supported", () => {
|
|
181
181
|
const api = new API (ENDPOINT, { skipReadLanding: true });
|
|
182
182
|
const landing = { stac_version: "0.1", links: [] };
|
|
183
|
-
expect(() => api._parseLanding(landing)).toThrow("API is not in a supported STAC version (Panoramax viewer supports only 1.
|
|
183
|
+
expect(() => api._parseLanding(landing)).toThrow("API is not in a supported STAC version (Panoramax viewer supports only 1.x, API is 0.1)");
|
|
184
184
|
});
|
|
185
185
|
|
|
186
186
|
it("fails if mandatory links are not set", () => {
|