更新版本号至0.0.21,注释掉调试日志并为Workspace类的branch参数设置默认值为'main'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kevisual/cnb",
|
||||
"version": "0.0.20",
|
||||
"version": "0.0.21",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -79,7 +79,7 @@ export class CNBCore {
|
||||
}
|
||||
delete _headers.Authorization;
|
||||
}
|
||||
console.log('Request URL:', url, data, _headers);
|
||||
// console.log('Request URL:', url, data, _headers);
|
||||
const response = await fetch(url || '', {
|
||||
method,
|
||||
headers: _headers,
|
||||
@@ -115,7 +115,7 @@ export class CNBCore {
|
||||
if (url && url.startsWith('http')) {
|
||||
return url;
|
||||
}
|
||||
console.log('url', url, this.baseURL)
|
||||
// console.log('url', url, this.baseURL)
|
||||
if (url.startsWith('/')) {
|
||||
return this.baseURL + url;
|
||||
}
|
||||
|
||||
@@ -115,6 +115,8 @@ export class Workspace extends CNBCore {
|
||||
|
||||
if (params.branch) {
|
||||
data.branch = params.branch;
|
||||
} else {
|
||||
data.branch = 'main'
|
||||
}
|
||||
if (params.ref) {
|
||||
data.ref = params.ref;
|
||||
|
||||
Reference in New Issue
Block a user