diff --git a/CHANGELOG.md b/CHANGELOG.md index 39e83f4..40b2432 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 0.14.1 + +## Fix + +- Typo's in the `create_keychain` command + # 0.14.0 ## Feat diff --git a/lib/src/integrations/android/android_command.dart b/lib/src/integrations/android/android_command.dart index 93606ef..cb6df07 100644 --- a/lib/src/integrations/android/android_command.dart +++ b/lib/src/integrations/android/android_command.dart @@ -1,5 +1,5 @@ import 'package:args/command_runner.dart'; -import 'package:impaktfull_cli/src/integrations/android/create_keystore/command/remove/android_create_keystore_command.dart'; +import 'package:impaktfull_cli/src/integrations/android/create_keystore/command/create_keystore/android_create_keystore_command.dart'; import 'package:impaktfull_cli/src/core/command/command/root_command.dart'; class AndroidRootCommand extends RootCommand { diff --git a/lib/src/integrations/android/create_keystore/command/remove/android_create_keystore_command.dart b/lib/src/integrations/android/create_keystore/command/create_keystore/android_create_keystore_command.dart similarity index 74% rename from lib/src/integrations/android/create_keystore/command/remove/android_create_keystore_command.dart rename to lib/src/integrations/android/create_keystore/command/create_keystore/android_create_keystore_command.dart index 11504a7..2008cc9 100644 --- a/lib/src/integrations/android/create_keystore/command/remove/android_create_keystore_command.dart +++ b/lib/src/integrations/android/create_keystore/command/create_keystore/android_create_keystore_command.dart @@ -1,7 +1,7 @@ import 'package:impaktfull_cli/impaktfull_cli.dart'; import 'package:impaktfull_cli/src/core/command/command/cli_command.dart'; -import 'package:impaktfull_cli/src/integrations/android/create_keystore/command/remove/android_create_keystore_command_config.dart'; -import 'package:impaktfull_cli/src/integrations/android/create_keystore/command/remove/model/android_create_keystore_config_data.dart'; +import 'package:impaktfull_cli/src/integrations/android/create_keystore/command/create_keystore/android_create_keystore_command_config.dart'; +import 'package:impaktfull_cli/src/integrations/android/create_keystore/command/create_keystore/model/android_create_keystore_config_data.dart'; import 'package:impaktfull_cli/src/core/command/config/command_config.dart'; import 'package:impaktfull_cli/src/integrations/android/create_keystore/plugin/android_create_keystore_plugin.dart'; @@ -29,12 +29,12 @@ class AndroidCreateKeystoreCommand ImpaktfullCliLogger.startSpinner('Creating keystore for $name'); await androidCreateKeyStorePlugin.createKeyStore( name: name, - dNameFullName: configData.dNameFullName, - dNameOrganization: configData.dNameOrganization, - dNameOrganizationUnit: configData.dNameOrganizationUnit, - dNameCity: configData.dNameCity, - dNameState: configData.dNameState, - dNameCountry: configData.dNameCountry, + fullName: configData.fullName, + organization: configData.organization, + organizationUnit: configData.organizationUnit, + city: configData.city, + state: configData.state, + country: configData.country, ); } } diff --git a/lib/src/integrations/android/create_keystore/command/remove/android_create_keystore_command_config.dart b/lib/src/integrations/android/create_keystore/command/create_keystore/android_create_keystore_command_config.dart similarity index 51% rename from lib/src/integrations/android/create_keystore/command/remove/android_create_keystore_command_config.dart rename to lib/src/integrations/android/create_keystore/command/create_keystore/android_create_keystore_command_config.dart index 3a37ad8..ae7583b 100644 --- a/lib/src/integrations/android/create_keystore/command/remove/android_create_keystore_command_config.dart +++ b/lib/src/integrations/android/create_keystore/command/create_keystore/android_create_keystore_command_config.dart @@ -1,17 +1,17 @@ import 'package:args/args.dart'; -import 'package:impaktfull_cli/src/integrations/android/create_keystore/command/remove/model/android_create_keystore_config_data.dart'; +import 'package:impaktfull_cli/src/integrations/android/create_keystore/command/create_keystore/model/android_create_keystore_config_data.dart'; import 'package:impaktfull_cli/src/core/command/config/command_config.dart'; import 'package:impaktfull_cli/src/core/util/extensions/arg_result_extensions.dart'; class AndroidCreateKeyStoreCommandConfig extends CommandConfig { static const String _optionConfigName = 'configName'; - static const String _optionDNameFullName = 'dNameFullName'; - static const String _optionDNameOrganization = 'dNameOrganization'; - static const String _optionDNameOrganizationUnit = 'dNameOrganizationUnit'; - static const String _optionDNameCity = 'dNameCity'; - static const String _optionDNameState = 'dNameState'; - static const String _optionDNameCountry = 'dNameCountry'; + static const String _optionFullName = 'fullName'; + static const String _optionOrganization = 'organization'; + static const String _optionOrganizationUnit = 'organizationUnit'; + static const String _optionCity = 'city'; + static const String _optionState = 'state'; + static const String _optionCountry = 'country'; static const defaultSigningConfigNames = ['debug', 'release']; const AndroidCreateKeyStoreCommandConfig(); @@ -24,29 +24,29 @@ class AndroidCreateKeyStoreCommandConfig defaultsTo: defaultSigningConfigNames, ); argParser.addOption( - _optionDNameFullName, + _optionFullName, help: 'Certificate info: Your full name', mandatory: true, ); argParser.addOption( - _optionDNameOrganization, + _optionOrganization, help: 'Certificate info: Your organization name', mandatory: true, ); argParser.addOption( - _optionDNameOrganizationUnit, + _optionOrganizationUnit, help: 'Certificate info: Your organization unit name', ); argParser.addOption( - _optionDNameState, + _optionState, help: 'Certificate info: Your state name', ); argParser.addOption( - _optionDNameCity, + _optionCity, help: 'Certificate info: Your city name', ); argParser.addOption( - _optionDNameCountry, + _optionCountry, help: 'Certificate info: Your country name', mandatory: true, ); @@ -56,18 +56,17 @@ class AndroidCreateKeyStoreCommandConfig AndroidCreateKeyStoreConfigData parseResult(ArgResults? argResults) => AndroidCreateKeyStoreConfigData( configNames: argResults.getRequiredOption(_optionConfigName), - dNameFullName: argResults.getRequiredOptionOrAskInput( - _optionDNameFullName, 'Enter your Full Name'), - dNameOrganization: argResults.getRequiredOptionOrAskInput( - _optionDNameOrganization, 'Enter your Organization'), - dNameOrganizationUnit: argResults.getOptionOrAskInput( - _optionDNameOrganizationUnit, - 'Enter your Oranization Unit (optional)'), - dNameCity: argResults.getOptionOrAskInput( - _optionDNameCity, 'Enter your City (optional)'), - dNameState: argResults.getOptionOrAskInput( - _optionDNameState, 'Enter your State (optional)'), - dNameCountry: argResults.getRequiredOptionOrAskInput( - _optionDNameCountry, 'Enter the Country'), + fullName: argResults.getRequiredOptionOrAskInput( + _optionFullName, 'Enter your Full Name'), + organization: argResults.getRequiredOptionOrAskInput( + _optionOrganization, 'Enter your Organization'), + organizationUnit: argResults.getOptionOrAskInput( + _optionOrganizationUnit, 'Enter your Oranization Unit (optional)'), + city: argResults.getOptionOrAskInput( + _optionCity, 'Enter your City (optional)'), + state: argResults.getOptionOrAskInput( + _optionState, 'Enter your State (optional)'), + country: argResults.getRequiredOptionOrAskInput( + _optionCountry, 'Enter the Country'), ); } diff --git a/lib/src/integrations/android/create_keystore/command/create_keystore/model/android_create_keystore_config_data.dart b/lib/src/integrations/android/create_keystore/command/create_keystore/model/android_create_keystore_config_data.dart new file mode 100644 index 0000000..94d291d --- /dev/null +++ b/lib/src/integrations/android/create_keystore/command/create_keystore/model/android_create_keystore_config_data.dart @@ -0,0 +1,22 @@ +import 'package:impaktfull_cli/src/core/command/config/command_config.dart'; + +class AndroidCreateKeyStoreConfigData extends ConfigData { + final List configNames; + + final String? fullName; + final String? organization; + final String? organizationUnit; + final String? city; + final String? state; + final String? country; + + const AndroidCreateKeyStoreConfigData({ + required this.configNames, + required this.fullName, + required this.organization, + required this.organizationUnit, + required this.city, + required this.state, + required this.country, + }); +} diff --git a/lib/src/integrations/android/create_keystore/command/remove/model/android_create_keystore_config_data.dart b/lib/src/integrations/android/create_keystore/command/remove/model/android_create_keystore_config_data.dart deleted file mode 100644 index f55c2b6..0000000 --- a/lib/src/integrations/android/create_keystore/command/remove/model/android_create_keystore_config_data.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:impaktfull_cli/src/core/command/config/command_config.dart'; - -class AndroidCreateKeyStoreConfigData extends ConfigData { - final List configNames; - - final String? dNameFullName; - final String? dNameOrganization; - final String? dNameOrganizationUnit; - final String? dNameCity; - final String? dNameState; - final String? dNameCountry; - - const AndroidCreateKeyStoreConfigData({ - required this.configNames, - required this.dNameFullName, - required this.dNameOrganization, - required this.dNameOrganizationUnit, - required this.dNameCity, - required this.dNameState, - required this.dNameCountry, - }); -} diff --git a/lib/src/integrations/android/create_keystore/model/keystore_credentials.dart b/lib/src/integrations/android/create_keystore/model/keystore_credentials.dart index c4d3d64..0126cd4 100644 --- a/lib/src/integrations/android/create_keystore/model/keystore_credentials.dart +++ b/lib/src/integrations/android/create_keystore/model/keystore_credentials.dart @@ -8,34 +8,34 @@ class KeyStoreCredentials { final String keyAlias; final Secret password; - final String? dNameFullName; - final String? dNameOrganization; - final String? dNameOrganizationUnit; - final String? dNameCity; - final String? dNameState; - final String? dNameCountry; + final String? fullName; + final String? organization; + final String? organizationUnit; + final String? city; + final String? state; + final String? country; KeyStoreCredentials({ required this.name, required this.storeFile, required this.keyAlias, required this.password, - required this.dNameFullName, - required this.dNameOrganization, - required this.dNameOrganizationUnit, - required this.dNameCity, - required this.dNameState, - required this.dNameCountry, + required this.fullName, + required this.organization, + required this.organizationUnit, + required this.city, + required this.state, + required this.country, }); String? get dName { final dNameItems = [ - dNameFullName == null ? null : "cn=$dNameFullName", - dNameOrganization == null ? null : "o=$dNameOrganization", - dNameOrganizationUnit == null ? null : "ou=$dNameOrganizationUnit", - dNameCity == null ? null : "l=$dNameCity", - dNameState == null ? null : "st=$dNameState", - dNameCountry == null ? null : "c=$dNameCountry", + fullName == null ? null : "cn=$fullName", + organization == null ? null : "o=$organization", + organizationUnit == null ? null : "ou=$organizationUnit", + city == null ? null : "l=$city", + state == null ? null : "st=$state", + country == null ? null : "c=$country", ].whereType(); if (dNameItems.isEmpty) return null; return dNameItems.join(', '); diff --git a/lib/src/integrations/android/create_keystore/plugin/android_create_keystore_plugin.dart b/lib/src/integrations/android/create_keystore/plugin/android_create_keystore_plugin.dart index bc05e20..6eccab8 100644 --- a/lib/src/integrations/android/create_keystore/plugin/android_create_keystore_plugin.dart +++ b/lib/src/integrations/android/create_keystore/plugin/android_create_keystore_plugin.dart @@ -15,12 +15,12 @@ class AndroidCreateKeyStorePlugin extends ImpaktfullCliPlugin { Future createKeyStore({ required String name, - String? dNameFullName, - String? dNameOrganization, - String? dNameOrganizationUnit, - String? dNameCity, - String? dNameState, - String? dNameCountry, + String? fullName, + String? organization, + String? organizationUnit, + String? city, + String? state, + String? country, }) async { final alias = 'android'; final keystoreFile = File(join('android', 'keystore', '$name.keystore')); @@ -36,12 +36,12 @@ class AndroidCreateKeyStorePlugin extends ImpaktfullCliPlugin { storeFile: keystoreFile, password: Secret.random(), keyAlias: alias, - dNameFullName: dNameFullName, - dNameOrganization: dNameOrganization, - dNameOrganizationUnit: dNameOrganizationUnit, - dNameState: dNameState, - dNameCity: dNameCity, - dNameCountry: dNameCountry, + fullName: fullName, + organization: organization, + organizationUnit: organizationUnit, + state: state, + city: city, + country: country, ); await processRunner.runProcess([ 'keytool',