do-you-bench
Advanced tools
Comparing version 1.0.4 to 1.1.1
#!/usr/bin/env node | ||
const { promptQuestion, collectInput } = require("./src/consolePrompter") | ||
const { promptQuestion } = require("./src/consolePrompter") | ||
const { executeShell } = require("./src/execute") | ||
@@ -7,3 +7,3 @@ const chalk = require("chalk") | ||
const colors = require("colors") | ||
const topics = require("./config/topics") | ||
const prompts = require("./config/prompts") | ||
@@ -31,4 +31,4 @@ const init = () => { | ||
const questions = collectInput(topics) | ||
const executables = await promptQuestion(questions) | ||
const executables = await promptQuestion(prompts) | ||
console.log(executables) | ||
executeShell(executables) | ||
@@ -35,0 +35,0 @@ } |
{ | ||
"name": "do-you-bench", | ||
"version": "1.0.4", | ||
"version": "1.1.1", | ||
"description": "Simple interactive http[s] benchmarking tool", | ||
@@ -5,0 +5,0 @@ "main": "cli.js", |
@@ -14,3 +14,3 @@ <div align="center"> | ||
> Simple recommended fields checker for your package.json | ||
> Simple interactive http[s] benchmarking tool | ||
@@ -23,2 +23,3 @@ ## Contents | ||
- [Usage](#usage) | ||
- [Methods](#methods) | ||
- [Contribute](#contribute) | ||
@@ -43,3 +44,8 @@ - [License](#license) | ||
## Methods | ||
- [x] GET | ||
- [ ] POST | ||
## Contribute | ||
@@ -46,0 +52,0 @@ |
@@ -7,26 +7,4 @@ const inquirer = require("inquirer") | ||
const collectInput = (input = []) => { | ||
const blueprint = { | ||
type: "input", | ||
validate: function(val) { | ||
if (val.length) { | ||
return true | ||
} else { | ||
return "Please provide a valid input" | ||
} | ||
} | ||
} | ||
return input.map(topic => { | ||
return { | ||
...blueprint, | ||
name: topic.toLowerCase(), | ||
message: `${topic}: ` | ||
} | ||
}) | ||
} | ||
module.exports = { | ||
promptQuestion, | ||
collectInput | ||
promptQuestion | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1922370
85
62