@geospatial-sdk/core 0.0.5-dev.43 → 0.0.5-dev.44
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/utils/freeze.test.ts
CHANGED
package/lib/utils/hash.test.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MapContext, MapContextDiff, MapContextLayer } from "../model";
|
|
2
|
-
import { computeMapContextDiff } from "./map-context-diff";
|
|
1
|
+
import { MapContext, MapContextDiff, MapContextLayer } from "../model/index.js";
|
|
2
|
+
import { computeMapContextDiff } from "./map-context-diff.js";
|
|
3
3
|
import {
|
|
4
4
|
SAMPLE_CONTEXT,
|
|
5
5
|
SAMPLE_LAYER1,
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
SAMPLE_LAYER3,
|
|
8
8
|
SAMPLE_LAYER4,
|
|
9
9
|
SAMPLE_LAYER5,
|
|
10
|
-
} from "../../fixtures/map-context.fixtures";
|
|
11
|
-
import {
|
|
10
|
+
} from "../../fixtures/map-context.fixtures.js";
|
|
11
|
+
import { beforeEach, describe, expect, it } from "vitest";
|
|
12
12
|
|
|
13
13
|
describe("Context diff utils", () => {
|
|
14
14
|
describe("computeMapContextDiff", () => {
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
isLayerSameAndUnchanged,
|
|
9
9
|
removeLayerFromContext,
|
|
10
10
|
replaceLayerInContext,
|
|
11
|
-
} from "./map-context";
|
|
12
|
-
import { MapContext } from "../model";
|
|
11
|
+
} from "./map-context.js";
|
|
12
|
+
import { MapContext } from "../model/index.js";
|
|
13
13
|
import {
|
|
14
14
|
SAMPLE_CONTEXT,
|
|
15
15
|
SAMPLE_LAYER1,
|
|
16
16
|
SAMPLE_LAYER2,
|
|
17
17
|
SAMPLE_LAYER3,
|
|
18
|
-
} from "../../fixtures/map-context.fixtures";
|
|
18
|
+
} from "../../fixtures/map-context.fixtures.js";
|
|
19
19
|
|
|
20
20
|
describe("Map context utils", () => {
|
|
21
21
|
describe("isLayerSame", () => {
|
|
@@ -78,6 +78,7 @@ describe("Map context utils", () => {
|
|
|
78
78
|
extras: undefined,
|
|
79
79
|
}),
|
|
80
80
|
).toBe(true);
|
|
81
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
81
82
|
const { extras, ...layer } = SAMPLE_LAYER1;
|
|
82
83
|
expect(isLayerSame(SAMPLE_LAYER1, layer)).toBe(true);
|
|
83
84
|
});
|
|
@@ -179,6 +180,7 @@ describe("Map context utils", () => {
|
|
|
179
180
|
extras: undefined,
|
|
180
181
|
}),
|
|
181
182
|
).toBe(false);
|
|
183
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
182
184
|
const { extras, ...layer } = SAMPLE_LAYER1;
|
|
183
185
|
expect(isLayerSameAndUnchanged(SAMPLE_LAYER1, layer)).toBe(false);
|
|
184
186
|
});
|
package/lib/utils/url.test.ts
CHANGED
package/lib/utils/view.test.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createViewFromLayer } from "./view";
|
|
1
|
+
import { createViewFromLayer } from "./view.js";
|
|
2
2
|
import {
|
|
3
3
|
MapContextLayerGeojson,
|
|
4
4
|
MapContextLayerWfs,
|
|
5
5
|
MapContextLayerWms,
|
|
6
6
|
MapContextLayerWmts,
|
|
7
|
-
} from "../model";
|
|
7
|
+
} from "../model/index.js";
|
|
8
8
|
|
|
9
9
|
vitest.mock("@camptocamp/ogc-client", () => ({
|
|
10
10
|
WmsEndpoint: class {
|
|
@@ -46,7 +46,7 @@ vitest.mock("@camptocamp/ogc-client", () => ({
|
|
|
46
46
|
isReady() {
|
|
47
47
|
return Promise.resolve({
|
|
48
48
|
getSingleLayerName: () => "layerName",
|
|
49
|
-
getLayerByName: (
|
|
49
|
+
getLayerByName: () => ({
|
|
50
50
|
latLonBoundingBox: [1, 2.6, 3.3, 4.2],
|
|
51
51
|
}),
|
|
52
52
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geospatial-sdk/core",
|
|
3
|
-
"version": "0.0.5-dev.
|
|
3
|
+
"version": "0.0.5-dev.44+44c94a2",
|
|
4
4
|
"description": "Core functions and models for the SDK",
|
|
5
5
|
"author": "Olivia <olivia.guyot@camptocamp.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"test": "vitest",
|
|
23
23
|
"build": "tsc"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "44c94a2e3458beb7e3f3ffc98ed170c21a0fc460",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"proj4": "^2.9.2"
|
|
28
28
|
},
|