@basemaps/lambda-tiler 8.3.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/dist/index.js 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 GetObjectCommand3 = class _GetObjectCommand extends smithy_client_1.Command {
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 = GetObjectCommand3;
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: path2, hostname } = request;
49131
+ if (protocol && protocol.slice(-1) !== ":") {
49132
+ protocol += ":";
49133
+ }
49134
+ if (port) {
49135
+ hostname += `:${port}`;
49136
+ }
49137
+ if (path2 && path2.charAt(0) !== "/") {
49138
+ path2 = `/${path2}`;
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}${path2}${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, command, options = {}) => {
49249
+ var _a2, _b;
49250
+ let s3Presigner;
49251
+ if (typeof client.config.endpointProvider === "function") {
49252
+ const endpointV2 = await (0, middleware_endpoint_1.getEndpointFromInstructions)(command.input, command.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 handler2 = command.resolveMiddleware(clientStack, client.config, {});
49299
+ const { output } = await handler2({ input: command.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 require_dist_cjs70 = __commonJS({
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 = require_dist_cjs70();
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 = require_dist_cjs70();
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 require_dist_cjs71 = __commonJS({
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 = require_dist_cjs70();
52971
- var credential_provider_cognito_identity_1 = require_dist_cjs71();
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 = require_dist_cjs70();
52990
- var credential_provider_cognito_identity_1 = require_dist_cjs71();
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 require_dist_cjs72 = __commonJS({
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 require_dist_cjs73 = __commonJS({
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 = require_dist_cjs72();
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 require_dist_cjs74 = __commonJS({
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 = require_dist_cjs74();
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 require_dist_cjs75 = __commonJS({
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 require_dist_cjs76 = __commonJS({
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 = require_dist_cjs76();
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 require_dist_cjs77 = __commonJS({
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 = require_dist_cjs77();
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 = require_dist_cjs77();
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 require_dist_cjs78 = __commonJS({
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 require_dist_cjs79 = __commonJS({
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 });
@@ -80597,6 +80795,7 @@ var MemoryConfigObject = class extends BasemapsConfigObject {
80597
80795
 
80598
80796
  // ../shared/build/file.system.js
80599
80797
  var import_client_s34 = __toESM(require_dist_cjs69(), 1);
80798
+ var import_s3_request_presigner = __toESM(require_dist_cjs71(), 1);
80600
80799
 
80601
80800
  // ../../node_modules/@chunkd/source/build/src/error.js
80602
80801
  var SourceError = class _SourceError extends Error {
@@ -81270,12 +81469,12 @@ var FsHttp = class {
81270
81469
 
81271
81470
  // ../../node_modules/@chunkd/fs-aws/build/src/credentials.js
81272
81471
  var import_client_s33 = __toESM(require_dist_cjs69(), 1);
81273
- var import_credential_providers = __toESM(require_dist_cjs73(), 1);
81472
+ var import_credential_providers = __toESM(require_dist_cjs75(), 1);
81274
81473
 
81275
81474
  // ../../node_modules/@chunkd/fs-aws/build/src/fs.s3.js
81276
81475
  var import_node_stream = require("stream");
81277
81476
  var import_client_s32 = __toESM(require_dist_cjs69(), 1);
81278
- var import_lib_storage = __toESM(require_dist_cjs75(), 1);
81477
+ var import_lib_storage = __toESM(require_dist_cjs77(), 1);
81279
81478
 
81280
81479
  // ../../node_modules/@chunkd/source-aws/build/src/index.js
81281
81480
  var import_client_s3 = __toESM(require_dist_cjs69(), 1);
@@ -81999,20 +82198,31 @@ function hasHostName(x) {
81999
82198
  }
82000
82199
 
82001
82200
  // ../shared/build/file.system.js
82002
- var s3Fs = new FsAwsS3(new import_client_s34.S3Client({
82201
+ var s3Client = new import_client_s34.S3Client({
82003
82202
  /**
82004
- * We buckets in multiple regions we do not know ahead of time which bucket is in what region
82203
+ * We have buckets in multiple regions. We don’t know ahead of time which region each bucket is in
82005
82204
  *
82006
- * So the S3 Client will have to follow the endpoints, this adds a bit of extra latency as requests have to be retried
82205
+ * So, the S3 Client will have to follow the endpoints. This adds a bit of extra latency as requests have to be retried
82007
82206
  */
82008
82207
  followRegionRedirects: true
82009
- }));
82208
+ });
82209
+ var s3Config = {
82210
+ client: s3Client,
82211
+ getSignedUrl: import_s3_request_presigner.getSignedUrl
82212
+ };
82213
+ var s3Fs = new FsAwsS3(s3Client);
82010
82214
  var s3FsPublic = new FsAwsS3(new import_client_s34.S3Client({
82011
82215
  followRegionRedirects: true,
82012
82216
  signer: {
82013
82217
  sign: (req) => Promise.resolve(req)
82014
82218
  }
82015
82219
  }));
82220
+ async function signS3Get(target) {
82221
+ if (target.protocol !== "s3:")
82222
+ throw new Error(`Presigning only works for S3 URLs, got ${target.href}`);
82223
+ const command = new import_client_s34.GetObjectCommand({ Bucket: target.host, Key: target.pathname.slice(1) });
82224
+ return await s3Config.getSignedUrl(s3Client, command, { expiresIn: 3600 });
82225
+ }
82016
82226
  function applyS3MiddleWare(fs4) {
82017
82227
  if (fs4.s3 == null)
82018
82228
  return;
@@ -82086,12 +82296,12 @@ function stringToUrlFolder(str) {
82086
82296
  }
82087
82297
 
82088
82298
  // ../shared/build/dynamo/dynamo.config.js
82089
- var import_client_dynamodb2 = __toESM(require_dist_cjs78(), 1);
82299
+ var import_client_dynamodb2 = __toESM(require_dist_cjs80(), 1);
82090
82300
  var import_util_retry = __toESM(require_dist_cjs40(), 1);
82091
82301
 
82092
82302
  // ../shared/build/dynamo/dynamo.config.base.js
82093
- var import_client_dynamodb = __toESM(require_dist_cjs78(), 1);
82094
- var import_util_dynamodb = __toESM(require_dist_cjs79(), 1);
82303
+ var import_client_dynamodb = __toESM(require_dist_cjs80(), 1);
82304
+ var import_util_dynamodb = __toESM(require_dist_cjs81(), 1);
82095
82305
  function toId(id) {
82096
82306
  return { id: { S: id } };
82097
82307
  }
@@ -87328,9 +87538,9 @@ var Router = class {
87328
87538
  };
87329
87539
 
87330
87540
  // ../../node_modules/@linzjs/lambda/build/src/function.js
87331
- var version2 = "v8.2.0-8-gfe8bbf9d";
87332
- var hash = "fe8bbf9d0a3ca2f590505924f227a6d9da0ea5a8";
87333
- var buildId = "15719849199-1";
87541
+ var version2 = "v8.4.0-5-g4f6f3929";
87542
+ var hash = "4f6f3929b9117c3e112f7d156ab185cb98821796";
87543
+ var buildId = "16305730095-1";
87334
87544
  var versionInfo = { version: version2, hash, buildId };
87335
87545
  async function runFunction(req, fn) {
87336
87546
  if (!req.timer.timers.has("lambda"))
@@ -88182,6 +88392,40 @@ async function configImageryGet(req) {
88182
88392
  return sendJson(req, imagery);
88183
88393
  }
88184
88394
 
88395
+ // src/routes/export.tileset.ts
88396
+ async function exportTileSetGet(req) {
88397
+ Validate.apiKey(req);
88398
+ req.set("tileSet", req.params.tileSet);
88399
+ const tileMatrix = Validate.getTileMatrixSet(req.params.tileMatrix);
88400
+ if (tileMatrix == null)
88401
+ throw new LambdaHttpResponse(404, "Tile Matrix not found");
88402
+ req.set("tileMatrix", tileMatrix.identifier);
88403
+ req.set("projection", tileMatrix.projection.code);
88404
+ const config = await ConfigLoader.load(req);
88405
+ req.timer.start("tileset:load");
88406
+ const tileSet = await config.TileSet.get(config.TileSet.id(req.params.tileSet));
88407
+ req.timer.end("tileset:load");
88408
+ if (tileSet == null)
88409
+ return NotFound();
88410
+ if (tileSet.layers.length > 1) {
88411
+ return new LambdaHttpResponse(500, `Too many layers in vector tileset ${tileSet.layers.length}`);
88412
+ }
88413
+ const epsgCode = tileMatrix.projection.code;
88414
+ const layerId = tileSet.layers[0][epsgCode];
88415
+ if (layerId == null)
88416
+ return new LambdaHttpResponse(404, `No data found for tile matrix: ${tileMatrix.identifier}`);
88417
+ if (!layerId.startsWith("s3://"))
88418
+ return new LambdaHttpResponse(400, `Unable to export tilesets not inside of S3`);
88419
+ if (!layerId.endsWith(".tar.co"))
88420
+ return new LambdaHttpResponse(400, `Unable to export tileset`);
88421
+ const target = new URL(layerId.replace(".tar.co", ".mbtiles"));
88422
+ const exists = await fsa.exists(target);
88423
+ if (!exists)
88424
+ return NotFound();
88425
+ const presignedUrl = await signS3Get(target);
88426
+ return new LambdaHttpResponse(302, "Moved", { location: presignedUrl });
88427
+ }
88428
+
88185
88429
  // src/util/source.cache.ts
88186
88430
  var SourceCache2 = class {
88187
88431
  constructor(maxSize) {
@@ -91680,18 +91924,18 @@ async function versionGet(req) {
91680
91924
  * last git version tag
91681
91925
  * @example "v6.42.1"
91682
91926
  */
91683
- version: "v8.2.0-8-gfe8bbf9d",
91927
+ version: "v8.4.0-5-g4f6f3929",
91684
91928
  /**
91685
91929
  * Full git commit hash
91686
91930
  * @example "e4231b1ee62c276c8657c56677ced02681dfe5d6"
91687
91931
  */
91688
- hash: "fe8bbf9d0a3ca2f590505924f227a6d9da0ea5a8",
91932
+ hash: "4f6f3929b9117c3e112f7d156ab185cb98821796",
91689
91933
  /**
91690
91934
  *
91691
91935
  * The exact build that this release was run from
91692
91936
  * @example "1658821493-3"
91693
91937
  */
91694
- buildId: "15719849199-1",
91938
+ buildId: "16305730095-1",
91695
91939
  /**
91696
91940
  * Configuration id that was used to power this config
91697
91941
  * @example { "id": "cb_01JTQ7ZK49F8EY4N5DRJ3XFT73", hash: "HcByZ8WS2zpaTxFJp6wSKg2eUpwahLqAGEQdcDxKxqp6" }
@@ -91761,6 +92005,7 @@ handler.router.get("/v1/attribution/:tileSet/:tileMatrix/summary.json", tileAttr
91761
92005
  handler.router.get("/v1/tiles/:tileSet/:tileMatrix/WMTSCapabilities.xml", wmtsCapabilitiesGet);
91762
92006
  handler.router.get("/v1/tiles/:tileSet/WMTSCapabilities.xml", wmtsCapabilitiesGet);
91763
92007
  handler.router.get("/v1/tiles/WMTSCapabilities.xml", wmtsCapabilitiesGet);
92008
+ handler.router.get("/v1/export/:tileSet/:tileMatrix.:extension", exportTileSetGet);
91764
92009
  // Annotate the CommonJS export names for ESM import in node:
91765
92010
  0 && (module.exports = {
91766
92011
  handler
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basemaps/lambda-tiler",
3
- "version": "8.3.0",
3
+ "version": "8.5.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@basemaps/lambda-tiler",
3
- "version": "8.3.0",
3
+ "version": "8.5.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@basemaps/lambda-tiler",
9
- "version": "8.3.0",
9
+ "version": "8.5.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "lerc": "4.0.4",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basemaps/lambda-tiler",
3
- "version": "8.3.0",
3
+ "version": "8.5.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/linz/basemaps.git",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basemaps/lambda-tiler",
3
- "version": "8.3.0",
3
+ "version": "8.5.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/linz/basemaps.git",
@@ -23,9 +23,9 @@
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
25
  "@basemaps/config": "^8.3.0",
26
- "@basemaps/config-loader": "^8.3.0",
26
+ "@basemaps/config-loader": "^8.5.0",
27
27
  "@basemaps/geo": "^8.3.0",
28
- "@basemaps/shared": "^8.3.0",
28
+ "@basemaps/shared": "^8.5.0",
29
29
  "@basemaps/tiler": "^8.3.0",
30
30
  "@basemaps/tiler-sharp": "^8.3.0",
31
31
  "@linzjs/geojson": "^8.0.0",
@@ -56,5 +56,5 @@
56
56
  "@types/pixelmatch": "^5.0.0",
57
57
  "pretty-json-log": "^1.0.0"
58
58
  },
59
- "gitHead": "fe8bbf9d0a3ca2f590505924f227a6d9da0ea5a8"
59
+ "gitHead": "4f6f3929b9117c3e112f7d156ab185cb98821796"
60
60
  }
package/src/index.ts CHANGED
@@ -3,6 +3,7 @@ import { LambdaHttpRequest, LambdaHttpResponse, lf } from '@linzjs/lambda';
3
3
 
4
4
  import { tileAttributionGet } from './routes/attribution.js';
5
5
  import { configImageryGet, configTileSetGet } from './routes/config.js';
6
+ import { exportTileSetGet } from './routes/export.tileset.js';
6
7
  import { fontGet, fontList } from './routes/fonts.js';
7
8
  import { healthGet } from './routes/health.js';
8
9
  import { imageryGet } from './routes/imagery.js';
@@ -116,3 +117,5 @@ handler.router.get('/v1/attribution/:tileSet/:tileMatrix/summary.json', tileAttr
116
117
  handler.router.get('/v1/tiles/:tileSet/:tileMatrix/WMTSCapabilities.xml', wmtsCapabilitiesGet);
117
118
  handler.router.get('/v1/tiles/:tileSet/WMTSCapabilities.xml', wmtsCapabilitiesGet);
118
119
  handler.router.get('/v1/tiles/WMTSCapabilities.xml', wmtsCapabilitiesGet);
120
+
121
+ handler.router.get('/v1/export/:tileSet/:tileMatrix.:extension', exportTileSetGet);