diff --git a/.vscode/settings.json b/.vscode/settings.json index fc1c2f7..80c0026 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,4 +13,10 @@ "*.gafq": "lua", "functional": "cpp" }, + "leetcode-problem-rating.filePath": { + "default": { + "folder": "", + "filename": "${id}.${kebab-case-name}_${yyyymmdd}.${ext}" + } + }, } diff --git a/CHANGELOG.md b/CHANGELOG.md index 11b976e..2ad51fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## version 2.17.7 + +- filepath 格式可以保存在工作区,避免每次新环境还要配文件名 + ## version 2.17.6 - 最新的题通过后没有百分比运行信息 diff --git a/package.json b/package.json index a3c021d..781a71c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-leetcode-problem-rating", "displayName": "LeetCode", "description": "%main.description%", - "version": "2.17.6", + "version": "2.17.7", "author": "ccagml", "publisher": "ccagml", "license": "MIT", @@ -767,7 +767,6 @@ }, "leetcode-problem-rating.filePath": { "type": "object", - "scope": "machine", "description": "%main.contributes.configuration.properties.leetcode-problem-rating.filePath.description%", "properties": { "default": { diff --git a/src/rpc/factory/api/testApi.ts b/src/rpc/factory/api/testApi.ts index 0704633..5a5c3ab 100644 --- a/src/rpc/factory/api/testApi.ts +++ b/src/rpc/factory/api/testApi.ts @@ -15,7 +15,7 @@ import { reply } from "../../utils/ReplyUtils"; import { sessionUtils } from "../../utils/sessionUtils"; import { ApiBase } from "../apiBase"; -import { commUtils } from "../../utils/commUtils"; +// import { commUtils } from "../../utils/commUtils"; import { chainMgr } from "../../actionChain/chainManager"; class TestApi extends ApiBase { @@ -188,12 +188,12 @@ class TestApi extends ApiBase { sessionUtils.argv = argv; if (!argv.i) return that.runTest(argv); - commUtils.readStdin(function (e, data) { - if (e) return reply.info(e); + // commUtils.readStdin(function (e, data) { + // if (e) return reply.info(e); - argv.testcase = data; - return that.runTest(argv); - }); + // argv.testcase = data; + // return that.runTest(argv); + // }); } } diff --git a/src/rpc/utils/commUtils.ts b/src/rpc/utils/commUtils.ts index ed9d509..4c2fd2e 100644 --- a/src/rpc/utils/commUtils.ts +++ b/src/rpc/utils/commUtils.ts @@ -7,7 +7,7 @@ * Copyright (c) 2022 ccagml . All rights reserved. */ -import { storageUtils } from "./storageUtils"; +// import { storageUtils } from "./storageUtils"; class CommUtils { KEYS; @@ -36,30 +36,30 @@ class CommUtils { } } - readStdin(cb) { - const stdin = process.stdin; - let bufs: Array = []; + // readStdin(cb) { + // const stdin = process.stdin; + // let bufs: Array = []; - console.log( - "NOTE: to finish the input, press " + (storageUtils.isWindows() ? " and " : "") - ); + // console.log( + // "NOTE: to finish the input, press " + (storageUtils.isWindows() ? " and " : "") + // ); - stdin.on("readable", function () { - const data = stdin.read(); - if (data) { - // windows doesn't treat ctrl-D as EOF - if (storageUtils.isWindows() && data.toString() === "\x04\r\n") { - stdin.emit("end"); - } else { - bufs.push(data); - } - } - }); - stdin.on("end", function () { - cb(null, Buffer.concat(bufs).toString()); - }); - stdin.on("error", cb); - } + // stdin.on("readable", function () { + // const data = stdin.read(); + // if (data) { + // // windows doesn't treat ctrl-D as EOF + // if (storageUtils.isWindows() && data.toString() === "\x04\r\n") { + // stdin.emit("end"); + // } else { + // bufs.push(data); + // } + // } + // }); + // stdin.on("end", function () { + // cb(null, Buffer.concat(bufs).toString()); + // }); + // stdin.on("error", cb); + // } getSetCookieValue(resp: any, key: any) { const cookies = resp.headers["set-cookie"];