Skip to content

Commit a58ef69

Browse files
committed
删除 控制台读取参数
1 parent 265cb35 commit a58ef69

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

src/rpc/factory/api/testApi.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,12 @@ class TestApi extends ApiBase {
188188
sessionUtils.argv = argv;
189189
if (!argv.i) return that.runTest(argv);
190190

191-
commUtils.readStdin(function (e, data) {
192-
if (e) return reply.info(e);
191+
// commUtils.readStdin(function (e, data) {
192+
// if (e) return reply.info(e);
193193

194-
argv.testcase = data;
195-
return that.runTest(argv);
196-
});
194+
// argv.testcase = data;
195+
// return that.runTest(argv);
196+
// });
197197
}
198198
}
199199

src/rpc/utils/commUtils.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (c) 2022 ccagml . All rights reserved.
88
*/
99

10-
import { storageUtils } from "./storageUtils";
10+
// import { storageUtils } from "./storageUtils";
1111

1212
class CommUtils {
1313
KEYS;
@@ -36,30 +36,30 @@ class CommUtils {
3636
}
3737
}
3838

39-
readStdin(cb) {
40-
const stdin = process.stdin;
41-
let bufs: Array<any> = [];
39+
// readStdin(cb) {
40+
// const stdin = process.stdin;
41+
// let bufs: Array<any> = [];
4242

43-
console.log(
44-
"NOTE: to finish the input, press " + (storageUtils.isWindows() ? "<Ctrl-D> and <Return>" : "<Ctrl-D>")
45-
);
43+
// console.log(
44+
// "NOTE: to finish the input, press " + (storageUtils.isWindows() ? "<Ctrl-D> and <Return>" : "<Ctrl-D>")
45+
// );
4646

47-
stdin.on("readable", function () {
48-
const data = stdin.read();
49-
if (data) {
50-
// windows doesn't treat ctrl-D as EOF
51-
if (storageUtils.isWindows() && data.toString() === "\x04\r\n") {
52-
stdin.emit("end");
53-
} else {
54-
bufs.push(data);
55-
}
56-
}
57-
});
58-
stdin.on("end", function () {
59-
cb(null, Buffer.concat(bufs).toString());
60-
});
61-
stdin.on("error", cb);
62-
}
47+
// stdin.on("readable", function () {
48+
// const data = stdin.read();
49+
// if (data) {
50+
// // windows doesn't treat ctrl-D as EOF
51+
// if (storageUtils.isWindows() && data.toString() === "\x04\r\n") {
52+
// stdin.emit("end");
53+
// } else {
54+
// bufs.push(data);
55+
// }
56+
// }
57+
// });
58+
// stdin.on("end", function () {
59+
// cb(null, Buffer.concat(bufs).toString());
60+
// });
61+
// stdin.on("error", cb);
62+
// }
6363

6464
getSetCookieValue(resp: any, key: any) {
6565
const cookies = resp.headers["set-cookie"];

0 commit comments

Comments
 (0)