From a9c2290c594c689aa2f2e6dc9779d47b55b2af93 Mon Sep 17 00:00:00 2001 From: Ajaychoubey Date: Thu, 9 Jan 2020 18:02:11 +0530 Subject: [PATCH 1/7] Made changes --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index bb74340..ed37af1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # nodecloud-cli nodecloud-cli is an unified command line interface for open cloud based on [nodecloud](https://github.com/cloudlibz/nodecloud). nodecloud-cli supports cloud providers like AWS, Azure, GCP and many more. +It also allows using of emojis on cli ## 🚀 Install @@ -163,3 +164,4 @@ $ yarn test ## 📜 License MIT + From 803132bd143f1595bff1daa1ff842c52ea46b583 Mon Sep 17 00:00:00 2001 From: Rudra-Choubey <58510490+Rudra-Choubey@users.noreply.github.com> Date: Thu, 9 Jan 2020 18:03:00 +0530 Subject: [PATCH 2/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bb74340..865f78e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # nodecloud-cli nodecloud-cli is an unified command line interface for open cloud based on [nodecloud](https://github.com/cloudlibz/nodecloud). nodecloud-cli supports cloud providers like AWS, Azure, GCP and many more. - +Allows using of emojis in CLI ## 🚀 Install Using npm From 691ad13016257498126416dea556cf9f53dae952 Mon Sep 17 00:00:00 2001 From: Rudra-Choubey <58510490+Rudra-Choubey@users.noreply.github.com> Date: Thu, 9 Jan 2020 18:08:47 +0530 Subject: [PATCH 3/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 865f78e..bb74340 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # nodecloud-cli nodecloud-cli is an unified command line interface for open cloud based on [nodecloud](https://github.com/cloudlibz/nodecloud). nodecloud-cli supports cloud providers like AWS, Azure, GCP and many more. -Allows using of emojis in CLI + ## 🚀 Install Using npm From 70259d37c90eafba47b467c588ead5a955f654b1 Mon Sep 17 00:00:00 2001 From: Ajaychoubey Date: Thu, 9 Jan 2020 18:12:03 +0530 Subject: [PATCH 4/7] Made changes --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index ed37af1..32097d5 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # nodecloud-cli nodecloud-cli is an unified command line interface for open cloud based on [nodecloud](https://github.com/cloudlibz/nodecloud). nodecloud-cli supports cloud providers like AWS, Azure, GCP and many more. -It also allows using of emojis on cli - +Very Simple to Use ## 🚀 Install Using npm From 8b57d562d53080325014fa65802ab203d50cfa34 Mon Sep 17 00:00:00 2001 From: Ajaychoubey Date: Thu, 9 Jan 2020 18:14:28 +0530 Subject: [PATCH 5/7] Changed --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 32097d5..bcfb09f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # nodecloud-cli nodecloud-cli is an unified command line interface for open cloud based on [nodecloud](https://github.com/cloudlibz/nodecloud). nodecloud-cli supports cloud providers like AWS, Azure, GCP and many more. -Very Simple to Use +Very Simple to Use. ## 🚀 Install Using npm From b1eba5ef219d69fb4a72d93dbdce3d94e7e795a7 Mon Sep 17 00:00:00 2001 From: Ajaychoubey Date: Thu, 9 Jan 2020 18:25:13 +0530 Subject: [PATCH 6/7] Add a new feature in list --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index bcfb09f..697d70b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ nodecloud-cli is an unified command line interface for open cloud based on [nodecloud](https://github.com/cloudlibz/nodecloud). nodecloud-cli supports cloud providers like AWS, Azure, GCP and many more. Very Simple to Use. +Allows you to use emojis. ## 🚀 Install Using npm From baf58d775e7647b49665eda4fc8acfbf83638006 Mon Sep 17 00:00:00 2001 From: Ajaychoubey Date: Thu, 9 Jan 2020 20:59:57 +0530 Subject: [PATCH 7/7] Added Emojis --- lib/compute.js | 4 +++- lib/config.js | 2 +- lib/database.js | 3 ++- lib/iam.js | 7 ++++--- lib/init.js | 13 +++++++------ lib/network.js | 9 +++++---- lib/storage.js | 3 ++- 7 files changed, 24 insertions(+), 17 deletions(-) diff --git a/lib/compute.js b/lib/compute.js index d19446a..0634cd8 100644 --- a/lib/compute.js +++ b/lib/compute.js @@ -1,3 +1,4 @@ + class Compute { constructor(program, ncProviders, options) { if (program.type == "AWS" || "aws") { @@ -7,7 +8,8 @@ class Compute { } else if (program.type == "Azure") { this._compute = ncProviders.azure.compute(options); } else { - throw new Error("Please specify a provider by flag -p --provider"); + const emoji = require("node-emoji"); + throw new Error(emoji.get("x")+" Please specify a provider by flag -p --provider"); } } diff --git a/lib/config.js b/lib/config.js index 4fb1fcf..a35b705 100644 --- a/lib/config.js +++ b/lib/config.js @@ -6,7 +6,7 @@ const { exec } = require("child_process"); function installDependencies(path, cb) { exec(`cd ${path} && npm install`, (error, stdout, stderr) => { if (error) { - console.log("error", error); + console.log(emoji.get("x"), " ","error", error); cb(error, null); } cb(null, true); diff --git a/lib/database.js b/lib/database.js index 633f832..d3a02b0 100644 --- a/lib/database.js +++ b/lib/database.js @@ -7,7 +7,8 @@ class Database { } else if (program.type == "Azure" || "azure") { this._database = nodecloud.azure.compute(options); } else { - throw new Error("Please specify a provider by flag -p --provider"); + const emoji = require("node-emoji"); + throw new Error(emoji.get("x")+" Please specify a provider by flag -p --provider"); } } diff --git a/lib/iam.js b/lib/iam.js index 09e9f1a..eae8a9b 100644 --- a/lib/iam.js +++ b/lib/iam.js @@ -1,19 +1,20 @@ class Iam { constructor(program, nodecloud, options) { + const emoji = require("node-emoji"); if (program.type == "AWS" || "aws") { this._iam = nodecloud.aws.iam(options); } else if (program.type == "GCP") { throw new Error( - "Identity & Access Management (IAM) for GCP is not available" + emoji.get("x")+" Identity & Access Management (IAM) for GCP is not available" ); // this._iam = nodecloud.gcp.iam(options); } else if (program.type == "Azure") { //this._iam = nodecloud.azure.iam(options); throw new Error( - "Identity & Access Management (IAM) for Azure is not available" + emoji.get("x")+" Identity & Access Management (IAM) for Azure is not available" ); } else { - throw new Error("Please specify a provider by flag -p --provider"); + throw new Error(emoji.get("x")+" Please specify a provider by flag -p --provider"); } } diff --git a/lib/init.js b/lib/init.js index 39efc5a..8fb4793 100644 --- a/lib/init.js +++ b/lib/init.js @@ -68,23 +68,24 @@ class Init { let instance = this; let data = ` const ${providers.require} = require('${providers.package}'); - + const providers = [ ${providers.provider} ]; - + module.exports = providers; `; instance .writeFile(data) .then(function(response) { + const emoji = require("node-emoji"); if (response.state) { if (response.exists) { instance._spinner.warn("Configuration file exist"); } else { instance._spinner.succeed( - "Configuration file generated successfully" + emoji.get("tada")+" Configuration file generated successfully" ); } instance @@ -92,11 +93,11 @@ class Init { .then(status => { if (!status) { instance._spinner.fail( - `Installing package ${providers.package} failed` + `${emoji.get("x")} Installing package ${providers.package} failed` ); } instance._spinner.succeed( - `Installed ${providers.package} successfully` + `${emoji.get("tada")} Installed ${providers.package} successfully` ); }) .catch(err => { @@ -105,7 +106,7 @@ class Init { } }) .catch(function(err) { - instance._spinner.fail("Configuration file generation Failed"); + instance._spinner.fail(emoji.get("x")+" Configuration file generation Failed"); }); } diff --git a/lib/network.js b/lib/network.js index c5a8ea7..ef3e9b1 100644 --- a/lib/network.js +++ b/lib/network.js @@ -1,5 +1,6 @@ class Network { constructor(program, nodecloud, options) { + const emoji = require("node-emoji"); this._program = program; if (program.type == "AWS" || "aws") { if (program.service === "dns") { @@ -7,20 +8,20 @@ class Network { } else if (program.service === "lb") { this._network = nodecloud.aws.loadbalancer(options); } else { - throw new Error("Please select a service type"); + throw new Error(emoji.get("x")+" Please select a service type"); } } else if (program.type == "GCP" || "gcp") { if (program.service == "dns") { this._network = nodecloud.gcp.dns(options); } else { - throw new Error("Please select a service type"); + throw new Error(emoji.get("x")+" Please select a service type"); } throw new Error("Network for GCP is not available"); } else if (program.type == "Azure" || "azure") { //this._network = nodecloud.azure.network(options); - throw new Error("Network for Azure is not available"); + throw new Error(emoji.get("x")+" Network for Azure is not available"); } else { - throw new Error("Please specify a provider by flag -p --provider"); + throw new Error(emoji.get("x")+" Please specify a provider by flag -p --provider"); } } diff --git a/lib/storage.js b/lib/storage.js index f220a6d..3e7aa8c 100644 --- a/lib/storage.js +++ b/lib/storage.js @@ -1,5 +1,6 @@ class Storage { constructor(program, nodecloud, options) { + const emoji = require("node-emoji"); this._program = program; if (program.type == "AWS" || "aws") { this._storage = nodecloud.aws.bucket(options); @@ -8,7 +9,7 @@ class Storage { } else if (program.type == "Azure" || "azure") { this._storage = nodecloud.azure.blob(options); } else { - throw new Error("Please specify a provider by flag -p --provider"); + throw new Error(emoji.get("x")+" Please specify a provider by flag -p --provider"); } }