Browse Source

cliverse prompt fixes and new build

production
pb 3 years ago
parent
commit
8745c0d6e3
3 changed files with 2491 additions and 208 deletions
  1. 12
    6
      cliverse.js
  2. 2478
    202
      i.js
  3. 1
    0
      package.json

+ 12
- 6
cliverse.js View File

var cli = { var cli = {
nodeShellExec nodeShellExec
, get prompter() { , get prompter() {
const clii = readline.createInterface({ input: process.stdin, output: process.stdout });
clii.ask = function(q){
return new Promise((resolve, reject)=>{
clii.question(q, (answer)=>{ resolve(answer) })
})
var prompt_interface = {
ask : function(q){
// Needs to be serialized. Parallel asks are not possible.
const clii = readline.createInterface({ input: process.stdin, output: process.stdout });
return new Promise((resolve, reject)=>{
clii.question(q, (answer)=>{
clii.close();
resolve(answer)
})
})
}
} }
return clii
return prompt_interface
} }
, prompt , prompt
} }

+ 2478
- 202
i.js
File diff suppressed because it is too large
View File


+ 1
- 0
package.json View File

"crossfilter2": "^1.5.4", "crossfilter2": "^1.5.4",
"chalk": "^4.1.0", "chalk": "^4.1.0",
"glob": "^7.1.2", "glob": "^7.1.2",
"uuid": "^8.3.2",
"tree-kill": "^1.2.2" "tree-kill": "^1.2.2"
}, },
"bin": { "bin": {

Loading…
Cancel
Save