@basemaps/cli-vector 8.4.0 → 8.5.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/build/cli/cli.extract.js +50 -5
- package/build/cli/cli.extract.js.map +1 -1
- package/build/stac.js +4 -1
- package/build/stac.js.map +1 -1
- package/dist/index.cjs +283 -41
- package/package.json +3 -3
package/build/cli/cli.extract.js
CHANGED
|
@@ -51,6 +51,7 @@ export const ExtractCommand = command({
|
|
|
51
51
|
const schemas = await schemaLoader.load();
|
|
52
52
|
const smallLayers = [];
|
|
53
53
|
const largeLayers = [];
|
|
54
|
+
const collectionLinks = [];
|
|
54
55
|
let total = 0;
|
|
55
56
|
const allFiles = [];
|
|
56
57
|
const vectorStac = new VectorStac(logger);
|
|
@@ -66,7 +67,7 @@ export const ExtractCommand = command({
|
|
|
66
67
|
}
|
|
67
68
|
// Create stac file for the cache mbtiles
|
|
68
69
|
logger.info({ layer: schema.name, id: layer.id }, 'Extract: StacItem');
|
|
69
|
-
const
|
|
70
|
+
const stacItemFile = new URL(layer.cache.path.href.replace(/\.mbtiles$/, '.json'));
|
|
70
71
|
const stacLink = await vectorStac.createStacLink(schema.name, layer);
|
|
71
72
|
const options = {
|
|
72
73
|
name: schema.name,
|
|
@@ -74,20 +75,64 @@ export const ExtractCommand = command({
|
|
|
74
75
|
tileMatrix: tileMatrix.identifier,
|
|
75
76
|
layer,
|
|
76
77
|
};
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
// Create the STAC item for the layer
|
|
79
|
+
const itemfileName = layer.cache.fileName.replace(/\.mbtiles$/, '');
|
|
80
|
+
const stacItem = vectorStac.createStacItem([stacLink], itemfileName, tileMatrix, options);
|
|
81
|
+
const ldsStacItem = await fsa.readJson(new URL(layer.source.replace(/\.gpkg$/, '.json')));
|
|
82
|
+
if (ldsStacItem != null) {
|
|
83
|
+
stacItem.bbox = ldsStacItem.bbox;
|
|
84
|
+
stacItem.geometry = ldsStacItem.geometry;
|
|
85
|
+
}
|
|
86
|
+
await fsa.write(stacItemFile, JSON.stringify(stacItem, null, 2));
|
|
87
|
+
// Create STAC collection
|
|
88
|
+
const stacCollectionFile = new URL(layer.cache.path.href.replace(layer.cache.fileName, 'collection.json'));
|
|
89
|
+
if (await fsa.exists(stacCollectionFile)) {
|
|
90
|
+
const collection = await fsa.readJson(stacCollectionFile);
|
|
91
|
+
if (collection.links.find((l) => l.href === `./${itemfileName}.json`) == null) {
|
|
92
|
+
collection.links.push({ rel: 'item', href: `./${itemfileName}.json` });
|
|
93
|
+
}
|
|
94
|
+
await fsa.write(stacCollectionFile, JSON.stringify(collection, null, 2));
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
const title = `Mbtiles cache for ${layer.name}`;
|
|
98
|
+
const collection = vectorStac.createStacCollection(stacItem.bbox, [], itemfileName, title);
|
|
99
|
+
await fsa.write(stacCollectionFile, JSON.stringify(collection, null, 2));
|
|
100
|
+
}
|
|
101
|
+
// Prepare Stac collection links for catalog
|
|
102
|
+
collectionLinks.push({
|
|
103
|
+
href: `./${layer.id}/collection.json`,
|
|
104
|
+
title: layer.name,
|
|
105
|
+
type: 'application/json',
|
|
106
|
+
rel: 'child',
|
|
107
|
+
});
|
|
79
108
|
// Prepare task to process
|
|
80
109
|
logger.info({ layer: schema.name, id: layer.id }, 'Extract: ToProcess');
|
|
81
110
|
// Separate large layer as individual task
|
|
82
111
|
if (layer.largeLayer) {
|
|
83
|
-
largeLayers.push({ path:
|
|
112
|
+
largeLayers.push({ path: stacItemFile.href });
|
|
84
113
|
}
|
|
85
114
|
else {
|
|
86
|
-
smallLayers.push({ path:
|
|
115
|
+
smallLayers.push({ path: stacItemFile.href });
|
|
87
116
|
}
|
|
88
117
|
total++;
|
|
89
118
|
}
|
|
90
119
|
}
|
|
120
|
+
// Create STAC catalog
|
|
121
|
+
const stacCatalogFile = new URL(`${tileMatrix.projection.code}/catalog.json`, cache);
|
|
122
|
+
if (await fsa.exists(stacCatalogFile)) {
|
|
123
|
+
const catalog = await fsa.readJson(stacCatalogFile);
|
|
124
|
+
for (const link of collectionLinks) {
|
|
125
|
+
if (catalog.links.find((l) => l.href === link.href) == null) {
|
|
126
|
+
catalog.links.push(link);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
await fsa.write(stacCatalogFile, JSON.stringify(catalog, null, 2));
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
const catalog = vectorStac.createStacCatalog();
|
|
133
|
+
catalog.links.push(...collectionLinks);
|
|
134
|
+
await fsa.write(stacCatalogFile, JSON.stringify(catalog, null, 2));
|
|
135
|
+
}
|
|
91
136
|
logger.info({ ToProcess: total }, 'CheckUpdate: Finish');
|
|
92
137
|
await fsa.write(fsa.toUrl('/tmp/extract/allCaches.json'), JSON.stringify(allFiles, null, 2));
|
|
93
138
|
await fsa.write(fsa.toUrl('/tmp/extract/smallLayers.json'), JSON.stringify(smallLayers, null, 2));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.extract.js","sourceRoot":"","sources":["../../src/cli/cli.extract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.extract.js","sourceRoot":"","sources":["../../src/cli/cli.extract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,GAAG,EAAE,GAAG,EAA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AAC,GAAG,CAAC,KAAK,CAAC,+BAA+B,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAClG,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;IAC/E,CAAC;CACF,CAAC,CAAC"}
|
package/build/stac.js
CHANGED
|
@@ -66,7 +66,10 @@ export class VectorStac {
|
|
|
66
66
|
collection: CliId,
|
|
67
67
|
stac_version: '1.0.0',
|
|
68
68
|
stac_extensions: [],
|
|
69
|
-
geometry:
|
|
69
|
+
geometry: {
|
|
70
|
+
type: 'Polygon',
|
|
71
|
+
coordinates: tileMatrix.extent.toPolygon(),
|
|
72
|
+
},
|
|
70
73
|
bbox: tileMatrix.extent.toBbox(),
|
|
71
74
|
links: [
|
|
72
75
|
{ href: `./${filename}.json`, rel: 'self' },
|
package/build/stac.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stac.js","sourceRoot":"","sources":["../src/stac.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,EAAiB,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,GAAG,EAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAG7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,MAAM,EAAc,MAAM,2BAA2B,CAAC;AAmC/D,MAAM,SAAS,GAAmB;IAChC,EAAE,IAAI,EAAE,8BAA8B,EAAE,GAAG,EAAE,2BAA2B,EAAE,KAAK,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE;CACzG,CAAC;AAEF,MAAM,OAAO,UAAU;IAMrB,YAAY,MAAe;QAL3B;;;;;WAAgB;QAEhB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,GAAG,IAAI,GAAG,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAC;IACpE,IAAI,MAAM,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC;QAAE,WAAW,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAc,WAAW,CAAC,CAAC;IAC9F,8BAA8B;IAC9B,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC;QACrB,GAAG,EAAE,OAAO;QACZ,IAAI,EAAE,KAAK,KAAK,kBAAkB;QAClC,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,kBAAkB;KACzB,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,YAAY,QAAQ,OAAO,CAAC,CAAC;IACpD,MAAM,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACzD,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACzD,MAAM,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACrE,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;IACnD,MAAM,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAE/D,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -44838,7 +44838,7 @@ var require_GetObjectCommand = __commonJS({
|
|
|
44838
44838
|
var types_1 = require_dist_cjs();
|
|
44839
44839
|
var models_0_1 = require_models_0();
|
|
44840
44840
|
var Aws_restXml_1 = require_Aws_restXml();
|
|
44841
|
-
var
|
|
44841
|
+
var GetObjectCommand4 = class _GetObjectCommand extends smithy_client_1.Command {
|
|
44842
44842
|
static getEndpointParameterInstructions() {
|
|
44843
44843
|
return {
|
|
44844
44844
|
Bucket: { type: "contextParams", name: "Bucket" },
|
|
@@ -44894,7 +44894,7 @@ var require_GetObjectCommand = __commonJS({
|
|
|
44894
44894
|
return (0, Aws_restXml_1.de_GetObjectCommand)(output, context);
|
|
44895
44895
|
}
|
|
44896
44896
|
};
|
|
44897
|
-
exports.GetObjectCommand =
|
|
44897
|
+
exports.GetObjectCommand = GetObjectCommand4;
|
|
44898
44898
|
}
|
|
44899
44899
|
});
|
|
44900
44900
|
|
|
@@ -49117,6 +49117,204 @@ var require_dist_cjs69 = __commonJS({
|
|
|
49117
49117
|
}
|
|
49118
49118
|
});
|
|
49119
49119
|
|
|
49120
|
+
// ../shared/node_modules/@aws-sdk/util-format-url/dist-cjs/index.js
|
|
49121
|
+
var require_dist_cjs70 = __commonJS({
|
|
49122
|
+
"../shared/node_modules/@aws-sdk/util-format-url/dist-cjs/index.js"(exports) {
|
|
49123
|
+
"use strict";
|
|
49124
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49125
|
+
exports.formatUrl = void 0;
|
|
49126
|
+
var querystring_builder_1 = require_dist_cjs13();
|
|
49127
|
+
function formatUrl(request) {
|
|
49128
|
+
var _a2, _b;
|
|
49129
|
+
const { port, query } = request;
|
|
49130
|
+
let { protocol, path: path4, hostname } = request;
|
|
49131
|
+
if (protocol && protocol.slice(-1) !== ":") {
|
|
49132
|
+
protocol += ":";
|
|
49133
|
+
}
|
|
49134
|
+
if (port) {
|
|
49135
|
+
hostname += `:${port}`;
|
|
49136
|
+
}
|
|
49137
|
+
if (path4 && path4.charAt(0) !== "/") {
|
|
49138
|
+
path4 = `/${path4}`;
|
|
49139
|
+
}
|
|
49140
|
+
let queryString = query ? (0, querystring_builder_1.buildQueryString)(query) : "";
|
|
49141
|
+
if (queryString && queryString[0] !== "?") {
|
|
49142
|
+
queryString = `?${queryString}`;
|
|
49143
|
+
}
|
|
49144
|
+
let auth = "";
|
|
49145
|
+
if (request.username != null || request.password != null) {
|
|
49146
|
+
const username = (_a2 = request.username) !== null && _a2 !== void 0 ? _a2 : "";
|
|
49147
|
+
const password = (_b = request.password) !== null && _b !== void 0 ? _b : "";
|
|
49148
|
+
auth = `${username}:${password}@`;
|
|
49149
|
+
}
|
|
49150
|
+
let fragment = "";
|
|
49151
|
+
if (request.fragment) {
|
|
49152
|
+
fragment = `#${request.fragment}`;
|
|
49153
|
+
}
|
|
49154
|
+
return `${protocol}//${auth}${hostname}${path4}${queryString}${fragment}`;
|
|
49155
|
+
}
|
|
49156
|
+
exports.formatUrl = formatUrl;
|
|
49157
|
+
}
|
|
49158
|
+
});
|
|
49159
|
+
|
|
49160
|
+
// ../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/constants.js
|
|
49161
|
+
var require_constants11 = __commonJS({
|
|
49162
|
+
"../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/constants.js"(exports) {
|
|
49163
|
+
"use strict";
|
|
49164
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49165
|
+
exports.ALGORITHM_IDENTIFIER = exports.HOST_HEADER = exports.EXPIRES_QUERY_PARAM = exports.SIGNED_HEADERS_QUERY_PARAM = exports.AMZ_DATE_QUERY_PARAM = exports.CREDENTIAL_QUERY_PARAM = exports.ALGORITHM_QUERY_PARAM = exports.SHA256_HEADER = exports.UNSIGNED_PAYLOAD = void 0;
|
|
49166
|
+
exports.UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";
|
|
49167
|
+
exports.SHA256_HEADER = "X-Amz-Content-Sha256";
|
|
49168
|
+
exports.ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm";
|
|
49169
|
+
exports.CREDENTIAL_QUERY_PARAM = "X-Amz-Credential";
|
|
49170
|
+
exports.AMZ_DATE_QUERY_PARAM = "X-Amz-Date";
|
|
49171
|
+
exports.SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders";
|
|
49172
|
+
exports.EXPIRES_QUERY_PARAM = "X-Amz-Expires";
|
|
49173
|
+
exports.HOST_HEADER = "host";
|
|
49174
|
+
exports.ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256";
|
|
49175
|
+
}
|
|
49176
|
+
});
|
|
49177
|
+
|
|
49178
|
+
// ../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/presigner.js
|
|
49179
|
+
var require_presigner = __commonJS({
|
|
49180
|
+
"../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/presigner.js"(exports) {
|
|
49181
|
+
"use strict";
|
|
49182
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49183
|
+
exports.S3RequestPresigner = void 0;
|
|
49184
|
+
var signature_v4_multi_region_1 = require_dist_cjs64();
|
|
49185
|
+
var constants_1 = require_constants11();
|
|
49186
|
+
var S3RequestPresigner = class {
|
|
49187
|
+
constructor(options) {
|
|
49188
|
+
const resolvedOptions = {
|
|
49189
|
+
service: options.signingName || options.service || "s3",
|
|
49190
|
+
uriEscapePath: options.uriEscapePath || false,
|
|
49191
|
+
applyChecksum: options.applyChecksum || false,
|
|
49192
|
+
...options
|
|
49193
|
+
};
|
|
49194
|
+
this.signer = new signature_v4_multi_region_1.SignatureV4MultiRegion(resolvedOptions);
|
|
49195
|
+
}
|
|
49196
|
+
presign(requestToSign, { unsignableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), ...options } = {}) {
|
|
49197
|
+
this.prepareRequest(requestToSign, {
|
|
49198
|
+
unsignableHeaders,
|
|
49199
|
+
unhoistableHeaders
|
|
49200
|
+
});
|
|
49201
|
+
return this.signer.presign(requestToSign, {
|
|
49202
|
+
expiresIn: 900,
|
|
49203
|
+
unsignableHeaders,
|
|
49204
|
+
unhoistableHeaders,
|
|
49205
|
+
...options
|
|
49206
|
+
});
|
|
49207
|
+
}
|
|
49208
|
+
presignWithCredentials(requestToSign, credentials2, { unsignableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), ...options } = {}) {
|
|
49209
|
+
this.prepareRequest(requestToSign, {
|
|
49210
|
+
unsignableHeaders,
|
|
49211
|
+
unhoistableHeaders
|
|
49212
|
+
});
|
|
49213
|
+
return this.signer.presignWithCredentials(requestToSign, credentials2, {
|
|
49214
|
+
expiresIn: 900,
|
|
49215
|
+
unsignableHeaders,
|
|
49216
|
+
unhoistableHeaders,
|
|
49217
|
+
...options
|
|
49218
|
+
});
|
|
49219
|
+
}
|
|
49220
|
+
prepareRequest(requestToSign, { unsignableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set() } = {}) {
|
|
49221
|
+
unsignableHeaders.add("content-type");
|
|
49222
|
+
Object.keys(requestToSign.headers).map((header) => header.toLowerCase()).filter((header) => header.startsWith("x-amz-server-side-encryption")).forEach((header) => {
|
|
49223
|
+
unhoistableHeaders.add(header);
|
|
49224
|
+
});
|
|
49225
|
+
requestToSign.headers[constants_1.SHA256_HEADER] = constants_1.UNSIGNED_PAYLOAD;
|
|
49226
|
+
const currentHostHeader = requestToSign.headers.host;
|
|
49227
|
+
const port = requestToSign.port;
|
|
49228
|
+
const expectedHostHeader = `${requestToSign.hostname}${requestToSign.port != null ? ":" + port : ""}`;
|
|
49229
|
+
if (!currentHostHeader || currentHostHeader === requestToSign.hostname && requestToSign.port != null) {
|
|
49230
|
+
requestToSign.headers.host = expectedHostHeader;
|
|
49231
|
+
}
|
|
49232
|
+
}
|
|
49233
|
+
};
|
|
49234
|
+
exports.S3RequestPresigner = S3RequestPresigner;
|
|
49235
|
+
}
|
|
49236
|
+
});
|
|
49237
|
+
|
|
49238
|
+
// ../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/getSignedUrl.js
|
|
49239
|
+
var require_getSignedUrl = __commonJS({
|
|
49240
|
+
"../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/getSignedUrl.js"(exports) {
|
|
49241
|
+
"use strict";
|
|
49242
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49243
|
+
exports.getSignedUrl = void 0;
|
|
49244
|
+
var util_format_url_1 = require_dist_cjs70();
|
|
49245
|
+
var middleware_endpoint_1 = require_dist_cjs38();
|
|
49246
|
+
var protocol_http_1 = require_dist_cjs2();
|
|
49247
|
+
var presigner_1 = require_presigner();
|
|
49248
|
+
var getSignedUrl2 = async (client, command5, options = {}) => {
|
|
49249
|
+
var _a2, _b;
|
|
49250
|
+
let s3Presigner;
|
|
49251
|
+
if (typeof client.config.endpointProvider === "function") {
|
|
49252
|
+
const endpointV2 = await (0, middleware_endpoint_1.getEndpointFromInstructions)(command5.input, command5.constructor, client.config);
|
|
49253
|
+
const authScheme = (_b = (_a2 = endpointV2.properties) === null || _a2 === void 0 ? void 0 : _a2.authSchemes) === null || _b === void 0 ? void 0 : _b[0];
|
|
49254
|
+
s3Presigner = new presigner_1.S3RequestPresigner({
|
|
49255
|
+
...client.config,
|
|
49256
|
+
signingName: authScheme === null || authScheme === void 0 ? void 0 : authScheme.signingName,
|
|
49257
|
+
region: async () => authScheme === null || authScheme === void 0 ? void 0 : authScheme.signingRegion
|
|
49258
|
+
});
|
|
49259
|
+
} else {
|
|
49260
|
+
s3Presigner = new presigner_1.S3RequestPresigner(client.config);
|
|
49261
|
+
}
|
|
49262
|
+
const presignInterceptMiddleware = (next, context) => async (args) => {
|
|
49263
|
+
var _a3, _b2;
|
|
49264
|
+
const { request } = args;
|
|
49265
|
+
if (!protocol_http_1.HttpRequest.isInstance(request)) {
|
|
49266
|
+
throw new Error("Request to be presigned is not an valid HTTP request.");
|
|
49267
|
+
}
|
|
49268
|
+
delete request.headers["amz-sdk-invocation-id"];
|
|
49269
|
+
delete request.headers["amz-sdk-request"];
|
|
49270
|
+
delete request.headers["x-amz-user-agent"];
|
|
49271
|
+
let presigned2;
|
|
49272
|
+
const presignerOptions = {
|
|
49273
|
+
...options,
|
|
49274
|
+
signingRegion: (_a3 = options.signingRegion) !== null && _a3 !== void 0 ? _a3 : context["signing_region"],
|
|
49275
|
+
signingService: (_b2 = options.signingService) !== null && _b2 !== void 0 ? _b2 : context["signing_service"]
|
|
49276
|
+
};
|
|
49277
|
+
if (context.s3ExpressIdentity) {
|
|
49278
|
+
presigned2 = await s3Presigner.presignWithCredentials(request, context.s3ExpressIdentity, presignerOptions);
|
|
49279
|
+
} else {
|
|
49280
|
+
presigned2 = await s3Presigner.presign(request, presignerOptions);
|
|
49281
|
+
}
|
|
49282
|
+
return {
|
|
49283
|
+
response: {},
|
|
49284
|
+
output: {
|
|
49285
|
+
$metadata: { httpStatusCode: 200 },
|
|
49286
|
+
presigned: presigned2
|
|
49287
|
+
}
|
|
49288
|
+
};
|
|
49289
|
+
};
|
|
49290
|
+
const middlewareName = "presignInterceptMiddleware";
|
|
49291
|
+
const clientStack = client.middlewareStack.clone();
|
|
49292
|
+
clientStack.addRelativeTo(presignInterceptMiddleware, {
|
|
49293
|
+
name: middlewareName,
|
|
49294
|
+
relation: "before",
|
|
49295
|
+
toMiddleware: "awsAuthMiddleware",
|
|
49296
|
+
override: true
|
|
49297
|
+
});
|
|
49298
|
+
const handler = command5.resolveMiddleware(clientStack, client.config, {});
|
|
49299
|
+
const { output } = await handler({ input: command5.input });
|
|
49300
|
+
const { presigned } = output;
|
|
49301
|
+
return (0, util_format_url_1.formatUrl)(presigned);
|
|
49302
|
+
};
|
|
49303
|
+
exports.getSignedUrl = getSignedUrl2;
|
|
49304
|
+
}
|
|
49305
|
+
});
|
|
49306
|
+
|
|
49307
|
+
// ../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/index.js
|
|
49308
|
+
var require_dist_cjs71 = __commonJS({
|
|
49309
|
+
"../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/index.js"(exports) {
|
|
49310
|
+
"use strict";
|
|
49311
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49312
|
+
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
49313
|
+
tslib_1.__exportStar(require_getSignedUrl(), exports);
|
|
49314
|
+
tslib_1.__exportStar(require_presigner(), exports);
|
|
49315
|
+
}
|
|
49316
|
+
});
|
|
49317
|
+
|
|
49120
49318
|
// ../../node_modules/@aws-sdk/client-cognito-identity/dist-cjs/endpoint/EndpointParameters.js
|
|
49121
49319
|
var require_EndpointParameters4 = __commonJS({
|
|
49122
49320
|
"../../node_modules/@aws-sdk/client-cognito-identity/dist-cjs/endpoint/EndpointParameters.js"(exports) {
|
|
@@ -52666,7 +52864,7 @@ var require_models4 = __commonJS({
|
|
|
52666
52864
|
});
|
|
52667
52865
|
|
|
52668
52866
|
// ../../node_modules/@aws-sdk/client-cognito-identity/dist-cjs/index.js
|
|
52669
|
-
var
|
|
52867
|
+
var require_dist_cjs72 = __commonJS({
|
|
52670
52868
|
"../../node_modules/@aws-sdk/client-cognito-identity/dist-cjs/index.js"(exports) {
|
|
52671
52869
|
"use strict";
|
|
52672
52870
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -52739,7 +52937,7 @@ var require_fromCognitoIdentity = __commonJS({
|
|
|
52739
52937
|
"use strict";
|
|
52740
52938
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52741
52939
|
exports.fromCognitoIdentity = void 0;
|
|
52742
|
-
var client_cognito_identity_1 =
|
|
52940
|
+
var client_cognito_identity_1 = require_dist_cjs72();
|
|
52743
52941
|
var property_provider_1 = require_dist_cjs25();
|
|
52744
52942
|
var resolveLogins_1 = require_resolveLogins();
|
|
52745
52943
|
function fromCognitoIdentity(parameters) {
|
|
@@ -52903,7 +53101,7 @@ var require_fromCognitoIdentityPool = __commonJS({
|
|
|
52903
53101
|
"use strict";
|
|
52904
53102
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52905
53103
|
exports.fromCognitoIdentityPool = void 0;
|
|
52906
|
-
var client_cognito_identity_1 =
|
|
53104
|
+
var client_cognito_identity_1 = require_dist_cjs72();
|
|
52907
53105
|
var property_provider_1 = require_dist_cjs25();
|
|
52908
53106
|
var fromCognitoIdentity_1 = require_fromCognitoIdentity();
|
|
52909
53107
|
var localStorage_1 = require_localStorage();
|
|
@@ -52948,7 +53146,7 @@ var require_fromCognitoIdentityPool = __commonJS({
|
|
|
52948
53146
|
});
|
|
52949
53147
|
|
|
52950
53148
|
// ../../node_modules/@aws-sdk/credential-provider-cognito-identity/dist-cjs/index.js
|
|
52951
|
-
var
|
|
53149
|
+
var require_dist_cjs73 = __commonJS({
|
|
52952
53150
|
"../../node_modules/@aws-sdk/credential-provider-cognito-identity/dist-cjs/index.js"(exports) {
|
|
52953
53151
|
"use strict";
|
|
52954
53152
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -52967,8 +53165,8 @@ var require_fromCognitoIdentity2 = __commonJS({
|
|
|
52967
53165
|
"use strict";
|
|
52968
53166
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52969
53167
|
exports.fromCognitoIdentity = void 0;
|
|
52970
|
-
var client_cognito_identity_1 =
|
|
52971
|
-
var credential_provider_cognito_identity_1 =
|
|
53168
|
+
var client_cognito_identity_1 = require_dist_cjs72();
|
|
53169
|
+
var credential_provider_cognito_identity_1 = require_dist_cjs73();
|
|
52972
53170
|
var fromCognitoIdentity = (options) => {
|
|
52973
53171
|
var _a2;
|
|
52974
53172
|
return (0, credential_provider_cognito_identity_1.fromCognitoIdentity)({
|
|
@@ -52986,8 +53184,8 @@ var require_fromCognitoIdentityPool2 = __commonJS({
|
|
|
52986
53184
|
"use strict";
|
|
52987
53185
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52988
53186
|
exports.fromCognitoIdentityPool = void 0;
|
|
52989
|
-
var client_cognito_identity_1 =
|
|
52990
|
-
var credential_provider_cognito_identity_1 =
|
|
53187
|
+
var client_cognito_identity_1 = require_dist_cjs72();
|
|
53188
|
+
var credential_provider_cognito_identity_1 = require_dist_cjs73();
|
|
52991
53189
|
var fromCognitoIdentityPool = (options) => {
|
|
52992
53190
|
var _a2;
|
|
52993
53191
|
return (0, credential_provider_cognito_identity_1.fromCognitoIdentityPool)({
|
|
@@ -53208,7 +53406,7 @@ var require_fromHttp = __commonJS({
|
|
|
53208
53406
|
});
|
|
53209
53407
|
|
|
53210
53408
|
// ../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js
|
|
53211
|
-
var
|
|
53409
|
+
var require_dist_cjs74 = __commonJS({
|
|
53212
53410
|
"../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js"(exports) {
|
|
53213
53411
|
"use strict";
|
|
53214
53412
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -53378,7 +53576,7 @@ var require_fromWebToken2 = __commonJS({
|
|
|
53378
53576
|
});
|
|
53379
53577
|
|
|
53380
53578
|
// ../../node_modules/@aws-sdk/credential-providers/dist-cjs/index.js
|
|
53381
|
-
var
|
|
53579
|
+
var require_dist_cjs75 = __commonJS({
|
|
53382
53580
|
"../../node_modules/@aws-sdk/credential-providers/dist-cjs/index.js"(exports) {
|
|
53383
53581
|
"use strict";
|
|
53384
53582
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -53388,7 +53586,7 @@ var require_dist_cjs73 = __commonJS({
|
|
|
53388
53586
|
tslib_1.__exportStar(require_fromCognitoIdentityPool2(), exports);
|
|
53389
53587
|
tslib_1.__exportStar(require_fromContainerMetadata2(), exports);
|
|
53390
53588
|
tslib_1.__exportStar(require_fromEnv3(), exports);
|
|
53391
|
-
var credential_provider_http_1 =
|
|
53589
|
+
var credential_provider_http_1 = require_dist_cjs74();
|
|
53392
53590
|
Object.defineProperty(exports, "fromHttp", { enumerable: true, get: function() {
|
|
53393
53591
|
return credential_provider_http_1.fromHttp;
|
|
53394
53592
|
} });
|
|
@@ -53453,7 +53651,7 @@ var require_AbortController = __commonJS({
|
|
|
53453
53651
|
});
|
|
53454
53652
|
|
|
53455
53653
|
// ../../node_modules/@smithy/abort-controller/dist-cjs/index.js
|
|
53456
|
-
var
|
|
53654
|
+
var require_dist_cjs76 = __commonJS({
|
|
53457
53655
|
"../../node_modules/@smithy/abort-controller/dist-cjs/index.js"(exports) {
|
|
53458
53656
|
"use strict";
|
|
53459
53657
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -53667,7 +53865,7 @@ var require_Upload = __commonJS({
|
|
|
53667
53865
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53668
53866
|
exports.Upload = void 0;
|
|
53669
53867
|
var client_s3_1 = require_dist_cjs69();
|
|
53670
|
-
var abort_controller_1 =
|
|
53868
|
+
var abort_controller_1 = require_dist_cjs76();
|
|
53671
53869
|
var middleware_endpoint_1 = require_dist_cjs38();
|
|
53672
53870
|
var smithy_client_1 = require_dist_cjs16();
|
|
53673
53871
|
var events_1 = require("events");
|
|
@@ -53940,7 +54138,7 @@ var require_types11 = __commonJS({
|
|
|
53940
54138
|
});
|
|
53941
54139
|
|
|
53942
54140
|
// ../../node_modules/@aws-sdk/lib-storage/dist-cjs/index.js
|
|
53943
|
-
var
|
|
54141
|
+
var require_dist_cjs77 = __commonJS({
|
|
53944
54142
|
"../../node_modules/@aws-sdk/lib-storage/dist-cjs/index.js"(exports) {
|
|
53945
54143
|
"use strict";
|
|
53946
54144
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -54701,7 +54899,7 @@ var require_EndpointCache = __commonJS({
|
|
|
54701
54899
|
});
|
|
54702
54900
|
|
|
54703
54901
|
// ../../node_modules/@aws-sdk/endpoint-cache/dist-cjs/index.js
|
|
54704
|
-
var
|
|
54902
|
+
var require_dist_cjs78 = __commonJS({
|
|
54705
54903
|
"../../node_modules/@aws-sdk/endpoint-cache/dist-cjs/index.js"(exports) {
|
|
54706
54904
|
"use strict";
|
|
54707
54905
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -54717,7 +54915,7 @@ var require_resolveEndpointDiscoveryConfig = __commonJS({
|
|
|
54717
54915
|
"use strict";
|
|
54718
54916
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54719
54917
|
exports.resolveEndpointDiscoveryConfig = void 0;
|
|
54720
|
-
var endpoint_cache_1 =
|
|
54918
|
+
var endpoint_cache_1 = require_dist_cjs78();
|
|
54721
54919
|
var resolveEndpointDiscoveryConfig = (input, { endpointDiscoveryCommandCtor }) => {
|
|
54722
54920
|
var _a2;
|
|
54723
54921
|
return {
|
|
@@ -54733,7 +54931,7 @@ var require_resolveEndpointDiscoveryConfig = __commonJS({
|
|
|
54733
54931
|
});
|
|
54734
54932
|
|
|
54735
54933
|
// ../../node_modules/@aws-sdk/middleware-endpoint-discovery/dist-cjs/index.js
|
|
54736
|
-
var
|
|
54934
|
+
var require_dist_cjs79 = __commonJS({
|
|
54737
54935
|
"../../node_modules/@aws-sdk/middleware-endpoint-discovery/dist-cjs/index.js"(exports) {
|
|
54738
54936
|
"use strict";
|
|
54739
54937
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -60213,7 +60411,7 @@ var require_runtimeConfig6 = __commonJS({
|
|
|
60213
60411
|
var client_sts_1 = require_dist_cjs59();
|
|
60214
60412
|
var core_1 = require_dist_cjs44();
|
|
60215
60413
|
var credential_provider_node_1 = require_dist_cjs58();
|
|
60216
|
-
var middleware_endpoint_discovery_1 =
|
|
60414
|
+
var middleware_endpoint_discovery_1 = require_dist_cjs79();
|
|
60217
60415
|
var util_user_agent_node_1 = require_dist_cjs48();
|
|
60218
60416
|
var config_resolver_1 = require_dist_cjs30();
|
|
60219
60417
|
var hash_node_1 = require_dist_cjs49();
|
|
@@ -60292,7 +60490,7 @@ var require_DynamoDBClient = __commonJS({
|
|
|
60292
60490
|
"use strict";
|
|
60293
60491
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60294
60492
|
exports.DynamoDBClient = exports.__Client = void 0;
|
|
60295
|
-
var middleware_endpoint_discovery_1 =
|
|
60493
|
+
var middleware_endpoint_discovery_1 = require_dist_cjs79();
|
|
60296
60494
|
var middleware_host_header_1 = require_dist_cjs4();
|
|
60297
60495
|
var middleware_logger_1 = require_dist_cjs5();
|
|
60298
60496
|
var middleware_recursion_detection_1 = require_dist_cjs6();
|
|
@@ -63924,7 +64122,7 @@ var require_models5 = __commonJS({
|
|
|
63924
64122
|
});
|
|
63925
64123
|
|
|
63926
64124
|
// ../../node_modules/@aws-sdk/client-dynamodb/dist-cjs/index.js
|
|
63927
|
-
var
|
|
64125
|
+
var require_dist_cjs80 = __commonJS({
|
|
63928
64126
|
"../../node_modules/@aws-sdk/client-dynamodb/dist-cjs/index.js"(exports) {
|
|
63929
64127
|
"use strict";
|
|
63930
64128
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -64260,7 +64458,7 @@ var require_unmarshall = __commonJS({
|
|
|
64260
64458
|
});
|
|
64261
64459
|
|
|
64262
64460
|
// ../../node_modules/@aws-sdk/util-dynamodb/dist-cjs/index.js
|
|
64263
|
-
var
|
|
64461
|
+
var require_dist_cjs81 = __commonJS({
|
|
64264
64462
|
"../../node_modules/@aws-sdk/util-dynamodb/dist-cjs/index.js"(exports) {
|
|
64265
64463
|
"use strict";
|
|
64266
64464
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -80548,9 +80746,9 @@ var ulid2 = __toESM(require_index_umd(), 1);
|
|
|
80548
80746
|
var CliInfo = {
|
|
80549
80747
|
// Detect unlinked packages looks for this string since its a package name, slightly work around it
|
|
80550
80748
|
package: "@basemaps/cli",
|
|
80551
|
-
version: "v8.
|
|
80552
|
-
hash: "
|
|
80553
|
-
buildId: "
|
|
80749
|
+
version: "v8.5.0",
|
|
80750
|
+
hash: "4f6f3929b9117c3e112f7d156ab185cb98821796",
|
|
80751
|
+
buildId: "16305730095-1"
|
|
80554
80752
|
};
|
|
80555
80753
|
var CliDate = (/* @__PURE__ */ new Date()).toISOString();
|
|
80556
80754
|
var CliId = ulid2.ulid();
|
|
@@ -84848,6 +85046,7 @@ var import_ulid2 = __toESM(require_index_umd(), 1);
|
|
|
84848
85046
|
// ../shared/build/file.system.js
|
|
84849
85047
|
var import_node_url3 = require("url");
|
|
84850
85048
|
var import_client_s34 = __toESM(require_dist_cjs69(), 1);
|
|
85049
|
+
var import_s3_request_presigner = __toESM(require_dist_cjs71(), 1);
|
|
84851
85050
|
|
|
84852
85051
|
// ../../node_modules/@chunkd/source/build/src/error.js
|
|
84853
85052
|
var SourceError = class _SourceError extends Error {
|
|
@@ -85573,12 +85772,12 @@ var FsHttp = class {
|
|
|
85573
85772
|
|
|
85574
85773
|
// ../../node_modules/@chunkd/fs-aws/build/src/credentials.js
|
|
85575
85774
|
var import_client_s33 = __toESM(require_dist_cjs69(), 1);
|
|
85576
|
-
var import_credential_providers = __toESM(
|
|
85775
|
+
var import_credential_providers = __toESM(require_dist_cjs75(), 1);
|
|
85577
85776
|
|
|
85578
85777
|
// ../../node_modules/@chunkd/fs-aws/build/src/fs.s3.js
|
|
85579
85778
|
var import_node_stream = require("stream");
|
|
85580
85779
|
var import_client_s32 = __toESM(require_dist_cjs69(), 1);
|
|
85581
|
-
var import_lib_storage = __toESM(
|
|
85780
|
+
var import_lib_storage = __toESM(require_dist_cjs77(), 1);
|
|
85582
85781
|
|
|
85583
85782
|
// ../../node_modules/@chunkd/source-aws/build/src/index.js
|
|
85584
85783
|
var import_client_s3 = __toESM(require_dist_cjs69(), 1);
|
|
@@ -86302,14 +86501,15 @@ function hasHostName(x) {
|
|
|
86302
86501
|
}
|
|
86303
86502
|
|
|
86304
86503
|
// ../shared/build/file.system.js
|
|
86305
|
-
var
|
|
86504
|
+
var s3Client = new import_client_s34.S3Client({
|
|
86306
86505
|
/**
|
|
86307
|
-
* We buckets in multiple regions
|
|
86506
|
+
* We have buckets in multiple regions. We don’t know ahead of time which region each bucket is in
|
|
86308
86507
|
*
|
|
86309
|
-
* So the S3 Client will have to follow the endpoints
|
|
86508
|
+
* So, the S3 Client will have to follow the endpoints. This adds a bit of extra latency as requests have to be retried
|
|
86310
86509
|
*/
|
|
86311
86510
|
followRegionRedirects: true
|
|
86312
|
-
})
|
|
86511
|
+
});
|
|
86512
|
+
var s3Fs = new FsAwsS3(s3Client);
|
|
86313
86513
|
var s3FsPublic = new FsAwsS3(new import_client_s34.S3Client({
|
|
86314
86514
|
followRegionRedirects: true,
|
|
86315
86515
|
signer: {
|
|
@@ -86416,12 +86616,12 @@ var UrlArrayJsonFile = {
|
|
|
86416
86616
|
};
|
|
86417
86617
|
|
|
86418
86618
|
// ../shared/build/dynamo/dynamo.config.js
|
|
86419
|
-
var import_client_dynamodb2 = __toESM(
|
|
86619
|
+
var import_client_dynamodb2 = __toESM(require_dist_cjs80(), 1);
|
|
86420
86620
|
var import_util_retry = __toESM(require_dist_cjs40(), 1);
|
|
86421
86621
|
|
|
86422
86622
|
// ../shared/build/dynamo/dynamo.config.base.js
|
|
86423
|
-
var import_client_dynamodb = __toESM(
|
|
86424
|
-
var import_util_dynamodb = __toESM(
|
|
86623
|
+
var import_client_dynamodb = __toESM(require_dist_cjs80(), 1);
|
|
86624
|
+
var import_util_dynamodb = __toESM(require_dist_cjs81(), 1);
|
|
86425
86625
|
function toId(id) {
|
|
86426
86626
|
return { id: { S: id } };
|
|
86427
86627
|
}
|
|
@@ -90777,7 +90977,10 @@ var VectorStac = class {
|
|
|
90777
90977
|
collection: CliId,
|
|
90778
90978
|
stac_version: "1.0.0",
|
|
90779
90979
|
stac_extensions: [],
|
|
90780
|
-
geometry:
|
|
90980
|
+
geometry: {
|
|
90981
|
+
type: "Polygon",
|
|
90982
|
+
coordinates: tileMatrix.extent.toPolygon()
|
|
90983
|
+
},
|
|
90781
90984
|
bbox: tileMatrix.extent.toBbox(),
|
|
90782
90985
|
links: [
|
|
90783
90986
|
{ href: `./${filename}.json`, rel: "self" },
|
|
@@ -90933,6 +91136,7 @@ var ExtractCommand = (0, import_cmd_ts2.command)({
|
|
|
90933
91136
|
const schemas = await schemaLoader.load();
|
|
90934
91137
|
const smallLayers = [];
|
|
90935
91138
|
const largeLayers = [];
|
|
91139
|
+
const collectionLinks = [];
|
|
90936
91140
|
let total = 0;
|
|
90937
91141
|
const allFiles = [];
|
|
90938
91142
|
const vectorStac = new VectorStac(logger);
|
|
@@ -90946,7 +91150,7 @@ var ExtractCommand = (0, import_cmd_ts2.command)({
|
|
|
90946
91150
|
continue;
|
|
90947
91151
|
}
|
|
90948
91152
|
logger.info({ layer: schema.name, id: layer.id }, "Extract: StacItem");
|
|
90949
|
-
const
|
|
91153
|
+
const stacItemFile = new URL(layer.cache.path.href.replace(/\.mbtiles$/, ".json"));
|
|
90950
91154
|
const stacLink = await vectorStac.createStacLink(schema.name, layer);
|
|
90951
91155
|
const options = {
|
|
90952
91156
|
name: schema.name,
|
|
@@ -90954,17 +91158,55 @@ var ExtractCommand = (0, import_cmd_ts2.command)({
|
|
|
90954
91158
|
tileMatrix: tileMatrix.identifier,
|
|
90955
91159
|
layer
|
|
90956
91160
|
};
|
|
90957
|
-
const
|
|
90958
|
-
|
|
91161
|
+
const itemfileName = layer.cache.fileName.replace(/\.mbtiles$/, "");
|
|
91162
|
+
const stacItem = vectorStac.createStacItem([stacLink], itemfileName, tileMatrix, options);
|
|
91163
|
+
const ldsStacItem = await Fsa.readJson(new URL(layer.source.replace(/\.gpkg$/, ".json")));
|
|
91164
|
+
if (ldsStacItem != null) {
|
|
91165
|
+
stacItem.bbox = ldsStacItem.bbox;
|
|
91166
|
+
stacItem.geometry = ldsStacItem.geometry;
|
|
91167
|
+
}
|
|
91168
|
+
await Fsa.write(stacItemFile, JSON.stringify(stacItem, null, 2));
|
|
91169
|
+
const stacCollectionFile = new URL(layer.cache.path.href.replace(layer.cache.fileName, "collection.json"));
|
|
91170
|
+
if (await Fsa.exists(stacCollectionFile)) {
|
|
91171
|
+
const collection = await Fsa.readJson(stacCollectionFile);
|
|
91172
|
+
if (collection.links.find((l) => l.href === `./${itemfileName}.json`) == null) {
|
|
91173
|
+
collection.links.push({ rel: "item", href: `./${itemfileName}.json` });
|
|
91174
|
+
}
|
|
91175
|
+
await Fsa.write(stacCollectionFile, JSON.stringify(collection, null, 2));
|
|
91176
|
+
} else {
|
|
91177
|
+
const title = `Mbtiles cache for ${layer.name}`;
|
|
91178
|
+
const collection = vectorStac.createStacCollection(stacItem.bbox, [], itemfileName, title);
|
|
91179
|
+
await Fsa.write(stacCollectionFile, JSON.stringify(collection, null, 2));
|
|
91180
|
+
}
|
|
91181
|
+
collectionLinks.push({
|
|
91182
|
+
href: `./${layer.id}/collection.json`,
|
|
91183
|
+
title: layer.name,
|
|
91184
|
+
type: "application/json",
|
|
91185
|
+
rel: "child"
|
|
91186
|
+
});
|
|
90959
91187
|
logger.info({ layer: schema.name, id: layer.id }, "Extract: ToProcess");
|
|
90960
91188
|
if (layer.largeLayer) {
|
|
90961
|
-
largeLayers.push({ path:
|
|
91189
|
+
largeLayers.push({ path: stacItemFile.href });
|
|
90962
91190
|
} else {
|
|
90963
|
-
smallLayers.push({ path:
|
|
91191
|
+
smallLayers.push({ path: stacItemFile.href });
|
|
90964
91192
|
}
|
|
90965
91193
|
total++;
|
|
90966
91194
|
}
|
|
90967
91195
|
}
|
|
91196
|
+
const stacCatalogFile = new URL(`${tileMatrix.projection.code}/catalog.json`, cache);
|
|
91197
|
+
if (await Fsa.exists(stacCatalogFile)) {
|
|
91198
|
+
const catalog = await Fsa.readJson(stacCatalogFile);
|
|
91199
|
+
for (const link of collectionLinks) {
|
|
91200
|
+
if (catalog.links.find((l) => l.href === link.href) == null) {
|
|
91201
|
+
catalog.links.push(link);
|
|
91202
|
+
}
|
|
91203
|
+
}
|
|
91204
|
+
await Fsa.write(stacCatalogFile, JSON.stringify(catalog, null, 2));
|
|
91205
|
+
} else {
|
|
91206
|
+
const catalog = vectorStac.createStacCatalog();
|
|
91207
|
+
catalog.links.push(...collectionLinks);
|
|
91208
|
+
await Fsa.write(stacCatalogFile, JSON.stringify(catalog, null, 2));
|
|
91209
|
+
}
|
|
90968
91210
|
logger.info({ ToProcess: total }, "CheckUpdate: Finish");
|
|
90969
91211
|
await Fsa.write(Fsa.toUrl("/tmp/extract/allCaches.json"), JSON.stringify(allFiles, null, 2));
|
|
90970
91212
|
await Fsa.write(Fsa.toUrl("/tmp/extract/smallLayers.json"), JSON.stringify(smallLayers, null, 2));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/cli-vector",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@basemaps/config": "^8.3.0",
|
|
53
53
|
"@basemaps/geo": "^8.3.0",
|
|
54
|
-
"@basemaps/shared": "^8.
|
|
54
|
+
"@basemaps/shared": "^8.5.0",
|
|
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": "4f6f3929b9117c3e112f7d156ab185cb98821796"
|
|
69
69
|
}
|