更新版本号至0.0.16,并简化CNBCore子类构造函数的参数传递

This commit is contained in:
2026-02-05 19:49:21 +08:00
parent ed6a9c5bbc
commit 388af1cd55
9 changed files with 9 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@kevisual/cnb",
"version": "0.0.15",
"version": "0.0.16",
"description": "",
"main": "index.js",
"scripts": {

View File

@@ -3,7 +3,7 @@ import { CNBCore, CNBCoreOptions, RequestOptions, Result } from "../cnb-core.ts"
class AiBase extends CNBCore {
group: string;
constructor(options: CNBCoreOptions) {
super({ token: options.token, cookie: options.cookie });
super(options);
}
autoPr(repo: string, data: { body: string, branch?: string, title: string }): Promise<Result<any>> {
const url = `/${repo}/-/build/ai/auto-pr`;

View File

@@ -3,7 +3,7 @@ import { CNBCore, CNBCoreOptions, RequestOptions, Result } from "../cnb-core.ts"
export class Build extends CNBCore {
constructor(options: CNBCoreOptions ) {
super({ token: options.token, cookie: options.cookie });
super(options);
}
startBuild(repo: string, data: StartBuildData): Promise<any> {
const url = `/${repo}/-/build/start`;

View File

@@ -166,7 +166,7 @@ export type HeadRef = {
*/
export class Git extends CNBCore {
constructor(options: CNBCoreOptions) {
super({ token: options.token, cookie: options.cookie });
super(options);
}
/**

View File

@@ -38,7 +38,7 @@ export type IssueItem = {
};
export class Issue extends CNBCore {
constructor(options: CNBCoreOptions) {
super({ token: options.token, cookie: options.cookie });
super(options);
}
createIssue(repo: string, data: Partial<IssueItem>): Promise<any> {

View File

@@ -2,7 +2,7 @@ import { CNBCore, CNBCoreOptions, Result } from "../cnb-core.ts";
export class KnowledgeBase extends CNBCore {
constructor(options: CNBCoreOptions) {
super({ token: options.token, cookie: options.cookie });
super(options);
}
queryKnowledgeBase(repo: string, data: {

View File

@@ -2,7 +2,7 @@ import { CNBCore, CNBCoreOptions, RequestOptions, Result } from "../cnb-core.ts"
export class Mission extends CNBCore {
constructor(options: CNBCoreOptions) {
super({ token: options.token, cookie: options.cookie });
super(options);
}
/**

View File

@@ -2,7 +2,7 @@ import { CNBCore, CNBCoreOptions, RequestOptions, Result } from "../cnb-core.ts"
export class Repo extends CNBCore {
constructor(options: CNBCoreOptions) {
super({ token: options.token, cookie: options.cookie });
super(options);
}
/**
* 创建代码仓库

View File

@@ -2,7 +2,7 @@ import { CNBCore, CNBCoreOptions } from "../cnb-core.ts";
import { Result } from "@kevisual/query";
export class User extends CNBCore {
constructor(options: CNBCoreOptions<{}>) {
super({ token: options.token, cookie: options.cookie });
super(options);
}
/**