Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amplify-frontend-android

Package Overview
Dependencies
Maintainers
5
Versions
578
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amplify-frontend-android - npm Package Compare versions

Comparing version 2.15.5-ext.0 to 2.16.0-geo.0

tests/__snapshots__/amplify-config-helper.test.js.snap

7

CHANGELOG.md

@@ -6,10 +6,13 @@ # Change Log

## [2.15.5-ext.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@2.15.3...amplify-frontend-android@2.15.5-ext.0) (2021-08-20)
# [2.16.0-geo.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@2.15.4...amplify-frontend-android@2.16.0-geo.0) (2021-09-21)
**Note:** Version bump only for package amplify-frontend-android
### Features
* **amplify-fronted-ios, amplify-frontend-android:** add geo config ([#8237](https://github.com/aws-amplify/amplify-cli/issues/8237)) ([52ac164](https://github.com/aws-amplify/amplify-cli/commit/52ac1645bb157bde29e07344e36b5c3c38484b67))
## [2.15.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@2.15.3...amplify-frontend-android@2.15.4) (2021-08-06)

@@ -16,0 +19,0 @@

@@ -13,2 +13,3 @@ function generateConfig(context, newAWSConfig) {

constructStorage(metadata, amplifyConfig);
constructGeo(metadata, amplifyConfig);

@@ -191,4 +192,57 @@ return amplifyConfig;

function constructGeo(metadata, amplifyConfig) {
const categoryName = 'geo';
const pluginName = 'awsLocationGeoPlugin';
if (metadata[categoryName] && Object.keys(metadata[categoryName]).length > 0) {
let defaultMap = '';
const mapConfig = {
items: {}
};
let defaultPlaceIndex = '';
const placeIndexConfig = {
items: []
};
Object.keys(metadata[categoryName]).forEach(r => {
const resourceMeta = metadata[categoryName][r];
if (resourceMeta.output) {
if (resourceMeta.service === 'Map') {
const mapName = resourceMeta.output.Name;
mapConfig.items[mapName] = {
style: resourceMeta.output.Style
}
if(resourceMeta.isDefault === true) {
defaultMap = mapName;
}
}
else if (resourceMeta.service === 'PlaceIndex') {
const placeIndexName = resourceMeta.output.Name;
placeIndexConfig.items.push(placeIndexName);
if(resourceMeta.isDefault === true) {
defaultPlaceIndex = placeIndexName;
}
}
}
});
mapConfig.default = defaultMap;
placeIndexConfig.default = defaultPlaceIndex;
amplifyConfig[categoryName] = {
plugins: {}
};
amplifyConfig[categoryName].plugins[pluginName] = {
region: metadata.providers.awscloudformation.Region
};
if (Object.keys(mapConfig.items).length > 0) {
amplifyConfig[categoryName].plugins[pluginName]['maps'] = mapConfig;
}
if (placeIndexConfig.items.length > 0) {
amplifyConfig[categoryName].plugins[pluginName]['searchIndices'] = placeIndexConfig;
}
}
}
module.exports = {
generateConfig,
};
{
"name": "amplify-frontend-android",
"version": "2.15.5-ext.0",
"version": "2.16.0-geo.0",
"description": "amplify-cli front-end plugin for Android project",

@@ -23,3 +23,3 @@ "repository": {

},
"gitHead": "6d0282a77f5e4a200d8b2b76e227863d21ec9d33"
"gitHead": "94629517325c7d477fd85c3d5cda4f0123f3e6d1"
}
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