@elastic/ems-client 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/.backportrc.json +5 -17
- package/.buildkite/build.sh +16 -0
- package/.buildkite/pipeline.yml +6 -0
- package/.buildkite/pull-requests.json +30 -0
- package/.nvmrc +1 -0
- package/CHANGELOG.md +7 -0
- package/CONTRIBUTING.md +18 -0
- package/catalog-info.yaml +68 -0
- package/package.json +5 -2
- package/src/ems_client.ts +33 -32
- package/src/index.ts +1 -1
- package/target/ems_client.d.ts +2 -2
- package/target/index.d.ts +1 -1
- package/target/node/ems_client.js +41 -39
- package/target/node/ems_service.js +9 -5
- package/target/node/file_layer.js +10 -5
- package/target/node/index.js +6 -0
- package/target/node/tms_service.js +15 -12
- package/target/node/utils.js +5 -0
- package/target/origin.d.ts +4 -0
- package/target/web/ems_client.js +262 -317
- package/target/web/ems_service.js +3 -4
- package/target/web/file_layer.js +48 -50
- package/target/web/index.js +1 -1
- package/target/web/tms_service.js +380 -412
- package/target/web/utils.js +5 -0
- package/test/ems_client.test.ts +33 -0
- package/.ci/jobs/defaults.yml +0 -67
- package/.ci/jobs/elastic+ems-client+master.yml +0 -18
- package/.ci/jobs/elastic+ems-client+pull-request.yml +0 -19
|
@@ -10,19 +10,13 @@ var _utils = require("./utils");
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
13
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
|
|
14
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
15
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
16
|
+
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
17
|
+
* 2.0.
|
|
18
|
+
*/
|
|
14
19
|
class TMSService extends _ems_service.AbstractEmsService {
|
|
15
|
-
/*
|
|
16
|
-
List of supported languages with labels and OMT codes extracted
|
|
17
|
-
from https://openmaptiles.org/languages
|
|
18
|
-
Keys are values for i18.locale from Kibana settings
|
|
19
|
-
and OMT codes for the rest.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/*
|
|
23
|
-
Suggested default operations for the different EMS styles
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
20
|
constructor(config, emsClient, proxyPath) {
|
|
27
21
|
super(config, emsClient, proxyPath);
|
|
28
22
|
_defineProperty(this, "_config", void 0);
|
|
@@ -299,6 +293,12 @@ class TMSService extends _ems_service.AbstractEmsService {
|
|
|
299
293
|
}
|
|
300
294
|
}
|
|
301
295
|
exports.TMSService = TMSService;
|
|
296
|
+
/*
|
|
297
|
+
List of supported languages with labels and OMT codes extracted
|
|
298
|
+
from https://openmaptiles.org/languages
|
|
299
|
+
Keys are values for i18.locale from Kibana settings
|
|
300
|
+
and OMT codes for the rest.
|
|
301
|
+
*/
|
|
302
302
|
_defineProperty(TMSService, "SupportedLanguages", [{
|
|
303
303
|
key: 'ar',
|
|
304
304
|
omt: 'ar'
|
|
@@ -477,6 +477,9 @@ _defineProperty(TMSService, "SupportedLanguages", [{
|
|
|
477
477
|
key: 'zh-cn',
|
|
478
478
|
omt: 'zh'
|
|
479
479
|
}]);
|
|
480
|
+
/*
|
|
481
|
+
Suggested default operations for the different EMS styles
|
|
482
|
+
*/
|
|
480
483
|
_defineProperty(TMSService, "colorOperationDefaults", [{
|
|
481
484
|
style: 'road_map',
|
|
482
485
|
operation: 'mix',
|
package/target/node/utils.js
CHANGED
|
@@ -39,6 +39,11 @@ function toAbsoluteUrl(host, path) {
|
|
|
39
39
|
Type with the possible ways to define a color in maplibre
|
|
40
40
|
*/
|
|
41
41
|
|
|
42
|
+
/*
|
|
43
|
+
A selection of the different maplibre-gl-js properties that refer to a color.
|
|
44
|
+
Taken from maplibre https://github.com/maplibre/maplibre-gl-js/blob/main/src/style-spec/types.g.ts
|
|
45
|
+
*/
|
|
46
|
+
|
|
42
47
|
/*
|
|
43
48
|
Function to transform a maplibre color definition by a given function.
|
|
44
49
|
*/
|