@elastic/ems-client 8.2.0 → 8.3.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 +2 -1
- package/.ci/jobs/elastic+ems-client+pull-request.yml +1 -0
- package/CHANGELOG.md +5 -0
- package/package.json +3 -3
- package/src/ems_client.ts +1 -1
- package/src/tms_service.ts +6 -4
- package/target/node/ems_client.js +1 -1
- package/target/origin.d.ts +4 -0
- package/target/tms_service.d.ts +3 -3
- package/target/web/ems_client.js +1 -1
package/.backportrc.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
|
|
|
3
3
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
5
5
|
|
|
6
|
+
## [8.3.0] - 2022-04-18
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
- Default EMS version is 8.3
|
|
10
|
+
- bump maplibre-gl to 2.1.9
|
|
6
11
|
|
|
7
12
|
## [8.2.0] - 2022-03-24
|
|
8
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elastic/ems-client",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.0",
|
|
4
4
|
"description": "JavaScript client library for the Elastic Maps Service",
|
|
5
5
|
"main": "target/node/index.js",
|
|
6
6
|
"browser": "target/web/index.js",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"eslint-plugin-prettier": "^3.1.3",
|
|
64
64
|
"husky": "^4.2.5",
|
|
65
65
|
"jest": "^26.4.0",
|
|
66
|
-
"maplibre-gl": "
|
|
66
|
+
"maplibre-gl": "2.1.9",
|
|
67
67
|
"node-fetch": "^2.6.1",
|
|
68
68
|
"prettier": "^2.0.5",
|
|
69
69
|
"ts-jest": "^26.2.0",
|
|
70
|
-
"typescript": "
|
|
70
|
+
"typescript": "4.6.3"
|
|
71
71
|
}
|
|
72
72
|
}
|
package/src/ems_client.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { toAbsoluteUrl } from './utils';
|
|
|
16
16
|
import { ParsedUrlQueryInput } from 'querystring';
|
|
17
17
|
import LRUCache from 'lru-cache';
|
|
18
18
|
|
|
19
|
-
const DEFAULT_EMS_VERSION = '8.
|
|
19
|
+
const DEFAULT_EMS_VERSION = '8.3';
|
|
20
20
|
|
|
21
21
|
type URLMeaningfulParts = {
|
|
22
22
|
auth?: string | null;
|
package/src/tms_service.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import _ from 'lodash';
|
|
9
|
-
import {
|
|
9
|
+
import { StyleSpecification, VectorSourceSpecification } from 'maplibre-gl';
|
|
10
10
|
import { EMSClient, EmsTmsFormat, TMSServiceConfig } from './ems_client';
|
|
11
11
|
import { AbstractEmsService } from './ems_service';
|
|
12
12
|
|
|
@@ -24,10 +24,10 @@ export type EmsSpriteSheet = {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
type EmsVectorSources = {
|
|
27
|
-
[sourceName: string]:
|
|
27
|
+
[sourceName: string]: VectorSourceSpecification;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
type EmsVectorStyle =
|
|
30
|
+
type EmsVectorStyle = StyleSpecification & {
|
|
31
31
|
sources: EmsVectorSources;
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -80,7 +80,9 @@ export class TMSService extends AbstractEmsService {
|
|
|
80
80
|
if (url) {
|
|
81
81
|
const sourceUrl = this._proxyPath + this._getAbsoluteUrl(url);
|
|
82
82
|
const extendedUrl = this._emsClient.extendUrlWithParams(sourceUrl);
|
|
83
|
-
const sourceJson = await this._emsClient.getManifest<
|
|
83
|
+
const sourceJson = await this._emsClient.getManifest<VectorSourceSpecification>(
|
|
84
|
+
extendedUrl
|
|
85
|
+
);
|
|
84
86
|
const tiles = sourceJson?.tiles?.map((tileUrl) => {
|
|
85
87
|
const directUrl = this._proxyPath + this._getAbsoluteUrl(tileUrl);
|
|
86
88
|
return this._emsClient.extendUrlWithParams(directUrl);
|
|
@@ -23,7 +23,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
23
23
|
|
|
24
24
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
25
|
|
|
26
|
-
const DEFAULT_EMS_VERSION = '8.
|
|
26
|
+
const DEFAULT_EMS_VERSION = '8.3';
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* plugins cannot have upstream dependencies on core/*-kibana.
|
package/target/tms_service.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyleSpecification, VectorSourceSpecification } from 'maplibre-gl';
|
|
2
2
|
import { EMSClient, TMSServiceConfig } from './ems_client';
|
|
3
3
|
import { AbstractEmsService } from './ems_service';
|
|
4
4
|
export declare type EmsSprite = {
|
|
@@ -13,9 +13,9 @@ export declare type EmsSpriteSheet = {
|
|
|
13
13
|
[spriteName: string]: EmsSprite;
|
|
14
14
|
};
|
|
15
15
|
declare type EmsVectorSources = {
|
|
16
|
-
[sourceName: string]:
|
|
16
|
+
[sourceName: string]: VectorSourceSpecification;
|
|
17
17
|
};
|
|
18
|
-
declare type EmsVectorStyle =
|
|
18
|
+
declare type EmsVectorStyle = StyleSpecification & {
|
|
19
19
|
sources: EmsVectorSources;
|
|
20
20
|
};
|
|
21
21
|
declare type EmsRasterStyle = {
|
package/target/web/ems_client.js
CHANGED
|
@@ -23,7 +23,7 @@ import semver from 'semver';
|
|
|
23
23
|
import { format as formatUrl, parse as parseUrl } from 'url';
|
|
24
24
|
import { toAbsoluteUrl } from './utils';
|
|
25
25
|
import LRUCache from 'lru-cache';
|
|
26
|
-
var DEFAULT_EMS_VERSION = '8.
|
|
26
|
+
var DEFAULT_EMS_VERSION = '8.3';
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* plugins cannot have upstream dependencies on core/*-kibana.
|