Skip to content

Commit d6abb5e

Browse files
authored
Merge pull request #196 from ccagml/main
2.17.7
2 parents 1ce3176 + d341b2f commit d6abb5e

File tree

5 files changed

+40
-31
lines changed

5 files changed

+40
-31
lines changed

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,10 @@
1313
"*.gafq": "lua",
1414
"functional": "cpp"
1515
},
16+
"leetcode-problem-rating.filePath": {
17+
"default": {
18+
"folder": "",
19+
"filename": "${id}.${kebab-case-name}_${yyyymmdd}.${ext}"
20+
}
21+
},
1622
}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## version 2.17.7
2+
3+
- filepath 格式可以保存在工作区,避免每次新环境还要配文件名
4+
15
## version 2.17.6
26

37
- 最新的题通过后没有百分比运行信息

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-leetcode-problem-rating",
33
"displayName": "LeetCode",
44
"description": "%main.description%",
5-
"version": "2.17.6",
5+
"version": "2.17.7",
66
"author": "ccagml",
77
"publisher": "ccagml",
88
"license": "MIT",
@@ -767,7 +767,6 @@
767767
},
768768
"leetcode-problem-rating.filePath": {
769769
"type": "object",
770-
"scope": "machine",
771770
"description": "%main.contributes.configuration.properties.leetcode-problem-rating.filePath.description%",
772771
"properties": {
773772
"default": {

src/rpc/factory/api/testApi.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { reply } from "../../utils/ReplyUtils";
1515

1616
import { sessionUtils } from "../../utils/sessionUtils";
1717
import { ApiBase } from "../apiBase";
18-
import { commUtils } from "../../utils/commUtils";
18+
// import { commUtils } from "../../utils/commUtils";
1919
import { chainMgr } from "../../actionChain/chainManager";
2020

2121
class TestApi extends ApiBase {
@@ -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)