@basemaps/cli-vector 8.10.1 → 8.10.2
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/index.cjs +19 -10
- package/package.json +4 -4
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.14.0",
|
|
82889
|
+
hash: "eb807c6d0f091b41e4d6d972b77c24f584cec230",
|
|
82890
|
+
buildId: "18453645562-1"
|
|
82891
82891
|
};
|
|
82892
82892
|
var CliDate = (/* @__PURE__ */ new Date()).toISOString();
|
|
82893
82893
|
var CliId = ulid2.ulid();
|
|
@@ -87137,7 +87137,7 @@ var ColorParser = z.object({
|
|
|
87137
87137
|
alpha: z.number()
|
|
87138
87138
|
});
|
|
87139
87139
|
var PipelineTerrainRgbParser = z.object({ type: z.literal("terrain-rgb") });
|
|
87140
|
-
var PipelineColorRampParser = z.object({ type: z.literal("color-ramp") });
|
|
87140
|
+
var PipelineColorRampParser = z.object({ type: z.literal("color-ramp"), ramp: z.string().optional() });
|
|
87141
87141
|
var PipelineNdviParser = z.object({
|
|
87142
87142
|
type: z.literal("ndvi"),
|
|
87143
87143
|
nir: z.number(),
|
|
@@ -88625,6 +88625,13 @@ var Env = {
|
|
|
88625
88625
|
/** Index to use for storing analytic data */
|
|
88626
88626
|
ElasticIndexName: "ELASTIC_INDEX_NAME"
|
|
88627
88627
|
},
|
|
88628
|
+
/** Load a environment variable throw a exception if the value is empty */
|
|
88629
|
+
getRequired(envName) {
|
|
88630
|
+
const value = Env.get(envName);
|
|
88631
|
+
if (value == null || value === "")
|
|
88632
|
+
throw new Error(`Missing env $${envName}`);
|
|
88633
|
+
return value;
|
|
88634
|
+
},
|
|
88628
88635
|
/** Load a environment var defaulting to defaultOutput if it does not exist */
|
|
88629
88636
|
get(envName) {
|
|
88630
88637
|
return process.env[envName];
|
|
@@ -92429,7 +92436,7 @@ function getTiffTagSize(fieldType) {
|
|
|
92429
92436
|
case TiffTagValueType.Ifd8:
|
|
92430
92437
|
return 8;
|
|
92431
92438
|
default:
|
|
92432
|
-
throw new Error(`Invalid fieldType ${fieldType}`);
|
|
92439
|
+
throw new Error(`Invalid fieldType ${String(fieldType)}`);
|
|
92433
92440
|
}
|
|
92434
92441
|
}
|
|
92435
92442
|
|
|
@@ -92603,10 +92610,14 @@ async function getValueAt(tiff, tag2, index) {
|
|
|
92603
92610
|
const bytes = await tiff.source.fetch(tag2.dataOffset + index * dataTypeSize, dataTypeSize);
|
|
92604
92611
|
const view = new DataView(bytes);
|
|
92605
92612
|
const value2 = readValue(tiff, void 0, view, 0, tag2.dataType, 1);
|
|
92613
|
+
if (typeof value2 !== "number")
|
|
92614
|
+
throw new Error("Value is not a number");
|
|
92606
92615
|
tag2.value[index] = value2;
|
|
92607
92616
|
return value2;
|
|
92608
92617
|
}
|
|
92609
92618
|
const value = readValue(tiff, void 0, tag2.view, index * dataTypeSize, tag2.dataType, 1);
|
|
92619
|
+
if (typeof value !== "number")
|
|
92620
|
+
throw new Error("Value is not a number");
|
|
92610
92621
|
tag2.value[index] = value;
|
|
92611
92622
|
return value;
|
|
92612
92623
|
}
|
|
@@ -93374,8 +93385,6 @@ var Tiff = class _Tiff {
|
|
|
93374
93385
|
const endian = bytes.getUint16(offset, this.isLittleEndian);
|
|
93375
93386
|
offset += 2;
|
|
93376
93387
|
this.isLittleEndian = endian === TiffEndian.Little;
|
|
93377
|
-
if (!this.isLittleEndian)
|
|
93378
|
-
throw new Error("Only little endian is supported");
|
|
93379
93388
|
this.version = bytes.getUint16(offset, this.isLittleEndian);
|
|
93380
93389
|
offset += 2;
|
|
93381
93390
|
let nextOffsetIfd;
|
|
@@ -93395,7 +93404,7 @@ var Tiff = class _Tiff {
|
|
|
93395
93404
|
nextOffsetIfd = getUint(bytes, offset, this.ifdConfig.pointer, this.isLittleEndian);
|
|
93396
93405
|
offset += this.ifdConfig.pointer;
|
|
93397
93406
|
} else {
|
|
93398
|
-
throw new Error(`Only tiff supported version:${this.version}`);
|
|
93407
|
+
throw new Error(`Only tiff supported version:${String(this.version)}`);
|
|
93399
93408
|
}
|
|
93400
93409
|
const ghostSize = nextOffsetIfd - offset;
|
|
93401
93410
|
if (ghostSize > 0 && ghostSize < 16 * 1024) {
|
|
@@ -93409,7 +93418,7 @@ var Tiff = class _Tiff {
|
|
|
93409
93418
|
lastView = new DataView(bytes2);
|
|
93410
93419
|
lastView.sourceOffset = nextOffsetIfd;
|
|
93411
93420
|
}
|
|
93412
|
-
nextOffsetIfd =
|
|
93421
|
+
nextOffsetIfd = this.readIfd(nextOffsetIfd, lastView);
|
|
93413
93422
|
}
|
|
93414
93423
|
await Promise.all(this.images.map((i) => i.init()));
|
|
93415
93424
|
this.isInitialized = true;
|
|
@@ -93421,7 +93430,7 @@ var Tiff = class _Tiff {
|
|
|
93421
93430
|
* @param offset file offset to read the header from
|
|
93422
93431
|
* @param view offset that contains the bytes for the header
|
|
93423
93432
|
*/
|
|
93424
|
-
|
|
93433
|
+
readIfd(offset, view) {
|
|
93425
93434
|
const viewOffset = offset - view.sourceOffset;
|
|
93426
93435
|
const tagCount = getUint(view, viewOffset, this.ifdConfig.offset, this.isLittleEndian);
|
|
93427
93436
|
const tags = /* @__PURE__ */ new Map();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/cli-vector",
|
|
3
|
-
"version": "8.10.
|
|
3
|
+
"version": "8.10.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"dist/"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@basemaps/config": "^8.
|
|
52
|
+
"@basemaps/config": "^8.11.0",
|
|
53
53
|
"@basemaps/geo": "^8.9.0",
|
|
54
|
-
"@basemaps/shared": "^8.9.
|
|
54
|
+
"@basemaps/shared": "^8.9.3",
|
|
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": "eb807c6d0f091b41e4d6d972b77c24f584cec230"
|
|
69
69
|
}
|