更新版本号至0.0.16,并简化CNBCore子类构造函数的参数传递
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kevisual/cnb",
|
||||
"version": "0.0.15",
|
||||
"version": "0.0.16",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -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`;
|
||||
|
||||
@@ -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`;
|
||||
|
||||
@@ -166,7 +166,7 @@ export type HeadRef = {
|
||||
*/
|
||||
export class Git extends CNBCore {
|
||||
constructor(options: CNBCoreOptions) {
|
||||
super({ token: options.token, cookie: options.cookie });
|
||||
super(options);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
/**
|
||||
* 创建代码仓库
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user