@aws-amplify/geo
Advanced tools
Comparing version 1.1.13-unstable.4 to 1.1.13-unstable.9
@@ -145,6 +145,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
} | ||
if (options['biasPosition'] && options['searchAreaConstraints']) { | ||
throw new Error('BiasPosition and SearchAreaConstraints are mutually exclusive, please remove one or the other from the options object'); | ||
} | ||
if (options['biasPosition']) { | ||
locationServiceInput.BiasPosition = options['biasPosition']; | ||
} | ||
else if (options['searchAreaConstraints']) { | ||
if (options['searchAreaConstraints']) { | ||
locationServiceInput.FilterBBox = options['searchAreaConstraints']; | ||
@@ -265,3 +268,3 @@ } | ||
if (!this._config.maps) { | ||
var errorString = "No map resources found in amplify config, run 'amplify add geo' to create them and ensure to run `amplify push` after"; | ||
var errorString = "No map resources found in amplify config, run 'amplify add geo' to create them and run `amplify push` after"; | ||
logger.warn(errorString); | ||
@@ -271,3 +274,3 @@ throw new Error(errorString); | ||
if (!this._config.maps.default) { | ||
var errorString = "No default map resource found in amplify config, run 'amplify add geo' to create one and ensure to run `amplify push` after"; | ||
var errorString = "No default map resource found in amplify config, run 'amplify add geo' to create one and run `amplify push` after"; | ||
logger.warn(errorString); | ||
@@ -280,3 +283,3 @@ throw new Error(errorString); | ||
!optionalSearchIndex) { | ||
var errorString = 'No Search Index found, please run `amplify add geo` to add one and ensure to run `amplify push` after.'; | ||
var errorString = 'No Search Index found, please run `amplify add geo` to add one and run `amplify push` after.'; | ||
logger.warn(errorString); | ||
@@ -283,0 +286,0 @@ throw new Error(errorString); |
@@ -150,6 +150,9 @@ "use strict"; | ||
} | ||
if (options['biasPosition'] && options['searchAreaConstraints']) { | ||
throw new Error('BiasPosition and SearchAreaConstraints are mutually exclusive, please remove one or the other from the options object'); | ||
} | ||
if (options['biasPosition']) { | ||
locationServiceInput.BiasPosition = options['biasPosition']; | ||
} | ||
else if (options['searchAreaConstraints']) { | ||
if (options['searchAreaConstraints']) { | ||
locationServiceInput.FilterBBox = options['searchAreaConstraints']; | ||
@@ -270,3 +273,3 @@ } | ||
if (!this._config.maps) { | ||
var errorString = "No map resources found in amplify config, run 'amplify add geo' to create them and ensure to run `amplify push` after"; | ||
var errorString = "No map resources found in amplify config, run 'amplify add geo' to create them and run `amplify push` after"; | ||
logger.warn(errorString); | ||
@@ -276,3 +279,3 @@ throw new Error(errorString); | ||
if (!this._config.maps.default) { | ||
var errorString = "No default map resource found in amplify config, run 'amplify add geo' to create one and ensure to run `amplify push` after"; | ||
var errorString = "No default map resource found in amplify config, run 'amplify add geo' to create one and run `amplify push` after"; | ||
logger.warn(errorString); | ||
@@ -285,3 +288,3 @@ throw new Error(errorString); | ||
!optionalSearchIndex) { | ||
var errorString = 'No Search Index found, please run `amplify add geo` to add one and ensure to run `amplify push` after.'; | ||
var errorString = 'No Search Index found, please run `amplify add geo` to add one and run `amplify push` after.'; | ||
logger.warn(errorString); | ||
@@ -288,0 +291,0 @@ throw new Error(errorString); |
{ | ||
"name": "@aws-amplify/geo", | ||
"version": "1.1.13-unstable.4+98aec0985", | ||
"version": "1.1.13-unstable.9+ee83e7375", | ||
"description": "Geo category for aws-amplify", | ||
@@ -44,3 +44,3 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@aws-amplify/core": "4.3.13-unstable.4+98aec0985", | ||
"@aws-amplify/core": "4.3.13-unstable.9+ee83e7375", | ||
"@aws-sdk/client-location": "3.41.0", | ||
@@ -101,3 +101,3 @@ "camelcase-keys": "6.2.2" | ||
}, | ||
"gitHead": "98aec098539535c47afb117bc802eba06ae2c1b2" | ||
"gitHead": "ee83e7375c32c8804cbf9a0e21cc6fd1ef662358" | ||
} |
@@ -155,5 +155,11 @@ /* | ||
if (options['biasPosition'] && options['searchAreaConstraints']) { | ||
throw new Error( | ||
'BiasPosition and SearchAreaConstraints are mutually exclusive, please remove one or the other from the options object' | ||
); | ||
} | ||
if (options['biasPosition']) { | ||
locationServiceInput.BiasPosition = options['biasPosition']; | ||
} else if (options['searchAreaConstraints']) { | ||
} | ||
if (options['searchAreaConstraints']) { | ||
locationServiceInput.FilterBBox = options['searchAreaConstraints']; | ||
@@ -272,3 +278,3 @@ } | ||
const errorString = | ||
"No map resources found in amplify config, run 'amplify add geo' to create them and ensure to run `amplify push` after"; | ||
"No map resources found in amplify config, run 'amplify add geo' to create them and run `amplify push` after"; | ||
logger.warn(errorString); | ||
@@ -279,3 +285,3 @@ throw new Error(errorString); | ||
const errorString = | ||
"No default map resource found in amplify config, run 'amplify add geo' to create one and ensure to run `amplify push` after"; | ||
"No default map resource found in amplify config, run 'amplify add geo' to create one and run `amplify push` after"; | ||
logger.warn(errorString); | ||
@@ -292,3 +298,3 @@ throw new Error(errorString); | ||
const errorString = | ||
'No Search Index found, please run `amplify add geo` to add one and ensure to run `amplify push` after.'; | ||
'No Search Index found, please run `amplify add geo` to add one and run `amplify push` after.'; | ||
logger.warn(errorString); | ||
@@ -295,0 +301,0 @@ throw new Error(errorString); |
@@ -37,3 +37,3 @@ /* | ||
/// P | ||
// Coordinate point | ||
export type Coordinates = [Longitude, Latitude]; | ||
@@ -40,0 +40,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
4514964
27555
61