@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 CHANGED
@@ -2,9 +2,10 @@
2
2
  "upstream": "elastic/ems-client",
3
3
  "branches": [
4
4
  {
5
- "name": "8.1",
5
+ "name": "8.2",
6
6
  "checked": true
7
7
  },
8
+ "8.1",
8
9
  "8.0",
9
10
  "7.17",
10
11
  "7.16",
@@ -15,4 +15,5 @@
15
15
  allow-whitelist-orgs-as-admins: true
16
16
  github-hooks: true
17
17
  cancel-builds-on-update: true
18
+ status-context: ems-client
18
19
  publishers: []
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.2.0",
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": "^1.15.2",
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": "^3.9.2"
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.2';
19
+ const DEFAULT_EMS_VERSION = '8.3';
20
20
 
21
21
  type URLMeaningfulParts = {
22
22
  auth?: string | null;
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import _ from 'lodash';
9
- import { Style as MapLibreStyle, VectorSource as MapLibreVectorSource } from 'maplibre-gl';
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]: MapLibreVectorSource;
27
+ [sourceName: string]: VectorSourceSpecification;
28
28
  };
29
29
 
30
- type EmsVectorStyle = MapLibreStyle & {
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<MapLibreVectorSource>(extendedUrl);
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.2';
26
+ const DEFAULT_EMS_VERSION = '8.3';
27
27
 
28
28
  /**
29
29
  * plugins cannot have upstream dependencies on core/*-kibana.
@@ -0,0 +1,4 @@
1
+ export declare const ORIGIN: {
2
+ EMS: string;
3
+ KIBANA_YML: string;
4
+ };
@@ -1,4 +1,4 @@
1
- import { Style as MapLibreStyle, VectorSource as MapLibreVectorSource } from 'maplibre-gl';
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]: MapLibreVectorSource;
16
+ [sourceName: string]: VectorSourceSpecification;
17
17
  };
18
- declare type EmsVectorStyle = MapLibreStyle & {
18
+ declare type EmsVectorStyle = StyleSpecification & {
19
19
  sources: EmsVectorSources;
20
20
  };
21
21
  declare type EmsRasterStyle = {
@@ -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.2';
26
+ var DEFAULT_EMS_VERSION = '8.3';
27
27
 
28
28
  /**
29
29
  * plugins cannot have upstream dependencies on core/*-kibana.