@cnbcool/mcp-server
Version:
CNB MCP Server. A comprehensive MCP server that provides seamless integration to the CNB's API(https://cnb.cool), offering a wide range of tools for repository management, pipelines operations and collaboration features
19 lines (18 loc) • 558 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createHeaders = createHeaders;
const getConfig_1 = require("../getConfig");
const cnb_1 = require("./cnb");
const baseURL = (0, getConfig_1.getBaseUrl)();
const timeout = 10000; // 客户端10秒超时
const CnbFetcher = new cnb_1.CnbRequest({
baseURL,
timeout
});
exports.default = CnbFetcher;
function createHeaders(token) {
return {
Authorization: `Bearer ${(0, getConfig_1.getToken)(token)}`,
Accept: 'application/vnd.cnb.api+json'
};
}