@doist/todoist-mcp 12.4.2 → 12.5.1
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/dist/index.d.ts +1163 -176
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +57 -101
- package/dist/main-http.js +2 -2
- package/dist/main.js +1 -1
- package/dist/mcp-apps/index.html +1 -1
- package/dist/mcp-helpers.d.ts +3 -4
- package/dist/mcp-helpers.d.ts.map +1 -1
- package/dist/{mcp-server-osYsN_F8.js → mcp-server-D55mj0Ly.js} +2042 -1813
- package/dist/mcp-server.d.ts +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/{require-valid-todoist-token-BqTqfHfh.js → require-valid-todoist-token-Cp1WZyMV.js} +9 -9
- package/dist/todoist-tool.d.ts +16 -1
- package/dist/todoist-tool.d.ts.map +1 -1
- package/dist/tool-execution-error.d.ts.map +1 -1
- package/dist/tool-registry.d.ts +4019 -0
- package/dist/tool-registry.d.ts.map +1 -0
- package/dist/tools/export-project-template.d.ts +53 -0
- package/dist/tools/export-project-template.d.ts.map +1 -0
- package/dist/tools/import-project-template.d.ts +144 -0
- package/dist/tools/import-project-template.d.ts.map +1 -0
- package/dist/utils/tool-names.d.ts +2 -0
- package/dist/utils/tool-names.d.ts.map +1 -1
- package/package.json +1 -1
- package/scripts/run-tool.ts +4 -84
- package/scripts/validate-schemas.ts +6 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../src/tool-registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAgEvD;;;;;;;;;;GAUG;AACH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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|
5
|
+
parameters: {
|
|
6
|
+
projectId: z.ZodString;
|
|
7
|
+
format: z.ZodDefault<z.ZodEnum<{
|
|
8
|
+
file: "file";
|
|
9
|
+
url: "url";
|
|
10
|
+
}>>;
|
|
11
|
+
useRelativeDates: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
};
|
|
13
|
+
outputSchema: {
|
|
14
|
+
format: z.ZodEnum<{
|
|
15
|
+
file: "file";
|
|
16
|
+
url: "url";
|
|
17
|
+
}>;
|
|
18
|
+
content: z.ZodOptional<z.ZodString>;
|
|
19
|
+
lineCount: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
21
|
+
fileUrl: z.ZodOptional<z.ZodString>;
|
|
22
|
+
};
|
|
23
|
+
annotations: {
|
|
24
|
+
readOnlyHint: true;
|
|
25
|
+
destructiveHint: false;
|
|
26
|
+
idempotentHint: true;
|
|
27
|
+
};
|
|
28
|
+
execute({ projectId, format, useRelativeDates }: {
|
|
29
|
+
projectId: string;
|
|
30
|
+
format: "file" | "url";
|
|
31
|
+
useRelativeDates?: boolean | undefined;
|
|
32
|
+
}, client: import('@doist/todoist-sdk').TodoistApi): Promise<{
|
|
33
|
+
textContent: string;
|
|
34
|
+
structuredContent: {
|
|
35
|
+
format: "url";
|
|
36
|
+
fileName: string;
|
|
37
|
+
fileUrl: string;
|
|
38
|
+
content?: undefined;
|
|
39
|
+
lineCount?: undefined;
|
|
40
|
+
};
|
|
41
|
+
} | {
|
|
42
|
+
textContent: string;
|
|
43
|
+
structuredContent: {
|
|
44
|
+
format: "file";
|
|
45
|
+
content: string;
|
|
46
|
+
lineCount: number;
|
|
47
|
+
fileName?: undefined;
|
|
48
|
+
fileUrl?: undefined;
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
51
|
+
};
|
|
52
|
+
export { exportProjectTemplate };
|
|
53
|
+
//# sourceMappingURL=export-project-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-project-template.d.ts","sourceRoot":"","sources":["../../src/tools/export-project-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA4CvB,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCoC,CAAA;AAc/D,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Accepts a bare template ID or a Todoist template URL. Both gallery links
|
|
4
|
+
* (`/templates/product-launch`) and in-app links
|
|
5
|
+
* (`/app/templates/category/my-templates/UT_28Ex.../view`) reduce to the last
|
|
6
|
+
* path segment once a trailing `/view` is dropped. Non-Todoist hosts are
|
|
7
|
+
* rejected rather than reduced, so a look-alike link cannot quietly resolve to
|
|
8
|
+
* a real gallery slug.
|
|
9
|
+
*/
|
|
10
|
+
declare function extractTemplateId(input: string): string;
|
|
11
|
+
declare const importProjectTemplate: {
|
|
12
|
+
name: "import-project-template";
|
|
13
|
+
description: string;
|
|
14
|
+
parameters: {
|
|
15
|
+
projectId: z.ZodString;
|
|
16
|
+
templateId: z.ZodOptional<z.ZodString>;
|
|
17
|
+
csvFileContent: z.ZodOptional<z.ZodString>;
|
|
18
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
19
|
+
};
|
|
20
|
+
outputSchema: {
|
|
21
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
sectionOrder: z.ZodNumber;
|
|
25
|
+
description: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
content: z.ZodString;
|
|
30
|
+
description: z.ZodString;
|
|
31
|
+
dueDate: z.ZodOptional<z.ZodString>;
|
|
32
|
+
recurring: z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>;
|
|
33
|
+
deadlineDate: z.ZodOptional<z.ZodString>;
|
|
34
|
+
priority: z.ZodEnum<{
|
|
35
|
+
p1: "p1";
|
|
36
|
+
p2: "p2";
|
|
37
|
+
p3: "p3";
|
|
38
|
+
p4: "p4";
|
|
39
|
+
}>;
|
|
40
|
+
projectId: z.ZodString;
|
|
41
|
+
sectionId: z.ZodOptional<z.ZodString>;
|
|
42
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
43
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
44
|
+
duration: z.ZodOptional<z.ZodString>;
|
|
45
|
+
responsibleUid: z.ZodOptional<z.ZodString>;
|
|
46
|
+
isUncompletable: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
assignedByUid: z.ZodOptional<z.ZodString>;
|
|
48
|
+
checked: z.ZodBoolean;
|
|
49
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
50
|
+
addedAt: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
comments: z.ZodArray<z.ZodObject<{
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
55
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
56
|
+
content: z.ZodString;
|
|
57
|
+
postedAt: z.ZodString;
|
|
58
|
+
postedUid: z.ZodOptional<z.ZodString>;
|
|
59
|
+
fileAttachment: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
resourceType: z.ZodString;
|
|
61
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
62
|
+
fileSize: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
fileType: z.ZodOptional<z.ZodString>;
|
|
64
|
+
fileUrl: z.ZodOptional<z.ZodString>;
|
|
65
|
+
fileDuration: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
uploadState: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
completed: "completed";
|
|
68
|
+
pending: "pending";
|
|
69
|
+
}>>;
|
|
70
|
+
url: z.ZodOptional<z.ZodString>;
|
|
71
|
+
title: z.ZodOptional<z.ZodString>;
|
|
72
|
+
image: z.ZodOptional<z.ZodString>;
|
|
73
|
+
imageWidth: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
imageHeight: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
}, z.core.$strip>>;
|
|
77
|
+
totalCount: z.ZodNumber;
|
|
78
|
+
};
|
|
79
|
+
annotations: {
|
|
80
|
+
readOnlyHint: false;
|
|
81
|
+
destructiveHint: false;
|
|
82
|
+
idempotentHint: false;
|
|
83
|
+
};
|
|
84
|
+
execute({ projectId, templateId, csvFileContent, locale }: {
|
|
85
|
+
projectId: string;
|
|
86
|
+
templateId?: string | undefined;
|
|
87
|
+
csvFileContent?: string | undefined;
|
|
88
|
+
locale?: string | undefined;
|
|
89
|
+
}, client: import('@doist/todoist-sdk').TodoistApi): Promise<{
|
|
90
|
+
textContent: string;
|
|
91
|
+
structuredContent: {
|
|
92
|
+
sections: {
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
sectionOrder: number;
|
|
96
|
+
description?: string | undefined;
|
|
97
|
+
}[];
|
|
98
|
+
tasks: {
|
|
99
|
+
id: string;
|
|
100
|
+
content: string;
|
|
101
|
+
description: string;
|
|
102
|
+
dueDate: string | undefined;
|
|
103
|
+
recurring: string | boolean;
|
|
104
|
+
deadlineDate: string | undefined;
|
|
105
|
+
priority: "p1" | "p2" | "p3" | "p4";
|
|
106
|
+
projectId: string;
|
|
107
|
+
sectionId: string | undefined;
|
|
108
|
+
parentId: string | undefined;
|
|
109
|
+
labels: string[];
|
|
110
|
+
duration: string | undefined;
|
|
111
|
+
responsibleUid: string | undefined;
|
|
112
|
+
assignedByUid: string | undefined;
|
|
113
|
+
checked: boolean;
|
|
114
|
+
completedAt: string | undefined;
|
|
115
|
+
addedAt: string | undefined;
|
|
116
|
+
}[];
|
|
117
|
+
comments: {
|
|
118
|
+
id: string;
|
|
119
|
+
taskId: string | undefined;
|
|
120
|
+
projectId: string | undefined;
|
|
121
|
+
content: string;
|
|
122
|
+
postedAt: string;
|
|
123
|
+
postedUid: string;
|
|
124
|
+
fileAttachment: {
|
|
125
|
+
resourceType: string;
|
|
126
|
+
fileName: string | undefined;
|
|
127
|
+
fileSize: number | undefined;
|
|
128
|
+
fileType: string | undefined;
|
|
129
|
+
fileUrl: string | undefined;
|
|
130
|
+
fileDuration: number | undefined;
|
|
131
|
+
uploadState: "completed" | "pending" | undefined;
|
|
132
|
+
url: string | undefined;
|
|
133
|
+
title: string | undefined;
|
|
134
|
+
image: string | undefined;
|
|
135
|
+
imageWidth: number | undefined;
|
|
136
|
+
imageHeight: number | undefined;
|
|
137
|
+
} | undefined;
|
|
138
|
+
}[];
|
|
139
|
+
totalCount: number;
|
|
140
|
+
};
|
|
141
|
+
}>;
|
|
142
|
+
};
|
|
143
|
+
export { extractTemplateId, importProjectTemplate };
|
|
144
|
+
//# sourceMappingURL=import-project-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-project-template.d.ts","sourceRoot":"","sources":["../../src/tools/import-project-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAWvB;;;;;;;GAOG;AACH,iBAAS,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAiChD;AAwCD,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CoC,CAAA;AAsB/D,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,CAAA"}
|
|
@@ -48,6 +48,8 @@ export declare const ToolNames: {
|
|
|
48
48
|
readonly FIND_FILTERS: "find-filters";
|
|
49
49
|
readonly ADD_FILTERS: "add-filters";
|
|
50
50
|
readonly UPDATE_FILTERS: "update-filters";
|
|
51
|
+
readonly EXPORT_PROJECT_TEMPLATE: "export-project-template";
|
|
52
|
+
readonly IMPORT_PROJECT_TEMPLATE: "import-project-template";
|
|
51
53
|
readonly LIST_WORKSPACES: "list-workspaces";
|
|
52
54
|
readonly SEARCH: "search";
|
|
53
55
|
readonly FETCH: "fetch";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-names.d.ts","sourceRoot":"","sources":["../../src/utils/tool-names.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"tool-names.d.ts","sourceRoot":"","sources":["../../src/utils/tool-names.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EZ,CAAA;AAGV,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAA"}
|
package/package.json
CHANGED
package/scripts/run-tool.ts
CHANGED
|
@@ -17,47 +17,7 @@
|
|
|
17
17
|
import { readFileSync } from 'node:fs'
|
|
18
18
|
import { TodoistApi } from '@doist/todoist-sdk'
|
|
19
19
|
import { config } from 'dotenv'
|
|
20
|
-
import {
|
|
21
|
-
import { addFilters } from '../src/tools/add-filters.js'
|
|
22
|
-
import { addLabels } from '../src/tools/add-labels.js'
|
|
23
|
-
import { addProjects } from '../src/tools/add-projects.js'
|
|
24
|
-
import { addSections } from '../src/tools/add-sections.js'
|
|
25
|
-
import { addTasks } from '../src/tools/add-tasks.js'
|
|
26
|
-
import { analyzeProjectHealth } from '../src/tools/analyze-project-health.js'
|
|
27
|
-
import { completeTasks } from '../src/tools/complete-tasks.js'
|
|
28
|
-
import { deleteObject } from '../src/tools/delete-object.js'
|
|
29
|
-
import { fetchObject } from '../src/tools/fetch-object.js'
|
|
30
|
-
import { fetch } from '../src/tools/fetch.js'
|
|
31
|
-
import { findActivity } from '../src/tools/find-activity.js'
|
|
32
|
-
import { findComments } from '../src/tools/find-comments.js'
|
|
33
|
-
import { findCompletedTasks } from '../src/tools/find-completed-tasks.js'
|
|
34
|
-
import { findFilters } from '../src/tools/find-filters.js'
|
|
35
|
-
import { findLabels } from '../src/tools/find-labels.js'
|
|
36
|
-
import { findProjectCollaborators } from '../src/tools/find-project-collaborators.js'
|
|
37
|
-
import { findProjects } from '../src/tools/find-projects.js'
|
|
38
|
-
import { findSections } from '../src/tools/find-sections.js'
|
|
39
|
-
import { findTasksByDate } from '../src/tools/find-tasks-by-date.js'
|
|
40
|
-
import { findTasks } from '../src/tools/find-tasks.js'
|
|
41
|
-
import { getOverview } from '../src/tools/get-overview.js'
|
|
42
|
-
import { getProjectActivityStats } from '../src/tools/get-project-activity-stats.js'
|
|
43
|
-
import { getProjectHealth } from '../src/tools/get-project-health.js'
|
|
44
|
-
import { getWorkspaceInsights } from '../src/tools/get-workspace-insights.js'
|
|
45
|
-
import { listWorkspaces } from '../src/tools/list-workspaces.js'
|
|
46
|
-
import { manageAssignments } from '../src/tools/manage-assignments.js'
|
|
47
|
-
import { projectManagement } from '../src/tools/project-management.js'
|
|
48
|
-
import { projectMove } from '../src/tools/project-move.js'
|
|
49
|
-
import { reorderObjects } from '../src/tools/reorder-objects.js'
|
|
50
|
-
import { rescheduleTasks } from '../src/tools/reschedule-tasks.js'
|
|
51
|
-
import { search } from '../src/tools/search.js'
|
|
52
|
-
import { uncompleteTasks } from '../src/tools/uncomplete-tasks.js'
|
|
53
|
-
import { updateComments } from '../src/tools/update-comments.js'
|
|
54
|
-
import { updateFilters } from '../src/tools/update-filters.js'
|
|
55
|
-
import { updateLabels } from '../src/tools/update-labels.js'
|
|
56
|
-
import { updateProjects } from '../src/tools/update-projects.js'
|
|
57
|
-
import { updateSections } from '../src/tools/update-sections.js'
|
|
58
|
-
import { updateTasks } from '../src/tools/update-tasks.js'
|
|
59
|
-
import { userInfo } from '../src/tools/user-info.js'
|
|
60
|
-
import { viewAttachment } from '../src/tools/view-attachment.js'
|
|
20
|
+
import { registeredTools } from '../src/tool-registry.js'
|
|
61
21
|
import { createTodoistClient, runWithUsageTrackingContext } from '../src/usage-tracking.js'
|
|
62
22
|
|
|
63
23
|
config()
|
|
@@ -73,49 +33,9 @@ type ExecutableTool = {
|
|
|
73
33
|
) => Promise<{ textContent?: string; structuredContent?: unknown; contentItems?: unknown[] }>
|
|
74
34
|
}
|
|
75
35
|
|
|
76
|
-
const tools: Record<string, ExecutableTool> =
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
'add-filters': addFilters,
|
|
80
|
-
'add-sections': addSections,
|
|
81
|
-
'add-comments': addComments,
|
|
82
|
-
'add-labels': addLabels,
|
|
83
|
-
'complete-tasks': completeTasks,
|
|
84
|
-
'uncomplete-tasks': uncompleteTasks,
|
|
85
|
-
'delete-object': deleteObject,
|
|
86
|
-
fetch: fetch,
|
|
87
|
-
'fetch-object': fetchObject,
|
|
88
|
-
'find-activity': findActivity,
|
|
89
|
-
'find-comments': findComments,
|
|
90
|
-
'find-filters': findFilters,
|
|
91
|
-
'find-completed-tasks': findCompletedTasks,
|
|
92
|
-
'find-labels': findLabels,
|
|
93
|
-
'find-project-collaborators': findProjectCollaborators,
|
|
94
|
-
'find-projects': findProjects,
|
|
95
|
-
'find-sections': findSections,
|
|
96
|
-
'find-tasks': findTasks,
|
|
97
|
-
'find-tasks-by-date': findTasksByDate,
|
|
98
|
-
'get-overview': getOverview,
|
|
99
|
-
'get-project-health': getProjectHealth,
|
|
100
|
-
'get-project-activity-stats': getProjectActivityStats,
|
|
101
|
-
'analyze-project-health': analyzeProjectHealth,
|
|
102
|
-
'get-workspace-insights': getWorkspaceInsights,
|
|
103
|
-
'list-workspaces': listWorkspaces,
|
|
104
|
-
'manage-assignments': manageAssignments,
|
|
105
|
-
'project-management': projectManagement,
|
|
106
|
-
'project-move': projectMove,
|
|
107
|
-
'reorder-objects': reorderObjects,
|
|
108
|
-
'reschedule-tasks': rescheduleTasks,
|
|
109
|
-
search: search,
|
|
110
|
-
'update-comments': updateComments,
|
|
111
|
-
'update-filters': updateFilters,
|
|
112
|
-
'update-labels': updateLabels,
|
|
113
|
-
'update-projects': updateProjects,
|
|
114
|
-
'update-sections': updateSections,
|
|
115
|
-
'update-tasks': updateTasks,
|
|
116
|
-
'user-info': userInfo,
|
|
117
|
-
'view-attachment': viewAttachment,
|
|
118
|
-
}
|
|
36
|
+
const tools: Record<string, ExecutableTool> = Object.fromEntries(
|
|
37
|
+
registeredTools.map((tool) => [tool.name, tool as ExecutableTool]),
|
|
38
|
+
)
|
|
119
39
|
|
|
120
40
|
function printUsage() {
|
|
121
41
|
console.log(`
|
|
@@ -158,14 +158,15 @@ function validateToolSchema(tool: {
|
|
|
158
158
|
*/
|
|
159
159
|
async function validateAllSchemas(verbose: boolean = false): Promise<ValidationResult> {
|
|
160
160
|
try {
|
|
161
|
-
const {
|
|
161
|
+
const { registeredTools } = await import(`${process.cwd()}/dist/index.js`)
|
|
162
|
+
|
|
163
|
+
const allTools = registeredTools
|
|
162
164
|
|
|
163
165
|
const allIssues: ValidationIssue[] = []
|
|
164
166
|
let totalParameters = 0
|
|
165
|
-
const toolNames = Object.keys(tools)
|
|
166
167
|
|
|
167
|
-
for (const
|
|
168
|
-
const
|
|
168
|
+
for (const tool of allTools) {
|
|
169
|
+
const toolName = tool.name
|
|
169
170
|
const toolIssues = validateToolSchema(tool)
|
|
170
171
|
allIssues.push(...toolIssues)
|
|
171
172
|
|
|
@@ -199,7 +200,7 @@ async function validateAllSchemas(verbose: boolean = false): Promise<ValidationR
|
|
|
199
200
|
return {
|
|
200
201
|
success: allIssues.length === 0,
|
|
201
202
|
issues: allIssues,
|
|
202
|
-
toolsChecked:
|
|
203
|
+
toolsChecked: allTools.length,
|
|
203
204
|
parametersChecked: totalParameters,
|
|
204
205
|
}
|
|
205
206
|
} catch (error) {
|