@basemaps/server 8.5.0 → 8.6.0
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/bin/basemaps-server.cjs +40 -18
- package/package.json +6 -6
package/bin/basemaps-server.cjs
CHANGED
|
@@ -125111,9 +125111,9 @@ var ulid2 = __toESM(require_index_umd(), 1);
|
|
|
125111
125111
|
var CliInfo = {
|
|
125112
125112
|
// Detect unlinked packages looks for this string since its a package name, slightly work around it
|
|
125113
125113
|
package: "@basemaps/cli",
|
|
125114
|
-
version: "v8.
|
|
125115
|
-
hash: "
|
|
125116
|
-
buildId: "
|
|
125114
|
+
version: "v8.5.0-5-gbd34894f",
|
|
125115
|
+
hash: "bd34894f26d1c7827503e0cb9d48d0773ecd6775",
|
|
125116
|
+
buildId: "16790799626-1"
|
|
125117
125117
|
};
|
|
125118
125118
|
var CliDate = (/* @__PURE__ */ new Date()).toISOString();
|
|
125119
125119
|
var CliId = ulid2.ulid();
|
|
@@ -129361,9 +129361,14 @@ var ConfigBase = z.object({
|
|
|
129361
129361
|
/**
|
|
129362
129362
|
* Was this configuration object generated from another object
|
|
129363
129363
|
*
|
|
129364
|
-
*
|
|
129364
|
+
* tileset-all: All tileset contains all raster layers
|
|
129365
|
+
* tileset-alias: Alias that points to another tileset
|
|
129366
|
+
* imagery-name: Tileset that is identified by its imagery name
|
|
129367
|
+
* imagery-id: Tileset that is identified by its imagery id
|
|
129368
|
+
*
|
|
129369
|
+
* @default undefined
|
|
129365
129370
|
*/
|
|
129366
|
-
virtual: z.
|
|
129371
|
+
virtual: z.enum(["tileset-all", "tileset-alias", "imagery-name", "imagery-id"]).optional()
|
|
129367
129372
|
});
|
|
129368
129373
|
|
|
129369
129374
|
// ../config/build/config/tile.set.js
|
|
@@ -129686,14 +129691,25 @@ var ConfigProviderMemory = class _ConfigProviderMemory extends BasemapsConfigPro
|
|
|
129686
129691
|
return cfg;
|
|
129687
129692
|
}
|
|
129688
129693
|
/** Find all imagery inside this configuration and create a virtual tile set for it */
|
|
129689
|
-
createVirtualTileSets() {
|
|
129694
|
+
createVirtualTileSets(createById = true) {
|
|
129690
129695
|
const allLayers = [];
|
|
129691
129696
|
for (const obj of this.objects.values()) {
|
|
129692
129697
|
if (isConfigImagery(obj)) {
|
|
129693
|
-
|
|
129698
|
+
if (createById)
|
|
129699
|
+
this.put(_ConfigProviderMemory.imageryToTileSet(obj));
|
|
129694
129700
|
const tileSet = this.imageryToTileSetByName(obj);
|
|
129695
129701
|
allLayers.push(tileSet.layers[0]);
|
|
129696
129702
|
}
|
|
129703
|
+
if (this.TileSet.is(obj)) {
|
|
129704
|
+
if (obj.aliases) {
|
|
129705
|
+
for (const alias of obj.aliases) {
|
|
129706
|
+
const aliasTs = structuredClone(obj);
|
|
129707
|
+
aliasTs.id = ConfigId.prefix(ConfigPrefix.TileSet, alias);
|
|
129708
|
+
aliasTs.virtual = "tileset-alias";
|
|
129709
|
+
this.put(aliasTs);
|
|
129710
|
+
}
|
|
129711
|
+
}
|
|
129712
|
+
}
|
|
129697
129713
|
}
|
|
129698
129714
|
if (allLayers.length)
|
|
129699
129715
|
this.createVirtualAllTileSet(allLayers);
|
|
@@ -129710,7 +129726,7 @@ var ConfigProviderMemory = class _ConfigProviderMemory extends BasemapsConfigPro
|
|
|
129710
129726
|
}
|
|
129711
129727
|
const allTileset = {
|
|
129712
129728
|
type: TileSetType.Raster,
|
|
129713
|
-
virtual:
|
|
129729
|
+
virtual: "tileset-all",
|
|
129714
129730
|
id: "ts_all",
|
|
129715
129731
|
name: "all",
|
|
129716
129732
|
title: "All Imagery",
|
|
@@ -129727,7 +129743,7 @@ var ConfigProviderMemory = class _ConfigProviderMemory extends BasemapsConfigPro
|
|
|
129727
129743
|
if (existing == null) {
|
|
129728
129744
|
existing = {
|
|
129729
129745
|
type: TileSetType.Raster,
|
|
129730
|
-
virtual:
|
|
129746
|
+
virtual: "imagery-name",
|
|
129731
129747
|
id: targetId,
|
|
129732
129748
|
title: i.title,
|
|
129733
129749
|
category: i.category,
|
|
@@ -129758,7 +129774,7 @@ var ConfigProviderMemory = class _ConfigProviderMemory extends BasemapsConfigPro
|
|
|
129758
129774
|
static imageryToTileSet(i) {
|
|
129759
129775
|
const ts = {
|
|
129760
129776
|
type: TileSetType.Raster,
|
|
129761
|
-
virtual:
|
|
129777
|
+
virtual: "imagery-id",
|
|
129762
129778
|
id: ConfigId.prefix(ConfigPrefix.TileSet, ConfigId.unprefix(ConfigPrefix.Imagery, i.id)),
|
|
129763
129779
|
name: i.name,
|
|
129764
129780
|
title: i.title,
|
|
@@ -136579,9 +136595,9 @@ var Router = class {
|
|
|
136579
136595
|
};
|
|
136580
136596
|
|
|
136581
136597
|
// ../../node_modules/@linzjs/lambda/build/src/function.js
|
|
136582
|
-
var version2 = "v8.
|
|
136583
|
-
var hash = "
|
|
136584
|
-
var buildId = "
|
|
136598
|
+
var version2 = "v8.5.0-5-gbd34894f";
|
|
136599
|
+
var hash = "bd34894f26d1c7827503e0cb9d48d0773ecd6775";
|
|
136600
|
+
var buildId = "16790799626-1";
|
|
136585
136601
|
var versionInfo = { version: version2, hash, buildId };
|
|
136586
136602
|
async function runFunction(req, fn) {
|
|
136587
136603
|
if (!req.timer.timers.has("lambda"))
|
|
@@ -141058,18 +141074,18 @@ async function versionGet(req) {
|
|
|
141058
141074
|
* last git version tag
|
|
141059
141075
|
* @example "v6.42.1"
|
|
141060
141076
|
*/
|
|
141061
|
-
version: "v8.
|
|
141077
|
+
version: "v8.5.0-5-gbd34894f",
|
|
141062
141078
|
/**
|
|
141063
141079
|
* Full git commit hash
|
|
141064
141080
|
* @example "e4231b1ee62c276c8657c56677ced02681dfe5d6"
|
|
141065
141081
|
*/
|
|
141066
|
-
hash: "
|
|
141082
|
+
hash: "bd34894f26d1c7827503e0cb9d48d0773ecd6775",
|
|
141067
141083
|
/**
|
|
141068
141084
|
*
|
|
141069
141085
|
* The exact build that this release was run from
|
|
141070
141086
|
* @example "1658821493-3"
|
|
141071
141087
|
*/
|
|
141072
|
-
buildId: "
|
|
141088
|
+
buildId: "16790799626-1",
|
|
141073
141089
|
/**
|
|
141074
141090
|
* Configuration id that was used to power this config
|
|
141075
141091
|
* @example { "id": "cb_01JTQ7ZK49F8EY4N5DRJ3XFT73", hash: "HcByZ8WS2zpaTxFJp6wSKg2eUpwahLqAGEQdcDxKxqp6" }
|
|
@@ -141245,7 +141261,8 @@ var zTileSetConfig = z.object({
|
|
|
141245
141261
|
minZoom: zZoom.optional(),
|
|
141246
141262
|
maxZoom: zZoom.optional(),
|
|
141247
141263
|
format: z.string().optional(),
|
|
141248
|
-
outputs: z.array(ConfigTileSetOutputParser).optional()
|
|
141264
|
+
outputs: z.array(ConfigTileSetOutputParser).optional(),
|
|
141265
|
+
aliases: z.array(z.string()).optional()
|
|
141249
141266
|
});
|
|
141250
141267
|
|
|
141251
141268
|
// ../config-loader/build/json/tiff.config.js
|
|
@@ -141794,6 +141811,7 @@ var ConfigJson = class _ConfigJson {
|
|
|
141794
141811
|
} else {
|
|
141795
141812
|
tileSet.format = ts.type === TileSetType.Vector ? "pbf" : "webp";
|
|
141796
141813
|
}
|
|
141814
|
+
tileSet.aliases = ts.aliases;
|
|
141797
141815
|
return tileSet;
|
|
141798
141816
|
}
|
|
141799
141817
|
loadImagery(url, name, title) {
|
|
@@ -141804,11 +141822,15 @@ var ConfigJson = class _ConfigJson {
|
|
|
141804
141822
|
}
|
|
141805
141823
|
return existing;
|
|
141806
141824
|
}
|
|
141825
|
+
/** Exposed for testing */
|
|
141826
|
+
initImageryFromTiffUrl(url) {
|
|
141827
|
+
return initImageryFromTiffUrl(url, this.Q, this.imageryConfigCache, this.logger);
|
|
141828
|
+
}
|
|
141807
141829
|
async _loadImagery(url, name, title) {
|
|
141808
141830
|
const imageId = guessIdFromUri(url.href) ?? sha256base58(url.href);
|
|
141809
141831
|
const id = ConfigId.prefix(ConfigPrefix.Imagery, imageId);
|
|
141810
141832
|
this.logger.trace({ url: url.href, imageId: id }, "Imagery:Fetch");
|
|
141811
|
-
const img = await initImageryFromTiffUrl(url
|
|
141833
|
+
const img = await this.initImageryFromTiffUrl(url);
|
|
141812
141834
|
img.id = id;
|
|
141813
141835
|
img.name = name;
|
|
141814
141836
|
img.title = title;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/server",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.6.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/linz/basemaps.git",
|
|
@@ -52,17 +52,17 @@
|
|
|
52
52
|
"sharp": "^0.33.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@basemaps/config": "^8.
|
|
56
|
-
"@basemaps/config-loader": "^8.
|
|
55
|
+
"@basemaps/config": "^8.6.0",
|
|
56
|
+
"@basemaps/config-loader": "^8.6.0",
|
|
57
57
|
"@basemaps/geo": "^8.3.0",
|
|
58
|
-
"@basemaps/lambda-tiler": "^8.
|
|
58
|
+
"@basemaps/lambda-tiler": "^8.6.0",
|
|
59
59
|
"@basemaps/landing": "^6.39.0",
|
|
60
|
-
"@basemaps/shared": "^8.
|
|
60
|
+
"@basemaps/shared": "^8.6.0",
|
|
61
61
|
"@fastify/formbody": "^7.0.1",
|
|
62
62
|
"@fastify/static": "^6.5.0",
|
|
63
63
|
"cmd-ts": "^0.12.1",
|
|
64
64
|
"fastify": "^4.9.2",
|
|
65
65
|
"pretty-json-log": "^1.0.0"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "bd34894f26d1c7827503e0cb9d48d0773ecd6775"
|
|
68
68
|
}
|