Skip to content

Commit be477ec

Browse files
committed
removed logs and unused deps
1 parent 3b0fe2b commit be477ec

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

cmds/new.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ module.exports = (args, db) => {
2525

2626
switch (new_type) {
2727
case 'request':
28-
console.log('New request flow');
2928
newRequest(db);
3029
break;
3130
case 'collection':
32-
console.log('New collection flow');
3331
newCollection(db);
3432
break;
3533
default:
@@ -52,7 +50,9 @@ async function newCollection(db) {
5250
if (db.getCollection(collectionName)) {
5351
outputCollectionExists();
5452
} else {
55-
db.addCollection(collectionName); // adding new collection if doesn't exist
53+
if (collectionName) {
54+
db.addCollection(collectionName); // adding new collection if doesn't exist
55+
}
5656
}
5757
proceed = await askAddNewRequest(collectionName);
5858
if (!proceed) {

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"author": "",
1313
"license": "ISC",
1414
"dependencies": {
15-
"async": "^2.6.1",
1615
"chalk": "^2.4.1",
1716
"cli-table2": "^0.2.0",
1817
"commander": "^2.19.0",

prompts/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const prompts = require('prompts');
22

33
let onCancel = () => {
44
console.log('See you next time ✌️');
5-
return true;
5+
return false;
66
}
77

88
const askCollectionName = async () => {
@@ -18,7 +18,7 @@ async function askRequestInfo(collectionName) {
1818
let questions = [{
1919
type: 'text',
2020
name: 'cx_result',
21-
message: 'Enter complete request (without cx or curl in front). Eg: -X GET https://httpbin.org/get'
21+
message: 'Enter complete request eg: cx -X GET https://httpbin.org/get'
2222
},
2323
{
2424
type: prev => (prev.length > 0) ? 'text' : null,

0 commit comments

Comments
 (0)