New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@elastic/ems-client

Package Overview
Dependencies
Maintainers
0
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elastic/ems-client - npm Package Compare versions

Comparing version 7.17.3 to 7.17.4

.github/workflows/backport.yml

22

.backportrc.json
{
"upstream": "elastic/ems-client",
"branches": [
{
"name": "8.4",
"checked": true
},
{
"name": "7.17",
"checked": true
}
],
"labels": [
"backport"
]
"repoOwner": "elastic",
"repoName": "ems-file-service",
"targetBranches": ["7.17"],
"targetPRLabels": ["backport"],
"commitConflicts": true,
"autoMerge": true,
"autoMergeMethod": "squash",
"fork": false
}

@@ -49,3 +49,3 @@ /*

...emsClientPackageJson['dependencies'],
...emsClientPackageJson['devDependencies']
// ...emsClientPackageJson['devDependencies']
};

@@ -52,0 +52,0 @@

@@ -6,18 +6,18 @@ # Changelog

## [7.17.3] - 2024-07-10
## [7.17.4] - 2024-12-16
### Changed
- Update dependencies (search PRs for `is:pr label:7.17.4,dependencies`)
## [7.17.3] - 2024-07-10
### Changed
- Update dependencies #243
## [7.17.2] - 2024-07-05
## Changed
- Update dependencies #218 #219 #220 #221 #236 #237
## [7.17.1] - 2023-11-09
### Changed
- Default EMS version is 7.17

@@ -29,3 +29,2 @@ - Upgrade dependencies #138 #162 #165 #169 #172 #173 !76 #184 #191 #198 #205

## [7.16.0] - 2021-10-13
### Changed

@@ -37,3 +36,2 @@ - Default EMS version is 7.16

## [7.15.1] - 2021-09-01
### Changed

@@ -43,3 +41,2 @@ - Unpinned `semver` dependency [#77](https://github.com/elastic/ems-client/pull/77)

## [7.15.0] - 2021-08-12
### Changed

@@ -49,9 +46,8 @@ - Default EMS version is 7.15

- Fix linting issues
## [7.14.0] - 2021-06-15
### Added
- New getters for optional field metadata `alias`, `regex`, and `values` #69
### Changed
- Default EMS version is 7.14

@@ -70,3 +66,2 @@ - **Breaking change** @elastic/ems-client is now licensed under the Elastic License v2. See the LICENSE.txt file in this repository #64

## [7.10.0] - 2020-08-17

@@ -98,3 +93,2 @@ ### Changed

## [7.8.1] - 2020-04-06

@@ -134,3 +128,2 @@ ### Fixed

## [7.6.0] - 2020-01-13
### Added

@@ -140,3 +133,2 @@ - 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)

### Changed
- 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.

@@ -154,3 +146,2 @@

## [7.2.1] - 2019-12-11
### Fixed

@@ -166,5 +157,3 @@ - Inject correct attribution into vector tile sources [#14](https://github.com/elastic/ems-client/pull/14/files)

## [1.0.2] - 2019-10-15
### Fixed

@@ -174,3 +163,2 @@ - Transpile the browser-side assets to be IE compatible.

## [1.0.1] - 2019-08-27
### Fixed

@@ -180,3 +168,2 @@ - Downgrade node-fetch dependency to fix fetch error

## [1.0.0] - 2019-08-26
- Initial release. Compatible with Elastic Maps Service v7.2.0.
{
"name": "@elastic/ems-client",
"version": "7.17.3",
"version": "7.17.4",
"description": "JavaScript client library for the Elastic Maps Service",

@@ -10,3 +10,3 @@ "main": "target/node/index.js",

"prelint": "tsc --noEmit",
"lint": "eslint . --ext .ts,.tsx",
"lint": "prettier --check src/* && eslint .",
"pretest": "yarn lint",

@@ -39,34 +39,39 @@ "test": "jest",

"dependencies": {
"@types/geojson": "^7946.0.14",
"@types/lru-cache": "^5.1.0",
"@types/topojson-client": "^3.1.4",
"@types/topojson-specification": "^1.0.5",
"lodash": "^4.17.21",
"lru-cache": "^4.1.5",
"semver": "7.6.2",
"topojson-client": "^3.1.0"
"@types/geojson": "7946.0.15",
"@types/topojson-client": "3.1.5",
"lodash": "4.17.21",
"lru-cache": "4.1.5",
"node-fetch": "2.7.0",
"semver": "7.6.3",
"topojson-client": "3.1.0"
},
"devDependencies": {
"@babel/cli": "^7.6.4",
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@babel/preset-typescript": "^7.9.0",
"@types/jest": "^26.0.10",
"@types/lodash": "4.17.5",
"@types/node": "^13.13.5",
"@types/node-fetch": "^2.5.7",
"@types/semver": "^7.1.0",
"@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.33.0",
"babel-jest": "^26.3.0",
"eslint": "^7.0.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"husky": "^4.2.5",
"jest": "^26.4.0",
"node-fetch": "^2.6.7",
"prettier": "^2.0.5",
"ts-jest": "^26.2.0",
"typescript": "4.6.3"
"@babel/cli": "7.26.4",
"@babel/core": "7.26.0",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/preset-env": "7.26.0",
"@babel/preset-typescript": "7.26.0",
"@eslint/core": "0.9.1",
"@eslint/js": "9.17.0",
"@types/eslint__js": "8.42.3",
"@types/jest": "29.5.14",
"@types/lodash": "4.17.13",
"@types/lru-cache": "5.1.1",
"@types/node": "20.17.10",
"@types/node-fetch": "2.6.12",
"@types/semver": "7.5.8",
"@types/topojson-specification": "1.0.5",
"@typescript-eslint/eslint-plugin": "8.18.1",
"@typescript-eslint/parser": "8.18.1",
"babel-jest": "29.7.0",
"eslint": "9.17.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.2.1",
"globals": "15.14.0",
"husky": "9.1.7",
"jest": "29.7.0",
"prettier": "3.4.2",
"ts-jest": "29.2.5",
"typescript": "5.7.2",
"typescript-eslint": "8.18.1"
},

@@ -73,0 +78,0 @@ "engines": {

@@ -18,2 +18,3 @@ /*

import LRUCache from 'lru-cache';
import { RequestInfo } from 'node-fetch';

@@ -100,6 +101,6 @@ const DEFAULT_EMS_VERSION = '7.17';

emsVersion?: string;
htmlSanitizer?: Function;
htmlSanitizer?: (x: string) => string;
language?: string;
landingPageUrl?: string;
fetchFunction: Function;
fetchFunction: (url: RequestInfo) => Promise<Response>;
proxyPath?: string;

@@ -209,4 +210,4 @@ cacheSize?: number;

private readonly _appVersion: string;
private readonly _fetchFunction: Function;
private readonly _sanitizer: Function;
private readonly _fetchFunction: (url: RequestInfo) => Promise<Response>;
private readonly _sanitizer: (x: string) => string;
private readonly _manifestServiceUrl?: string;

@@ -224,7 +225,7 @@ private readonly _fileApiUrl: string;

*/
private _getMainCatalog!: Function;
private _getDefaultTMSCatalog!: Function;
private _getDefaultFileCatalog!: Function;
private _loadTMSServices!: Function;
private _loadFileLayers!: Function;
private _getMainCatalog!: () => Promise<EmsCatalogManifest>;
private _getDefaultTMSCatalog!: () => Promise<EmsTmsCatalog>;
private _getDefaultFileCatalog!: () => Promise<EmsFileCatalog>;
private _loadTMSServices!: () => Promise<TMSService[]>;
private _loadFileLayers!: () => Promise<FileLayer[]>;

