Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ $ yarn install
$ yarn test
```

## Output Color Key

**Success -** Green Background, White Text ✅
**Warning -** Yellow Background, White Text ⚠️
**Error -** Red Background, White Text 🛑
**General -** White Background, Black Text ❕

## 📜 License

MIT
6 changes: 3 additions & 3 deletions lib/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ let logofied = text => {
*/
let logger = (data, error) => {
if (error) {
console.log(chalk.red(`${JSON.stringify(data, null, 2)}`));
console.log(chalk.bgRed(chalk.white(`${JSON.stringify(data, null, 2)}`)));
} else {
console.log(chalk.green(`${JSON.stringify(data, null, 2)}`));
console.log(chalk.bgWhite(chalk.black(`${JSON.stringify(data, null, 2)}`)));
}
};

Expand Down Expand Up @@ -117,4 +117,4 @@ module.exports = {
writeMetaData: writeMetaData,
logger: logger,
logofied: logofied
};
};
23 changes: 17 additions & 6 deletions lib/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const Storage = require("./storage");
const Iam = require("./iam");
const Database = require("./database");
const Network = require("./network");
const chalk = require("chalk");
let core = null;
let ncProviders = null;

Expand Down Expand Up @@ -114,7 +115,9 @@ function Services(program, spinner) {
break;

default:
throw new Error("Please select a valid command for Compute");
throw new Error(
chalk.bgRed(chalk.white("Please select a valid command for Compute"))
);
break;
}
}
Expand Down Expand Up @@ -164,7 +167,9 @@ function Services(program, spinner) {
break;

default:
throw new Error("Please select a valid command for Storage");
throw new Error(
chalk.bgRed(chalk.white("Please select a valid command for Storage"))
);
break;
}
}
Expand Down Expand Up @@ -206,7 +211,9 @@ function Services(program, spinner) {
break;

default:
throw new Error("Please select a valid command for Database");
throw new Error(
chalk.bgRed(chalk.white("Please select a valid command for Database"))
);
break;
}
}
Expand Down Expand Up @@ -270,7 +277,9 @@ function Services(program, spinner) {
break;

default:
throw new Error("Please select a valid command for IAM");
throw new Error(
chalk.bgRed(chalk.white("Please select a valid command for IAM"))
);
break;
}
}
Expand Down Expand Up @@ -397,10 +406,12 @@ function Services(program, spinner) {
});
break;
default:
throw new Error("Please select a valid command for Database");
throw new Error(
chalk.bgRed(chalk.white("Please select a valid command for Database"))
);
break;
}
}
}

module.exports = Services;
module.exports = Services;