@elastic/ems-client 7.17.3 → 7.17.4

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
@@ -1,16 +1,10 @@
1
1
  {
2
- "upstream": "elastic/ems-client",
3
- "branches": [
4
- {
5
- "name": "8.4",
6
- "checked": true
7
- },
8
- {
9
- "name": "7.17",
10
- "checked": true
11
- }
12
- ],
13
- "labels": [
14
- "backport"
15
- ]
2
+ "repoOwner": "elastic",
3
+ "repoName": "ems-file-service",
4
+ "targetBranches": ["7.17"],
5
+ "targetPRLabels": ["backport"],
6
+ "commitConflicts": true,
7
+ "autoMerge": true,
8
+ "autoMergeMethod": "squash",
9
+ "fork": false
16
10
  }
@@ -46,7 +46,7 @@ const main = async function () {
46
46
  const emsClientPackageJson = JSON.parse(fs.readFileSync('package.json'));
47
47
  const emsClientDeps = {
48
48
  ...emsClientPackageJson['dependencies'],
49
- ...emsClientPackageJson['devDependencies']
49
+ // ...emsClientPackageJson['devDependencies']
50
50
  };
51
51
 
52
52
  console.log(`ems-client@${emsClientPackageJson['version']}`);
@@ -1,5 +1,5 @@
1
1
  agents:
2
- image: "docker.elastic.co/ci-agent-images/ems/buildkite-agent-node20:0.1"
2
+ image: "docker.elastic.co/ci-agent-images/ems/buildkite-agent-node20:0.5@sha256:01d63c1c1e9895e410a8b50c0eb0ce8e986c354085a11ed1d00355a12935ac5e"
3
3
  cpu: "2"
4
4
  memory: "2G"
5
5
 
@@ -7,4 +7,4 @@ steps:
7
7
  - label: ":hammer_and_wrench: Test and build"
8
8
  command: ".buildkite/build.sh"
9
9
  env:
10
- KIBANA_BRANCH: "main"
10
+ KIBANA_BRANCH: "7.17"
@@ -0,0 +1,24 @@
1
+ name: Automatic backport action
2
+
3
+ on:
4
+ pull_request_target:
5
+ types: ["labeled", "closed"]
6
+
7
+ jobs:
8
+ backport:
9
+ name: Backport PR
10
+ if: github.event.pull_request.merged == true && !(contains(github.event.pull_request.labels.*.name, 'backport'))
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Backport Action
14
+ uses: sorenlouv/backport-github-action@ad888e978060bc1b2798690dd9d03c4036560947 # v9.5.1
15
+ with:
16
+ github_token: ${{ secrets.GITHUB_TOKEN }}
17
+
18
+ - name: Info log
19
+ if: ${{ success() }}
20
+ run: cat ~/.backport/backport.info.log
21
+
22
+ - name: Debug log
23
+ if: ${{ failure() }}
24
+ run: cat ~/.backport/backport.debug.log
package/CHANGELOG.md CHANGED
@@ -3,52 +3,48 @@ 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
- ## [7.17.3] - 2024-07-10
6
+ ## [7.17.4] - 2024-12-16
7
7
 
8
8
  ### Changed
9
+ - Update dependencies (search PRs for `is:pr label:7.17.4,dependencies`)
10
+
9
11
 
12
+ ## [7.17.3] - 2024-07-10
13
+ ### Changed
10
14
  - Update dependencies #243
11
15
 
12
16
  ## [7.17.2] - 2024-07-05
13
-
14
17
  ## Changed
15
-
16
18
  - Update dependencies #218 #219 #220 #221 #236 #237
17
19
 
18
20
  ## [7.17.1] - 2023-11-09
19
-
20
21
  ### Changed
21
-
22
22
  - Default EMS version is 7.17
23
23
  - Upgrade dependencies #138 #162 #165 #169 #172 #173 !76 #184 #191 #198 #205
24
24
  - Migration from Jenkins to Buildkite for automatic testing #163 #199
25
25
  - Upgrade to Node 20 #208
26
26
 
27
27
  ## [7.16.0] - 2021-10-13
28
-
29
28
  ### Changed
30
29
  - Default EMS version is 7.16
31
30
  - Update dependencies using `yarn upgrade`
32
31
  - Better error handling for HTTP responses
33
32
 
34
33
  ## [7.15.1] - 2021-09-01
35
-
36
34
  ### Changed
37
35
  - Unpinned `semver` dependency [#77](https://github.com/elastic/ems-client/pull/77)
38
36
 
39
37
  ## [7.15.0] - 2021-08-12
40
-
41
38
  ### Changed
42
39
  - Default EMS version is 7.15
43
40
  - Updated dependencies via `yarn upgrade`
44
41
  - Fix linting issues
42
+
45
43
  ## [7.14.0] - 2021-06-15
46
44
  ### Added
47
-
48
45
  - New getters for optional field metadata `alias`, `regex`, and `values` #69
49
46
 
50
47
  ### Changed
51
-
52
48
  - Default EMS version is 7.14
53
49
  - **Breaking change** @elastic/ems-client is now licensed under the Elastic License v2. See the LICENSE.txt file in this repository #64
54
50
 
@@ -62,7 +58,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
62
58
  - Updated dependencies using `yarn upgrade` and #44 #50
63
59
  - Add functions to get specific file formats #53
64
60
 
65
-
66
61
  ## [7.10.0] - 2020-08-17
67
62
  ### Changed
68
63
  - Default EMS version is 7.10
@@ -89,7 +84,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
89
84
  - Convert source code to Typescript
90
85
  - Added better linting with eslint and prettier
91
86
 
92
-
93
87
  ## [7.8.1] - 2020-04-06
94
88
  ### Fixed
95
89
  - Correctly handle API urls that end in slashes
@@ -124,12 +118,10 @@ always needed and in fact breaks some client-side use of this lib
124
118
  - Correctly handle API urls that end in slashes
125
119
 
126
120
  ## [7.6.0] - 2020-01-13
127
-
128
121
  ### Added
129
122
  - Two new parameters were introduced, `tileApiUrl` and `fileApiUrl`. These should be used instead of `manifestServiceUrl`. These parameters should be set to their respective domains (e.g. `https://tiles.maps.elastic.co`, `https://vector.maps.elastic.co`). [#13](https://github.com/elastic/ems-client/pull/13)
130
123
 
131
124
  ### Changed
132
-
133
125
  - Starting with v7.6, new Elastic Maps Service (EMS) versions will be released with every matching major and minor release of the Elastic Stack. New releases of ems-client will also be released to match the EMS versions.
134
126
 
135
127
  - Handle relative URLs in EMS v7.6 manifests.
@@ -142,7 +134,6 @@ always needed and in fact breaks some client-side use of this lib
142
134
  - Remove paragraph element from html attribution [#15](https://github.com/elastic/ems-client/pull/15)
143
135
 
144
136
  ## [7.2.1] - 2019-12-11
145
-
146
137
  ### Fixed
147
138
  - Inject correct attribution into vector tile sources [#14](https://github.com/elastic/ems-client/pull/14/files)
148
139
 
@@ -153,17 +144,13 @@ Bump version to match the corresponding Elastic Maps Service version. This relea
153
144
  ### Fixed
154
145
  - Update browser entry point that was pointing to an incorrect path, which fell back to the main entry
155
146
 
156
-
157
147
  ## [1.0.2] - 2019-10-15
158
-
159
148
  ### Fixed
160
149
  - Transpile the browser-side assets to be IE compatible.
161
150
 
162
151
  ## [1.0.1] - 2019-08-27
163
-
164
152
  ### Fixed
165
153
  - Downgrade node-fetch dependency to fix fetch error
166
154
 
167
155
  ## [1.0.0] - 2019-08-26
168
-
169
156
  - Initial release. Compatible with Elastic Maps Service v7.2.0.
@@ -0,0 +1,25 @@
1
+ // @ts-check
2
+
3
+ import eslint from '@eslint/js';
4
+ import tseslint from 'typescript-eslint';
5
+ import globals from 'globals';
6
+
7
+ export default tseslint.config(
8
+ eslint.configs.recommended,
9
+ ...tseslint.configs.recommended,
10
+ {
11
+ ignores: ["target","*.config.js",".buildkite"]
12
+ },
13
+ {
14
+ files: ['**/*.{ts,tsx,mts,cts}'],
15
+ rules: {
16
+ 'no-undef': 'off',
17
+ '@typescript-eslint/ban-types': 'off'
18
+ },
19
+ "languageOptions": {
20
+ "globals": {
21
+ ...globals.node
22
+ }
23
+ }
24
+ },
25
+ );
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@elastic/ems-client",
3
- "version": "7.17.3",
3
+ "version": "7.17.4",
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",
7
7
  "types": "target/index.d.ts",
8
8
  "scripts": {
9
9
  "prelint": "tsc --noEmit",
10
- "lint": "eslint . --ext .ts,.tsx",
10
+ "lint": "prettier --check src/* && eslint .",
11
11
  "pretest": "yarn lint",
12
12
  "test": "jest",
13
13
  "build": "tsc --emitDeclarationOnly && yarn build-web && yarn build-node",
@@ -35,38 +35,43 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@types/geojson": "^7946.0.14",
39
- "@types/lru-cache": "^5.1.0",
40
- "@types/topojson-client": "^3.1.4",
41
- "@types/topojson-specification": "^1.0.5",
42
- "lodash": "^4.17.21",
43
- "lru-cache": "^4.1.5",
44
- "semver": "7.6.2",
45
- "topojson-client": "^3.1.0"
38
+ "@types/geojson": "7946.0.15",
39
+ "@types/topojson-client": "3.1.5",
40
+ "lodash": "4.17.21",
41
+ "lru-cache": "4.1.5",
42
+ "node-fetch": "2.7.0",
43
+ "semver": "7.6.3",
44
+ "topojson-client": "3.1.0"
46
45
  },
47
46
  "devDependencies": {
48
- "@babel/cli": "^7.6.4",
49
- "@babel/core": "^7.5.5",
50
- "@babel/plugin-proposal-class-properties": "^7.5.5",
51
- "@babel/preset-env": "^7.5.5",
52
- "@babel/preset-typescript": "^7.9.0",
53
- "@types/jest": "^26.0.10",
54
- "@types/lodash": "4.17.5",
55
- "@types/node": "^13.13.5",
56
- "@types/node-fetch": "^2.5.7",
57
- "@types/semver": "^7.1.0",
58
- "@typescript-eslint/eslint-plugin": "^2.33.0",
59
- "@typescript-eslint/parser": "^2.33.0",
60
- "babel-jest": "^26.3.0",
61
- "eslint": "^7.0.0",
62
- "eslint-config-prettier": "^6.11.0",
63
- "eslint-plugin-prettier": "^3.1.3",
64
- "husky": "^4.2.5",
65
- "jest": "^26.4.0",
66
- "node-fetch": "^2.6.7",
67
- "prettier": "^2.0.5",
68
- "ts-jest": "^26.2.0",
69
- "typescript": "4.6.3"
47
+ "@babel/cli": "7.26.4",
48
+ "@babel/core": "7.26.0",
49
+ "@babel/plugin-proposal-class-properties": "7.18.6",
50
+ "@babel/preset-env": "7.26.0",
51
+ "@babel/preset-typescript": "7.26.0",
52
+ "@eslint/core": "0.9.1",
53
+ "@eslint/js": "9.17.0",
54
+ "@types/eslint__js": "8.42.3",
55
+ "@types/jest": "29.5.14",
56
+ "@types/lodash": "4.17.13",
57
+ "@types/lru-cache": "5.1.1",
58
+ "@types/node": "20.17.10",
59
+ "@types/node-fetch": "2.6.12",
60
+ "@types/semver": "7.5.8",
61
+ "@types/topojson-specification": "1.0.5",
62
+ "@typescript-eslint/eslint-plugin": "8.18.1",
63
+ "@typescript-eslint/parser": "8.18.1",
64
+ "babel-jest": "29.7.0",
65
+ "eslint": "9.17.0",
66
+ "eslint-config-prettier": "9.1.0",
67
+ "eslint-plugin-prettier": "5.2.1",
68
+ "globals": "15.14.0",
69
+ "husky": "9.1.7",
70
+ "jest": "29.7.0",
71
+ "prettier": "3.4.2",
72
+ "ts-jest": "29.2.5",
73
+ "typescript": "5.7.2",
74
+ "typescript-eslint": "8.18.1"
70
75
  },
71
76
  "engines": {
72
77
  "node": ">=18 <=20"
package/src/ems_client.ts CHANGED
@@ -15,6 +15,7 @@ import { format as formatUrl, parse as parseUrl, UrlObject } from 'url';
15
15
  import { toAbsoluteUrl } from './utils';
16
16
  import { ParsedUrlQueryInput } from 'querystring';
17
17
  import LRUCache from 'lru-cache';
18
+ import { RequestInfo } from 'node-fetch';
18
19
 
19
20
  const DEFAULT_EMS_VERSION = '7.17';
20
21
 
@@ -96,10 +97,10 @@ type BaseClientConfig = {
96
97
  tileApiUrl: string;
97
98
  fileApiUrl: string;
98
99
  emsVersion?: string;
99
- htmlSanitizer?: Function;
100
+ htmlSanitizer?: (x: string) => string;
100
101
  language?: string;
101
102
  landingPageUrl?: string;
102
- fetchFunction: Function;
103
+ fetchFunction: (url: RequestInfo) => Promise<Response>;
103
104
  proxyPath?: string;
104
105
  cacheSize?: number;
105
106
  };
@@ -204,8 +205,8 @@ export class EMSClient {
204
205
  readonly EMS_LOAD_TIMEOUT = 32000;
205
206
  private _queryParams: QueryParams;
206
207
  private readonly _appVersion: string;
207
- private readonly _fetchFunction: Function;
208
- private readonly _sanitizer: Function;
208
+ private readonly _fetchFunction: (url: RequestInfo) => Promise<Response>;
209
+ private readonly _sanitizer: (x: string) => string;
209
210
  private readonly _manifestServiceUrl?: string;
210
211
  private readonly _fileApiUrl: string;
211
212
  private readonly _tileApiUrl: string;
@@ -218,11 +219,11 @@ export class EMSClient {
218
219
  /**
219
220
  * these methods are assigned outside the constructor
220
221
  */
221
- private _getMainCatalog!: Function;
222
- private _getDefaultTMSCatalog!: Function;
223
- private _getDefaultFileCatalog!: Function;
224
- private _loadTMSServices!: Function;
225
- private _loadFileLayers!: Function;
222
+ private _getMainCatalog!: () => Promise<EmsCatalogManifest>;
223
+ private _getDefaultTMSCatalog!: () => Promise<EmsTmsCatalog>;
224
+ private _getDefaultFileCatalog!: () => Promise<EmsFileCatalog>;
225
+ private _loadTMSServices!: () => Promise<TMSService[]>;
226
+ private _loadFileLayers!: () => Promise<FileLayer[]>;
226
227
 
227
228
  constructor(config: ClientConfig | DeprecatedClientConfig) {
228
229
  // Remove kbnVersion in 8.0
@@ -300,7 +301,7 @@ export class EMSClient {
300
301
  */
301
302
  addQueryParams(additionalQueryParams: { [key: string]: string }): void {
302
303
  for (const key in additionalQueryParams) {
303
- if (additionalQueryParams.hasOwnProperty(key)) {
304
+ if (Object.prototype.hasOwnProperty.call(additionalQueryParams, key)) {
304
305
  if (additionalQueryParams[key] !== this._queryParams[key]) {
305
306
  //changes detected.
306
307
  this._queryParams = _.assign({}, this._queryParams, additionalQueryParams);
@@ -252,13 +252,12 @@ export class TMSService extends AbstractEmsService {
252
252
  vectorFormats = this._getFormats(formatType, this._emsClient.getDefaultLocale());
253
253
  }
254
254
  if (!vectorFormats.length) {
255
- // eslint-disable-next-line max-len
256
255
  throw new Error(
257
256
  `Cannot find ${formatType} tile layer for locale ${this._emsClient.getLocale()} or ${this._emsClient.getDefaultLocale()}`
258
257
  );
259
258
  }
260
259
  const defaultStyle = vectorFormats[0];
261
- if (defaultStyle && defaultStyle.hasOwnProperty('url')) {
260
+ if (defaultStyle && Object.prototype.hasOwnProperty.call(defaultStyle, 'url')) {
262
261
  return defaultStyle.url;
263
262
  }
264
263
  }
@@ -1,51 +1,53 @@
1
1
  import { TMSService } from './tms_service';
2
2
  import { EMSFormatType, FileLayer } from './file_layer';
3
3
  import { FeatureCollection } from 'geojson';
4
- declare type LocalizedStrings = {
4
+ import { Response } from 'node-fetch';
5
+ import { RequestInfo } from 'node-fetch';
6
+ type LocalizedStrings = {
5
7
  [key: string]: string;
6
8
  };
7
- declare type BaseClientConfig = {
9
+ type BaseClientConfig = {
8
10
  appName?: string;
9
11
  manifestServiceUrl?: string;
10
12
  tileApiUrl: string;
11
13
  fileApiUrl: string;
12
14
  emsVersion?: string;
13
- htmlSanitizer?: Function;
15
+ htmlSanitizer?: (x: string) => string;
14
16
  language?: string;
15
17
  landingPageUrl?: string;
16
- fetchFunction: Function;
18
+ fetchFunction: (url: RequestInfo) => Promise<Response>;
17
19
  proxyPath?: string;
18
20
  cacheSize?: number;
19
21
  };
20
- declare type DeprecatedClientConfig = BaseClientConfig & {
22
+ type DeprecatedClientConfig = BaseClientConfig & {
21
23
  kbnVersion: string;
22
24
  };
23
- declare type ClientConfig = BaseClientConfig & {
25
+ type ClientConfig = BaseClientConfig & {
24
26
  appVersion: string;
25
27
  };
26
- declare type EmsCatalogService = {
28
+ type EmsCatalogService = {
27
29
  id?: string;
28
30
  name?: string;
29
31
  manifest: string;
30
32
  type: string;
31
33
  };
32
- declare type EmsCatalogManifest = {
34
+ type EmsCatalogManifest = {
33
35
  version?: string;
34
36
  services: EmsCatalogService[];
35
37
  };
36
- declare type EmsTmsCatalog = {
38
+ type EmsTmsCatalog = {
37
39
  version?: string;
38
40
  services: TMSServiceConfig[];
39
41
  };
40
- export declare type EmsTmsFormat = {
42
+ export type EmsTmsFormat = {
41
43
  locale: string;
42
44
  format: string;
43
45
  url: string;
44
46
  };
45
- export declare type BaseEmsServiceConfig = {
47
+ export type BaseEmsServiceConfig = {
46
48
  attribution: EmsLayerAttribution[];
47
49
  };
48
- export declare type FileLayerConfig = BaseEmsServiceConfig & {
50
+ export type FileLayerConfig = BaseEmsServiceConfig & {
49
51
  layer_id: string;
50
52
  created_at: string;
51
53
  formats: (EmsFileLayerFormatGeoJson | EmsFileLayerFormatTopoJson)[];
@@ -53,7 +55,7 @@ export declare type FileLayerConfig = BaseEmsServiceConfig & {
53
55
  legacy_ids: string[];
54
56
  layer_name: LocalizedStrings;
55
57
  };
56
- export declare type FileLayerField = {
58
+ export type FileLayerField = {
57
59
  type: string;
58
60
  id: string;
59
61
  label: LocalizedStrings;
@@ -61,27 +63,27 @@ export declare type FileLayerField = {
61
63
  regex?: string;
62
64
  alias?: string[];
63
65
  };
64
- export declare type TMSServiceConfig = BaseEmsServiceConfig & {
66
+ export type TMSServiceConfig = BaseEmsServiceConfig & {
65
67
  id: string;
66
68
  name: {
67
69
  en: string;
68
70
  };
69
71
  formats: EmsTmsFormat[];
70
72
  };
71
- declare type EmsFileCatalog = {
73
+ type EmsFileCatalog = {
72
74
  version?: string;
73
75
  layers: FileLayerConfig[];
74
76
  };
75
- export declare type EmsLayerAttribution = {
77
+ export type EmsLayerAttribution = {
76
78
  label: LocalizedStrings;
77
79
  url: LocalizedStrings;
78
80
  };
79
- export declare type EmsFileLayerFormatGeoJson = {
81
+ export type EmsFileLayerFormatGeoJson = {
80
82
  type: EMSFormatType.geojson;
81
83
  url: string;
82
84
  legacy_default: boolean;
83
85
  };
84
- export declare type EmsFileLayerFormatTopoJson = {
86
+ export type EmsFileLayerFormatTopoJson = {
85
87
  type: EMSFormatType.topojson;
86
88
  url: string;
87
89
  legacy_default: boolean;
@@ -5,7 +5,7 @@ export declare enum EMSFormatType {
5
5
  geojson = "geojson",
6
6
  topojson = "topojson"
7
7
  }
8
- export declare type EMSFormatTypeStrings = keyof typeof EMSFormatType;
8
+ export type EMSFormatTypeStrings = keyof typeof EMSFormatType;
9
9
  export declare class FileLayer extends AbstractEmsService {
10
10
  protected readonly _config: FileLayerConfig;
11
11
  constructor(config: FileLayerConfig, emsClient: EMSClient, proxyPath: string);
@@ -167,7 +167,7 @@ class EMSClient {
167
167
  */
168
168
  addQueryParams(additionalQueryParams) {
169
169
  for (const key in additionalQueryParams) {
170
- if (additionalQueryParams.hasOwnProperty(key)) {
170
+ if (Object.prototype.hasOwnProperty.call(additionalQueryParams, key)) {
171
171
  if (additionalQueryParams[key] !== this._queryParams[key]) {
172
172
  //changes detected.
173
173
  this._queryParams = _lodash.default.assign({}, this._queryParams, additionalQueryParams);
@@ -184,11 +184,10 @@ class TMSService extends _ems_service.AbstractEmsService {
184
184
  vectorFormats = this._getFormats(formatType, this._emsClient.getDefaultLocale());
185
185
  }
186
186
  if (!vectorFormats.length) {
187
- // eslint-disable-next-line max-len
188
187
  throw new Error(`Cannot find ${formatType} tile layer for locale ${this._emsClient.getLocale()} or ${this._emsClient.getDefaultLocale()}`);
189
188
  }
190
189
  const defaultStyle = vectorFormats[0];
191
- if (defaultStyle && defaultStyle.hasOwnProperty('url')) {
190
+ if (defaultStyle && Object.prototype.hasOwnProperty.call(defaultStyle, 'url')) {
192
191
  return defaultStyle.url;
193
192
  }
194
193
  }
@@ -1,6 +1,6 @@
1
1
  import { EMSClient, TMSServiceConfig } from './ems_client';
2
2
  import { AbstractEmsService } from './ems_service';
3
- declare type EmsVectorSource = {
3
+ type EmsVectorSource = {
4
4
  type: 'vector';
5
5
  url: string;
6
6
  tiles: string[];
@@ -10,10 +10,10 @@ declare type EmsVectorSource = {
10
10
  maxzoom?: number;
11
11
  attribution?: string;
12
12
  };
13
- declare type EmsVectorSources = {
13
+ type EmsVectorSources = {
14
14
  [sourceName: string]: EmsVectorSource;
15
15
  };
16
- declare type EmsVectorStyle = {
16
+ type EmsVectorStyle = {
17
17
  sources: EmsVectorSources;
18
18
  sprite: string;
19
19
  glyphs: string;
@@ -28,17 +28,17 @@ declare type EmsVectorStyle = {
28
28
  version: number;
29
29
  zoom?: number;
30
30
  };
31
- declare type EmsSprite = {
31
+ type EmsSprite = {
32
32
  height: number;
33
33
  pixelRatio: number;
34
34
  width: number;
35
35
  x: number;
36
36
  y: number;
37
37
  };
38
- declare type EmsSpriteSheet = {
38
+ type EmsSpriteSheet = {
39
39
  [spriteName: string]: EmsSprite;
40
40
  };
41
- declare type EmsRasterStyle = {
41
+ type EmsRasterStyle = {
42
42
  tilejson: string;
43
43
  name: string;
44
44
  attribution: string;
@@ -161,7 +161,7 @@ export var EMSClient = /*#__PURE__*/function () {
161
161
  }, {
162
162
  key: "getManifest",
163
163
  value: (function () {
164
- var _getManifest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(endpointUrl) {
164
+ var _getManifest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(endpointUrl) {
165
165
  var url, response;
166
166
  return _regeneratorRuntime().wrap(function _callee$(_context) {
167
167
  while (1) switch (_context.prev = _context.next) {
@@ -225,7 +225,7 @@ export var EMSClient = /*#__PURE__*/function () {
225
225
  key: "addQueryParams",
226
226
  value: function addQueryParams(additionalQueryParams) {
227
227
  for (var _key in additionalQueryParams) {
228
- if (additionalQueryParams.hasOwnProperty(_key)) {
228
+ if (Object.prototype.hasOwnProperty.call(additionalQueryParams, _key)) {
229
229
  if (additionalQueryParams[_key] !== this._queryParams[_key]) {
230
230
  //changes detected.
231
231
  this._queryParams = _.assign({}, this._queryParams, additionalQueryParams);
@@ -238,7 +238,7 @@ export var EMSClient = /*#__PURE__*/function () {
238
238
  }, {
239
239
  key: "getMainManifest",
240
240
  value: function () {
241
- var _getMainManifest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
241
+ var _getMainManifest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
242
242
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
243
243
  while (1) switch (_context2.prev = _context2.next) {
244
244
  case 0:
@@ -260,7 +260,7 @@ export var EMSClient = /*#__PURE__*/function () {
260
260
  }, {
261
261
  key: "getDefaultFileManifest",
262
262
  value: function () {
263
- var _getDefaultFileManifest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
263
+ var _getDefaultFileManifest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
264
264
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
265
265
  while (1) switch (_context3.prev = _context3.next) {
266
266
  case 0:
@@ -282,7 +282,7 @@ export var EMSClient = /*#__PURE__*/function () {
282
282
  }, {
283
283
  key: "getDefaultTMSManifest",
284
284
  value: function () {
285
- var _getDefaultTMSManifest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
285
+ var _getDefaultTMSManifest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
286
286
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
287
287
  while (1) switch (_context4.prev = _context4.next) {
288
288
  case 0:
@@ -304,7 +304,7 @@ export var EMSClient = /*#__PURE__*/function () {
304
304
  }, {
305
305
  key: "getFileLayers",
306
306
  value: function () {
307
- var _getFileLayers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
307
+ var _getFileLayers = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
308
308
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
309
309
  while (1) switch (_context5.prev = _context5.next) {
310
310
  case 0:
@@ -326,7 +326,7 @@ export var EMSClient = /*#__PURE__*/function () {
326
326
  }, {
327
327
  key: "getTMSServices",
328
328
  value: function () {
329
- var _getTMSServices = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
329
+ var _getTMSServices = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
330
330
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
331
331
  while (1) switch (_context6.prev = _context6.next) {
332
332
  case 0:
@@ -386,7 +386,7 @@ export var EMSClient = /*#__PURE__*/function () {
386
386
  }, {
387
387
  key: "findFileLayerById",
388
388
  value: function () {
389
- var _findFileLayerById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(id) {
389
+ var _findFileLayerById = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(id) {
390
390
  var fileLayers, i;
391
391
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
392
392
  while (1) switch (_context7.prev = _context7.next) {
@@ -424,7 +424,7 @@ export var EMSClient = /*#__PURE__*/function () {
424
424
  }, {
425
425
  key: "findTMSServiceById",
426
426
  value: function () {
427
- var _findTMSServiceById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(id) {
427
+ var _findTMSServiceById = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(id) {
428
428
  var tmsServices, i;
429
429
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
430
430
  while (1) switch (_context8.prev = _context8.next) {
@@ -490,7 +490,7 @@ export var EMSClient = /*#__PURE__*/function () {
490
490
  }, {
491
491
  key: "_getManifestWithParams",
492
492
  value: function () {
493
- var _getManifestWithParams2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(url) {
493
+ var _getManifestWithParams2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(url) {
494
494
  var extendedUrl;
495
495
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
496
496
  while (1) switch (_context9.prev = _context9.next) {
@@ -516,7 +516,7 @@ export var EMSClient = /*#__PURE__*/function () {
516
516
  value: function _invalidateSettings() {
517
517
  var _this2 = this;
518
518
  this._cache.reset();
519
- this._getMainCatalog = _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
519
+ this._getMainCatalog = _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
520
520
  var services;
521
521
  return _regeneratorRuntime().wrap(function _callee10$(_context10) {
522
522
  while (1) switch (_context10.prev = _context10.next) {
@@ -553,7 +553,7 @@ export var EMSClient = /*#__PURE__*/function () {
553
553
  }
554
554
  }, _callee10);
555
555
  })));
556
- this._getDefaultTMSCatalog = _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
556
+ this._getDefaultTMSCatalog = _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
557
557
  var catalogue, firstService, url;
558
558
  return _regeneratorRuntime().wrap(function _callee11$(_context11) {
559
559
  while (1) switch (_context11.prev = _context11.next) {
@@ -584,7 +584,7 @@ export var EMSClient = /*#__PURE__*/function () {
584
584
  }
585
585
  }, _callee11);
586
586
  })));
587
- this._getDefaultFileCatalog = _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
587
+ this._getDefaultFileCatalog = _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
588
588
  var catalogue, firstService, url;
589
589
  return _regeneratorRuntime().wrap(function _callee12$(_context12) {
590
590
  while (1) switch (_context12.prev = _context12.next) {
@@ -617,7 +617,7 @@ export var EMSClient = /*#__PURE__*/function () {
617
617
  })));
618
618
 
619
619
  //Cache the actual instances of TMSService as these in turn cache sub-manifests for the style-files
620
- this._loadTMSServices = _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
620
+ this._loadTMSServices = _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
621
621
  var tmsManifest;
622
622
  return _regeneratorRuntime().wrap(function _callee13$(_context13) {
623
623
  while (1) switch (_context13.prev = _context13.next) {
@@ -635,7 +635,7 @@ export var EMSClient = /*#__PURE__*/function () {
635
635
  }
636
636
  }, _callee13);
637
637
  })));
638
- this._loadFileLayers = _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
638
+ this._loadFileLayers = _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
639
639
  var fileManifest;
640
640
  return _regeneratorRuntime().wrap(function _callee14$(_context14) {
641
641
  while (1) switch (_context14.prev = _context14.next) {
@@ -45,7 +45,7 @@ export var FileLayer = /*#__PURE__*/function (_AbstractEmsService) {
45
45
  return _createClass(FileLayer, [{
46
46
  key: "getGeoJson",
47
47
  value: function () {
48
- var _getGeoJson = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
48
+ var _getGeoJson = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
49
49
  var cachedGeoJson, format, fetchUrl, geojson, fetchedJson, _meta$feature_collect, meta, featureCollectionPath;
50
50
  return _regeneratorRuntime().wrap(function _callee$(_context) {
51
51
  while (1) switch (_context.prev = _context.next) {
@@ -35,7 +35,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
35
35
  _classCallCheck(this, TMSService);
36
36
  _this = _callSuper(this, TMSService, [config, emsClient, proxyPath]);
37
37
  _defineProperty(_this, "_config", void 0);
38
- _defineProperty(_this, "_getRasterStyleJson", _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
38
+ _defineProperty(_this, "_getRasterStyleJson", _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
39
39
  var rasterUrl, url;
40
40
  return _regeneratorRuntime().wrap(function _callee$(_context) {
41
41
  while (1) switch (_context.prev = _context.next) {
@@ -55,7 +55,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
55
55
  }
56
56
  }, _callee);
57
57
  }))));
58
- _defineProperty(_this, "_getVectorStyleJsonRaw", _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
58
+ _defineProperty(_this, "_getVectorStyleJsonRaw", _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
59
59
  var vectorUrl, url, vectorJson;
60
60
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
61
61
  while (1) switch (_context2.prev = _context2.next) {
@@ -79,7 +79,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
79
79
  }
80
80
  }, _callee2);
81
81
  }))));
82
- _defineProperty(_this, "_getVectorStyleJsonInlined", _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
82
+ _defineProperty(_this, "_getVectorStyleJsonInlined", _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
83
83
  var vectorJson, inlinedSources, sources, _iterator, _step, _sourceName, url, sourceUrl, extendedUrl, sourceJson, extendedTileUrls;
84
84
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
85
85
  while (1) switch (_context3.prev = _context3.next) {
@@ -166,7 +166,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
166
166
  return _createClass(TMSService, [{
167
167
  key: "getDefaultRasterStyle",
168
168
  value: function () {
169
- var _getDefaultRasterStyle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
169
+ var _getDefaultRasterStyle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
170
170
  var _this2 = this;
171
171
  var tileJson, tiles;
172
172
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
@@ -202,7 +202,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
202
202
  }, {
203
203
  key: "getUrlTemplate",
204
204
  value: function () {
205
- var _getUrlTemplate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
205
+ var _getUrlTemplate = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
206
206
  var tileJson, directUrl;
207
207
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
208
208
  while (1) switch (_context5.prev = _context5.next) {
@@ -233,7 +233,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
233
233
  }, {
234
234
  key: "getUrlTemplateForVector",
235
235
  value: function () {
236
- var _getUrlTemplateForVector = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(sourceId) {
236
+ var _getUrlTemplateForVector = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(sourceId) {
237
237
  var tileJson, directUrl;
238
238
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
239
239
  while (1) switch (_context6.prev = _context6.next) {
@@ -270,7 +270,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
270
270
  }, {
271
271
  key: "getVectorStyleSheet",
272
272
  value: function () {
273
- var _getVectorStyleSheet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
273
+ var _getVectorStyleSheet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
274
274
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
275
275
  while (1) switch (_context7.prev = _context7.next) {
276
276
  case 0:
@@ -292,7 +292,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
292
292
  }, {
293
293
  key: "getVectorStyleSheetRaw",
294
294
  value: function () {
295
- var _getVectorStyleSheetRaw = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
295
+ var _getVectorStyleSheetRaw = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
296
296
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
297
297
  while (1) switch (_context8.prev = _context8.next) {
298
298
  case 0:
@@ -314,7 +314,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
314
314
  }, {
315
315
  key: "getSpriteSheetMeta",
316
316
  value: function () {
317
- var _getSpriteSheetMeta = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
317
+ var _getSpriteSheetMeta = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
318
318
  var isRetina,
319
319
  metaUrl,
320
320
  spritePngs,
@@ -362,7 +362,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
362
362
  }, {
363
363
  key: "getSpriteSheetJsonPath",
364
364
  value: function () {
365
- var _getSpriteSheetJsonPath = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
365
+ var _getSpriteSheetJsonPath = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
366
366
  var isRetina,
367
367
  spriteSheetRootPath,
368
368
  suffix,
@@ -397,7 +397,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
397
397
  }, {
398
398
  key: "getSpriteSheetPngPath",
399
399
  value: function () {
400
- var _getSpriteSheetPngPath = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
400
+ var _getSpriteSheetPngPath = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
401
401
  var isRetina,
402
402
  spriteSheetRootPath,
403
403
  suffix,
@@ -437,7 +437,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
437
437
  }, {
438
438
  key: "getMinZoom",
439
439
  value: function () {
440
- var _getMinZoom = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
440
+ var _getMinZoom = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
441
441
  var tileJson;
442
442
  return _regeneratorRuntime().wrap(function _callee12$(_context12) {
443
443
  while (1) switch (_context12.prev = _context12.next) {
@@ -467,7 +467,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
467
467
  }, {
468
468
  key: "getMaxZoom",
469
469
  value: function () {
470
- var _getMaxZoom = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
470
+ var _getMaxZoom = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
471
471
  var tileJson;
472
472
  return _regeneratorRuntime().wrap(function _callee13$(_context13) {
473
473
  while (1) switch (_context13.prev = _context13.next) {
@@ -518,11 +518,10 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
518
518
  vectorFormats = this._getFormats(formatType, this._emsClient.getDefaultLocale());
519
519
  }
520
520
  if (!vectorFormats.length) {
521
- // eslint-disable-next-line max-len
522
521
  throw new Error("Cannot find ".concat(formatType, " tile layer for locale ").concat(this._emsClient.getLocale(), " or ").concat(this._emsClient.getDefaultLocale()));
523
522
  }
524
523
  var defaultStyle = vectorFormats[0];
525
- if (defaultStyle && defaultStyle.hasOwnProperty('url')) {
524
+ if (defaultStyle && Object.prototype.hasOwnProperty.call(defaultStyle, 'url')) {
526
525
  return defaultStyle.url;
527
526
  }
528
527
  }
@@ -536,7 +535,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
536
535
  }, {
537
536
  key: "_getSpriteSheetRootPath",
538
537
  value: function () {
539
- var _getSpriteSheetRootPath2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
538
+ var _getSpriteSheetRootPath2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
540
539
  var vectorStyleJson;
541
540
  return _regeneratorRuntime().wrap(function _callee14$(_context14) {
542
541
  while (1) switch (_context14.prev = _context14.next) {
@@ -566,7 +565,7 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
566
565
  }, {
567
566
  key: "_getUrlTemplateForGlyphs",
568
567
  value: function () {
569
- var _getUrlTemplateForGlyphs2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
568
+ var _getUrlTemplateForGlyphs2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
570
569
  var vectorStyleJson;
571
570
  return _regeneratorRuntime().wrap(function _callee15$(_context15) {
572
571
  while (1) switch (_context15.prev = _context15.next) {
@@ -1,29 +1,29 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`.getFileLayers[1] - getGeoJson defaults should convert topojson to geojson 1`] = `
4
- Object {
5
- "features": Array [
6
- Object {
7
- "geometry": Object {
8
- "coordinates": Array [
9
- Array [
10
- Array [
4
+ {
5
+ "features": [
6
+ {
7
+ "geometry": {
8
+ "coordinates": [
9
+ [
10
+ [
11
11
  72.77144284428442,
12
12
  62.593,
13
13
  ],
14
- Array [
14
+ [
15
15
  50.625,
16
16
  50.06444104410441,
17
17
  ],
18
- Array [
18
+ [
19
19
  91.7565793579358,
20
20
  35.46,
21
21
  ],
22
- Array [
22
+ [
23
23
  93.867,
24
24
  58.2621401140114,
25
25
  ],
26
- Array [
26
+ [
27
27
  72.77144284428442,
28
28
  62.593,
29
29
  ],
@@ -31,7 +31,7 @@ Object {
31
31
  ],
32
32
  "type": "Polygon",
33
33
  },
34
- "properties": Object {
34
+ "properties": {
35
35
  "foo": "bar",
36
36
  },
37
37
  "type": "Feature",
@@ -42,29 +42,29 @@ Object {
42
42
  `;
43
43
 
44
44
  exports[`.getFileLayers[1] - getGeoJson limited cache 1`] = `
45
- Object {
46
- "features": Array [
47
- Object {
48
- "geometry": Object {
49
- "coordinates": Array [
50
- Array [
51
- Array [
45
+ {
46
+ "features": [
47
+ {
48
+ "geometry": {
49
+ "coordinates": [
50
+ [
51
+ [
52
52
  72.77144284428442,
53
53
  62.593,
54
54
  ],
55
- Array [
55
+ [
56
56
  50.625,
57
57
  50.06444104410441,
58
58
  ],
59
- Array [
59
+ [
60
60
  91.7565793579358,
61
61
  35.46,
62
62
  ],
63
- Array [
63
+ [
64
64
  93.867,
65
65
  58.2621401140114,
66
66
  ],
67
- Array [
67
+ [
68
68
  72.77144284428442,
69
69
  62.593,
70
70
  ],
@@ -72,7 +72,7 @@ Object {
72
72
  ],
73
73
  "type": "Polygon",
74
74
  },
75
- "properties": Object {
75
+ "properties": {
76
76
  "foo": "bar",
77
77
  },
78
78
  "type": "Feature",
@@ -42,7 +42,7 @@ export function getEMSClient(options = {}) {
42
42
 
43
43
  const getManifestMock = jest
44
44
  .spyOn(emsClient, 'getManifest')
45
- .mockImplementation(async (url: string): Promise<any> => {
45
+ .mockImplementation(async (url: string): Promise<object | unknown> => {
46
46
  //simulate network calls
47
47
  if (url.startsWith('https://foobar')) {
48
48
  return EMS_CATALOGUE;
package/.eslintignore DELETED
@@ -1 +0,0 @@
1
- /target
package/.eslintrc DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "parser": "@typescript-eslint/parser",
3
- "plugins": ["@typescript-eslint"],
4
- "extends": [
5
- "plugin:@typescript-eslint/recommended",
6
- "prettier/@typescript-eslint",
7
- "plugin:prettier/recommended"
8
- ],
9
- "rules": {
10
- "@typescript-eslint/member-ordering": 2,
11
- "@typescript-eslint/camelcase": 0,
12
- "@typescript-eslint/no-explicit-any": 0,
13
- "@typescript-eslint/no-inferrable-types": 0,
14
- "@typescript-eslint/explicit-function-return-type": 0,
15
- "@typescript-eslint/no-non-null-assertion": 0,
16
- "@typescript-eslint/interface-name-prefix": 0
17
- }
18
- }