@chen0825/aiapp-ability 0.1.0 → 0.1.2
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/lib/abilities/dingtalk/index.d.ts +92 -0
- package/lib/abilities/dingtalk/index.js +242 -0
- package/{src/abilities/index.ts → lib/abilities/index.d.ts} +0 -1
- package/lib/abilities/index.js +21 -0
- package/lib/abilities/registry.d.ts +69 -0
- package/lib/abilities/registry.js +111 -0
- package/lib/core/environment.d.ts +47 -0
- package/lib/core/environment.js +51 -0
- package/lib/core/http-client.d.ts +16 -0
- package/lib/core/http-client.js +77 -0
- package/{src/core/index.ts → lib/core/index.d.ts} +0 -1
- package/lib/core/index.js +21 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +30 -0
- package/lib/types/dingtalk.d.ts +80 -0
- package/lib/types/dingtalk.js +5 -0
- package/{src/types/index.ts → lib/types/index.d.ts} +8 -12
- package/lib/types/index.js +21 -0
- package/lib/utils/index.js +1 -0
- package/package.json +9 -7
- package/ali-aiapp-ability-0.1.0.tgz +0 -0
- package/coverage/clover.xml +0 -226
- package/coverage/coverage-final.json +0 -12
- package/coverage/lcov-report/abilities/dingtalk/get-access-token.ts.html +0 -244
- package/coverage/lcov-report/abilities/dingtalk/get-user-info.ts.html +0 -253
- package/coverage/lcov-report/abilities/dingtalk/index.html +0 -146
- package/coverage/lcov-report/abilities/dingtalk/send-message.ts.html +0 -259
- package/coverage/lcov-report/abilities/index.html +0 -116
- package/coverage/lcov-report/abilities/registry.ts.html +0 -484
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -176
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/src/abilities/dingtalk/get-access-token.ts.html +0 -244
- package/coverage/lcov-report/src/abilities/dingtalk/get-user-info.ts.html +0 -253
- package/coverage/lcov-report/src/abilities/dingtalk/index.html +0 -161
- package/coverage/lcov-report/src/abilities/dingtalk/index.ts.html +0 -106
- package/coverage/lcov-report/src/abilities/dingtalk/send-message.ts.html +0 -259
- package/coverage/lcov-report/src/abilities/index.html +0 -131
- package/coverage/lcov-report/src/abilities/index.ts.html +0 -103
- package/coverage/lcov-report/src/abilities/registry.ts.html +0 -484
- package/coverage/lcov-report/src/core/environment.ts.html +0 -241
- package/coverage/lcov-report/src/core/http-client.ts.html +0 -430
- package/coverage/lcov-report/src/core/index.html +0 -146
- package/coverage/lcov-report/src/core/index.ts.html +0 -103
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/src/index.ts.html +0 -268
- package/coverage/lcov-report/src/utils/index.html +0 -116
- package/coverage/lcov-report/src/utils/index.ts.html +0 -385
- package/coverage/lcov-report/utils/index.html +0 -116
- package/coverage/lcov-report/utils/index.ts.html +0 -385
- package/coverage/lcov.info +0 -397
- package/src/abilities/dingtalk/index.ts +0 -311
- package/src/abilities/registry.ts +0 -134
- package/src/core/environment.ts +0 -79
- package/src/core/http-client.ts +0 -88
- package/src/index.ts +0 -17
- package/src/types/dingtalk.ts +0 -91
- package/tsconfig.tsbuildinfo +0 -1
- /package/{src/utils/index.ts → lib/utils/index.d.ts} +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HttpClient = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* HTTP 请求客户端
|
|
6
|
+
*/
|
|
7
|
+
class HttpClient {
|
|
8
|
+
constructor(baseUrl) {
|
|
9
|
+
this.baseUrl = baseUrl;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 发送 POST 请求
|
|
13
|
+
*/
|
|
14
|
+
async post(endpoint, data, options) {
|
|
15
|
+
try {
|
|
16
|
+
const response = await fetch(`${this.baseUrl}${endpoint}`, {
|
|
17
|
+
method: "POST",
|
|
18
|
+
headers: {
|
|
19
|
+
"Content-Type": "application/json",
|
|
20
|
+
...options?.headers,
|
|
21
|
+
},
|
|
22
|
+
body: JSON.stringify(data),
|
|
23
|
+
...options,
|
|
24
|
+
});
|
|
25
|
+
if (!response.ok) {
|
|
26
|
+
return {
|
|
27
|
+
success: false,
|
|
28
|
+
message: "请求异常",
|
|
29
|
+
data: undefined,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const result = await response.json();
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
console.error("HTTP请求失败:", error);
|
|
37
|
+
return {
|
|
38
|
+
success: false,
|
|
39
|
+
message: error instanceof Error ? error.message : "请求失败",
|
|
40
|
+
data: undefined,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 发送 GET 请求
|
|
46
|
+
*/
|
|
47
|
+
async get(endpoint, options) {
|
|
48
|
+
try {
|
|
49
|
+
const response = await fetch(`${this.baseUrl}${endpoint}`, {
|
|
50
|
+
method: "GET",
|
|
51
|
+
headers: {
|
|
52
|
+
"Content-Type": "application/json",
|
|
53
|
+
...options?.headers,
|
|
54
|
+
},
|
|
55
|
+
...options,
|
|
56
|
+
});
|
|
57
|
+
if (!response.ok) {
|
|
58
|
+
return {
|
|
59
|
+
success: false,
|
|
60
|
+
message: "请求异常",
|
|
61
|
+
data: undefined,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const result = await response.json();
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
console.error("HTTP请求失败:", error);
|
|
69
|
+
return {
|
|
70
|
+
success: false,
|
|
71
|
+
message: error instanceof Error ? error.message : "请求失败",
|
|
72
|
+
data: undefined,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.HttpClient = HttpClient;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 核心模块统一导出
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./http-client"), exports);
|
|
21
|
+
__exportStar(require("./environment"), exports);
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @ali/aiapp-ability
|
|
4
|
+
* AI应用能力包
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
// 导出类型
|
|
22
|
+
__exportStar(require("./types"), exports);
|
|
23
|
+
// 导出核心模块
|
|
24
|
+
__exportStar(require("./core"), exports);
|
|
25
|
+
// 导出能力模块
|
|
26
|
+
__exportStar(require("./abilities"), exports);
|
|
27
|
+
function main() {
|
|
28
|
+
return 'Write your own legend...';
|
|
29
|
+
}
|
|
30
|
+
exports.default = main;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 钉钉能力相关类型定义
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* 获取 AccessToken 请求参数
|
|
6
|
+
*/
|
|
7
|
+
export interface GetAccessTokenRequest {
|
|
8
|
+
/** 已创建的企业内部应用的 AppKey */
|
|
9
|
+
appKey: string;
|
|
10
|
+
/** 已创建的企业内部应用的 AppSecret */
|
|
11
|
+
appSecret: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 获取 AccessToken 响应
|
|
15
|
+
*/
|
|
16
|
+
export interface GetAccessTokenResponse {
|
|
17
|
+
/** 生成的 accessToken */
|
|
18
|
+
accessToken: string;
|
|
19
|
+
/** accessToken 的过期时间,单位秒 */
|
|
20
|
+
expireIn: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 批量发送机器人消息的消息类型
|
|
24
|
+
*/
|
|
25
|
+
export declare type RobotMsgKey = 'sampleMarkdown';
|
|
26
|
+
/**
|
|
27
|
+
* 批量发送机器人消息请求参数
|
|
28
|
+
* @see POST /v1.0/robot/oToMessages/batchSend
|
|
29
|
+
*/
|
|
30
|
+
export interface BatchSendRobotMsgRequest<T extends RobotMsgKey = RobotMsgKey> {
|
|
31
|
+
/** 机器人的编码 */
|
|
32
|
+
robotCode: string;
|
|
33
|
+
/** 接收消息的用户 userId 列表,最多支持 20 人 */
|
|
34
|
+
userIds: string[];
|
|
35
|
+
/** 消息模板 key */
|
|
36
|
+
msgKey: T;
|
|
37
|
+
/** 消息模板动态参数(JSON 字符串) */
|
|
38
|
+
msgParam: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 批量发送机器人消息响应
|
|
42
|
+
*/
|
|
43
|
+
export interface BatchSendRobotMsgResponse {
|
|
44
|
+
/** 处理结果列表 */
|
|
45
|
+
sendResults?: BatchSendResult[];
|
|
46
|
+
/** 流程 ID */
|
|
47
|
+
processQueryKey?: string;
|
|
48
|
+
/** 被限流的用户列表 */
|
|
49
|
+
flowControlledStaffIdList?: string[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* 批量发送结果
|
|
53
|
+
*/
|
|
54
|
+
export interface BatchSendResult {
|
|
55
|
+
/** 用户 ID */
|
|
56
|
+
staffId: string;
|
|
57
|
+
/** 是否成功 */
|
|
58
|
+
success: boolean;
|
|
59
|
+
/** 错误码 */
|
|
60
|
+
errorCode?: string;
|
|
61
|
+
/** 错误信息 */
|
|
62
|
+
errorMsg?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 批量发送响应
|
|
66
|
+
*/
|
|
67
|
+
export interface BatchSendResponse {
|
|
68
|
+
/** 是否成功 */
|
|
69
|
+
success: boolean;
|
|
70
|
+
/** 消息 */
|
|
71
|
+
message?: string;
|
|
72
|
+
/** 发送结果详情 */
|
|
73
|
+
data?: BatchSendRobotMsgResponse;
|
|
74
|
+
/** 失败的用户列表 */
|
|
75
|
+
failedUserIds?: string[];
|
|
76
|
+
/** 发送成功的数量 */
|
|
77
|
+
successCount?: number;
|
|
78
|
+
/** 发送失败的数量 */
|
|
79
|
+
failCount?: number;
|
|
80
|
+
}
|
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 类型定义统一导出
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
// 导出钉钉相关类型
|
|
6
4
|
export * from './dingtalk';
|
|
7
|
-
|
|
8
5
|
/**
|
|
9
6
|
* 通用响应接口
|
|
10
7
|
*/
|
|
11
8
|
export interface BaseResponse<T = any> {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
success: boolean;
|
|
10
|
+
message?: string;
|
|
11
|
+
data?: T;
|
|
15
12
|
}
|
|
16
|
-
|
|
17
13
|
/**
|
|
18
14
|
* 能力提供者基础接口
|
|
19
15
|
*/
|
|
20
16
|
export interface AbilityProvider {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
17
|
+
name: string;
|
|
18
|
+
version: string;
|
|
19
|
+
initialize?(config?: any): Promise<void> | void;
|
|
20
|
+
destroy?(): Promise<void> | void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 类型定义统一导出
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
// 导出钉钉相关类型
|
|
21
|
+
__exportStar(require("./dingtalk"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chen0825/aiapp-ability",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "aiapp能力包",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -23,15 +23,17 @@
|
|
|
23
23
|
"keywords": [],
|
|
24
24
|
"author": "",
|
|
25
25
|
"license": "MIT",
|
|
26
|
-
"dependencies": {
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"dotenv": "^17.3.1"
|
|
28
|
+
},
|
|
27
29
|
"devDependencies": {
|
|
28
|
-
"typescript": "^5.2.2",
|
|
29
|
-
"ts-jest": "^29.1.1",
|
|
30
|
-
"jest": "^29.6.4",
|
|
31
30
|
"@types/jest": "^29.5.4",
|
|
32
|
-
"prettier": "^3.0.2",
|
|
33
31
|
"husky": "^8.0.3",
|
|
34
|
-
"
|
|
32
|
+
"jest": "^29.6.4",
|
|
33
|
+
"lint-staged": "^13.2.3",
|
|
34
|
+
"prettier": "^3.0.2",
|
|
35
|
+
"ts-jest": "^29.1.1",
|
|
36
|
+
"typescript": "^5.2.2"
|
|
35
37
|
},
|
|
36
38
|
"publishConfig": {
|
|
37
39
|
"access": "public",
|
|
Binary file
|
package/coverage/clover.xml
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="1774599695371" clover="3.2.0">
|
|
3
|
-
<project timestamp="1774599695371" name="All files">
|
|
4
|
-
<metrics statements="172" coveredstatements="132" conditionals="48" coveredconditionals="28" methods="39" coveredmethods="27" elements="259" coveredelements="187" complexity="0" loc="172" ncloc="172" packages="5" files="11" classes="11"/>
|
|
5
|
-
<package name="src">
|
|
6
|
-
<metrics statements="18" coveredstatements="18" conditionals="1" coveredconditionals="0" methods="3" coveredmethods="3"/>
|
|
7
|
-
<file name="index.ts" path="/Users/chenduyi/Documents/ali-code-ai-app/@your-ability/@chenduyi:aiapp-ability/aiapp-ability/src/index.ts">
|
|
8
|
-
<metrics statements="18" coveredstatements="18" conditionals="1" coveredconditionals="0" methods="3" coveredmethods="3"/>
|
|
9
|
-
<line num="7" count="1" type="stmt"/>
|
|
10
|
-
<line num="10" count="1" type="stmt"/>
|
|
11
|
-
<line num="13" count="1" type="stmt"/>
|
|
12
|
-
<line num="16" count="1" type="stmt"/>
|
|
13
|
-
<line num="19" count="1" type="stmt"/>
|
|
14
|
-
<line num="24" count="1" type="stmt"/>
|
|
15
|
-
<line num="25" count="1" type="stmt"/>
|
|
16
|
-
<line num="26" count="1" type="stmt"/>
|
|
17
|
-
<line num="32" count="1" type="cond" truecount="0" falsecount="1"/>
|
|
18
|
-
<line num="33" count="3" type="stmt"/>
|
|
19
|
-
<line num="34" count="3" type="stmt"/>
|
|
20
|
-
<line num="35" count="3" type="stmt"/>
|
|
21
|
-
<line num="41" count="1" type="stmt"/>
|
|
22
|
-
<line num="45" count="2" type="stmt"/>
|
|
23
|
-
<line num="54" count="1" type="stmt"/>
|
|
24
|
-
<line num="58" count="2" type="stmt"/>
|
|
25
|
-
<line num="59" count="2" type="stmt"/>
|
|
26
|
-
<line num="60" count="2" type="stmt"/>
|
|
27
|
-
</file>
|
|
28
|
-
</package>
|
|
29
|
-
<package name="src.abilities">
|
|
30
|
-
<metrics statements="35" coveredstatements="35" conditionals="5" coveredconditionals="5" methods="11" coveredmethods="11"/>
|
|
31
|
-
<file name="index.ts" path="/Users/chenduyi/Documents/ali-code-ai-app/@your-ability/@chenduyi:aiapp-ability/aiapp-ability/src/abilities/index.ts">
|
|
32
|
-
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
33
|
-
<line num="5" count="1" type="stmt"/>
|
|
34
|
-
<line num="6" count="1" type="stmt"/>
|
|
35
|
-
</file>
|
|
36
|
-
<file name="registry.ts" path="/Users/chenduyi/Documents/ali-code-ai-app/@your-ability/@chenduyi:aiapp-ability/aiapp-ability/src/abilities/registry.ts">
|
|
37
|
-
<metrics statements="33" coveredstatements="33" conditionals="5" coveredconditionals="5" methods="11" coveredmethods="11"/>
|
|
38
|
-
<line num="10" count="2" type="stmt"/>
|
|
39
|
-
<line num="11" count="26" type="stmt"/>
|
|
40
|
-
<line num="15" count="26" type="stmt"/>
|
|
41
|
-
<line num="27" count="28" type="cond" truecount="1" falsecount="0"/>
|
|
42
|
-
<line num="28" count="1" type="stmt"/>
|
|
43
|
-
<line num="30" count="27" type="stmt"/>
|
|
44
|
-
<line num="31" count="27" type="stmt"/>
|
|
45
|
-
<line num="39" count="1" type="stmt"/>
|
|
46
|
-
<line num="40" count="2" type="stmt"/>
|
|
47
|
-
<line num="51" count="5" type="stmt"/>
|
|
48
|
-
<line num="65" count="3" type="stmt"/>
|
|
49
|
-
<line num="66" count="3" type="cond" truecount="1" falsecount="0"/>
|
|
50
|
-
<line num="67" count="1" type="stmt"/>
|
|
51
|
-
<line num="70" count="2" type="stmt"/>
|
|
52
|
-
<line num="71" count="2" type="stmt"/>
|
|
53
|
-
<line num="73" count="2" type="stmt"/>
|
|
54
|
-
<line num="74" count="2" type="stmt"/>
|
|
55
|
-
<line num="75" count="1" type="stmt"/>
|
|
56
|
-
<line num="76" count="1" type="stmt"/>
|
|
57
|
-
<line num="78" count="1" type="stmt"/>
|
|
58
|
-
<line num="79" count="1" type="stmt"/>
|
|
59
|
-
<line num="88" count="13" type="stmt"/>
|
|
60
|
-
<line num="95" count="3" type="stmt"/>
|
|
61
|
-
<line num="102" count="1" type="stmt"/>
|
|
62
|
-
<line num="110" count="2" type="stmt"/>
|
|
63
|
-
<line num="111" count="2" type="cond" truecount="1" falsecount="0"/>
|
|
64
|
-
<line num="112" count="1" type="stmt"/>
|
|
65
|
-
<line num="114" count="2" type="stmt"/>
|
|
66
|
-
<line num="121" count="1" type="stmt"/>
|
|
67
|
-
<line num="122" count="1" type="stmt"/>
|
|
68
|
-
<line num="126" count="33" type="cond" truecount="1" falsecount="0"/>
|
|
69
|
-
<line num="127" count="4" type="stmt"/>
|
|
70
|
-
<line num="133" count="2" type="stmt"/>
|
|
71
|
-
</file>
|
|
72
|
-
</package>
|
|
73
|
-
<package name="src.abilities.dingtalk">
|
|
74
|
-
<metrics statements="30" coveredstatements="30" conditionals="7" coveredconditionals="6" methods="3" coveredmethods="3"/>
|
|
75
|
-
<file name="get-access-token.ts" path="/Users/chenduyi/Documents/ali-code-ai-app/@your-ability/@chenduyi:aiapp-ability/aiapp-ability/src/abilities/dingtalk/get-access-token.ts">
|
|
76
|
-
<metrics statements="7" coveredstatements="7" conditionals="1" coveredconditionals="1" methods="1" coveredmethods="1"/>
|
|
77
|
-
<line num="13" count="2" type="stmt"/>
|
|
78
|
-
<line num="18" count="2" type="stmt"/>
|
|
79
|
-
<line num="30" count="3" type="stmt"/>
|
|
80
|
-
<line num="32" count="3" type="stmt"/>
|
|
81
|
-
<line num="44" count="2" type="cond" truecount="1" falsecount="0"/>
|
|
82
|
-
<line num="45" count="1" type="stmt"/>
|
|
83
|
-
<line num="48" count="1" type="stmt"/>
|
|
84
|
-
</file>
|
|
85
|
-
<file name="get-user-info.ts" path="/Users/chenduyi/Documents/ali-code-ai-app/@your-ability/@chenduyi:aiapp-ability/aiapp-ability/src/abilities/dingtalk/get-user-info.ts">
|
|
86
|
-
<metrics statements="7" coveredstatements="7" conditionals="1" coveredconditionals="1" methods="1" coveredmethods="1"/>
|
|
87
|
-
<line num="13" count="2" type="stmt"/>
|
|
88
|
-
<line num="18" count="2" type="stmt"/>
|
|
89
|
-
<line num="24" count="4" type="stmt"/>
|
|
90
|
-
<line num="26" count="4" type="stmt"/>
|
|
91
|
-
<line num="44" count="3" type="cond" truecount="1" falsecount="0"/>
|
|
92
|
-
<line num="45" count="1" type="stmt"/>
|
|
93
|
-
<line num="48" count="2" type="stmt"/>
|
|
94
|
-
</file>
|
|
95
|
-
<file name="index.ts" path="/Users/chenduyi/Documents/ali-code-ai-app/@your-ability/@chenduyi:aiapp-ability/aiapp-ability/src/abilities/dingtalk/index.ts">
|
|
96
|
-
<metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
97
|
-
<line num="5" count="1" type="stmt"/>
|
|
98
|
-
<line num="6" count="1" type="stmt"/>
|
|
99
|
-
<line num="7" count="1" type="stmt"/>
|
|
100
|
-
</file>
|
|
101
|
-
<file name="send-message.ts" path="/Users/chenduyi/Documents/ali-code-ai-app/@your-ability/@chenduyi:aiapp-ability/aiapp-ability/src/abilities/dingtalk/send-message.ts">
|
|
102
|
-
<metrics statements="13" coveredstatements="13" conditionals="5" coveredconditionals="4" methods="1" coveredmethods="1"/>
|
|
103
|
-
<line num="11" count="2" type="stmt"/>
|
|
104
|
-
<line num="16" count="2" type="stmt"/>
|
|
105
|
-
<line num="28" count="6" type="stmt"/>
|
|
106
|
-
<line num="29" count="6" type="stmt"/>
|
|
107
|
-
<line num="32" count="6" type="cond" truecount="1" falsecount="0"/>
|
|
108
|
-
<line num="33" count="1" type="stmt"/>
|
|
109
|
-
<line num="34" count="1" type="stmt"/>
|
|
110
|
-
<line num="35" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
111
|
-
<line num="36" count="1" type="stmt"/>
|
|
112
|
-
<line num="39" count="6" type="stmt"/>
|
|
113
|
-
<line num="40" count="6" type="stmt"/>
|
|
114
|
-
<line num="45" count="4" type="stmt"/>
|
|
115
|
-
<line num="51" count="2" type="stmt"/>
|
|
116
|
-
</file>
|
|
117
|
-
</package>
|
|
118
|
-
<package name="src.core">
|
|
119
|
-
<metrics statements="55" coveredstatements="15" conditionals="20" coveredconditionals="4" methods="14" coveredmethods="2"/>
|
|
120
|
-
<file name="environment.ts" path="/Users/chenduyi/Documents/ali-code-ai-app/@your-ability/@chenduyi:aiapp-ability/aiapp-ability/src/core/environment.ts">
|
|
121
|
-
<metrics statements="12" coveredstatements="8" conditionals="0" coveredconditionals="0" methods="5" coveredmethods="1"/>
|
|
122
|
-
<line num="8" count="1" type="stmt"/>
|
|
123
|
-
<line num="13" count="1" type="stmt"/>
|
|
124
|
-
<line num="18" count="1" type="stmt"/>
|
|
125
|
-
<line num="19" count="2" type="stmt"/>
|
|
126
|
-
<line num="26" count="1" type="stmt"/>
|
|
127
|
-
<line num="27" count="0" type="stmt"/>
|
|
128
|
-
<line num="36" count="1" type="stmt"/>
|
|
129
|
-
<line num="37" count="0" type="stmt"/>
|
|
130
|
-
<line num="43" count="1" type="stmt"/>
|
|
131
|
-
<line num="44" count="0" type="stmt"/>
|
|
132
|
-
<line num="50" count="1" type="stmt"/>
|
|
133
|
-
<line num="51" count="0" type="stmt"/>
|
|
134
|
-
</file>
|
|
135
|
-
<file name="http-client.ts" path="/Users/chenduyi/Documents/ali-code-ai-app/@your-ability/@chenduyi:aiapp-ability/aiapp-ability/src/core/http-client.ts">
|
|
136
|
-
<metrics statements="41" coveredstatements="5" conditionals="20" coveredconditionals="4" methods="9" coveredmethods="1"/>
|
|
137
|
-
<line num="21" count="1" type="cond" truecount="1" falsecount="0"/>
|
|
138
|
-
<line num="22" count="3" type="cond" truecount="3" falsecount="0"/>
|
|
139
|
-
<line num="30" count="0" type="stmt"/>
|
|
140
|
-
<line num="32" count="0" type="stmt"/>
|
|
141
|
-
<line num="41" count="0" type="cond" truecount="0" falsecount="3"/>
|
|
142
|
-
<line num="42" count="0" type="stmt"/>
|
|
143
|
-
<line num="45" count="0" type="stmt"/>
|
|
144
|
-
<line num="46" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
145
|
-
<line num="47" count="0" type="stmt"/>
|
|
146
|
-
<line num="49" count="0" type="stmt"/>
|
|
147
|
-
<line num="50" count="0" type="stmt"/>
|
|
148
|
-
<line num="51" count="0" type="stmt"/>
|
|
149
|
-
<line num="53" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
150
|
-
<line num="54" count="0" type="stmt"/>
|
|
151
|
-
<line num="57" count="0" type="stmt"/>
|
|
152
|
-
<line num="58" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
153
|
-
<line num="59" count="0" type="stmt"/>
|
|
154
|
-
<line num="62" count="0" type="stmt"/>
|
|
155
|
-
<line num="64" count="0" type="stmt"/>
|
|
156
|
-
<line num="65" count="0" type="cond" truecount="0" falsecount="3"/>
|
|
157
|
-
<line num="66" count="0" type="stmt"/>
|
|
158
|
-
<line num="68" count="0" type="stmt"/>
|
|
159
|
-
<line num="72" count="3" type="stmt"/>
|
|
160
|
-
<line num="73" count="0" type="stmt"/>
|
|
161
|
-
<line num="75" count="0" type="stmt"/>
|
|
162
|
-
<line num="77" count="0" type="stmt"/>
|
|
163
|
-
<line num="79" count="0" type="stmt"/>
|
|
164
|
-
<line num="87" count="0" type="cond" truecount="0" falsecount="3"/>
|
|
165
|
-
<line num="88" count="0" type="stmt"/>
|
|
166
|
-
<line num="91" count="0" type="stmt"/>
|
|
167
|
-
<line num="92" count="0" type="stmt"/>
|
|
168
|
-
<line num="93" count="0" type="stmt"/>
|
|
169
|
-
<line num="96" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
170
|
-
<line num="97" count="0" type="stmt"/>
|
|
171
|
-
<line num="103" count="1" type="stmt"/>
|
|
172
|
-
<line num="105" count="0" type="stmt"/>
|
|
173
|
-
<line num="106" count="0" type="stmt"/>
|
|
174
|
-
<line num="107" count="0" type="stmt"/>
|
|
175
|
-
<line num="109" count="0" type="stmt"/>
|
|
176
|
-
<line num="110" count="0" type="stmt"/>
|
|
177
|
-
<line num="115" count="1" type="stmt"/>
|
|
178
|
-
</file>
|
|
179
|
-
<file name="index.ts" path="/Users/chenduyi/Documents/ali-code-ai-app/@your-ability/@chenduyi:aiapp-ability/aiapp-ability/src/core/index.ts">
|
|
180
|
-
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
181
|
-
<line num="5" count="1" type="stmt"/>
|
|
182
|
-
<line num="6" count="1" type="stmt"/>
|
|
183
|
-
</file>
|
|
184
|
-
</package>
|
|
185
|
-
<package name="src.utils">
|
|
186
|
-
<metrics statements="34" coveredstatements="34" conditionals="15" coveredconditionals="13" methods="8" coveredmethods="8"/>
|
|
187
|
-
<file name="index.ts" path="/Users/chenduyi/Documents/ali-code-ai-app/@your-ability/@chenduyi:aiapp-ability/aiapp-ability/src/utils/index.ts">
|
|
188
|
-
<metrics statements="34" coveredstatements="34" conditionals="15" coveredconditionals="13" methods="8" coveredmethods="8"/>
|
|
189
|
-
<line num="5" count="2" type="stmt"/>
|
|
190
|
-
<line num="12" count="2" type="stmt"/>
|
|
191
|
-
<line num="13" count="5" type="stmt"/>
|
|
192
|
-
<line num="14" count="5" type="stmt"/>
|
|
193
|
-
<line num="15" count="5" type="stmt"/>
|
|
194
|
-
<line num="16" count="5" type="stmt"/>
|
|
195
|
-
<line num="22" count="2" type="stmt"/>
|
|
196
|
-
<line num="23" count="1" type="stmt"/>
|
|
197
|
-
<line num="30" count="2" type="stmt"/>
|
|
198
|
-
<line num="31" count="5" type="stmt"/>
|
|
199
|
-
<line num="40" count="2" type="stmt"/>
|
|
200
|
-
<line num="47" count="3" type="stmt"/>
|
|
201
|
-
<line num="48" count="7" type="stmt"/>
|
|
202
|
-
<line num="49" count="7" type="stmt"/>
|
|
203
|
-
<line num="51" count="5" type="stmt"/>
|
|
204
|
-
<line num="52" count="5" type="cond" truecount="1" falsecount="0"/>
|
|
205
|
-
<line num="53" count="4" type="stmt"/>
|
|
206
|
-
<line num="58" count="1" type="stmt"/>
|
|
207
|
-
<line num="66" count="2" type="stmt"/>
|
|
208
|
-
<line num="67" count="3" type="stmt"/>
|
|
209
|
-
<line num="68" count="3" type="stmt"/>
|
|
210
|
-
<line num="70" count="1" type="stmt"/>
|
|
211
|
-
<line num="78" count="2" type="stmt"/>
|
|
212
|
-
<line num="79" count="2" type="stmt"/>
|
|
213
|
-
<line num="86" count="2" type="stmt"/>
|
|
214
|
-
<line num="87" count="11" type="cond" truecount="3" falsecount="0"/>
|
|
215
|
-
<line num="88" count="2" type="stmt"/>
|
|
216
|
-
<line num="90" count="9" type="cond" truecount="3" falsecount="0"/>
|
|
217
|
-
<line num="91" count="2" type="stmt"/>
|
|
218
|
-
<line num="93" count="7" type="cond" truecount="3" falsecount="0"/>
|
|
219
|
-
<line num="94" count="1" type="stmt"/>
|
|
220
|
-
<line num="96" count="6" type="cond" truecount="3" falsecount="0"/>
|
|
221
|
-
<line num="97" count="1" type="stmt"/>
|
|
222
|
-
<line num="99" count="5" type="stmt"/>
|
|
223
|
-
</file>
|
|
224
|
-
</package>
|
|
225
|
-
</project>
|
|
226
|
-
</coverage>
|