更新版本号至0.0.18,优化构建脚本,更新@types/node依赖至25.2.1,并重构CNBCore类以提高可读性
This commit is contained in:
@@ -2,7 +2,14 @@ import { Issue } from "../src/issue/index.ts";
|
||||
|
||||
import { token, showMore, cookie } from "./common.ts";
|
||||
// group: "kevisual",
|
||||
const issue = new Issue({ token: token, cookie: cookie });
|
||||
const issue = new Issue({
|
||||
token: token, cookie: cookie,
|
||||
cors: {
|
||||
// baseUrl: 'http://localhost:8080'
|
||||
// baseUrl: 'https://cors.kevisual.cn'
|
||||
baseUrl: 'http://cors.kevisual.cn:11111'
|
||||
}
|
||||
});
|
||||
// const res = await issue.createIssue("cnb", {
|
||||
// title: "测试通过 API 创建 Issue",
|
||||
// })
|
||||
@@ -16,13 +23,13 @@ const issue = new Issue({ token: token, cookie: cookie });
|
||||
// });
|
||||
// console.log(showMore(updateIssueRes));
|
||||
|
||||
const itemIssueRes = await issue.getItem("cnb", 1);
|
||||
console.log(showMore(itemIssueRes));
|
||||
// const itemIssueRes = await issue.getItem("cnb", 1);
|
||||
// console.log(showMore(itemIssueRes));
|
||||
|
||||
const listIssueRes = await issue.getList("cnb", {
|
||||
const listIssueRes = await issue.getList("kevisual/kevisual", {
|
||||
state: "open",
|
||||
});
|
||||
console.log(showMore(listIssueRes));
|
||||
|
||||
const commentListRes = await issue.getCommentList("cnb", 1);
|
||||
console.log(showMore(commentListRes));
|
||||
// const commentListRes = await issue.getCommentList("kevisual/kevisual", 1);
|
||||
// console.log(showMore(commentListRes));
|
||||
Reference in New Issue
Block a user