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