Pārlūkot izejas kodu

cliverse prompt fixes and new build

pull/5/head
pb pirms 3 gadiem
vecāks
revīzija
8745c0d6e3
3 mainītis faili ar 2491 papildinājumiem un 208 dzēšanām
  1. 12
    6
      cliverse.js
  2. 2478
    202
      i.js
  3. 1
    0
      package.json

+ 12
- 6
cliverse.js Parādīt failu

@@ -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
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 1
- 0
package.json Parādīt failu

@@ -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": {

Notiek ielāde…
Atcelt
Saglabāt