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

amplify-frontend-android

Package Overview
Dependencies
Maintainers
2
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 0.2.0-alpha.faff0c3c to 0.2.1-multienv.0

91

CHANGELOG.md

@@ -6,2 +6,93 @@ # Change Log

<a name="0.2.1-multienv.0"></a>
## [0.2.1-multienv.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@0.1.34-multienv.0...amplify-frontend-android@0.2.1-multienv.0) (2018-11-21)
**Note:** Version bump only for package amplify-frontend-android
<a name="0.1.34-multienv.0"></a>
## [0.1.34-multienv.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@0.1.33...amplify-frontend-android@0.1.34-multienv.0) (2018-11-16)
### Features
* headless Init and configure ([#371](https://github.com/aws-amplify/amplify-cli/issues/371)) ([acd14a8](https://github.com/aws-amplify/amplify-cli/commit/acd14a8))
<a name="0.1.33"></a>
## [0.1.33](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@0.1.33-beta.0...amplify-frontend-android@0.1.33) (2018-11-09)
**Note:** Version bump only for package amplify-frontend-android
<a name="0.1.33-beta.0"></a>
## [0.1.33-beta.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@0.1.12...amplify-frontend-android@0.1.33-beta.0) (2018-11-09)
**Note:** Version bump only for package amplify-frontend-android
<a name="0.1.32"></a>
## [0.1.32](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@0.1.32-beta.0...amplify-frontend-android@0.1.32) (2018-11-05)
**Note:** Version bump only for package amplify-frontend-android
<a name="0.1.32-beta.0"></a>
## [0.1.32-beta.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@0.1.12...amplify-frontend-android@0.1.32-beta.0) (2018-11-05)
**Note:** Version bump only for package amplify-frontend-android
<a name="0.1.31"></a>
## [0.1.31](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@0.1.12...amplify-frontend-android@0.1.31) (2018-11-02)
**Note:** Version bump only for package amplify-frontend-android
<a name="0.1.30"></a>
## [0.1.30](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@0.1.30-beta.0...amplify-frontend-android@0.1.30) (2018-11-02)
**Note:** Version bump only for package amplify-frontend-android
<a name="0.1.30-beta.0"></a>
## [0.1.30-beta.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@0.1.12...amplify-frontend-android@0.1.30-beta.0) (2018-11-02)
**Note:** Version bump only for package amplify-frontend-android
<a name="0.1.29"></a>
## [0.1.29](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@0.1.29-beta.0...amplify-frontend-android@0.1.29) (2018-10-23)
**Note:** Version bump only for package amplify-frontend-android
<a name="0.1.29-beta.0"></a>
## [0.1.29-beta.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@0.1.12...amplify-frontend-android@0.1.29-beta.0) (2018-10-23)
**Note:** Version bump only for package amplify-frontend-android
<a name="0.1.28"></a>

@@ -8,0 +99,0 @@ ## [0.1.28](https://github.com/aws-amplify/amplify-cli/compare/amplify-frontend-android@0.1.28-beta.0...amplify-frontend-android@0.1.28) (2018-10-18)

64

lib/configuration-manager.js
const inquirer = require('inquirer');
const constants = require('./constants');
function init(context) {
context.print.info('Describe your project:');
return promptForConfiguration(context);
async function init(context) {
normalizeInputParams(context);
await confirmConfiguration(context);
return context;
}
function onInitSuccessful(context) {
return new Promise((resolve) => {
resolve(context);
});
return context;
}
function configure(context) {
return promptForConfiguration(context);
async function configure(context) {
normalizeInputParams(context);
await confirmConfiguration(context);
return context;
}
function promptForConfiguration(context) {
function normalizeInputParams(context) {
let inputParams;
if (context.exeInfo.inputParams && context.exeInfo.inputParams[constants.Label]) {
inputParams = context.exeInfo.inputParams[constants.Label];
}
if (inputParams && inputParams.config) {
if (!inputParams.config.ResDir) {
throw new Error('The command line parameter for android frontend configuration is incomplete.');
}
}
context.exeInfo.inputParams[constants.Label] = inputParams;
}
async function confirmConfiguration(context) {
if (!context.exeInfo.projectConfig[constants.Label]) {

@@ -26,17 +40,21 @@ context.exeInfo.projectConfig[constants.Label] = {};

}
const { config } = context.exeInfo.projectConfig[constants.Label];
const configurationSettings = [
{
type: 'input',
name: 'ResDir',
message: 'Where is your Res directory: ',
default: config.ResDir || 'app/src/main/res',
},
];
return inquirer.prompt(configurationSettings)
.then((answers) => {
config.ResDir = answers.ResDir;
return context;
});
const inputParams = context.exeInfo.inputParams[constants.Label];
if (inputParams) {
Object.assign(context.exeInfo.projectConfig[constants.Label], inputParams);
} else if (!context.exeInfo.inputParams.yes) {
context.print.info('Please tell us about your project');
const { config } = context.exeInfo.projectConfig[constants.Label];
const configurationSettings = [
{
type: 'input',
name: 'ResDir',
message: 'Where is your Res directory: ',
default: config.ResDir || 'app/src/main/res',
},
];
const answers = await inquirer.prompt(configurationSettings);
config.ResDir = answers.ResDir;
}
}

@@ -43,0 +61,0 @@

module.exports = {
Label: 'amplify-frontend-android',
Label: 'android',
ProjectScanBaseScore: 0,

@@ -4,0 +4,0 @@ ProjectScanMaxScore: 100,

@@ -8,3 +8,3 @@ const constants = require('./constants');

const projectPath = context.exeInfo ?
context.exeInfo.projectConfig.projectPath : amplify.getProjectConfig().projectPath;
context.exeInfo.localEnvInfo.projectPath : amplify.getEnvInfo().projectPath;
const projectConfig = context.exeInfo ?

@@ -60,3 +60,3 @@ context.exeInfo.projectConfig[constants.Label] : amplify.getProjectConfig()[constants.Label];

const projectPath = context.exeInfo ?
context.exeInfo.projectConfig.projectPath : amplify.getProjectConfig().projectPath;
context.exeInfo.localEnvInfo.projectPath : amplify.getEnvInfo().projectPath;
const projectConfig = context.exeInfo ?

@@ -63,0 +63,0 @@ context.exeInfo.projectConfig[constants.Label] : amplify.getProjectConfig()[constants.Label];

{
"name": "amplify-frontend-android",
"version": "0.2.0-alpha.faff0c3c",
"version": "0.2.1-multienv.0",
"description": "amplify-cli front-end plugin for Android project",

@@ -11,3 +11,3 @@ "main": "index.js",

"eslint": "^4.19.1",
"fs-extra": "^6.0.1",
"fs-extra": "^7.0.0",
"inquirer": "^6.0.0",

@@ -14,0 +14,0 @@ "path": "^0.12.7"

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