Skip to content

Commit a384626

Browse files
authored
Merge pull request #11 from aliyun/release_v1
Release v1
2 parents c8018c4 + c5f801a commit a384626

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "alibabacloud-dataworks-mcp-server",
3-
"version": "1.0.41",
3+
"version": "1.0.43",
44
"description": "DataWorks MCP Server: Export the DataWorks Open API to MCP Server, allowing clients that can run MCP Server to use DataWorks Open API through AI.",
55
"main": "build/index.js",
66
"module": "build/index.js",

src/openApiClient/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class OpenApiClient {
5555
const endpoint = process.env.OPEN_API_ENDPOINT || (`dataworks${isPre ? '-pre' : ''}.${regionId ? `${regionId}.` : ''}aliyuncs.com`);
5656
apiConfig.endpoint = endpoint;
5757

58+
// timeout 设定 https://github.com/aliyun/credentials-nodejs/blob/0bd0925b18e0cb831a3bc824d5f87a51e688e452/src/providers/uri.ts#L77
5859

5960
// 使用特定方式调用
6061
// import DataWorksPublic20240518 from '@alicloud/dataworks-public20240518';

src/tools/callTool.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ async function callTool(
126126
if (['GET', 'DELETE'].includes(method || '')) body = null;
127127

128128
const request = new OpenApi.OpenApiRequest({ query, body });
129-
const runtime = new Util.RuntimeOptions({});
129+
// runtime default settings https://github.com/aliyun/tea-util/blob/5f4bdebef3b57d33207b6bc44af6ed5e1a009959/ts/test/client.spec.ts#L133
130+
const runtime = new Util.RuntimeOptions({
131+
readTimeout: process.env.OPEN_API_READ_TIMEOUT ? Number(process.env.OPEN_API_READ_TIMEOUT) : 10000,
132+
connectTimeout: process.env.OPEN_API_CONNECT_TIMEOUT ? Number(process.env.OPEN_API_CONNECT_TIMEOUT) : 10000,
133+
});
130134
// 查看 https://github.com/aliyun/darabonba-openapi/blob/master/ts/src/client.ts
131135
const res = await (agent as any)?.callApi?.(apiRequestConfigs, request, runtime);
132136
let result: IAlibabaCloudOpenApiJsonResponse['body'] | null = null;

0 commit comments

Comments
 (0)