@spurreiter/geocoder
Advanced tools
Comparing version 1.5.2 to 1.5.3
{ | ||
"name": "@spurreiter/geocoder", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"description": "Node geocoding library, google maps, bing maps, mapquest, mapbox, here maps, arcgis, nominatim, ...", | ||
@@ -63,20 +63,20 @@ "keywords": [ | ||
"agentkeepalive": "^4.2.1", | ||
"got": "^12.1.0", | ||
"i18n-iso-countries": "^7.4.0" | ||
"got": "^12.5.3", | ||
"i18n-iso-countries": "^7.5.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^16.11.36", | ||
"c8": "^7.11.3", | ||
"dotenv": "^16.0.1", | ||
"eslint": "^8.16.0", | ||
"@types/node": "^18.11.10", | ||
"c8": "^7.12.0", | ||
"dotenv": "^16.0.3", | ||
"eslint": "^8.29.0", | ||
"eslint-config-standard": "^17.0.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-n": "^15.2.0", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"mocha": "^10.0.0", | ||
"eslint-plugin-n": "^15.5.1", | ||
"eslint-plugin-promise": "^6.1.1", | ||
"mocha": "^10.1.0", | ||
"npm-run-all": "^4.1.5", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.75.1", | ||
"sinon": "^14.0.0", | ||
"typescript": "^4.7.2" | ||
"rollup": "^3.5.1", | ||
"sinon": "^14.0.2", | ||
"typescript": "^4.9.3" | ||
}, | ||
@@ -83,0 +83,0 @@ "engines": { |
@@ -0,3 +1,4 @@ | ||
// @ts-expect-error | ||
import got from 'got' | ||
// @ts-ignore | ||
// @ts-expect-error | ||
import HttpAgent from 'agentkeepalive' | ||
@@ -4,0 +5,0 @@ import { isNumber } from './utils/index.js' |
@@ -17,2 +17,3 @@ | ||
features, | ||
// @ts-expect-error | ||
{ license, attribution, query } = {} | ||
@@ -19,0 +20,0 @@ ) => ({ |
@@ -10,3 +10,3 @@ // @ts-ignore | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../types').ForwardQuery} ForwardQuery */ | ||
@@ -13,0 +13,0 @@ /** @typedef {import('../types').ReverseQuery} ReverseQuery */ |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError, countryCode, countryName, toFixed } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ const undef = (s) => s === '' ? undefined : s |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ const hasResult = (result) => { |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError, countryName } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ /** |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError, objToCamelCase } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ function hasResult (result) { |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ // status can be "OK", "ZERO_RESULTS", "OVER_QUERY_LIMIT", "REQUEST_DENIED", "INVALID_REQUEST", or "UNKNOWN_ERROR" |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError, countryCode, toFixed } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ /** |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ function hasResult (result) { |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError, toFixed, toUpperCase } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ /** |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ /** |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError, countryName } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ /** |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError, toUpperCase } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ /** |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError, toFixed } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ /** |
import { OsmGeocoder } from './osm.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -5,0 +5,0 @@ /** |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError, toFixed, toUpperCase } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ const ACCEPT_LANGUAGE = 'accept-language' |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError, countryCode, toFixed } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ /** |
import { OsmGeocoder } from './osm.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -5,0 +5,0 @@ /** |
@@ -9,3 +9,3 @@ /** | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -12,0 +12,0 @@ function getEmbeddedPath (parent, path, def) { |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError, countryCode as countryCodeF, toFixed } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ const undef = (s) => s === '' ? undefined : s |
import { AbstractGeocoder } from './abstract.js' | ||
import { HttpError } from '../utils/index.js' | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
@@ -6,0 +6,0 @@ /** |
@@ -8,3 +8,3 @@ { | ||
"declarationDir": "types", | ||
"moduleResolution": "node", | ||
// "moduleResolution": "node", | ||
"noImplicitAny": false, | ||
@@ -11,0 +11,0 @@ "strict": true, |
@@ -1,2 +0,2 @@ | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../types').ForwardQuery} ForwardQuery */ | ||
@@ -78,5 +78,5 @@ /** @typedef {import('../types').ReverseQuery} ReverseQuery */ | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
export type ForwardQuery = import('../types').ForwardQuery; | ||
export type ReverseQuery = import('../types').ReverseQuery; | ||
export type GeocoderResult = import('../types').GeocoderResult; |
@@ -66,3 +66,3 @@ /** | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
/** | ||
@@ -69,0 +69,0 @@ * see https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm |
@@ -68,3 +68,3 @@ /** | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
/** | ||
@@ -71,0 +71,0 @@ * see https://docs.microsoft.com/en-us/bingmaps/rest-services/locations/find-a-location-by-address |
@@ -1,2 +0,2 @@ | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
/** | ||
@@ -70,3 +70,3 @@ * see https://www.geocod.io/docs/#single-address | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
/** | ||
@@ -73,0 +73,0 @@ * see https://www.geocod.io/docs/#single-address |
@@ -55,3 +55,3 @@ /** | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
export type GeoLite2ForwardQuery = { | ||
@@ -58,0 +58,0 @@ address: string; |
@@ -62,3 +62,3 @@ /** | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
/** | ||
@@ -65,0 +65,0 @@ * see https://developers.google.com/maps/documentation/geocoding/overview#GeocodingRequests |
@@ -55,3 +55,3 @@ export class HereGeocoder extends AbstractGeocoder { | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
export type HereForwardQuery = { | ||
@@ -58,0 +58,0 @@ address: string; |
@@ -27,3 +27,3 @@ export class IpStackGeocoder extends AbstractGeocoder { | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
import { AbstractGeocoder } from "./abstract.js"; |
@@ -59,3 +59,3 @@ export class LocationIqGeocoder extends AbstractGeocoder { | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
export type LocationIqForwardQuery = { | ||
@@ -62,0 +62,0 @@ address: string; |
@@ -1,2 +0,2 @@ | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
/** | ||
@@ -73,3 +73,3 @@ * @typedef {object} MapBoxForwardQuery | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
export type MapBoxForwardQuery = { | ||
@@ -76,0 +76,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
/** | ||
@@ -75,3 +75,3 @@ * @typedef {object} MapQuestForwardQuery | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
export type MapQuestForwardQuery = { | ||
@@ -78,0 +78,0 @@ /** |
@@ -56,3 +56,3 @@ export class OpenCageGeocoder extends AbstractGeocoder { | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
export type OpenCageForwardQuery = { | ||
@@ -59,0 +59,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
/** | ||
@@ -60,3 +60,3 @@ * see https://geo.api.gouv.fr/adresse | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
/** | ||
@@ -63,0 +63,0 @@ * see https://geo.api.gouv.fr/adresse |
@@ -1,2 +0,2 @@ | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
/** | ||
@@ -47,3 +47,3 @@ * see https://developer.mapquest.com/documentation/open/nominatim-search/search/ | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
/** | ||
@@ -50,0 +50,0 @@ * see https://developer.mapquest.com/documentation/open/nominatim-search/search/ |
@@ -96,3 +96,3 @@ /** | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
export type OsmForwardQuery = { | ||
@@ -99,0 +99,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
/** | ||
@@ -54,3 +54,3 @@ * @typedef {object} PeliasForwardQuery | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
export type PeliasForwardQuery = { | ||
@@ -57,0 +57,0 @@ address: string; |
@@ -1,2 +0,2 @@ | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
/** | ||
@@ -47,3 +47,3 @@ * see https://pickpoint.io/api-reference#forward-geocoding | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
/** | ||
@@ -50,0 +50,0 @@ * see https://pickpoint.io/api-reference#forward-geocoding |
@@ -49,3 +49,3 @@ /** | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
export type TeleportForwardQuery = { | ||
@@ -52,0 +52,0 @@ address: string; |
@@ -68,3 +68,3 @@ /** | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
/** | ||
@@ -71,0 +71,0 @@ * see https://developer.tomtom.com/search-api/documentation/geocoding-service/geocode |
@@ -1,2 +0,2 @@ | ||
/** @typedef {import('../adapter').fetchAdapterFn} fetchAdapterFn */ | ||
/** @typedef {import('../adapter.js').fetchAdapterFn} fetchAdapterFn */ | ||
/** | ||
@@ -62,3 +62,3 @@ * @see https://yandex.com/dev/maps/geocoder/doc/desc/concepts/input_params.html | ||
} | ||
export type fetchAdapterFn = import('../adapter').fetchAdapterFn; | ||
export type fetchAdapterFn = import('../adapter.js').fetchAdapterFn; | ||
export type YandexForwardQuery = { | ||
@@ -65,0 +65,0 @@ address: string; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
272791
8787
Updatedgot@^12.5.3
Updatedi18n-iso-countries@^7.5.0