@basemaps/server 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/bin/basemaps-server.cjs +291 -46
- package/package.json +5 -5
package/bin/basemaps-server.cjs
CHANGED
|
@@ -44843,7 +44843,7 @@ var require_GetObjectCommand = __commonJS({
|
|
|
44843
44843
|
var types_1 = require_dist_cjs();
|
|
44844
44844
|
var models_0_1 = require_models_0();
|
|
44845
44845
|
var Aws_restXml_1 = require_Aws_restXml();
|
|
44846
|
-
var
|
|
44846
|
+
var GetObjectCommand4 = class _GetObjectCommand extends smithy_client_1.Command {
|
|
44847
44847
|
static getEndpointParameterInstructions() {
|
|
44848
44848
|
return {
|
|
44849
44849
|
Bucket: { type: "contextParams", name: "Bucket" },
|
|
@@ -44899,7 +44899,7 @@ var require_GetObjectCommand = __commonJS({
|
|
|
44899
44899
|
return (0, Aws_restXml_1.de_GetObjectCommand)(output, context);
|
|
44900
44900
|
}
|
|
44901
44901
|
};
|
|
44902
|
-
exports.GetObjectCommand =
|
|
44902
|
+
exports.GetObjectCommand = GetObjectCommand4;
|
|
44903
44903
|
}
|
|
44904
44904
|
});
|
|
44905
44905
|
|
|
@@ -49122,6 +49122,204 @@ var require_dist_cjs69 = __commonJS({
|
|
|
49122
49122
|
}
|
|
49123
49123
|
});
|
|
49124
49124
|
|
|
49125
|
+
// ../shared/node_modules/@aws-sdk/util-format-url/dist-cjs/index.js
|
|
49126
|
+
var require_dist_cjs70 = __commonJS({
|
|
49127
|
+
"../shared/node_modules/@aws-sdk/util-format-url/dist-cjs/index.js"(exports) {
|
|
49128
|
+
"use strict";
|
|
49129
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49130
|
+
exports.formatUrl = void 0;
|
|
49131
|
+
var querystring_builder_1 = require_dist_cjs13();
|
|
49132
|
+
function formatUrl(request) {
|
|
49133
|
+
var _a2, _b;
|
|
49134
|
+
const { port, query } = request;
|
|
49135
|
+
let { protocol, path: path3, hostname } = request;
|
|
49136
|
+
if (protocol && protocol.slice(-1) !== ":") {
|
|
49137
|
+
protocol += ":";
|
|
49138
|
+
}
|
|
49139
|
+
if (port) {
|
|
49140
|
+
hostname += `:${port}`;
|
|
49141
|
+
}
|
|
49142
|
+
if (path3 && path3.charAt(0) !== "/") {
|
|
49143
|
+
path3 = `/${path3}`;
|
|
49144
|
+
}
|
|
49145
|
+
let queryString = query ? (0, querystring_builder_1.buildQueryString)(query) : "";
|
|
49146
|
+
if (queryString && queryString[0] !== "?") {
|
|
49147
|
+
queryString = `?${queryString}`;
|
|
49148
|
+
}
|
|
49149
|
+
let auth = "";
|
|
49150
|
+
if (request.username != null || request.password != null) {
|
|
49151
|
+
const username = (_a2 = request.username) !== null && _a2 !== void 0 ? _a2 : "";
|
|
49152
|
+
const password = (_b = request.password) !== null && _b !== void 0 ? _b : "";
|
|
49153
|
+
auth = `${username}:${password}@`;
|
|
49154
|
+
}
|
|
49155
|
+
let fragment = "";
|
|
49156
|
+
if (request.fragment) {
|
|
49157
|
+
fragment = `#${request.fragment}`;
|
|
49158
|
+
}
|
|
49159
|
+
return `${protocol}//${auth}${hostname}${path3}${queryString}${fragment}`;
|
|
49160
|
+
}
|
|
49161
|
+
exports.formatUrl = formatUrl;
|
|
49162
|
+
}
|
|
49163
|
+
});
|
|
49164
|
+
|
|
49165
|
+
// ../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/constants.js
|
|
49166
|
+
var require_constants11 = __commonJS({
|
|
49167
|
+
"../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/constants.js"(exports) {
|
|
49168
|
+
"use strict";
|
|
49169
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49170
|
+
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;
|
|
49171
|
+
exports.UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";
|
|
49172
|
+
exports.SHA256_HEADER = "X-Amz-Content-Sha256";
|
|
49173
|
+
exports.ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm";
|
|
49174
|
+
exports.CREDENTIAL_QUERY_PARAM = "X-Amz-Credential";
|
|
49175
|
+
exports.AMZ_DATE_QUERY_PARAM = "X-Amz-Date";
|
|
49176
|
+
exports.SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders";
|
|
49177
|
+
exports.EXPIRES_QUERY_PARAM = "X-Amz-Expires";
|
|
49178
|
+
exports.HOST_HEADER = "host";
|
|
49179
|
+
exports.ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256";
|
|
49180
|
+
}
|
|
49181
|
+
});
|
|
49182
|
+
|
|
49183
|
+
// ../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/presigner.js
|
|
49184
|
+
var require_presigner = __commonJS({
|
|
49185
|
+
"../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/presigner.js"(exports) {
|
|
49186
|
+
"use strict";
|
|
49187
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49188
|
+
exports.S3RequestPresigner = void 0;
|
|
49189
|
+
var signature_v4_multi_region_1 = require_dist_cjs64();
|
|
49190
|
+
var constants_1 = require_constants11();
|
|
49191
|
+
var S3RequestPresigner = class {
|
|
49192
|
+
constructor(options) {
|
|
49193
|
+
const resolvedOptions = {
|
|
49194
|
+
service: options.signingName || options.service || "s3",
|
|
49195
|
+
uriEscapePath: options.uriEscapePath || false,
|
|
49196
|
+
applyChecksum: options.applyChecksum || false,
|
|
49197
|
+
...options
|
|
49198
|
+
};
|
|
49199
|
+
this.signer = new signature_v4_multi_region_1.SignatureV4MultiRegion(resolvedOptions);
|
|
49200
|
+
}
|
|
49201
|
+
presign(requestToSign, { unsignableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), ...options } = {}) {
|
|
49202
|
+
this.prepareRequest(requestToSign, {
|
|
49203
|
+
unsignableHeaders,
|
|
49204
|
+
unhoistableHeaders
|
|
49205
|
+
});
|
|
49206
|
+
return this.signer.presign(requestToSign, {
|
|
49207
|
+
expiresIn: 900,
|
|
49208
|
+
unsignableHeaders,
|
|
49209
|
+
unhoistableHeaders,
|
|
49210
|
+
...options
|
|
49211
|
+
});
|
|
49212
|
+
}
|
|
49213
|
+
presignWithCredentials(requestToSign, credentials2, { unsignableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), ...options } = {}) {
|
|
49214
|
+
this.prepareRequest(requestToSign, {
|
|
49215
|
+
unsignableHeaders,
|
|
49216
|
+
unhoistableHeaders
|
|
49217
|
+
});
|
|
49218
|
+
return this.signer.presignWithCredentials(requestToSign, credentials2, {
|
|
49219
|
+
expiresIn: 900,
|
|
49220
|
+
unsignableHeaders,
|
|
49221
|
+
unhoistableHeaders,
|
|
49222
|
+
...options
|
|
49223
|
+
});
|
|
49224
|
+
}
|
|
49225
|
+
prepareRequest(requestToSign, { unsignableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set() } = {}) {
|
|
49226
|
+
unsignableHeaders.add("content-type");
|
|
49227
|
+
Object.keys(requestToSign.headers).map((header) => header.toLowerCase()).filter((header) => header.startsWith("x-amz-server-side-encryption")).forEach((header) => {
|
|
49228
|
+
unhoistableHeaders.add(header);
|
|
49229
|
+
});
|
|
49230
|
+
requestToSign.headers[constants_1.SHA256_HEADER] = constants_1.UNSIGNED_PAYLOAD;
|
|
49231
|
+
const currentHostHeader = requestToSign.headers.host;
|
|
49232
|
+
const port = requestToSign.port;
|
|
49233
|
+
const expectedHostHeader = `${requestToSign.hostname}${requestToSign.port != null ? ":" + port : ""}`;
|
|
49234
|
+
if (!currentHostHeader || currentHostHeader === requestToSign.hostname && requestToSign.port != null) {
|
|
49235
|
+
requestToSign.headers.host = expectedHostHeader;
|
|
49236
|
+
}
|
|
49237
|
+
}
|
|
49238
|
+
};
|
|
49239
|
+
exports.S3RequestPresigner = S3RequestPresigner;
|
|
49240
|
+
}
|
|
49241
|
+
});
|
|
49242
|
+
|
|
49243
|
+
// ../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/getSignedUrl.js
|
|
49244
|
+
var require_getSignedUrl = __commonJS({
|
|
49245
|
+
"../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/getSignedUrl.js"(exports) {
|
|
49246
|
+
"use strict";
|
|
49247
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49248
|
+
exports.getSignedUrl = void 0;
|
|
49249
|
+
var util_format_url_1 = require_dist_cjs70();
|
|
49250
|
+
var middleware_endpoint_1 = require_dist_cjs38();
|
|
49251
|
+
var protocol_http_1 = require_dist_cjs2();
|
|
49252
|
+
var presigner_1 = require_presigner();
|
|
49253
|
+
var getSignedUrl2 = async (client, command2, options = {}) => {
|
|
49254
|
+
var _a2, _b;
|
|
49255
|
+
let s3Presigner;
|
|
49256
|
+
if (typeof client.config.endpointProvider === "function") {
|
|
49257
|
+
const endpointV2 = await (0, middleware_endpoint_1.getEndpointFromInstructions)(command2.input, command2.constructor, client.config);
|
|
49258
|
+
const authScheme = (_b = (_a2 = endpointV2.properties) === null || _a2 === void 0 ? void 0 : _a2.authSchemes) === null || _b === void 0 ? void 0 : _b[0];
|
|
49259
|
+
s3Presigner = new presigner_1.S3RequestPresigner({
|
|
49260
|
+
...client.config,
|
|
49261
|
+
signingName: authScheme === null || authScheme === void 0 ? void 0 : authScheme.signingName,
|
|
49262
|
+
region: async () => authScheme === null || authScheme === void 0 ? void 0 : authScheme.signingRegion
|
|
49263
|
+
});
|
|
49264
|
+
} else {
|
|
49265
|
+
s3Presigner = new presigner_1.S3RequestPresigner(client.config);
|
|
49266
|
+
}
|
|
49267
|
+
const presignInterceptMiddleware = (next, context) => async (args) => {
|
|
49268
|
+
var _a3, _b2;
|
|
49269
|
+
const { request } = args;
|
|
49270
|
+
if (!protocol_http_1.HttpRequest.isInstance(request)) {
|
|
49271
|
+
throw new Error("Request to be presigned is not an valid HTTP request.");
|
|
49272
|
+
}
|
|
49273
|
+
delete request.headers["amz-sdk-invocation-id"];
|
|
49274
|
+
delete request.headers["amz-sdk-request"];
|
|
49275
|
+
delete request.headers["x-amz-user-agent"];
|
|
49276
|
+
let presigned2;
|
|
49277
|
+
const presignerOptions = {
|
|
49278
|
+
...options,
|
|
49279
|
+
signingRegion: (_a3 = options.signingRegion) !== null && _a3 !== void 0 ? _a3 : context["signing_region"],
|
|
49280
|
+
signingService: (_b2 = options.signingService) !== null && _b2 !== void 0 ? _b2 : context["signing_service"]
|
|
49281
|
+
};
|
|
49282
|
+
if (context.s3ExpressIdentity) {
|
|
49283
|
+
presigned2 = await s3Presigner.presignWithCredentials(request, context.s3ExpressIdentity, presignerOptions);
|
|
49284
|
+
} else {
|
|
49285
|
+
presigned2 = await s3Presigner.presign(request, presignerOptions);
|
|
49286
|
+
}
|
|
49287
|
+
return {
|
|
49288
|
+
response: {},
|
|
49289
|
+
output: {
|
|
49290
|
+
$metadata: { httpStatusCode: 200 },
|
|
49291
|
+
presigned: presigned2
|
|
49292
|
+
}
|
|
49293
|
+
};
|
|
49294
|
+
};
|
|
49295
|
+
const middlewareName = "presignInterceptMiddleware";
|
|
49296
|
+
const clientStack = client.middlewareStack.clone();
|
|
49297
|
+
clientStack.addRelativeTo(presignInterceptMiddleware, {
|
|
49298
|
+
name: middlewareName,
|
|
49299
|
+
relation: "before",
|
|
49300
|
+
toMiddleware: "awsAuthMiddleware",
|
|
49301
|
+
override: true
|
|
49302
|
+
});
|
|
49303
|
+
const handler2 = command2.resolveMiddleware(clientStack, client.config, {});
|
|
49304
|
+
const { output } = await handler2({ input: command2.input });
|
|
49305
|
+
const { presigned } = output;
|
|
49306
|
+
return (0, util_format_url_1.formatUrl)(presigned);
|
|
49307
|
+
};
|
|
49308
|
+
exports.getSignedUrl = getSignedUrl2;
|
|
49309
|
+
}
|
|
49310
|
+
});
|
|
49311
|
+
|
|
49312
|
+
// ../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/index.js
|
|
49313
|
+
var require_dist_cjs71 = __commonJS({
|
|
49314
|
+
"../shared/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/index.js"(exports) {
|
|
49315
|
+
"use strict";
|
|
49316
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49317
|
+
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
49318
|
+
tslib_1.__exportStar(require_getSignedUrl(), exports);
|
|
49319
|
+
tslib_1.__exportStar(require_presigner(), exports);
|
|
49320
|
+
}
|
|
49321
|
+
});
|
|
49322
|
+
|
|
49125
49323
|
// ../../node_modules/@aws-sdk/client-cognito-identity/dist-cjs/endpoint/EndpointParameters.js
|
|
49126
49324
|
var require_EndpointParameters4 = __commonJS({
|
|
49127
49325
|
"../../node_modules/@aws-sdk/client-cognito-identity/dist-cjs/endpoint/EndpointParameters.js"(exports) {
|
|
@@ -52671,7 +52869,7 @@ var require_models4 = __commonJS({
|
|
|
52671
52869
|
});
|
|
52672
52870
|
|
|
52673
52871
|
// ../../node_modules/@aws-sdk/client-cognito-identity/dist-cjs/index.js
|
|
52674
|
-
var
|
|
52872
|
+
var require_dist_cjs72 = __commonJS({
|
|
52675
52873
|
"../../node_modules/@aws-sdk/client-cognito-identity/dist-cjs/index.js"(exports) {
|
|
52676
52874
|
"use strict";
|
|
52677
52875
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -52744,7 +52942,7 @@ var require_fromCognitoIdentity = __commonJS({
|
|
|
52744
52942
|
"use strict";
|
|
52745
52943
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52746
52944
|
exports.fromCognitoIdentity = void 0;
|
|
52747
|
-
var client_cognito_identity_1 =
|
|
52945
|
+
var client_cognito_identity_1 = require_dist_cjs72();
|
|
52748
52946
|
var property_provider_1 = require_dist_cjs25();
|
|
52749
52947
|
var resolveLogins_1 = require_resolveLogins();
|
|
52750
52948
|
function fromCognitoIdentity(parameters) {
|
|
@@ -52908,7 +53106,7 @@ var require_fromCognitoIdentityPool = __commonJS({
|
|
|
52908
53106
|
"use strict";
|
|
52909
53107
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52910
53108
|
exports.fromCognitoIdentityPool = void 0;
|
|
52911
|
-
var client_cognito_identity_1 =
|
|
53109
|
+
var client_cognito_identity_1 = require_dist_cjs72();
|
|
52912
53110
|
var property_provider_1 = require_dist_cjs25();
|
|
52913
53111
|
var fromCognitoIdentity_1 = require_fromCognitoIdentity();
|
|
52914
53112
|
var localStorage_1 = require_localStorage();
|
|
@@ -52953,7 +53151,7 @@ var require_fromCognitoIdentityPool = __commonJS({
|
|
|
52953
53151
|
});
|
|
52954
53152
|
|
|
52955
53153
|
// ../../node_modules/@aws-sdk/credential-provider-cognito-identity/dist-cjs/index.js
|
|
52956
|
-
var
|
|
53154
|
+
var require_dist_cjs73 = __commonJS({
|
|
52957
53155
|
"../../node_modules/@aws-sdk/credential-provider-cognito-identity/dist-cjs/index.js"(exports) {
|
|
52958
53156
|
"use strict";
|
|
52959
53157
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -52972,8 +53170,8 @@ var require_fromCognitoIdentity2 = __commonJS({
|
|
|
52972
53170
|
"use strict";
|
|
52973
53171
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52974
53172
|
exports.fromCognitoIdentity = void 0;
|
|
52975
|
-
var client_cognito_identity_1 =
|
|
52976
|
-
var credential_provider_cognito_identity_1 =
|
|
53173
|
+
var client_cognito_identity_1 = require_dist_cjs72();
|
|
53174
|
+
var credential_provider_cognito_identity_1 = require_dist_cjs73();
|
|
52977
53175
|
var fromCognitoIdentity = (options) => {
|
|
52978
53176
|
var _a2;
|
|
52979
53177
|
return (0, credential_provider_cognito_identity_1.fromCognitoIdentity)({
|
|
@@ -52991,8 +53189,8 @@ var require_fromCognitoIdentityPool2 = __commonJS({
|
|
|
52991
53189
|
"use strict";
|
|
52992
53190
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52993
53191
|
exports.fromCognitoIdentityPool = void 0;
|
|
52994
|
-
var client_cognito_identity_1 =
|
|
52995
|
-
var credential_provider_cognito_identity_1 =
|
|
53192
|
+
var client_cognito_identity_1 = require_dist_cjs72();
|
|
53193
|
+
var credential_provider_cognito_identity_1 = require_dist_cjs73();
|
|
52996
53194
|
var fromCognitoIdentityPool = (options) => {
|
|
52997
53195
|
var _a2;
|
|
52998
53196
|
return (0, credential_provider_cognito_identity_1.fromCognitoIdentityPool)({
|
|
@@ -53213,7 +53411,7 @@ var require_fromHttp = __commonJS({
|
|
|
53213
53411
|
});
|
|
53214
53412
|
|
|
53215
53413
|
// ../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js
|
|
53216
|
-
var
|
|
53414
|
+
var require_dist_cjs74 = __commonJS({
|
|
53217
53415
|
"../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js"(exports) {
|
|
53218
53416
|
"use strict";
|
|
53219
53417
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -53383,7 +53581,7 @@ var require_fromWebToken2 = __commonJS({
|
|
|
53383
53581
|
});
|
|
53384
53582
|
|
|
53385
53583
|
// ../../node_modules/@aws-sdk/credential-providers/dist-cjs/index.js
|
|
53386
|
-
var
|
|
53584
|
+
var require_dist_cjs75 = __commonJS({
|
|
53387
53585
|
"../../node_modules/@aws-sdk/credential-providers/dist-cjs/index.js"(exports) {
|
|
53388
53586
|
"use strict";
|
|
53389
53587
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -53393,7 +53591,7 @@ var require_dist_cjs73 = __commonJS({
|
|
|
53393
53591
|
tslib_1.__exportStar(require_fromCognitoIdentityPool2(), exports);
|
|
53394
53592
|
tslib_1.__exportStar(require_fromContainerMetadata2(), exports);
|
|
53395
53593
|
tslib_1.__exportStar(require_fromEnv3(), exports);
|
|
53396
|
-
var credential_provider_http_1 =
|
|
53594
|
+
var credential_provider_http_1 = require_dist_cjs74();
|
|
53397
53595
|
Object.defineProperty(exports, "fromHttp", { enumerable: true, get: function() {
|
|
53398
53596
|
return credential_provider_http_1.fromHttp;
|
|
53399
53597
|
} });
|
|
@@ -53458,7 +53656,7 @@ var require_AbortController = __commonJS({
|
|
|
53458
53656
|
});
|
|
53459
53657
|
|
|
53460
53658
|
// ../../node_modules/@smithy/abort-controller/dist-cjs/index.js
|
|
53461
|
-
var
|
|
53659
|
+
var require_dist_cjs76 = __commonJS({
|
|
53462
53660
|
"../../node_modules/@smithy/abort-controller/dist-cjs/index.js"(exports) {
|
|
53463
53661
|
"use strict";
|
|
53464
53662
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -53672,7 +53870,7 @@ var require_Upload = __commonJS({
|
|
|
53672
53870
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53673
53871
|
exports.Upload = void 0;
|
|
53674
53872
|
var client_s3_1 = require_dist_cjs69();
|
|
53675
|
-
var abort_controller_1 =
|
|
53873
|
+
var abort_controller_1 = require_dist_cjs76();
|
|
53676
53874
|
var middleware_endpoint_1 = require_dist_cjs38();
|
|
53677
53875
|
var smithy_client_1 = require_dist_cjs16();
|
|
53678
53876
|
var events_1 = require("events");
|
|
@@ -53945,7 +54143,7 @@ var require_types11 = __commonJS({
|
|
|
53945
54143
|
});
|
|
53946
54144
|
|
|
53947
54145
|
// ../../node_modules/@aws-sdk/lib-storage/dist-cjs/index.js
|
|
53948
|
-
var
|
|
54146
|
+
var require_dist_cjs77 = __commonJS({
|
|
53949
54147
|
"../../node_modules/@aws-sdk/lib-storage/dist-cjs/index.js"(exports) {
|
|
53950
54148
|
"use strict";
|
|
53951
54149
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -54706,7 +54904,7 @@ var require_EndpointCache = __commonJS({
|
|
|
54706
54904
|
});
|
|
54707
54905
|
|
|
54708
54906
|
// ../../node_modules/@aws-sdk/endpoint-cache/dist-cjs/index.js
|
|
54709
|
-
var
|
|
54907
|
+
var require_dist_cjs78 = __commonJS({
|
|
54710
54908
|
"../../node_modules/@aws-sdk/endpoint-cache/dist-cjs/index.js"(exports) {
|
|
54711
54909
|
"use strict";
|
|
54712
54910
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -54722,7 +54920,7 @@ var require_resolveEndpointDiscoveryConfig = __commonJS({
|
|
|
54722
54920
|
"use strict";
|
|
54723
54921
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54724
54922
|
exports.resolveEndpointDiscoveryConfig = void 0;
|
|
54725
|
-
var endpoint_cache_1 =
|
|
54923
|
+
var endpoint_cache_1 = require_dist_cjs78();
|
|
54726
54924
|
var resolveEndpointDiscoveryConfig = (input, { endpointDiscoveryCommandCtor }) => {
|
|
54727
54925
|
var _a2;
|
|
54728
54926
|
return {
|
|
@@ -54738,7 +54936,7 @@ var require_resolveEndpointDiscoveryConfig = __commonJS({
|
|
|
54738
54936
|
});
|
|
54739
54937
|
|
|
54740
54938
|
// ../../node_modules/@aws-sdk/middleware-endpoint-discovery/dist-cjs/index.js
|
|
54741
|
-
var
|
|
54939
|
+
var require_dist_cjs79 = __commonJS({
|
|
54742
54940
|
"../../node_modules/@aws-sdk/middleware-endpoint-discovery/dist-cjs/index.js"(exports) {
|
|
54743
54941
|
"use strict";
|
|
54744
54942
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -60218,7 +60416,7 @@ var require_runtimeConfig6 = __commonJS({
|
|
|
60218
60416
|
var client_sts_1 = require_dist_cjs59();
|
|
60219
60417
|
var core_1 = require_dist_cjs44();
|
|
60220
60418
|
var credential_provider_node_1 = require_dist_cjs58();
|
|
60221
|
-
var middleware_endpoint_discovery_1 =
|
|
60419
|
+
var middleware_endpoint_discovery_1 = require_dist_cjs79();
|
|
60222
60420
|
var util_user_agent_node_1 = require_dist_cjs48();
|
|
60223
60421
|
var config_resolver_1 = require_dist_cjs30();
|
|
60224
60422
|
var hash_node_1 = require_dist_cjs49();
|
|
@@ -60297,7 +60495,7 @@ var require_DynamoDBClient = __commonJS({
|
|
|
60297
60495
|
"use strict";
|
|
60298
60496
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60299
60497
|
exports.DynamoDBClient = exports.__Client = void 0;
|
|
60300
|
-
var middleware_endpoint_discovery_1 =
|
|
60498
|
+
var middleware_endpoint_discovery_1 = require_dist_cjs79();
|
|
60301
60499
|
var middleware_host_header_1 = require_dist_cjs4();
|
|
60302
60500
|
var middleware_logger_1 = require_dist_cjs5();
|
|
60303
60501
|
var middleware_recursion_detection_1 = require_dist_cjs6();
|
|
@@ -63929,7 +64127,7 @@ var require_models5 = __commonJS({
|
|
|
63929
64127
|
});
|
|
63930
64128
|
|
|
63931
64129
|
// ../../node_modules/@aws-sdk/client-dynamodb/dist-cjs/index.js
|
|
63932
|
-
var
|
|
64130
|
+
var require_dist_cjs80 = __commonJS({
|
|
63933
64131
|
"../../node_modules/@aws-sdk/client-dynamodb/dist-cjs/index.js"(exports) {
|
|
63934
64132
|
"use strict";
|
|
63935
64133
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -64265,7 +64463,7 @@ var require_unmarshall = __commonJS({
|
|
|
64265
64463
|
});
|
|
64266
64464
|
|
|
64267
64465
|
// ../../node_modules/@aws-sdk/util-dynamodb/dist-cjs/index.js
|
|
64268
|
-
var
|
|
64466
|
+
var require_dist_cjs81 = __commonJS({
|
|
64269
64467
|
"../../node_modules/@aws-sdk/util-dynamodb/dist-cjs/index.js"(exports) {
|
|
64270
64468
|
"use strict";
|
|
64271
64469
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -106037,7 +106235,7 @@ var require_proxy_addr = __commonJS({
|
|
|
106037
106235
|
});
|
|
106038
106236
|
|
|
106039
106237
|
// ../../node_modules/fastify/node_modules/semver/internal/constants.js
|
|
106040
|
-
var
|
|
106238
|
+
var require_constants12 = __commonJS({
|
|
106041
106239
|
"../../node_modules/fastify/node_modules/semver/internal/constants.js"(exports, module2) {
|
|
106042
106240
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
106043
106241
|
var MAX_LENGTH = 256;
|
|
@@ -106083,7 +106281,7 @@ var require_re = __commonJS({
|
|
|
106083
106281
|
MAX_SAFE_COMPONENT_LENGTH,
|
|
106084
106282
|
MAX_SAFE_BUILD_LENGTH,
|
|
106085
106283
|
MAX_LENGTH
|
|
106086
|
-
} =
|
|
106284
|
+
} = require_constants12();
|
|
106087
106285
|
var debug = require_debug3();
|
|
106088
106286
|
exports = module2.exports = {};
|
|
106089
106287
|
var re = exports.re = [];
|
|
@@ -106201,7 +106399,7 @@ var require_identifiers = __commonJS({
|
|
|
106201
106399
|
var require_semver = __commonJS({
|
|
106202
106400
|
"../../node_modules/fastify/node_modules/semver/classes/semver.js"(exports, module2) {
|
|
106203
106401
|
var debug = require_debug3();
|
|
106204
|
-
var { MAX_LENGTH, MAX_SAFE_INTEGER } =
|
|
106402
|
+
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants12();
|
|
106205
106403
|
var { safeRe: re, t } = require_re();
|
|
106206
106404
|
var parseOptions = require_parse_options();
|
|
106207
106405
|
var { compareIdentifiers } = require_identifiers();
|
|
@@ -107581,7 +107779,7 @@ var require_range = __commonJS({
|
|
|
107581
107779
|
tildeTrimReplace,
|
|
107582
107780
|
caretTrimReplace
|
|
107583
107781
|
} = require_re();
|
|
107584
|
-
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } =
|
|
107782
|
+
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants12();
|
|
107585
107783
|
var isNullSet = (c2) => c2.value === "<0.0.0-0";
|
|
107586
107784
|
var isAny = (c2) => c2.value === "";
|
|
107587
107785
|
var isSatisfiable = (comparators, options) => {
|
|
@@ -108378,7 +108576,7 @@ var require_subset = __commonJS({
|
|
|
108378
108576
|
var require_semver2 = __commonJS({
|
|
108379
108577
|
"../../node_modules/fastify/node_modules/semver/index.js"(exports, module2) {
|
|
108380
108578
|
var internalRe = require_re();
|
|
108381
|
-
var constants =
|
|
108579
|
+
var constants = require_constants12();
|
|
108382
108580
|
var SemVer = require_semver();
|
|
108383
108581
|
var identifiers = require_identifiers();
|
|
108384
108582
|
var parse2 = require_parse3();
|
|
@@ -124913,9 +125111,9 @@ var ulid2 = __toESM(require_index_umd(), 1);
|
|
|
124913
125111
|
var CliInfo = {
|
|
124914
125112
|
// Detect unlinked packages looks for this string since its a package name, slightly work around it
|
|
124915
125113
|
package: "@basemaps/cli",
|
|
124916
|
-
version: "v8.
|
|
124917
|
-
hash: "
|
|
124918
|
-
buildId: "
|
|
125114
|
+
version: "v8.4.0-5-g4f6f3929",
|
|
125115
|
+
hash: "4f6f3929b9117c3e112f7d156ab185cb98821796",
|
|
125116
|
+
buildId: "16305730095-1"
|
|
124919
125117
|
};
|
|
124920
125118
|
var CliDate = (/* @__PURE__ */ new Date()).toISOString();
|
|
124921
125119
|
var CliId = ulid2.ulid();
|
|
@@ -129627,6 +129825,7 @@ var MemoryConfigObject = class extends BasemapsConfigObject {
|
|
|
129627
129825
|
|
|
129628
129826
|
// ../shared/build/file.system.js
|
|
129629
129827
|
var import_client_s34 = __toESM(require_dist_cjs69(), 1);
|
|
129828
|
+
var import_s3_request_presigner = __toESM(require_dist_cjs71(), 1);
|
|
129630
129829
|
|
|
129631
129830
|
// ../../node_modules/@chunkd/source/build/src/error.js
|
|
129632
129831
|
var SourceError = class _SourceError extends Error {
|
|
@@ -130300,12 +130499,12 @@ var FsHttp = class {
|
|
|
130300
130499
|
|
|
130301
130500
|
// ../../node_modules/@chunkd/fs-aws/build/src/credentials.js
|
|
130302
130501
|
var import_client_s33 = __toESM(require_dist_cjs69(), 1);
|
|
130303
|
-
var import_credential_providers = __toESM(
|
|
130502
|
+
var import_credential_providers = __toESM(require_dist_cjs75(), 1);
|
|
130304
130503
|
|
|
130305
130504
|
// ../../node_modules/@chunkd/fs-aws/build/src/fs.s3.js
|
|
130306
130505
|
var import_node_stream = require("stream");
|
|
130307
130506
|
var import_client_s32 = __toESM(require_dist_cjs69(), 1);
|
|
130308
|
-
var import_lib_storage = __toESM(
|
|
130507
|
+
var import_lib_storage = __toESM(require_dist_cjs77(), 1);
|
|
130309
130508
|
|
|
130310
130509
|
// ../../node_modules/@chunkd/source-aws/build/src/index.js
|
|
130311
130510
|
var import_client_s3 = __toESM(require_dist_cjs69(), 1);
|
|
@@ -131029,20 +131228,31 @@ function hasHostName(x) {
|
|
|
131029
131228
|
}
|
|
131030
131229
|
|
|
131031
131230
|
// ../shared/build/file.system.js
|
|
131032
|
-
var
|
|
131231
|
+
var s3Client = new import_client_s34.S3Client({
|
|
131033
131232
|
/**
|
|
131034
|
-
* We buckets in multiple regions
|
|
131233
|
+
* We have buckets in multiple regions. We don’t know ahead of time which region each bucket is in
|
|
131035
131234
|
*
|
|
131036
|
-
* So the S3 Client will have to follow the endpoints
|
|
131235
|
+
* So, the S3 Client will have to follow the endpoints. This adds a bit of extra latency as requests have to be retried
|
|
131037
131236
|
*/
|
|
131038
131237
|
followRegionRedirects: true
|
|
131039
|
-
})
|
|
131238
|
+
});
|
|
131239
|
+
var s3Config = {
|
|
131240
|
+
client: s3Client,
|
|
131241
|
+
getSignedUrl: import_s3_request_presigner.getSignedUrl
|
|
131242
|
+
};
|
|
131243
|
+
var s3Fs = new FsAwsS3(s3Client);
|
|
131040
131244
|
var s3FsPublic = new FsAwsS3(new import_client_s34.S3Client({
|
|
131041
131245
|
followRegionRedirects: true,
|
|
131042
131246
|
signer: {
|
|
131043
131247
|
sign: (req) => Promise.resolve(req)
|
|
131044
131248
|
}
|
|
131045
131249
|
}));
|
|
131250
|
+
async function signS3Get(target) {
|
|
131251
|
+
if (target.protocol !== "s3:")
|
|
131252
|
+
throw new Error(`Presigning only works for S3 URLs, got ${target.href}`);
|
|
131253
|
+
const command2 = new import_client_s34.GetObjectCommand({ Bucket: target.host, Key: target.pathname.slice(1) });
|
|
131254
|
+
return await s3Config.getSignedUrl(s3Client, command2, { expiresIn: 3600 });
|
|
131255
|
+
}
|
|
131046
131256
|
function applyS3MiddleWare(fs4) {
|
|
131047
131257
|
if (fs4.s3 == null)
|
|
131048
131258
|
return;
|
|
@@ -131116,12 +131326,12 @@ function stringToUrlFolder(str) {
|
|
|
131116
131326
|
}
|
|
131117
131327
|
|
|
131118
131328
|
// ../shared/build/dynamo/dynamo.config.js
|
|
131119
|
-
var import_client_dynamodb2 = __toESM(
|
|
131329
|
+
var import_client_dynamodb2 = __toESM(require_dist_cjs80(), 1);
|
|
131120
131330
|
var import_util_retry = __toESM(require_dist_cjs40(), 1);
|
|
131121
131331
|
|
|
131122
131332
|
// ../shared/build/dynamo/dynamo.config.base.js
|
|
131123
|
-
var import_client_dynamodb = __toESM(
|
|
131124
|
-
var import_util_dynamodb = __toESM(
|
|
131333
|
+
var import_client_dynamodb = __toESM(require_dist_cjs80(), 1);
|
|
131334
|
+
var import_util_dynamodb = __toESM(require_dist_cjs81(), 1);
|
|
131125
131335
|
function toId(id) {
|
|
131126
131336
|
return { id: { S: id } };
|
|
131127
131337
|
}
|
|
@@ -136369,9 +136579,9 @@ var Router = class {
|
|
|
136369
136579
|
};
|
|
136370
136580
|
|
|
136371
136581
|
// ../../node_modules/@linzjs/lambda/build/src/function.js
|
|
136372
|
-
var version2 = "v8.
|
|
136373
|
-
var hash = "
|
|
136374
|
-
var buildId = "
|
|
136582
|
+
var version2 = "v8.4.0-5-g4f6f3929";
|
|
136583
|
+
var hash = "4f6f3929b9117c3e112f7d156ab185cb98821796";
|
|
136584
|
+
var buildId = "16305730095-1";
|
|
136375
136585
|
var versionInfo = { version: version2, hash, buildId };
|
|
136376
136586
|
async function runFunction(req, fn) {
|
|
136377
136587
|
if (!req.timer.timers.has("lambda"))
|
|
@@ -137271,6 +137481,40 @@ async function configImageryGet(req) {
|
|
|
137271
137481
|
return sendJson(req, imagery);
|
|
137272
137482
|
}
|
|
137273
137483
|
|
|
137484
|
+
// ../lambda-tiler/build/routes/export.tileset.js
|
|
137485
|
+
async function exportTileSetGet(req) {
|
|
137486
|
+
Validate.apiKey(req);
|
|
137487
|
+
req.set("tileSet", req.params.tileSet);
|
|
137488
|
+
const tileMatrix = Validate.getTileMatrixSet(req.params.tileMatrix);
|
|
137489
|
+
if (tileMatrix == null)
|
|
137490
|
+
throw new LambdaHttpResponse(404, "Tile Matrix not found");
|
|
137491
|
+
req.set("tileMatrix", tileMatrix.identifier);
|
|
137492
|
+
req.set("projection", tileMatrix.projection.code);
|
|
137493
|
+
const config = await ConfigLoader.load(req);
|
|
137494
|
+
req.timer.start("tileset:load");
|
|
137495
|
+
const tileSet = await config.TileSet.get(config.TileSet.id(req.params.tileSet));
|
|
137496
|
+
req.timer.end("tileset:load");
|
|
137497
|
+
if (tileSet == null)
|
|
137498
|
+
return NotFound();
|
|
137499
|
+
if (tileSet.layers.length > 1) {
|
|
137500
|
+
return new LambdaHttpResponse(500, `Too many layers in vector tileset ${tileSet.layers.length}`);
|
|
137501
|
+
}
|
|
137502
|
+
const epsgCode = tileMatrix.projection.code;
|
|
137503
|
+
const layerId = tileSet.layers[0][epsgCode];
|
|
137504
|
+
if (layerId == null)
|
|
137505
|
+
return new LambdaHttpResponse(404, `No data found for tile matrix: ${tileMatrix.identifier}`);
|
|
137506
|
+
if (!layerId.startsWith("s3://"))
|
|
137507
|
+
return new LambdaHttpResponse(400, `Unable to export tilesets not inside of S3`);
|
|
137508
|
+
if (!layerId.endsWith(".tar.co"))
|
|
137509
|
+
return new LambdaHttpResponse(400, `Unable to export tileset`);
|
|
137510
|
+
const target = new URL(layerId.replace(".tar.co", ".mbtiles"));
|
|
137511
|
+
const exists = await fsa.exists(target);
|
|
137512
|
+
if (!exists)
|
|
137513
|
+
return NotFound();
|
|
137514
|
+
const presignedUrl = await signS3Get(target);
|
|
137515
|
+
return new LambdaHttpResponse(302, "Moved", { location: presignedUrl });
|
|
137516
|
+
}
|
|
137517
|
+
|
|
137274
137518
|
// ../lambda-tiler/build/util/source.cache.js
|
|
137275
137519
|
var SourceCache2 = class {
|
|
137276
137520
|
constructor(maxSize) {
|
|
@@ -140814,18 +141058,18 @@ async function versionGet(req) {
|
|
|
140814
141058
|
* last git version tag
|
|
140815
141059
|
* @example "v6.42.1"
|
|
140816
141060
|
*/
|
|
140817
|
-
version: "v8.
|
|
141061
|
+
version: "v8.4.0-5-g4f6f3929",
|
|
140818
141062
|
/**
|
|
140819
141063
|
* Full git commit hash
|
|
140820
141064
|
* @example "e4231b1ee62c276c8657c56677ced02681dfe5d6"
|
|
140821
141065
|
*/
|
|
140822
|
-
hash: "
|
|
141066
|
+
hash: "4f6f3929b9117c3e112f7d156ab185cb98821796",
|
|
140823
141067
|
/**
|
|
140824
141068
|
*
|
|
140825
141069
|
* The exact build that this release was run from
|
|
140826
141070
|
* @example "1658821493-3"
|
|
140827
141071
|
*/
|
|
140828
|
-
buildId: "
|
|
141072
|
+
buildId: "16305730095-1",
|
|
140829
141073
|
/**
|
|
140830
141074
|
* Configuration id that was used to power this config
|
|
140831
141075
|
* @example { "id": "cb_01JTQ7ZK49F8EY4N5DRJ3XFT73", hash: "HcByZ8WS2zpaTxFJp6wSKg2eUpwahLqAGEQdcDxKxqp6" }
|
|
@@ -140895,6 +141139,7 @@ handler.router.get("/v1/attribution/:tileSet/:tileMatrix/summary.json", tileAttr
|
|
|
140895
141139
|
handler.router.get("/v1/tiles/:tileSet/:tileMatrix/WMTSCapabilities.xml", wmtsCapabilitiesGet);
|
|
140896
141140
|
handler.router.get("/v1/tiles/:tileSet/WMTSCapabilities.xml", wmtsCapabilitiesGet);
|
|
140897
141141
|
handler.router.get("/v1/tiles/WMTSCapabilities.xml", wmtsCapabilitiesGet);
|
|
141142
|
+
handler.router.get("/v1/export/:tileSet/:tileMatrix.:extension", exportTileSetGet);
|
|
140898
141143
|
|
|
140899
141144
|
// src/server.ts
|
|
140900
141145
|
var import_formbody = __toESM(require_formbody(), 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/server",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/linz/basemaps.git",
|
|
@@ -53,16 +53,16 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@basemaps/config": "^8.3.0",
|
|
56
|
-
"@basemaps/config-loader": "^8.
|
|
56
|
+
"@basemaps/config-loader": "^8.5.0",
|
|
57
57
|
"@basemaps/geo": "^8.3.0",
|
|
58
|
-
"@basemaps/lambda-tiler": "^8.
|
|
58
|
+
"@basemaps/lambda-tiler": "^8.5.0",
|
|
59
59
|
"@basemaps/landing": "^6.39.0",
|
|
60
|
-
"@basemaps/shared": "^8.
|
|
60
|
+
"@basemaps/shared": "^8.5.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": "4f6f3929b9117c3e112f7d156ab185cb98821796"
|
|
68
68
|
}
|