@@ -307,3 +308,3 @@ constructor(config: ClientConfig | DeprecatedClientConfig) {

for (const key in additionalQueryParams) {
if (additionalQueryParams.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(additionalQueryParams, key)) {
if (additionalQueryParams[key] !== this._queryParams[key]) {

@@ -310,0 +311,0 @@ //changes detected.

@@ -255,3 +255,2 @@ /*

if (!vectorFormats.length) {
// eslint-disable-next-line max-len
throw new Error(

@@ -262,3 +261,3 @@ `Cannot find ${formatType} tile layer for locale ${this._emsClient.getLocale()} or ${this._emsClient.getDefaultLocale()}`

const defaultStyle = vectorFormats[0];
if (defaultStyle && defaultStyle.hasOwnProperty('url')) {
if (defaultStyle && Object.prototype.hasOwnProperty.call(defaultStyle, 'url')) {
return defaultStyle.url;

@@ -265,0 +264,0 @@ }

import { TMSService } from './tms_service';
import { EMSFormatType, FileLayer } from './file_layer';
import { FeatureCollection } from 'geojson';
declare type LocalizedStrings = {
import { Response } from 'node-fetch';
import { RequestInfo } from 'node-fetch';
type LocalizedStrings = {
[key: string]: string;
};
declare type BaseClientConfig = {
type BaseClientConfig = {
appName?: string;

@@ -13,16 +15,16 @@ manifestServiceUrl?: string;

emsVersion?: string;
htmlSanitizer?: Function;
htmlSanitizer?: (x: string) => string;
language?: string;
landingPageUrl?: string;
fetchFunction: Function;
fetchFunction: (url: RequestInfo) => Promise<Response>;
proxyPath?: string;
cacheSize?: number;
};
declare type DeprecatedClientConfig = BaseClientConfig & {
type DeprecatedClientConfig = BaseClientConfig & {
kbnVersion: string;
};
declare type ClientConfig = BaseClientConfig & {
type ClientConfig = BaseClientConfig & {
appVersion: string;
};
declare type EmsCatalogService = {
type EmsCatalogService = {
id?: string;

@@ -33,11 +35,11 @@ name?: string;

};
declare type EmsCatalogManifest = {
type EmsCatalogManifest = {
version?: string;
services: EmsCatalogService[];
};
declare type EmsTmsCatalog = {
type EmsTmsCatalog = {
version?: string;
services: TMSServiceConfig[];
};
export declare type EmsTmsFormat = {
export type EmsTmsFormat = {
locale: string;

@@ -47,6 +49,6 @@ format: string;

};
export declare type BaseEmsServiceConfig = {
export type BaseEmsServiceConfig = {
attribution: EmsLayerAttribution[];
};
export declare type FileLayerConfig = BaseEmsServiceConfig & {
export type FileLayerConfig = BaseEmsServiceConfig & {
layer_id: string;

@@ -59,3 +61,3 @@ created_at: string;

};
export declare type FileLayerField = {
export type FileLayerField = {
type: string;

@@ -68,3 +70,3 @@ id: string;

};
export declare type TMSServiceConfig = BaseEmsServiceConfig & {
export type TMSServiceConfig = BaseEmsServiceConfig & {
id: string;

@@ -76,11 +78,11 @@ name: {

};
declare type EmsFileCatalog = {
type EmsFileCatalog = {
version?: string;
layers: FileLayerConfig[];
};
export declare type EmsLayerAttribution = {
export type EmsLayerAttribution = {
label: LocalizedStrings;
url: LocalizedStrings;
};
export declare type EmsFileLayerFormatGeoJson = {
export type EmsFileLayerFormatGeoJson = {
type: EMSFormatType.geojson;

@@ -90,3 +92,3 @@ url: string;

};
export declare type EmsFileLayerFormatTopoJson = {
export type EmsFileLayerFormatTopoJson = {
type: EMSFormatType.topojson;

@@ -93,0 +95,0 @@ url: string;

@@ -8,3 +8,3 @@ import { EMSClient, FileLayerConfig, FileLayerField } from './ems_client';

}
export declare type EMSFormatTypeStrings = keyof typeof EMSFormatType;
export type EMSFormatTypeStrings = keyof typeof EMSFormatType;
export declare class FileLayer extends AbstractEmsService {

@@ -11,0 +11,0 @@ protected readonly _config: FileLayerConfig;

@@ -170,3 +170,3 @@ "use strict";

for (const key in additionalQueryParams) {
if (additionalQueryParams.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(additionalQueryParams, key)) {
if (additionalQueryParams[key] !== this._queryParams[key]) {

@@ -173,0 +173,0 @@ //changes detected.

@@ -187,7 +187,6 @@ "use strict";

if (!vectorFormats.length) {
// eslint-disable-next-line max-len
throw new Error(`Cannot find ${formatType} tile layer for locale ${this._emsClient.getLocale()} or ${this._emsClient.getDefaultLocale()}`);
}
const defaultStyle = vectorFormats[0];
if (defaultStyle && defaultStyle.hasOwnProperty('url')) {
if (defaultStyle && Object.prototype.hasOwnProperty.call(defaultStyle, 'url')) {
return defaultStyle.url;

@@ -194,0 +193,0 @@ }

import { EMSClient, TMSServiceConfig } from './ems_client';
import { AbstractEmsService } from './ems_service';
declare type EmsVectorSource = {
type EmsVectorSource = {
type: 'vector';

@@ -13,6 +13,6 @@ url: string;

};
declare type EmsVectorSources = {
type EmsVectorSources = {
[sourceName: string]: EmsVectorSource;
};
declare type EmsVectorStyle = {
type EmsVectorStyle = {
sources: EmsVectorSources;

@@ -32,3 +32,3 @@ sprite: string;

};
declare type EmsSprite = {
type EmsSprite = {
height: number;

@@ -40,6 +40,6 @@ pixelRatio: number;

};
declare type EmsSpriteSheet = {
type EmsSpriteSheet = {
[spriteName: string]: EmsSprite;
};
declare type EmsRasterStyle = {
type EmsRasterStyle = {
tilejson: string;

@@ -46,0 +46,0 @@ name: string;

@@ -164,3 +164,3 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }

value: (function () {
var _getManifest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(endpointUrl) {
var _getManifest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(endpointUrl) {
var url, response;

@@ -229,3 +229,3 @@ return _regeneratorRuntime().wrap(function _callee$(_context) {

for (var _key in additionalQueryParams) {
if (additionalQueryParams.hasOwnProperty(_key)) {
if (Object.prototype.hasOwnProperty.call(additionalQueryParams, _key)) {
if (additionalQueryParams[_key] !== this._queryParams[_key]) {

@@ -243,3 +243,3 @@ //changes detected.

value: function () {
var _getMainManifest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var _getMainManifest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {

@@ -266,3 +266,3 @@ while (1) switch (_context2.prev = _context2.next) {

value: function () {
var _getDefaultFileManifest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
var _getDefaultFileManifest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {

@@ -289,3 +289,3 @@ while (1) switch (_context3.prev = _context3.next) {

value: function () {
var _getDefaultTMSManifest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var _getDefaultTMSManifest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {

@@ -312,3 +312,3 @@ while (1) switch (_context4.prev = _context4.next) {

value: function () {
var _getFileLayers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
var _getFileLayers = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {

@@ -335,3 +335,3 @@ while (1) switch (_context5.prev = _context5.next) {

value: function () {
var _getTMSServices = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
var _getTMSServices = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {

@@ -396,3 +396,3 @@ while (1) switch (_context6.prev = _context6.next) {

value: function () {
var _findFileLayerById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(id) {
var _findFileLayerById = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(id) {
var fileLayers, i;

@@ -435,3 +435,3 @@ return _regeneratorRuntime().wrap(function _callee7$(_context7) {

value: function () {
var _findTMSServiceById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(id) {
var _findTMSServiceById = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(id) {
var tmsServices, i;

@@ -502,3 +502,3 @@ return _regeneratorRuntime().wrap(function _callee8$(_context8) {

value: function () {
var _getManifestWithParams2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(url) {
var _getManifestWithParams2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(url) {
var extendedUrl;

@@ -529,3 +529,3 @@ return _regeneratorRuntime().wrap(function _callee9$(_context9) {

this._cache.reset();
this._getMainCatalog = _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
this._getMainCatalog = _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
var services;

@@ -567,3 +567,3 @@ return _regeneratorRuntime().wrap(function _callee10$(_context10) {

})));
this._getDefaultTMSCatalog = _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
this._getDefaultTMSCatalog = _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
var catalogue, firstService, url;

@@ -599,3 +599,3 @@ return _regeneratorRuntime().wrap(function _callee11$(_context11) {

})));
this._getDefaultFileCatalog = _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
this._getDefaultFileCatalog = _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
var catalogue, firstService, url;

@@ -633,3 +633,3 @@ return _regeneratorRuntime().wrap(function _callee12$(_context12) {

//Cache the actual instances of TMSService as these in turn cache sub-manifests for the style-files
this._loadTMSServices = _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
this._loadTMSServices = _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
var tmsManifest;

@@ -652,3 +652,3 @@ return _regeneratorRuntime().wrap(function _callee13$(_context13) {

})));
this._loadFileLayers = _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
this._loadFileLayers = _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
var fileManifest;

@@ -655,0 +655,0 @@ return _regeneratorRuntime().wrap(function _callee14$(_context14) {

@@ -48,3 +48,3 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }

value: function () {
var _getGeoJson = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var _getGeoJson = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var cachedGeoJson, format, fetchUrl, geojson, fetchedJson, _meta$feature_collect, meta, featureCollectionPath;

@@ -51,0 +51,0 @@ return _regeneratorRuntime().wrap(function _callee$(_context) {

@@ -38,3 +38,3 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }

_defineProperty(_this, "_config", void 0);
_defineProperty(_this, "_getRasterStyleJson", _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
_defineProperty(_this, "_getRasterStyleJson", _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var rasterUrl, url;

@@ -59,3 +59,3 @@ return _regeneratorRuntime().wrap(function _callee$(_context) {

}))));
_defineProperty(_this, "_getVectorStyleJsonRaw", _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
_defineProperty(_this, "_getVectorStyleJsonRaw", _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var vectorUrl, url, vectorJson;

@@ -84,3 +84,3 @@ return _regeneratorRuntime().wrap(function _callee2$(_context2) {

}))));
_defineProperty(_this, "_getVectorStyleJsonInlined", _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
_defineProperty(_this, "_getVectorStyleJsonInlined", _.once(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
var vectorJson, inlinedSources, sources, _iterator, _step, _sourceName, url, sourceUrl, extendedUrl, sourceJson, extendedTileUrls;

@@ -172,3 +172,3 @@ return _regeneratorRuntime().wrap(function _callee3$(_context3) {

value: function () {
var _getDefaultRasterStyle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var _getDefaultRasterStyle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var _this2 = this;

@@ -209,3 +209,3 @@ var tileJson, tiles;

value: function () {
var _getUrlTemplate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
var _getUrlTemplate = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
var tileJson, directUrl;

@@ -241,3 +241,3 @@ return _regeneratorRuntime().wrap(function _callee5$(_context5) {

value: function () {
var _getUrlTemplateForVector = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(sourceId) {
var _getUrlTemplateForVector = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(sourceId) {
var tileJson, directUrl;

@@ -279,3 +279,3 @@ return _regeneratorRuntime().wrap(function _callee6$(_context6) {

value: function () {
var _getVectorStyleSheet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
var _getVectorStyleSheet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {

@@ -302,3 +302,3 @@ while (1) switch (_context7.prev = _context7.next) {

value: function () {
var _getVectorStyleSheetRaw = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
var _getVectorStyleSheetRaw = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {

@@ -325,3 +325,3 @@ while (1) switch (_context8.prev = _context8.next) {

value: function () {
var _getSpriteSheetMeta = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
var _getSpriteSheetMeta = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
var isRetina,

@@ -374,3 +374,3 @@ metaUrl,

value: function () {
var _getSpriteSheetJsonPath = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
var _getSpriteSheetJsonPath = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
var isRetina,

@@ -410,3 +410,3 @@ spriteSheetRootPath,

value: function () {
var _getSpriteSheetPngPath = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
var _getSpriteSheetPngPath = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
var isRetina,

@@ -451,3 +451,3 @@ spriteSheetRootPath,

value: function () {
var _getMinZoom = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
var _getMinZoom = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
var tileJson;

@@ -482,3 +482,3 @@ return _regeneratorRuntime().wrap(function _callee12$(_context12) {

value: function () {
var _getMaxZoom = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
var _getMaxZoom = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
var tileJson;

@@ -534,7 +534,6 @@ return _regeneratorRuntime().wrap(function _callee13$(_context13) {

if (!vectorFormats.length) {
// eslint-disable-next-line max-len
throw new Error("Cannot find ".concat(formatType, " tile layer for locale ").concat(this._emsClient.getLocale(), " or ").concat(this._emsClient.getDefaultLocale()));
}
var defaultStyle = vectorFormats[0];
if (defaultStyle && defaultStyle.hasOwnProperty('url')) {
if (defaultStyle && Object.prototype.hasOwnProperty.call(defaultStyle, 'url')) {
return defaultStyle.url;

@@ -553,3 +552,3 @@ }

value: function () {
var _getSpriteSheetRootPath2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
var _getSpriteSheetRootPath2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
var vectorStyleJson;

@@ -584,3 +583,3 @@ return _regeneratorRuntime().wrap(function _callee14$(_context14) {

value: function () {
var _getUrlTemplateForGlyphs2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
var _getUrlTemplateForGlyphs2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
var vectorStyleJson;

@@ -587,0 +586,0 @@ return _regeneratorRuntime().wrap(function _callee15$(_context15) {

@@ -45,3 +45,3 @@ /*

.spyOn(emsClient, 'getManifest')
.mockImplementation(async (url: string): Promise<any> => {
.mockImplementation(async (url: string): Promise<object | unknown> => {
//simulate network calls

@@ -48,0 +48,0 @@ if (url.startsWith('https://foobar')) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc