Sfoglia il codice sorgente

cliverse prompt fixes and new build

pull/5/head
pb 3 anni fa
parent
commit
8745c0d6e3
3 ha cambiato i file con 2491 aggiunte e 208 eliminazioni
  1. 12
    6
      cliverse.js
  2. 2478
    202
      i.js
  3. 1
    0
      package.json

+ 12
- 6
cliverse.js Vedi File

@@ -76,13 +76,19 @@ const readline = require("readline");
var cli = {
nodeShellExec
, 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
}

+ 2478
- 202
i.js
File diff soppresso perché troppo grande
Vedi File


+ 1
- 0
package.json Vedi File

@@ -19,6 +19,7 @@
"crossfilter2": "^1.5.4",
"chalk": "^4.1.0",
"glob": "^7.1.2",
"uuid": "^8.3.2",
"tree-kill": "^1.2.2"
},
"bin": {

Loading…
Annulla
Salva