@basemaps/cli-vector 8.9.0 → 8.10.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.
|
@@ -23,19 +23,19 @@ describe('HandleLayerContours', () => {
|
|
|
23
23
|
},
|
|
24
24
|
};
|
|
25
25
|
describe('handleKindContours', () => {
|
|
26
|
-
it('should assign
|
|
26
|
+
it('should not assign the feature a type or override its minzoom', () => {
|
|
27
27
|
const feature = structuredClone(FakeFeature);
|
|
28
|
-
feature.properties['elevation'] =
|
|
28
|
+
feature.properties['elevation'] = 105;
|
|
29
29
|
const modifiedFeature = handleKindContours(feature, Logger);
|
|
30
|
-
strictEqual(modifiedFeature.properties['type'],
|
|
31
|
-
strictEqual(modifiedFeature.tippecanoe.minzoom,
|
|
30
|
+
strictEqual(modifiedFeature.properties['type'], undefined);
|
|
31
|
+
strictEqual(modifiedFeature.tippecanoe.minzoom, 13);
|
|
32
32
|
});
|
|
33
|
-
it(
|
|
33
|
+
it('should assign the feature a type of index and override its minzoom', () => {
|
|
34
34
|
const feature = structuredClone(FakeFeature);
|
|
35
|
-
feature.properties['elevation'] =
|
|
35
|
+
feature.properties['elevation'] = 100;
|
|
36
36
|
const modifiedFeature = handleKindContours(feature, Logger);
|
|
37
|
-
strictEqual(modifiedFeature.properties['type'],
|
|
38
|
-
strictEqual(modifiedFeature.tippecanoe.minzoom,
|
|
37
|
+
strictEqual(modifiedFeature.properties['type'], 'index');
|
|
38
|
+
strictEqual(modifiedFeature.tippecanoe.minzoom, FakeFeature.tippecanoe.minzoom);
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
describe('handleKindPeak', () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contours.test.js","sourceRoot":"","sources":["../../../../src/modify/layers/__test__/contours.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,SAA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AAC,gBAAgB,EAAE,GAAG,EAAE;QAC9B,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;YACjD,MAAM,KAAK,GAAG;gBACZ,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE;gBAC5B,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE;gBAC5B,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE;gBAC5B,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE;gBAC3B,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;aAC1B,CAAC;YAEF,KAAK,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,KAAK,EAAE,CAAC;gBACxC,MAAM,OAAO,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;gBAC7C,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;gBAE5C,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAExD,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC;YACxD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -82885,9 +82885,9 @@ var ulid2 = __toESM(require_index_umd(), 1);
|
|
|
82885
82885
|
var CliInfo = {
|
|
82886
82886
|
// Detect unlinked packages looks for this string since its a package name, slightly work around it
|
|
82887
82887
|
package: "@basemaps/cli",
|
|
82888
|
-
version: "v8.
|
|
82889
|
-
hash: "
|
|
82890
|
-
buildId: "
|
|
82888
|
+
version: "v8.13.0",
|
|
82889
|
+
hash: "5a1984ab0e9b3939aab0db451d2f5e7aee1919af",
|
|
82890
|
+
buildId: "18264739226-1"
|
|
82891
82891
|
};
|
|
82892
82892
|
var CliDate = (/* @__PURE__ */ new Date()).toISOString();
|
|
82893
82893
|
var CliId = ulid2.ulid();
|
|
@@ -87130,15 +87130,39 @@ var ConfigImageFormatParser = z.union([
|
|
|
87130
87130
|
z.literal("avif")
|
|
87131
87131
|
]);
|
|
87132
87132
|
var ConfigResizeKernelParser = z.union([z.literal("nearest"), z.literal("lanczos3"), z.literal("lanczos2")]);
|
|
87133
|
-
var
|
|
87134
|
-
|
|
87135
|
-
|
|
87136
|
-
|
|
87137
|
-
|
|
87138
|
-
|
|
87139
|
-
|
|
87140
|
-
|
|
87133
|
+
var ColorParser = z.object({
|
|
87134
|
+
r: z.number(),
|
|
87135
|
+
g: z.number(),
|
|
87136
|
+
b: z.number(),
|
|
87137
|
+
alpha: z.number()
|
|
87138
|
+
});
|
|
87139
|
+
var PipelineTerrainRgbParser = z.object({ type: z.literal("terrain-rgb") });
|
|
87140
|
+
var PipelineColorRampParser = z.object({ type: z.literal("color-ramp") });
|
|
87141
|
+
var PipelineNdviParser = z.object({
|
|
87142
|
+
type: z.literal("ndvi"),
|
|
87143
|
+
nir: z.number(),
|
|
87144
|
+
r: z.number(),
|
|
87145
|
+
alpha: z.number(),
|
|
87146
|
+
scale: z.object({
|
|
87147
|
+
nir: z.number(),
|
|
87148
|
+
r: z.number(),
|
|
87149
|
+
alpha: z.number()
|
|
87150
|
+
}).optional()
|
|
87141
87151
|
});
|
|
87152
|
+
var PipelineExtractParser = z.object({
|
|
87153
|
+
type: z.literal("extract"),
|
|
87154
|
+
r: z.number(),
|
|
87155
|
+
g: z.number(),
|
|
87156
|
+
b: z.number(),
|
|
87157
|
+
alpha: z.number(),
|
|
87158
|
+
scale: ColorParser.optional()
|
|
87159
|
+
});
|
|
87160
|
+
var ConfigTileSetPipelineParser = z.discriminatedUnion("type", [
|
|
87161
|
+
PipelineExtractParser,
|
|
87162
|
+
PipelineTerrainRgbParser,
|
|
87163
|
+
PipelineColorRampParser,
|
|
87164
|
+
PipelineNdviParser
|
|
87165
|
+
]);
|
|
87142
87166
|
var ConfigRgbaParser = z.object({ r: z.number(), g: z.number(), b: z.number(), alpha: z.number() });
|
|
87143
87167
|
var ConfigTileSetOutputParser = z.object({
|
|
87144
87168
|
/**
|
|
@@ -94257,7 +94281,7 @@ function handleKindContours(feature, logger) {
|
|
|
94257
94281
|
feature.properties["type"] = type;
|
|
94258
94282
|
logger?.trace({ type }, "new/overidden tags");
|
|
94259
94283
|
} else {
|
|
94260
|
-
const minzoom =
|
|
94284
|
+
const minzoom = 13;
|
|
94261
94285
|
feature.tippecanoe.minzoom = minzoom;
|
|
94262
94286
|
logger?.trace({ minzoom }, "overidden styles");
|
|
94263
94287
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/cli-vector",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"build": "tsc",
|
|
23
23
|
"bundle": "../../scripts/bundle.mjs package.json",
|
|
24
24
|
"prepack": "../../scripts/bundle.mjs package.json",
|
|
25
|
-
"test": "node --test"
|
|
25
|
+
"test": "node --test \"build/**/*.test.js\""
|
|
26
26
|
},
|
|
27
27
|
"bundle": [
|
|
28
28
|
{
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"dist/"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@basemaps/config": "^8.
|
|
52
|
+
"@basemaps/config": "^8.10.1",
|
|
53
53
|
"@basemaps/geo": "^8.9.0",
|
|
54
|
-
"@basemaps/shared": "^8.9.
|
|
54
|
+
"@basemaps/shared": "^8.9.2",
|
|
55
55
|
"@cotar/builder": "^6.0.1",
|
|
56
56
|
"@cotar/core": "^6.0.1",
|
|
57
57
|
"@linzjs/docker-command": "^7.5.0",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"tar-stream": "^2.2.0",
|
|
66
66
|
"zod": "^3.24.4"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "5a1984ab0e9b3939aab0db451d2f5e7aee1919af"
|
|
69
69
|
}
|