浏览代码

cliverse prompt fixes and new build

pull/5/head
pb 3 年前
父节点
当前提交
8745c0d6e3
共有 3 个文件被更改,包括 2491 次插入208 次删除
  1. 12
    6
      cliverse.js
  2. 2478
    202
      i.js
  3. 1
    0
      package.json

+ 12
- 6
cliverse.js 查看文件

@@ -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
文件差异内容过多而无法显示
查看文件


+ 1
- 0
package.json 查看文件

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

正在加载...
取消
保存