apipost-mcp-server-simple 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/apipost-client.js +3 -3
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/apipost-client.js
CHANGED
|
@@ -27,7 +27,7 @@ export class ApipostClient {
|
|
|
27
27
|
async loadDefinition() {
|
|
28
28
|
if (this.openApiUrl) {
|
|
29
29
|
try {
|
|
30
|
-
console.error(`正在从 URL 获取 OpenAPI 定义: ${this.openApiUrl}...`);
|
|
30
|
+
// console.error(`正在从 URL 获取 OpenAPI 定义: ${this.openApiUrl}...`);
|
|
31
31
|
const response = await axios.get(this.openApiUrl);
|
|
32
32
|
// 显式断言类型
|
|
33
33
|
this.spec = response.data;
|
|
@@ -38,7 +38,7 @@ export class ApipostClient {
|
|
|
38
38
|
}
|
|
39
39
|
else if (this.openApiFilePath) {
|
|
40
40
|
try {
|
|
41
|
-
console.error(`正在从文件读取 OpenAPI 定义: ${this.openApiFilePath}...`);
|
|
41
|
+
// console.error(`正在从文件读取 OpenAPI 定义: ${this.openApiFilePath}...`);
|
|
42
42
|
const content = await fs.readFile(this.openApiFilePath, 'utf-8');
|
|
43
43
|
this.spec = JSON.parse(content);
|
|
44
44
|
}
|
|
@@ -103,7 +103,7 @@ export class ApipostClient {
|
|
|
103
103
|
}
|
|
104
104
|
const baseUrl = this.getBaseUrl();
|
|
105
105
|
const url = `${baseUrl}${path}`;
|
|
106
|
-
console.error(`正在执行 API: ${method} ${url}`);
|
|
106
|
+
// console.error(`正在执行 API: ${method} ${url}`);
|
|
107
107
|
try {
|
|
108
108
|
const response = await axios({
|
|
109
109
|
method: method,
|
package/dist/index.js
CHANGED
|
@@ -84,14 +84,14 @@ async function main() {
|
|
|
84
84
|
try {
|
|
85
85
|
// 启动时预加载以验证配置
|
|
86
86
|
await client.loadDefinition();
|
|
87
|
-
console.error(`成功加载 OpenAPI 定义,包含 ${client.getApiList().length} 个 API。`);
|
|
87
|
+
// console.error(`成功加载 OpenAPI 定义,包含 ${client.getApiList().length} 个 API。`);
|
|
88
88
|
}
|
|
89
89
|
catch (e) {
|
|
90
90
|
console.error(`警告: 启动时加载 OpenAPI 定义失败: ${e.message}`);
|
|
91
91
|
}
|
|
92
92
|
const transport = new StdioServerTransport();
|
|
93
93
|
await server.connect(transport);
|
|
94
|
-
console.error("Apipost MCP Server Simple 正在通过 stdio 运行");
|
|
94
|
+
// console.error("Apipost MCP Server Simple 正在通过 stdio 运行");
|
|
95
95
|
}
|
|
96
96
|
main().catch((error) => {
|
|
97
97
|
console.error("main() 发生致命错误:", error);
|