@mcp-abap-adt/core 5.0.10 → 5.1.0
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/CHANGELOG.md +16 -0
- package/dist/handlers/behavior_definition/high/handleCheckBehaviorDefinition.d.ts +26 -0
- package/dist/handlers/behavior_definition/high/handleCheckBehaviorDefinition.d.ts.map +1 -0
- package/dist/handlers/behavior_definition/high/handleCheckBehaviorDefinition.js +26 -0
- package/dist/handlers/behavior_definition/high/handleCheckBehaviorDefinition.js.map +1 -0
- package/dist/handlers/class/high/handleCheckClass.d.ts +37 -0
- package/dist/handlers/class/high/handleCheckClass.d.ts.map +1 -0
- package/dist/handlers/class/high/handleCheckClass.js +35 -0
- package/dist/handlers/class/high/handleCheckClass.js.map +1 -0
- package/dist/handlers/data_element/high/handleCheckDataElement.d.ts +26 -0
- package/dist/handlers/data_element/high/handleCheckDataElement.d.ts.map +1 -0
- package/dist/handlers/data_element/high/handleCheckDataElement.js +26 -0
- package/dist/handlers/data_element/high/handleCheckDataElement.js.map +1 -0
- package/dist/handlers/ddlx/high/handleCheckMetadataExtension.d.ts +26 -0
- package/dist/handlers/ddlx/high/handleCheckMetadataExtension.d.ts.map +1 -0
- package/dist/handlers/ddlx/high/handleCheckMetadataExtension.js +26 -0
- package/dist/handlers/ddlx/high/handleCheckMetadataExtension.js.map +1 -0
- package/dist/handlers/domain/high/handleCheckDomain.d.ts +26 -0
- package/dist/handlers/domain/high/handleCheckDomain.d.ts.map +1 -0
- package/dist/handlers/domain/high/handleCheckDomain.js +26 -0
- package/dist/handlers/domain/high/handleCheckDomain.js.map +1 -0
- package/dist/handlers/function/high/handleCheckFunctionGroup.d.ts +26 -0
- package/dist/handlers/function/high/handleCheckFunctionGroup.d.ts.map +1 -0
- package/dist/handlers/function/high/handleCheckFunctionGroup.js +26 -0
- package/dist/handlers/function/high/handleCheckFunctionGroup.js.map +1 -0
- package/dist/handlers/function/high/handleCheckFunctionModule.d.ts +37 -0
- package/dist/handlers/function/high/handleCheckFunctionModule.d.ts.map +1 -0
- package/dist/handlers/function/high/handleCheckFunctionModule.js +35 -0
- package/dist/handlers/function/high/handleCheckFunctionModule.js.map +1 -0
- package/dist/handlers/interface/high/handleCheckInterface.d.ts +26 -0
- package/dist/handlers/interface/high/handleCheckInterface.d.ts.map +1 -0
- package/dist/handlers/interface/high/handleCheckInterface.js +26 -0
- package/dist/handlers/interface/high/handleCheckInterface.js.map +1 -0
- package/dist/handlers/package/high/handleCheckPackage.d.ts +31 -0
- package/dist/handlers/package/high/handleCheckPackage.d.ts.map +1 -0
- package/dist/handlers/package/high/handleCheckPackage.js +30 -0
- package/dist/handlers/package/high/handleCheckPackage.js.map +1 -0
- package/dist/handlers/program/high/handleCheckProgram.d.ts +26 -0
- package/dist/handlers/program/high/handleCheckProgram.d.ts.map +1 -0
- package/dist/handlers/program/high/handleCheckProgram.js +26 -0
- package/dist/handlers/program/high/handleCheckProgram.js.map +1 -0
- package/dist/handlers/structure/high/handleCheckStructure.d.ts +37 -0
- package/dist/handlers/structure/high/handleCheckStructure.d.ts.map +1 -0
- package/dist/handlers/structure/high/handleCheckStructure.js +35 -0
- package/dist/handlers/structure/high/handleCheckStructure.js.map +1 -0
- package/dist/handlers/table/high/handleCheckTable.d.ts +37 -0
- package/dist/handlers/table/high/handleCheckTable.d.ts.map +1 -0
- package/dist/handlers/table/high/handleCheckTable.js +35 -0
- package/dist/handlers/table/high/handleCheckTable.js.map +1 -0
- package/dist/handlers/view/high/handleCheckView.d.ts +37 -0
- package/dist/handlers/view/high/handleCheckView.d.ts.map +1 -0
- package/dist/handlers/view/high/handleCheckView.js +35 -0
- package/dist/handlers/view/high/handleCheckView.js.map +1 -0
- package/dist/lib/handlers/groups/HighLevelHandlersGroup.d.ts.map +1 -1
- package/dist/lib/handlers/groups/HighLevelHandlersGroup.js +67 -1
- package/dist/lib/handlers/groups/HighLevelHandlersGroup.js.map +1 -1
- package/dist/lib/normalizeCheckResponse.d.ts +16 -0
- package/dist/lib/normalizeCheckResponse.d.ts.map +1 -0
- package/dist/lib/normalizeCheckResponse.js +27 -0
- package/dist/lib/normalizeCheckResponse.js.map +1 -0
- package/dist/server/BaseMcpServer.d.ts.map +1 -1
- package/dist/server/BaseMcpServer.js +1 -3
- package/dist/server/BaseMcpServer.js.map +1 -1
- package/docs/superpowers/plans/2026-04-13-high-level-check-tools.md +1740 -0
- package/docs/superpowers/specs/2026-04-13-high-level-check-tools-design.md +204 -0
- package/docs/user-guide/AVAILABLE_TOOLS.md +187 -3
- package/docs/user-guide/AVAILABLE_TOOLS_COMPACT.md +1 -1
- package/docs/user-guide/AVAILABLE_TOOLS_HIGH.md +186 -2
- package/docs/user-guide/AVAILABLE_TOOLS_LEGACY.md +127 -3
- package/docs/user-guide/AVAILABLE_TOOLS_LOW.md +1 -1
- package/docs/user-guide/AVAILABLE_TOOLS_READONLY.md +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,1740 @@
|
|
|
1
|
+
# High-Level Check Tools Implementation Plan
|
|
2
|
+
|
|
3
|
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
4
|
+
|
|
5
|
+
**Goal:** Add 13 high-level Check tools that wrap existing low-level check handlers, stripping session fields and adding a normalized `object_name` response field.
|
|
6
|
+
|
|
7
|
+
**Architecture:** Each high-level Check handler delegates to its low-level counterpart, then normalizes the response via a shared `normalizeCheckResponse()` utility. All 13 handlers are registered in `HighLevelHandlersGroup`. Integration tests use `LambdaTester` to call handlers and verify the normalized response contract.
|
|
8
|
+
|
|
9
|
+
**Tech Stack:** TypeScript, Jest, LambdaTester, existing ADT client library
|
|
10
|
+
|
|
11
|
+
**Spec:** `docs/superpowers/specs/2026-04-13-high-level-check-tools-design.md`
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
### Task 1: Create shared normalizeCheckResponse utility
|
|
16
|
+
|
|
17
|
+
**Files:**
|
|
18
|
+
- Create: `src/lib/normalizeCheckResponse.ts`
|
|
19
|
+
- Create: `src/__tests__/unit/normalizeCheckResponse.test.ts`
|
|
20
|
+
|
|
21
|
+
- [ ] **Step 1: Write failing unit tests**
|
|
22
|
+
|
|
23
|
+
Create `src/__tests__/unit/normalizeCheckResponse.test.ts`:
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { normalizeCheckResponse } from '../../lib/normalizeCheckResponse';
|
|
27
|
+
|
|
28
|
+
describe('normalizeCheckResponse', () => {
|
|
29
|
+
it('should add object_name and strip session fields from success response', () => {
|
|
30
|
+
const lowLevelResult = {
|
|
31
|
+
isError: false,
|
|
32
|
+
content: [
|
|
33
|
+
{
|
|
34
|
+
type: 'text' as const,
|
|
35
|
+
text: JSON.stringify({
|
|
36
|
+
success: true,
|
|
37
|
+
class_name: 'ZCL_TEST',
|
|
38
|
+
check_result: { success: true, status: 'processed', errors: [], warnings: [], info: [], total_messages: 0, has_errors: false, has_warnings: false, message: '' },
|
|
39
|
+
session_id: 'abc123',
|
|
40
|
+
session_state: { cookies: 'x=y' },
|
|
41
|
+
message: 'Class ZCL_TEST has no syntax errors',
|
|
42
|
+
}),
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const result = normalizeCheckResponse(lowLevelResult, 'ZCL_TEST');
|
|
48
|
+
|
|
49
|
+
expect(result.isError).toBe(false);
|
|
50
|
+
const data = JSON.parse(result.content[0].text);
|
|
51
|
+
expect(data.object_name).toBe('ZCL_TEST');
|
|
52
|
+
expect(data.class_name).toBe('ZCL_TEST');
|
|
53
|
+
expect(data.success).toBe(true);
|
|
54
|
+
expect(data.check_result).toBeDefined();
|
|
55
|
+
expect(data.message).toBeDefined();
|
|
56
|
+
expect(data).not.toHaveProperty('session_id');
|
|
57
|
+
expect(data).not.toHaveProperty('session_state');
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('should pass through error responses unchanged', () => {
|
|
61
|
+
const errorResult = {
|
|
62
|
+
isError: true,
|
|
63
|
+
content: [{ type: 'text' as const, text: 'Error: Class not found' }],
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const result = normalizeCheckResponse(errorResult, 'ZCL_TEST');
|
|
67
|
+
|
|
68
|
+
expect(result).toBe(errorResult);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it('should pass through non-JSON responses unchanged', () => {
|
|
72
|
+
const nonJsonResult = {
|
|
73
|
+
isError: false,
|
|
74
|
+
content: [{ type: 'text' as const, text: 'not valid json' }],
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const result = normalizeCheckResponse(nonJsonResult, 'ZCL_TEST');
|
|
78
|
+
|
|
79
|
+
expect(result).toBe(nonJsonResult);
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
- [ ] **Step 2: Run tests to verify they fail**
|
|
85
|
+
|
|
86
|
+
Run: `npx jest src/__tests__/unit/normalizeCheckResponse.test.ts --no-coverage`
|
|
87
|
+
Expected: FAIL — module not found
|
|
88
|
+
|
|
89
|
+
- [ ] **Step 3: Implement normalizeCheckResponse**
|
|
90
|
+
|
|
91
|
+
Create `src/lib/normalizeCheckResponse.ts`:
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
type McpResponse = {
|
|
95
|
+
isError: boolean;
|
|
96
|
+
content: Array<{ type: string; text: string }>;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Normalizes a low-level check handler response for high-level consumption.
|
|
101
|
+
* - Strips session_id and session_state from JSON payload
|
|
102
|
+
* - Adds object_name as canonical shared field
|
|
103
|
+
* - Passes through error responses and non-JSON payloads unchanged
|
|
104
|
+
*/
|
|
105
|
+
export function normalizeCheckResponse(
|
|
106
|
+
result: McpResponse,
|
|
107
|
+
objectName: string,
|
|
108
|
+
): McpResponse {
|
|
109
|
+
if (result.isError) return result;
|
|
110
|
+
|
|
111
|
+
try {
|
|
112
|
+
const data = JSON.parse(result.content[0].text);
|
|
113
|
+
delete data.session_id;
|
|
114
|
+
delete data.session_state;
|
|
115
|
+
data.object_name = objectName;
|
|
116
|
+
return {
|
|
117
|
+
isError: false,
|
|
118
|
+
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
119
|
+
};
|
|
120
|
+
} catch {
|
|
121
|
+
return result;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
- [ ] **Step 4: Run tests to verify they pass**
|
|
127
|
+
|
|
128
|
+
Run: `npx jest src/__tests__/unit/normalizeCheckResponse.test.ts --no-coverage`
|
|
129
|
+
Expected: PASS — all 3 tests green
|
|
130
|
+
|
|
131
|
+
- [ ] **Step 5: Commit**
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
git add src/lib/normalizeCheckResponse.ts src/__tests__/unit/normalizeCheckResponse.test.ts
|
|
135
|
+
git commit -m "feat: add normalizeCheckResponse utility for high-level check tools (#54)"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### Task 2: Create CheckBehaviorDefinition high-level handler
|
|
141
|
+
|
|
142
|
+
**Files:**
|
|
143
|
+
- Create: `src/handlers/behavior_definition/high/handleCheckBehaviorDefinition.ts`
|
|
144
|
+
|
|
145
|
+
- [ ] **Step 1: Create handler**
|
|
146
|
+
|
|
147
|
+
Create `src/handlers/behavior_definition/high/handleCheckBehaviorDefinition.ts`:
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
import { normalizeCheckResponse } from '../../../lib/normalizeCheckResponse';
|
|
151
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
152
|
+
import { handleCheckBehaviorDefinition as handleCheckBdefLow } from '../low/handleCheckBehaviorDefinition';
|
|
153
|
+
|
|
154
|
+
export const TOOL_DEFINITION = {
|
|
155
|
+
name: 'CheckBehaviorDefinition',
|
|
156
|
+
available_in: ['onprem', 'cloud'] as const,
|
|
157
|
+
description:
|
|
158
|
+
'Perform syntax check on an ABAP behavior definition (BDEF). Returns syntax errors, warnings, and messages.',
|
|
159
|
+
inputSchema: {
|
|
160
|
+
type: 'object',
|
|
161
|
+
properties: {
|
|
162
|
+
name: {
|
|
163
|
+
type: 'string',
|
|
164
|
+
description: 'BehaviorDefinition name (e.g., ZI_MY_BDEF).',
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
required: ['name'],
|
|
168
|
+
},
|
|
169
|
+
} as const;
|
|
170
|
+
|
|
171
|
+
export async function handleCheckBehaviorDefinition(
|
|
172
|
+
context: HandlerContext,
|
|
173
|
+
args: { name: string },
|
|
174
|
+
) {
|
|
175
|
+
const result = await handleCheckBdefLow(context, args);
|
|
176
|
+
return normalizeCheckResponse(result, args.name?.toUpperCase());
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
- [ ] **Step 2: Commit**
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
git add src/handlers/behavior_definition/high/handleCheckBehaviorDefinition.ts
|
|
184
|
+
git commit -m "feat: add CheckBehaviorDefinition high-level handler (#54)"
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
### Task 3: Create CheckClass high-level handler
|
|
190
|
+
|
|
191
|
+
**Files:**
|
|
192
|
+
- Create: `src/handlers/class/high/handleCheckClass.ts`
|
|
193
|
+
|
|
194
|
+
- [ ] **Step 1: Create handler**
|
|
195
|
+
|
|
196
|
+
Create `src/handlers/class/high/handleCheckClass.ts`:
|
|
197
|
+
|
|
198
|
+
```typescript
|
|
199
|
+
import { normalizeCheckResponse } from '../../../lib/normalizeCheckResponse';
|
|
200
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
201
|
+
import { handleCheckClass as handleCheckClassLow } from '../low/handleCheckClass';
|
|
202
|
+
|
|
203
|
+
export const TOOL_DEFINITION = {
|
|
204
|
+
name: 'CheckClass',
|
|
205
|
+
available_in: ['onprem', 'cloud', 'legacy'] as const,
|
|
206
|
+
description:
|
|
207
|
+
'Perform syntax check on an ABAP class. Can check existing class (active/inactive) or validate hypothetical source code. Returns syntax errors, warnings, and messages.',
|
|
208
|
+
inputSchema: {
|
|
209
|
+
type: 'object',
|
|
210
|
+
properties: {
|
|
211
|
+
class_name: {
|
|
212
|
+
type: 'string',
|
|
213
|
+
description: 'Class name (e.g., ZCL_MY_CLASS).',
|
|
214
|
+
},
|
|
215
|
+
version: {
|
|
216
|
+
type: 'string',
|
|
217
|
+
description:
|
|
218
|
+
"Version to check: 'active' (last activated) or 'inactive' (current unsaved). Default: active.",
|
|
219
|
+
enum: ['active', 'inactive'],
|
|
220
|
+
},
|
|
221
|
+
source_code: {
|
|
222
|
+
type: 'string',
|
|
223
|
+
description:
|
|
224
|
+
'Optional: source code to validate. If provided, validates hypothetical code without creating object. Must include complete CLASS DEFINITION and IMPLEMENTATION sections.',
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
required: ['class_name'],
|
|
228
|
+
},
|
|
229
|
+
} as const;
|
|
230
|
+
|
|
231
|
+
export async function handleCheckClass(
|
|
232
|
+
context: HandlerContext,
|
|
233
|
+
args: { class_name: string; version?: string; source_code?: string },
|
|
234
|
+
) {
|
|
235
|
+
const result = await handleCheckClassLow(context, args);
|
|
236
|
+
return normalizeCheckResponse(result, args.class_name?.toUpperCase());
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
- [ ] **Step 2: Commit**
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
git add src/handlers/class/high/handleCheckClass.ts
|
|
244
|
+
git commit -m "feat: add CheckClass high-level handler (#54)"
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
### Task 4: Create CheckDataElement high-level handler
|
|
250
|
+
|
|
251
|
+
**Files:**
|
|
252
|
+
- Create: `src/handlers/data_element/high/handleCheckDataElement.ts`
|
|
253
|
+
|
|
254
|
+
- [ ] **Step 1: Create handler**
|
|
255
|
+
|
|
256
|
+
Create `src/handlers/data_element/high/handleCheckDataElement.ts`:
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
import { normalizeCheckResponse } from '../../../lib/normalizeCheckResponse';
|
|
260
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
261
|
+
import { handleCheckDataElement as handleCheckDataElementLow } from '../low/handleCheckDataElement';
|
|
262
|
+
|
|
263
|
+
export const TOOL_DEFINITION = {
|
|
264
|
+
name: 'CheckDataElement',
|
|
265
|
+
available_in: ['onprem', 'cloud'] as const,
|
|
266
|
+
description:
|
|
267
|
+
'Perform syntax check on an ABAP data element. Returns syntax errors, warnings, and messages.',
|
|
268
|
+
inputSchema: {
|
|
269
|
+
type: 'object',
|
|
270
|
+
properties: {
|
|
271
|
+
data_element_name: {
|
|
272
|
+
type: 'string',
|
|
273
|
+
description: 'Data element name (e.g., ZDE_MY_ELEMENT).',
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
required: ['data_element_name'],
|
|
277
|
+
},
|
|
278
|
+
} as const;
|
|
279
|
+
|
|
280
|
+
export async function handleCheckDataElement(
|
|
281
|
+
context: HandlerContext,
|
|
282
|
+
args: { data_element_name: string },
|
|
283
|
+
) {
|
|
284
|
+
const result = await handleCheckDataElementLow(context, args);
|
|
285
|
+
return normalizeCheckResponse(result, args.data_element_name?.toUpperCase());
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
- [ ] **Step 2: Commit**
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
git add src/handlers/data_element/high/handleCheckDataElement.ts
|
|
293
|
+
git commit -m "feat: add CheckDataElement high-level handler (#54)"
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
### Task 5: Create CheckDomain high-level handler
|
|
299
|
+
|
|
300
|
+
**Files:**
|
|
301
|
+
- Create: `src/handlers/domain/high/handleCheckDomain.ts`
|
|
302
|
+
|
|
303
|
+
- [ ] **Step 1: Create handler**
|
|
304
|
+
|
|
305
|
+
Create `src/handlers/domain/high/handleCheckDomain.ts`:
|
|
306
|
+
|
|
307
|
+
```typescript
|
|
308
|
+
import { normalizeCheckResponse } from '../../../lib/normalizeCheckResponse';
|
|
309
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
310
|
+
import { handleCheckDomain as handleCheckDomainLow } from '../low/handleCheckDomain';
|
|
311
|
+
|
|
312
|
+
export const TOOL_DEFINITION = {
|
|
313
|
+
name: 'CheckDomain',
|
|
314
|
+
available_in: ['onprem', 'cloud'] as const,
|
|
315
|
+
description:
|
|
316
|
+
'Perform syntax check on an ABAP domain. Returns syntax errors, warnings, and messages.',
|
|
317
|
+
inputSchema: {
|
|
318
|
+
type: 'object',
|
|
319
|
+
properties: {
|
|
320
|
+
domain_name: {
|
|
321
|
+
type: 'string',
|
|
322
|
+
description: 'Domain name (e.g., ZDM_MY_DOMAIN).',
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
required: ['domain_name'],
|
|
326
|
+
},
|
|
327
|
+
} as const;
|
|
328
|
+
|
|
329
|
+
export async function handleCheckDomain(
|
|
330
|
+
context: HandlerContext,
|
|
331
|
+
args: { domain_name: string },
|
|
332
|
+
) {
|
|
333
|
+
const result = await handleCheckDomainLow(context, args);
|
|
334
|
+
return normalizeCheckResponse(result, args.domain_name?.toUpperCase());
|
|
335
|
+
}
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
- [ ] **Step 2: Commit**
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
git add src/handlers/domain/high/handleCheckDomain.ts
|
|
342
|
+
git commit -m "feat: add CheckDomain high-level handler (#54)"
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
### Task 6: Create CheckFunctionGroup high-level handler
|
|
348
|
+
|
|
349
|
+
**Files:**
|
|
350
|
+
- Create: `src/handlers/function/high/handleCheckFunctionGroup.ts`
|
|
351
|
+
|
|
352
|
+
- [ ] **Step 1: Create handler**
|
|
353
|
+
|
|
354
|
+
Create `src/handlers/function/high/handleCheckFunctionGroup.ts`:
|
|
355
|
+
|
|
356
|
+
```typescript
|
|
357
|
+
import { normalizeCheckResponse } from '../../../lib/normalizeCheckResponse';
|
|
358
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
359
|
+
import { handleCheckFunctionGroup as handleCheckFunctionGroupLow } from '../low/handleCheckFunctionGroup';
|
|
360
|
+
|
|
361
|
+
export const TOOL_DEFINITION = {
|
|
362
|
+
name: 'CheckFunctionGroup',
|
|
363
|
+
available_in: ['onprem', 'cloud', 'legacy'] as const,
|
|
364
|
+
description:
|
|
365
|
+
'Perform syntax check on an ABAP function group. Returns syntax errors, warnings, and messages.',
|
|
366
|
+
inputSchema: {
|
|
367
|
+
type: 'object',
|
|
368
|
+
properties: {
|
|
369
|
+
function_group_name: {
|
|
370
|
+
type: 'string',
|
|
371
|
+
description: 'Function group name (e.g., ZFGRP_MY_GROUP).',
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
required: ['function_group_name'],
|
|
375
|
+
},
|
|
376
|
+
} as const;
|
|
377
|
+
|
|
378
|
+
export async function handleCheckFunctionGroup(
|
|
379
|
+
context: HandlerContext,
|
|
380
|
+
args: { function_group_name: string },
|
|
381
|
+
) {
|
|
382
|
+
const result = await handleCheckFunctionGroupLow(context, args);
|
|
383
|
+
return normalizeCheckResponse(result, args.function_group_name?.toUpperCase());
|
|
384
|
+
}
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
- [ ] **Step 2: Commit**
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
git add src/handlers/function/high/handleCheckFunctionGroup.ts
|
|
391
|
+
git commit -m "feat: add CheckFunctionGroup high-level handler (#54)"
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
### Task 7: Create CheckFunctionModule high-level handler
|
|
397
|
+
|
|
398
|
+
**Files:**
|
|
399
|
+
- Create: `src/handlers/function/high/handleCheckFunctionModule.ts`
|
|
400
|
+
|
|
401
|
+
- [ ] **Step 1: Create handler**
|
|
402
|
+
|
|
403
|
+
Create `src/handlers/function/high/handleCheckFunctionModule.ts`:
|
|
404
|
+
|
|
405
|
+
```typescript
|
|
406
|
+
import { normalizeCheckResponse } from '../../../lib/normalizeCheckResponse';
|
|
407
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
408
|
+
import { handleCheckFunctionModule as handleCheckFunctionModuleLow } from '../low/handleCheckFunctionModule';
|
|
409
|
+
|
|
410
|
+
export const TOOL_DEFINITION = {
|
|
411
|
+
name: 'CheckFunctionModule',
|
|
412
|
+
available_in: ['onprem', 'cloud', 'legacy'] as const,
|
|
413
|
+
description:
|
|
414
|
+
'Perform syntax check on an ABAP function module. Returns syntax errors, warnings, and messages.',
|
|
415
|
+
inputSchema: {
|
|
416
|
+
type: 'object',
|
|
417
|
+
properties: {
|
|
418
|
+
function_group_name: {
|
|
419
|
+
type: 'string',
|
|
420
|
+
description: 'Function group name containing the function module.',
|
|
421
|
+
},
|
|
422
|
+
function_module_name: {
|
|
423
|
+
type: 'string',
|
|
424
|
+
description: 'Function module name (e.g., Z_MY_FUNCTION).',
|
|
425
|
+
},
|
|
426
|
+
version: {
|
|
427
|
+
type: 'string',
|
|
428
|
+
description:
|
|
429
|
+
"Version to check: 'active' or 'inactive'. Default: active.",
|
|
430
|
+
enum: ['active', 'inactive'],
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
required: ['function_group_name', 'function_module_name'],
|
|
434
|
+
},
|
|
435
|
+
} as const;
|
|
436
|
+
|
|
437
|
+
export async function handleCheckFunctionModule(
|
|
438
|
+
context: HandlerContext,
|
|
439
|
+
args: { function_group_name: string; function_module_name: string; version?: string },
|
|
440
|
+
) {
|
|
441
|
+
const result = await handleCheckFunctionModuleLow(context, args);
|
|
442
|
+
return normalizeCheckResponse(result, args.function_module_name?.toUpperCase());
|
|
443
|
+
}
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
- [ ] **Step 2: Commit**
|
|
447
|
+
|
|
448
|
+
```bash
|
|
449
|
+
git add src/handlers/function/high/handleCheckFunctionModule.ts
|
|
450
|
+
git commit -m "feat: add CheckFunctionModule high-level handler (#54)"
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
### Task 8: Create CheckInterface high-level handler
|
|
456
|
+
|
|
457
|
+
**Files:**
|
|
458
|
+
- Create: `src/handlers/interface/high/handleCheckInterface.ts`
|
|
459
|
+
|
|
460
|
+
- [ ] **Step 1: Create handler**
|
|
461
|
+
|
|
462
|
+
Create `src/handlers/interface/high/handleCheckInterface.ts`:
|
|
463
|
+
|
|
464
|
+
```typescript
|
|
465
|
+
import { normalizeCheckResponse } from '../../../lib/normalizeCheckResponse';
|
|
466
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
467
|
+
import { handleCheckInterface as handleCheckInterfaceLow } from '../low/handleCheckInterface';
|
|
468
|
+
|
|
469
|
+
export const TOOL_DEFINITION = {
|
|
470
|
+
name: 'CheckInterface',
|
|
471
|
+
available_in: ['onprem', 'cloud', 'legacy'] as const,
|
|
472
|
+
description:
|
|
473
|
+
'Perform syntax check on an ABAP interface. Returns syntax errors, warnings, and messages.',
|
|
474
|
+
inputSchema: {
|
|
475
|
+
type: 'object',
|
|
476
|
+
properties: {
|
|
477
|
+
interface_name: {
|
|
478
|
+
type: 'string',
|
|
479
|
+
description: 'Interface name (e.g., ZIF_MY_INTERFACE).',
|
|
480
|
+
},
|
|
481
|
+
},
|
|
482
|
+
required: ['interface_name'],
|
|
483
|
+
},
|
|
484
|
+
} as const;
|
|
485
|
+
|
|
486
|
+
export async function handleCheckInterface(
|
|
487
|
+
context: HandlerContext,
|
|
488
|
+
args: { interface_name: string },
|
|
489
|
+
) {
|
|
490
|
+
const result = await handleCheckInterfaceLow(context, args);
|
|
491
|
+
return normalizeCheckResponse(result, args.interface_name?.toUpperCase());
|
|
492
|
+
}
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
- [ ] **Step 2: Commit**
|
|
496
|
+
|
|
497
|
+
```bash
|
|
498
|
+
git add src/handlers/interface/high/handleCheckInterface.ts
|
|
499
|
+
git commit -m "feat: add CheckInterface high-level handler (#54)"
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
---
|
|
503
|
+
|
|
504
|
+
### Task 9: Create CheckMetadataExtension high-level handler
|
|
505
|
+
|
|
506
|
+
**Files:**
|
|
507
|
+
- Create: `src/handlers/ddlx/high/handleCheckMetadataExtension.ts`
|
|
508
|
+
|
|
509
|
+
- [ ] **Step 1: Create handler**
|
|
510
|
+
|
|
511
|
+
Create `src/handlers/ddlx/high/handleCheckMetadataExtension.ts`:
|
|
512
|
+
|
|
513
|
+
```typescript
|
|
514
|
+
import { normalizeCheckResponse } from '../../../lib/normalizeCheckResponse';
|
|
515
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
516
|
+
import { handleCheckMetadataExtension as handleCheckMetadataExtensionLow } from '../low/handleCheckMetadataExtension';
|
|
517
|
+
|
|
518
|
+
export const TOOL_DEFINITION = {
|
|
519
|
+
name: 'CheckMetadataExtension',
|
|
520
|
+
available_in: ['onprem', 'cloud'] as const,
|
|
521
|
+
description:
|
|
522
|
+
'Perform syntax check on an ABAP metadata extension (DDLX). Returns syntax errors, warnings, and messages.',
|
|
523
|
+
inputSchema: {
|
|
524
|
+
type: 'object',
|
|
525
|
+
properties: {
|
|
526
|
+
name: {
|
|
527
|
+
type: 'string',
|
|
528
|
+
description: 'Metadata extension name (e.g., ZC_MY_DDLX).',
|
|
529
|
+
},
|
|
530
|
+
},
|
|
531
|
+
required: ['name'],
|
|
532
|
+
},
|
|
533
|
+
} as const;
|
|
534
|
+
|
|
535
|
+
export async function handleCheckMetadataExtension(
|
|
536
|
+
context: HandlerContext,
|
|
537
|
+
args: { name: string },
|
|
538
|
+
) {
|
|
539
|
+
const result = await handleCheckMetadataExtensionLow(context, args);
|
|
540
|
+
return normalizeCheckResponse(result, args.name?.toUpperCase());
|
|
541
|
+
}
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
- [ ] **Step 2: Commit**
|
|
545
|
+
|
|
546
|
+
```bash
|
|
547
|
+
git add src/handlers/ddlx/high/handleCheckMetadataExtension.ts
|
|
548
|
+
git commit -m "feat: add CheckMetadataExtension high-level handler (#54)"
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
---
|
|
552
|
+
|
|
553
|
+
### Task 10: Create CheckPackage high-level handler
|
|
554
|
+
|
|
555
|
+
**Files:**
|
|
556
|
+
- Create: `src/handlers/package/high/handleCheckPackage.ts`
|
|
557
|
+
|
|
558
|
+
- [ ] **Step 1: Create handler**
|
|
559
|
+
|
|
560
|
+
Create `src/handlers/package/high/handleCheckPackage.ts`:
|
|
561
|
+
|
|
562
|
+
```typescript
|
|
563
|
+
import { normalizeCheckResponse } from '../../../lib/normalizeCheckResponse';
|
|
564
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
565
|
+
import { handleCheckPackage as handleCheckPackageLow } from '../low/handleCheckPackage';
|
|
566
|
+
|
|
567
|
+
export const TOOL_DEFINITION = {
|
|
568
|
+
name: 'CheckPackage',
|
|
569
|
+
available_in: ['onprem', 'cloud', 'legacy'] as const,
|
|
570
|
+
description:
|
|
571
|
+
'Perform syntax check on an ABAP package. Returns syntax errors, warnings, and messages.',
|
|
572
|
+
inputSchema: {
|
|
573
|
+
type: 'object',
|
|
574
|
+
properties: {
|
|
575
|
+
package_name: {
|
|
576
|
+
type: 'string',
|
|
577
|
+
description: 'Package name (e.g., ZMY_PACKAGE).',
|
|
578
|
+
},
|
|
579
|
+
super_package: {
|
|
580
|
+
type: 'string',
|
|
581
|
+
description: 'Super package name (parent package).',
|
|
582
|
+
},
|
|
583
|
+
},
|
|
584
|
+
required: ['package_name', 'super_package'],
|
|
585
|
+
},
|
|
586
|
+
} as const;
|
|
587
|
+
|
|
588
|
+
export async function handleCheckPackage(
|
|
589
|
+
context: HandlerContext,
|
|
590
|
+
args: { package_name: string; super_package: string },
|
|
591
|
+
) {
|
|
592
|
+
const result = await handleCheckPackageLow(context, args);
|
|
593
|
+
return normalizeCheckResponse(result, args.package_name?.toUpperCase());
|
|
594
|
+
}
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
- [ ] **Step 2: Commit**
|
|
598
|
+
|
|
599
|
+
```bash
|
|
600
|
+
git add src/handlers/package/high/handleCheckPackage.ts
|
|
601
|
+
git commit -m "feat: add CheckPackage high-level handler (#54)"
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
---
|
|
605
|
+
|
|
606
|
+
### Task 11: Create CheckProgram high-level handler
|
|
607
|
+
|
|
608
|
+
**Files:**
|
|
609
|
+
- Create: `src/handlers/program/high/handleCheckProgram.ts`
|
|
610
|
+
|
|
611
|
+
- [ ] **Step 1: Create handler**
|
|
612
|
+
|
|
613
|
+
Create `src/handlers/program/high/handleCheckProgram.ts`:
|
|
614
|
+
|
|
615
|
+
```typescript
|
|
616
|
+
import { normalizeCheckResponse } from '../../../lib/normalizeCheckResponse';
|
|
617
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
618
|
+
import { handleCheckProgram as handleCheckProgramLow } from '../low/handleCheckProgram';
|
|
619
|
+
|
|
620
|
+
export const TOOL_DEFINITION = {
|
|
621
|
+
name: 'CheckProgram',
|
|
622
|
+
available_in: ['onprem', 'legacy'] as const,
|
|
623
|
+
description:
|
|
624
|
+
'Perform syntax check on an ABAP program. Returns syntax errors, warnings, and messages. Not available on cloud.',
|
|
625
|
+
inputSchema: {
|
|
626
|
+
type: 'object',
|
|
627
|
+
properties: {
|
|
628
|
+
program_name: {
|
|
629
|
+
type: 'string',
|
|
630
|
+
description: 'Program name (e.g., ZMCP_MY_PROGRAM).',
|
|
631
|
+
},
|
|
632
|
+
},
|
|
633
|
+
required: ['program_name'],
|
|
634
|
+
},
|
|
635
|
+
} as const;
|
|
636
|
+
|
|
637
|
+
export async function handleCheckProgram(
|
|
638
|
+
context: HandlerContext,
|
|
639
|
+
args: { program_name: string },
|
|
640
|
+
) {
|
|
641
|
+
const result = await handleCheckProgramLow(context, args);
|
|
642
|
+
return normalizeCheckResponse(result, args.program_name?.toUpperCase());
|
|
643
|
+
}
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
- [ ] **Step 2: Commit**
|
|
647
|
+
|
|
648
|
+
```bash
|
|
649
|
+
git add src/handlers/program/high/handleCheckProgram.ts
|
|
650
|
+
git commit -m "feat: add CheckProgram high-level handler (#54)"
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
---
|
|
654
|
+
|
|
655
|
+
### Task 12: Create CheckStructure high-level handler
|
|
656
|
+
|
|
657
|
+
**Files:**
|
|
658
|
+
- Create: `src/handlers/structure/high/handleCheckStructure.ts`
|
|
659
|
+
|
|
660
|
+
- [ ] **Step 1: Create handler**
|
|
661
|
+
|
|
662
|
+
Create `src/handlers/structure/high/handleCheckStructure.ts`:
|
|
663
|
+
|
|
664
|
+
```typescript
|
|
665
|
+
import { normalizeCheckResponse } from '../../../lib/normalizeCheckResponse';
|
|
666
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
667
|
+
import { handleCheckStructure as handleCheckStructureLow } from '../low/handleCheckStructure';
|
|
668
|
+
|
|
669
|
+
export const TOOL_DEFINITION = {
|
|
670
|
+
name: 'CheckStructure',
|
|
671
|
+
available_in: ['onprem', 'cloud'] as const,
|
|
672
|
+
description:
|
|
673
|
+
'Perform syntax check on an ABAP structure. Can check existing structure (active/inactive) or validate hypothetical DDL code. Returns syntax errors, warnings, and messages.',
|
|
674
|
+
inputSchema: {
|
|
675
|
+
type: 'object',
|
|
676
|
+
properties: {
|
|
677
|
+
structure_name: {
|
|
678
|
+
type: 'string',
|
|
679
|
+
description: 'Structure name (e.g., ZST_MY_STRUCTURE).',
|
|
680
|
+
},
|
|
681
|
+
version: {
|
|
682
|
+
type: 'string',
|
|
683
|
+
description:
|
|
684
|
+
"Version to check: 'active' or 'inactive'. Default: inactive.",
|
|
685
|
+
enum: ['active', 'inactive'],
|
|
686
|
+
},
|
|
687
|
+
ddl_code: {
|
|
688
|
+
type: 'string',
|
|
689
|
+
description:
|
|
690
|
+
'Optional: DDL source code to validate instead of the saved version.',
|
|
691
|
+
},
|
|
692
|
+
},
|
|
693
|
+
required: ['structure_name'],
|
|
694
|
+
},
|
|
695
|
+
} as const;
|
|
696
|
+
|
|
697
|
+
export async function handleCheckStructure(
|
|
698
|
+
context: HandlerContext,
|
|
699
|
+
args: { structure_name: string; version?: string; ddl_code?: string },
|
|
700
|
+
) {
|
|
701
|
+
const result = await handleCheckStructureLow(context, args);
|
|
702
|
+
return normalizeCheckResponse(result, args.structure_name?.toUpperCase());
|
|
703
|
+
}
|
|
704
|
+
```
|
|
705
|
+
|
|
706
|
+
- [ ] **Step 2: Commit**
|
|
707
|
+
|
|
708
|
+
```bash
|
|
709
|
+
git add src/handlers/structure/high/handleCheckStructure.ts
|
|
710
|
+
git commit -m "feat: add CheckStructure high-level handler (#54)"
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
---
|
|
714
|
+
|
|
715
|
+
### Task 13: Create CheckTable high-level handler
|
|
716
|
+
|
|
717
|
+
**Files:**
|
|
718
|
+
- Create: `src/handlers/table/high/handleCheckTable.ts`
|
|
719
|
+
|
|
720
|
+
- [ ] **Step 1: Create handler**
|
|
721
|
+
|
|
722
|
+
Note: `reporter` parameter is excluded from high-level API per spec. Low-level default `abapCheckRun` is used.
|
|
723
|
+
|
|
724
|
+
Create `src/handlers/table/high/handleCheckTable.ts`:
|
|
725
|
+
|
|
726
|
+
```typescript
|
|
727
|
+
import { normalizeCheckResponse } from '../../../lib/normalizeCheckResponse';
|
|
728
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
729
|
+
import { handleCheckTable as handleCheckTableLow } from '../low/handleCheckTable';
|
|
730
|
+
|
|
731
|
+
export const TOOL_DEFINITION = {
|
|
732
|
+
name: 'CheckTable',
|
|
733
|
+
available_in: ['onprem', 'cloud'] as const,
|
|
734
|
+
description:
|
|
735
|
+
'Perform syntax check on an ABAP table. Can check existing table (active/inactive) or validate hypothetical DDL code. Returns syntax errors, warnings, and messages.',
|
|
736
|
+
inputSchema: {
|
|
737
|
+
type: 'object',
|
|
738
|
+
properties: {
|
|
739
|
+
table_name: {
|
|
740
|
+
type: 'string',
|
|
741
|
+
description: 'Table name (e.g., ZMCP_MY_TABLE).',
|
|
742
|
+
},
|
|
743
|
+
version: {
|
|
744
|
+
type: 'string',
|
|
745
|
+
description:
|
|
746
|
+
"Version to check: 'active', 'inactive', or 'new'. Default: new.",
|
|
747
|
+
enum: ['active', 'inactive', 'new'],
|
|
748
|
+
},
|
|
749
|
+
ddl_code: {
|
|
750
|
+
type: 'string',
|
|
751
|
+
description:
|
|
752
|
+
'Optional: DDL source code to validate instead of the saved version.',
|
|
753
|
+
},
|
|
754
|
+
},
|
|
755
|
+
required: ['table_name'],
|
|
756
|
+
},
|
|
757
|
+
} as const;
|
|
758
|
+
|
|
759
|
+
export async function handleCheckTable(
|
|
760
|
+
context: HandlerContext,
|
|
761
|
+
args: { table_name: string; version?: string; ddl_code?: string },
|
|
762
|
+
) {
|
|
763
|
+
const result = await handleCheckTableLow(context, args);
|
|
764
|
+
return normalizeCheckResponse(result, args.table_name?.toUpperCase());
|
|
765
|
+
}
|
|
766
|
+
```
|
|
767
|
+
|
|
768
|
+
- [ ] **Step 2: Commit**
|
|
769
|
+
|
|
770
|
+
```bash
|
|
771
|
+
git add src/handlers/table/high/handleCheckTable.ts
|
|
772
|
+
git commit -m "feat: add CheckTable high-level handler (#54)"
|
|
773
|
+
```
|
|
774
|
+
|
|
775
|
+
---
|
|
776
|
+
|
|
777
|
+
### Task 14: Create CheckView high-level handler
|
|
778
|
+
|
|
779
|
+
**Files:**
|
|
780
|
+
- Create: `src/handlers/view/high/handleCheckView.ts`
|
|
781
|
+
|
|
782
|
+
- [ ] **Step 1: Create handler**
|
|
783
|
+
|
|
784
|
+
Create `src/handlers/view/high/handleCheckView.ts`:
|
|
785
|
+
|
|
786
|
+
```typescript
|
|
787
|
+
import { normalizeCheckResponse } from '../../../lib/normalizeCheckResponse';
|
|
788
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
789
|
+
import { handleCheckView as handleCheckViewLow } from '../low/handleCheckView';
|
|
790
|
+
|
|
791
|
+
export const TOOL_DEFINITION = {
|
|
792
|
+
name: 'CheckView',
|
|
793
|
+
available_in: ['onprem', 'cloud', 'legacy'] as const,
|
|
794
|
+
description:
|
|
795
|
+
'Perform syntax check on an ABAP CDS view. Can check existing view (active/inactive) or validate hypothetical DDL source. Returns syntax errors, warnings, and messages.',
|
|
796
|
+
inputSchema: {
|
|
797
|
+
type: 'object',
|
|
798
|
+
properties: {
|
|
799
|
+
view_name: {
|
|
800
|
+
type: 'string',
|
|
801
|
+
description: 'CDS view name (e.g., ZI_MY_VIEW).',
|
|
802
|
+
},
|
|
803
|
+
version: {
|
|
804
|
+
type: 'string',
|
|
805
|
+
description:
|
|
806
|
+
"Version to check: 'active' or 'inactive'. Default: inactive.",
|
|
807
|
+
enum: ['active', 'inactive'],
|
|
808
|
+
},
|
|
809
|
+
ddl_source: {
|
|
810
|
+
type: 'string',
|
|
811
|
+
description:
|
|
812
|
+
'Optional: DDL source code to validate instead of the saved version.',
|
|
813
|
+
},
|
|
814
|
+
},
|
|
815
|
+
required: ['view_name'],
|
|
816
|
+
},
|
|
817
|
+
} as const;
|
|
818
|
+
|
|
819
|
+
export async function handleCheckView(
|
|
820
|
+
context: HandlerContext,
|
|
821
|
+
args: { view_name: string; version?: string; ddl_source?: string },
|
|
822
|
+
) {
|
|
823
|
+
const result = await handleCheckViewLow(context, args);
|
|
824
|
+
return normalizeCheckResponse(result, args.view_name?.toUpperCase());
|
|
825
|
+
}
|
|
826
|
+
```
|
|
827
|
+
|
|
828
|
+
- [ ] **Step 2: Commit**
|
|
829
|
+
|
|
830
|
+
```bash
|
|
831
|
+
git add src/handlers/view/high/handleCheckView.ts
|
|
832
|
+
git commit -m "feat: add CheckView high-level handler (#54)"
|
|
833
|
+
```
|
|
834
|
+
|
|
835
|
+
---
|
|
836
|
+
|
|
837
|
+
### Task 15: Register all 13 Check handlers in HighLevelHandlersGroup
|
|
838
|
+
|
|
839
|
+
**Files:**
|
|
840
|
+
- Modify: `src/lib/handlers/groups/HighLevelHandlersGroup.ts`
|
|
841
|
+
|
|
842
|
+
- [ ] **Step 1: Add imports**
|
|
843
|
+
|
|
844
|
+
Add these imports at the top of `src/lib/handlers/groups/HighLevelHandlersGroup.ts`, alongside the existing imports for each object type:
|
|
845
|
+
|
|
846
|
+
```typescript
|
|
847
|
+
import {
|
|
848
|
+
TOOL_DEFINITION as CheckBehaviorDefinition_Tool,
|
|
849
|
+
handleCheckBehaviorDefinition,
|
|
850
|
+
} from '../../../handlers/behavior_definition/high/handleCheckBehaviorDefinition';
|
|
851
|
+
import {
|
|
852
|
+
TOOL_DEFINITION as CheckClass_Tool,
|
|
853
|
+
handleCheckClass,
|
|
854
|
+
} from '../../../handlers/class/high/handleCheckClass';
|
|
855
|
+
import {
|
|
856
|
+
TOOL_DEFINITION as CheckDataElement_Tool,
|
|
857
|
+
handleCheckDataElement,
|
|
858
|
+
} from '../../../handlers/data_element/high/handleCheckDataElement';
|
|
859
|
+
import {
|
|
860
|
+
TOOL_DEFINITION as CheckMetadataExtension_Tool,
|
|
861
|
+
handleCheckMetadataExtension,
|
|
862
|
+
} from '../../../handlers/ddlx/high/handleCheckMetadataExtension';
|
|
863
|
+
import {
|
|
864
|
+
TOOL_DEFINITION as CheckDomain_Tool,
|
|
865
|
+
handleCheckDomain,
|
|
866
|
+
} from '../../../handlers/domain/high/handleCheckDomain';
|
|
867
|
+
import {
|
|
868
|
+
TOOL_DEFINITION as CheckFunctionGroup_Tool,
|
|
869
|
+
handleCheckFunctionGroup,
|
|
870
|
+
} from '../../../handlers/function/high/handleCheckFunctionGroup';
|
|
871
|
+
import {
|
|
872
|
+
TOOL_DEFINITION as CheckFunctionModule_Tool,
|
|
873
|
+
handleCheckFunctionModule,
|
|
874
|
+
} from '../../../handlers/function/high/handleCheckFunctionModule';
|
|
875
|
+
import {
|
|
876
|
+
TOOL_DEFINITION as CheckInterface_Tool,
|
|
877
|
+
handleCheckInterface,
|
|
878
|
+
} from '../../../handlers/interface/high/handleCheckInterface';
|
|
879
|
+
import {
|
|
880
|
+
TOOL_DEFINITION as CheckPackage_Tool,
|
|
881
|
+
handleCheckPackage,
|
|
882
|
+
} from '../../../handlers/package/high/handleCheckPackage';
|
|
883
|
+
import {
|
|
884
|
+
TOOL_DEFINITION as CheckProgram_Tool,
|
|
885
|
+
handleCheckProgram,
|
|
886
|
+
} from '../../../handlers/program/high/handleCheckProgram';
|
|
887
|
+
import {
|
|
888
|
+
TOOL_DEFINITION as CheckStructure_Tool,
|
|
889
|
+
handleCheckStructure,
|
|
890
|
+
} from '../../../handlers/structure/high/handleCheckStructure';
|
|
891
|
+
import {
|
|
892
|
+
TOOL_DEFINITION as CheckTable_Tool,
|
|
893
|
+
handleCheckTable,
|
|
894
|
+
} from '../../../handlers/table/high/handleCheckTable';
|
|
895
|
+
import {
|
|
896
|
+
TOOL_DEFINITION as CheckView_Tool,
|
|
897
|
+
handleCheckView,
|
|
898
|
+
} from '../../../handlers/view/high/handleCheckView';
|
|
899
|
+
```
|
|
900
|
+
|
|
901
|
+
- [ ] **Step 2: Add handler entries to getHandlers() return array**
|
|
902
|
+
|
|
903
|
+
Add these entries inside the `return [...]` array in the `getHandlers()` method. Place them as a group (e.g., after existing per-type Activate entries or at the end of the array, but grouped together):
|
|
904
|
+
|
|
905
|
+
```typescript
|
|
906
|
+
// Per-type Check handlers (high-level)
|
|
907
|
+
{
|
|
908
|
+
toolDefinition: CheckBehaviorDefinition_Tool,
|
|
909
|
+
handler: withContext(handleCheckBehaviorDefinition),
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
toolDefinition: CheckClass_Tool,
|
|
913
|
+
handler: withContext(handleCheckClass),
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
toolDefinition: CheckDataElement_Tool,
|
|
917
|
+
handler: withContext(handleCheckDataElement),
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
toolDefinition: CheckDomain_Tool,
|
|
921
|
+
handler: withContext(handleCheckDomain),
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
toolDefinition: CheckFunctionGroup_Tool,
|
|
925
|
+
handler: withContext(handleCheckFunctionGroup),
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
toolDefinition: CheckFunctionModule_Tool,
|
|
929
|
+
handler: withContext(handleCheckFunctionModule),
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
toolDefinition: CheckInterface_Tool,
|
|
933
|
+
handler: withContext(handleCheckInterface),
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
toolDefinition: CheckMetadataExtension_Tool,
|
|
937
|
+
handler: withContext(handleCheckMetadataExtension),
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
toolDefinition: CheckPackage_Tool,
|
|
941
|
+
handler: withContext(handleCheckPackage),
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
toolDefinition: CheckProgram_Tool,
|
|
945
|
+
handler: withContext(handleCheckProgram),
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
toolDefinition: CheckStructure_Tool,
|
|
949
|
+
handler: withContext(handleCheckStructure),
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
toolDefinition: CheckTable_Tool,
|
|
953
|
+
handler: withContext(handleCheckTable),
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
toolDefinition: CheckView_Tool,
|
|
957
|
+
handler: withContext(handleCheckView),
|
|
958
|
+
},
|
|
959
|
+
```
|
|
960
|
+
|
|
961
|
+
- [ ] **Step 3: Verify TypeScript compiles**
|
|
962
|
+
|
|
963
|
+
Run: `npx tsc --noEmit`
|
|
964
|
+
Expected: No errors
|
|
965
|
+
|
|
966
|
+
- [ ] **Step 4: Commit**
|
|
967
|
+
|
|
968
|
+
```bash
|
|
969
|
+
git add src/lib/handlers/groups/HighLevelHandlersGroup.ts
|
|
970
|
+
git commit -m "feat: register 13 high-level Check handlers in HighLevelHandlersGroup (#54)"
|
|
971
|
+
```
|
|
972
|
+
|
|
973
|
+
---
|
|
974
|
+
|
|
975
|
+
### Task 16: Add test configuration for high-level Check handlers
|
|
976
|
+
|
|
977
|
+
**Files:**
|
|
978
|
+
- Modify: `tests/test-config.yaml.template`
|
|
979
|
+
|
|
980
|
+
- [ ] **Step 1: Add check test cases to test-config.yaml.template**
|
|
981
|
+
|
|
982
|
+
Add the following test case configurations to `tests/test-config.yaml.template`. These use existing shared objects (created by `npm run shared:setup`) so no new SAP objects need to be created. Place after existing handler test configurations:
|
|
983
|
+
|
|
984
|
+
```yaml
|
|
985
|
+
# ============================================================================
|
|
986
|
+
# Check Handlers (High-Level) — syntax/semantic validation
|
|
987
|
+
# Uses existing shared objects, no CRUD needed
|
|
988
|
+
# ============================================================================
|
|
989
|
+
|
|
990
|
+
# CheckClass
|
|
991
|
+
check_class_high:
|
|
992
|
+
test_cases:
|
|
993
|
+
- name: "check_existing"
|
|
994
|
+
enabled: true
|
|
995
|
+
available_in: ["onprem", "cloud", "legacy"]
|
|
996
|
+
description: "Check an existing ABAP class for syntax errors"
|
|
997
|
+
params:
|
|
998
|
+
class_name: "ZCL_MCP_SHARED_CLS" # shared class from shared:setup, or any existing class
|
|
999
|
+
|
|
1000
|
+
# CheckBehaviorDefinition
|
|
1001
|
+
check_bdef_high:
|
|
1002
|
+
test_cases:
|
|
1003
|
+
- name: "check_existing"
|
|
1004
|
+
enabled: true
|
|
1005
|
+
available_in: ["onprem", "cloud"]
|
|
1006
|
+
description: "Check an existing behavior definition for syntax errors"
|
|
1007
|
+
params:
|
|
1008
|
+
name: "ZI_MCP_SHR_ROOT" # shared BDEF from shared:setup
|
|
1009
|
+
|
|
1010
|
+
# CheckView
|
|
1011
|
+
check_view_high:
|
|
1012
|
+
test_cases:
|
|
1013
|
+
- name: "check_existing"
|
|
1014
|
+
enabled: true
|
|
1015
|
+
available_in: ["onprem", "cloud", "legacy"]
|
|
1016
|
+
description: "Check an existing CDS view for syntax errors"
|
|
1017
|
+
params:
|
|
1018
|
+
view_name: "ZI_MCP_SHR_ROOT" # shared CDS view from shared:setup
|
|
1019
|
+
|
|
1020
|
+
# CheckDomain
|
|
1021
|
+
check_domain_high:
|
|
1022
|
+
test_cases:
|
|
1023
|
+
- name: "check_existing"
|
|
1024
|
+
enabled: true
|
|
1025
|
+
available_in: ["onprem", "cloud"]
|
|
1026
|
+
description: "Check an existing domain for syntax errors"
|
|
1027
|
+
params:
|
|
1028
|
+
domain_name: "ZMCP_SHR_DOMAIN" # any existing domain, or shared one
|
|
1029
|
+
|
|
1030
|
+
# CheckDataElement
|
|
1031
|
+
check_data_element_high:
|
|
1032
|
+
test_cases:
|
|
1033
|
+
- name: "check_existing"
|
|
1034
|
+
enabled: true
|
|
1035
|
+
available_in: ["onprem", "cloud"]
|
|
1036
|
+
description: "Check an existing data element for syntax errors"
|
|
1037
|
+
params:
|
|
1038
|
+
data_element_name: "ZMCP_SHR_DTEL" # any existing data element
|
|
1039
|
+
|
|
1040
|
+
# CheckTable
|
|
1041
|
+
check_table_high:
|
|
1042
|
+
test_cases:
|
|
1043
|
+
- name: "check_existing"
|
|
1044
|
+
enabled: true
|
|
1045
|
+
available_in: ["onprem", "cloud"]
|
|
1046
|
+
description: "Check an existing table for syntax errors"
|
|
1047
|
+
params:
|
|
1048
|
+
table_name: "ZMCP_SHR_RTABL" # shared table from shared:setup
|
|
1049
|
+
|
|
1050
|
+
# CheckStructure
|
|
1051
|
+
check_structure_high:
|
|
1052
|
+
test_cases:
|
|
1053
|
+
- name: "check_existing"
|
|
1054
|
+
enabled: true
|
|
1055
|
+
available_in: ["onprem", "cloud"]
|
|
1056
|
+
description: "Check an existing structure for syntax errors"
|
|
1057
|
+
params:
|
|
1058
|
+
structure_name: "ZMCP_SHR_STRUCT" # any existing structure
|
|
1059
|
+
|
|
1060
|
+
# CheckInterface
|
|
1061
|
+
check_interface_high:
|
|
1062
|
+
test_cases:
|
|
1063
|
+
- name: "check_existing"
|
|
1064
|
+
enabled: true
|
|
1065
|
+
available_in: ["onprem", "cloud", "legacy"]
|
|
1066
|
+
description: "Check an existing interface for syntax errors"
|
|
1067
|
+
params:
|
|
1068
|
+
interface_name: "ZIF_MCP_SHARED" # any existing interface
|
|
1069
|
+
|
|
1070
|
+
# CheckPackage
|
|
1071
|
+
check_package_high:
|
|
1072
|
+
test_cases:
|
|
1073
|
+
- name: "check_existing"
|
|
1074
|
+
enabled: true
|
|
1075
|
+
available_in: ["onprem", "cloud", "legacy"]
|
|
1076
|
+
description: "Check an existing package for syntax errors"
|
|
1077
|
+
params:
|
|
1078
|
+
package_name: "ZMCP_SHARED" # shared package from shared:setup
|
|
1079
|
+
super_package: "" # super package (from shared_dependencies)
|
|
1080
|
+
|
|
1081
|
+
# CheckProgram
|
|
1082
|
+
check_program_high:
|
|
1083
|
+
test_cases:
|
|
1084
|
+
- name: "check_existing"
|
|
1085
|
+
enabled: true
|
|
1086
|
+
available_in: ["onprem", "legacy"]
|
|
1087
|
+
description: "Check an existing program for syntax errors (not available on cloud)"
|
|
1088
|
+
params:
|
|
1089
|
+
program_name: "ZMCP_SHR_PROG" # any existing program
|
|
1090
|
+
|
|
1091
|
+
# CheckFunctionGroup
|
|
1092
|
+
check_function_group_high:
|
|
1093
|
+
test_cases:
|
|
1094
|
+
- name: "check_existing"
|
|
1095
|
+
enabled: true
|
|
1096
|
+
available_in: ["onprem", "cloud", "legacy"]
|
|
1097
|
+
description: "Check an existing function group for syntax errors"
|
|
1098
|
+
params:
|
|
1099
|
+
function_group_name: "ZMCP_SHR_FGRP" # any existing function group
|
|
1100
|
+
|
|
1101
|
+
# CheckFunctionModule
|
|
1102
|
+
check_function_module_high:
|
|
1103
|
+
test_cases:
|
|
1104
|
+
- name: "check_existing"
|
|
1105
|
+
enabled: true
|
|
1106
|
+
available_in: ["onprem", "cloud", "legacy"]
|
|
1107
|
+
description: "Check an existing function module for syntax errors"
|
|
1108
|
+
params:
|
|
1109
|
+
function_group_name: "ZMCP_SHR_FGRP"
|
|
1110
|
+
function_module_name: "Z_MCP_SHR_FM" # any existing FM in that group
|
|
1111
|
+
|
|
1112
|
+
# CheckMetadataExtension
|
|
1113
|
+
check_metadata_extension_high:
|
|
1114
|
+
test_cases:
|
|
1115
|
+
- name: "check_existing"
|
|
1116
|
+
enabled: true
|
|
1117
|
+
available_in: ["onprem", "cloud"]
|
|
1118
|
+
description: "Check an existing metadata extension for syntax errors"
|
|
1119
|
+
params:
|
|
1120
|
+
name: "ZC_MCP_SHR_DDLX" # any existing DDLX
|
|
1121
|
+
```
|
|
1122
|
+
|
|
1123
|
+
- [ ] **Step 2: Copy new entries to local test-config.yaml**
|
|
1124
|
+
|
|
1125
|
+
After updating the template, also add these entries to the local `tests/test-config.yaml` with object names appropriate for the test system.
|
|
1126
|
+
|
|
1127
|
+
- [ ] **Step 3: Commit template changes**
|
|
1128
|
+
|
|
1129
|
+
```bash
|
|
1130
|
+
git add tests/test-config.yaml.template
|
|
1131
|
+
git commit -m "feat: add test configuration for high-level Check handlers (#54)"
|
|
1132
|
+
```
|
|
1133
|
+
|
|
1134
|
+
---
|
|
1135
|
+
|
|
1136
|
+
### Task 17: Create integration tests for high-level Check handlers
|
|
1137
|
+
|
|
1138
|
+
**Files:**
|
|
1139
|
+
- Create: `src/__tests__/integration/high/check/CheckHighHandlers.test.ts`
|
|
1140
|
+
|
|
1141
|
+
- [ ] **Step 1: Create integration test file**
|
|
1142
|
+
|
|
1143
|
+
Create `src/__tests__/integration/high/check/CheckHighHandlers.test.ts`:
|
|
1144
|
+
|
|
1145
|
+
```typescript
|
|
1146
|
+
/**
|
|
1147
|
+
* Integration tests for Check High-Level Handlers
|
|
1148
|
+
*
|
|
1149
|
+
* Tests high-level Check handlers that perform syntax/semantic validation:
|
|
1150
|
+
* Each handler wraps a low-level check, strips session fields,
|
|
1151
|
+
* and adds normalized object_name field.
|
|
1152
|
+
*
|
|
1153
|
+
* Run: npm test -- --testPathPattern=integration/high/check
|
|
1154
|
+
*/
|
|
1155
|
+
|
|
1156
|
+
import { handleCheckBehaviorDefinition } from '../../../../handlers/behavior_definition/high/handleCheckBehaviorDefinition';
|
|
1157
|
+
import { handleCheckClass } from '../../../../handlers/class/high/handleCheckClass';
|
|
1158
|
+
import { handleCheckDataElement } from '../../../../handlers/data_element/high/handleCheckDataElement';
|
|
1159
|
+
import { handleCheckMetadataExtension } from '../../../../handlers/ddlx/high/handleCheckMetadataExtension';
|
|
1160
|
+
import { handleCheckDomain } from '../../../../handlers/domain/high/handleCheckDomain';
|
|
1161
|
+
import { handleCheckFunctionGroup } from '../../../../handlers/function/high/handleCheckFunctionGroup';
|
|
1162
|
+
import { handleCheckFunctionModule } from '../../../../handlers/function/high/handleCheckFunctionModule';
|
|
1163
|
+
import { handleCheckInterface } from '../../../../handlers/interface/high/handleCheckInterface';
|
|
1164
|
+
import { handleCheckPackage } from '../../../../handlers/package/high/handleCheckPackage';
|
|
1165
|
+
import { handleCheckProgram } from '../../../../handlers/program/high/handleCheckProgram';
|
|
1166
|
+
import { handleCheckStructure } from '../../../../handlers/structure/high/handleCheckStructure';
|
|
1167
|
+
import { handleCheckTable } from '../../../../handlers/table/high/handleCheckTable';
|
|
1168
|
+
import { handleCheckView } from '../../../../handlers/view/high/handleCheckView';
|
|
1169
|
+
import { getTimeout } from '../../helpers/configHelpers';
|
|
1170
|
+
import { createTestLogger } from '../../helpers/loggerHelpers';
|
|
1171
|
+
import { LambdaTester } from '../../helpers/testers/LambdaTester';
|
|
1172
|
+
import type { LambdaTesterContext } from '../../helpers/testers/types';
|
|
1173
|
+
import {
|
|
1174
|
+
createHandlerContext,
|
|
1175
|
+
parseHandlerResponse,
|
|
1176
|
+
} from '../../helpers/testHelpers';
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* Helper: assert normalized check response contract
|
|
1180
|
+
* Verifies: object_name present, session fields absent, core fields present
|
|
1181
|
+
*/
|
|
1182
|
+
function assertNormalizedCheckResponse(data: any, expectedObjectName: string) {
|
|
1183
|
+
// Normalized common fields
|
|
1184
|
+
expect(data.object_name).toBe(expectedObjectName.toUpperCase());
|
|
1185
|
+
expect(data.success).toBeDefined();
|
|
1186
|
+
expect(data.message).toBeDefined();
|
|
1187
|
+
expect(data.check_result).toBeDefined();
|
|
1188
|
+
|
|
1189
|
+
// Session fields must be absent
|
|
1190
|
+
expect(data).not.toHaveProperty('session_id');
|
|
1191
|
+
expect(data).not.toHaveProperty('session_state');
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
describe('Check High-Level Handlers Integration', () => {
|
|
1195
|
+
const logger = createTestLogger('check-high');
|
|
1196
|
+
|
|
1197
|
+
// CheckClass
|
|
1198
|
+
describe('CheckClass', () => {
|
|
1199
|
+
let tester: LambdaTester;
|
|
1200
|
+
|
|
1201
|
+
beforeAll(async () => {
|
|
1202
|
+
tester = new LambdaTester(
|
|
1203
|
+
'check_class_high',
|
|
1204
|
+
'check_existing',
|
|
1205
|
+
'check-class-high',
|
|
1206
|
+
);
|
|
1207
|
+
await tester.beforeAll(async () => {}, async () => {});
|
|
1208
|
+
}, getTimeout('long'));
|
|
1209
|
+
|
|
1210
|
+
afterAll(async () => { await tester.afterAll(async () => {}); });
|
|
1211
|
+
beforeEach(async () => { await tester.beforeEach(async () => {}); });
|
|
1212
|
+
afterEach(async () => { await tester.afterEach(); });
|
|
1213
|
+
|
|
1214
|
+
it('should check existing class and return normalized response', async () => {
|
|
1215
|
+
await tester.run(async (context: LambdaTesterContext) => {
|
|
1216
|
+
const { connection, params } = context;
|
|
1217
|
+
const checkLogger = createTestLogger('check-class');
|
|
1218
|
+
const response = await tester.invokeToolOrHandler(
|
|
1219
|
+
'CheckClass',
|
|
1220
|
+
{ class_name: params.class_name },
|
|
1221
|
+
async () => {
|
|
1222
|
+
const ctx = createHandlerContext({ connection, logger: checkLogger });
|
|
1223
|
+
return handleCheckClass(ctx, { class_name: params.class_name });
|
|
1224
|
+
},
|
|
1225
|
+
);
|
|
1226
|
+
|
|
1227
|
+
expect(response.isError).toBe(false);
|
|
1228
|
+
const data = parseHandlerResponse(response);
|
|
1229
|
+
assertNormalizedCheckResponse(data, params.class_name);
|
|
1230
|
+
expect(data.class_name).toBe(params.class_name.toUpperCase());
|
|
1231
|
+
});
|
|
1232
|
+
}, getTimeout('medium'));
|
|
1233
|
+
});
|
|
1234
|
+
|
|
1235
|
+
// CheckBehaviorDefinition
|
|
1236
|
+
describe('CheckBehaviorDefinition', () => {
|
|
1237
|
+
let tester: LambdaTester;
|
|
1238
|
+
|
|
1239
|
+
beforeAll(async () => {
|
|
1240
|
+
tester = new LambdaTester(
|
|
1241
|
+
'check_bdef_high',
|
|
1242
|
+
'check_existing',
|
|
1243
|
+
'check-bdef-high',
|
|
1244
|
+
);
|
|
1245
|
+
await tester.beforeAll(async () => {}, async () => {});
|
|
1246
|
+
}, getTimeout('long'));
|
|
1247
|
+
|
|
1248
|
+
afterAll(async () => { await tester.afterAll(async () => {}); });
|
|
1249
|
+
beforeEach(async () => { await tester.beforeEach(async () => {}); });
|
|
1250
|
+
afterEach(async () => { await tester.afterEach(); });
|
|
1251
|
+
|
|
1252
|
+
it('should check existing BDEF and return normalized response', async () => {
|
|
1253
|
+
await tester.run(async (context: LambdaTesterContext) => {
|
|
1254
|
+
const { connection, params } = context;
|
|
1255
|
+
const checkLogger = createTestLogger('check-bdef');
|
|
1256
|
+
const response = await tester.invokeToolOrHandler(
|
|
1257
|
+
'CheckBehaviorDefinition',
|
|
1258
|
+
{ name: params.name },
|
|
1259
|
+
async () => {
|
|
1260
|
+
const ctx = createHandlerContext({ connection, logger: checkLogger });
|
|
1261
|
+
return handleCheckBehaviorDefinition(ctx, { name: params.name });
|
|
1262
|
+
},
|
|
1263
|
+
);
|
|
1264
|
+
|
|
1265
|
+
expect(response.isError).toBe(false);
|
|
1266
|
+
const data = parseHandlerResponse(response);
|
|
1267
|
+
assertNormalizedCheckResponse(data, params.name);
|
|
1268
|
+
expect(data.name).toBe(params.name.toUpperCase());
|
|
1269
|
+
});
|
|
1270
|
+
}, getTimeout('medium'));
|
|
1271
|
+
});
|
|
1272
|
+
|
|
1273
|
+
// CheckView
|
|
1274
|
+
describe('CheckView', () => {
|
|
1275
|
+
let tester: LambdaTester;
|
|
1276
|
+
|
|
1277
|
+
beforeAll(async () => {
|
|
1278
|
+
tester = new LambdaTester(
|
|
1279
|
+
'check_view_high',
|
|
1280
|
+
'check_existing',
|
|
1281
|
+
'check-view-high',
|
|
1282
|
+
);
|
|
1283
|
+
await tester.beforeAll(async () => {}, async () => {});
|
|
1284
|
+
}, getTimeout('long'));
|
|
1285
|
+
|
|
1286
|
+
afterAll(async () => { await tester.afterAll(async () => {}); });
|
|
1287
|
+
beforeEach(async () => { await tester.beforeEach(async () => {}); });
|
|
1288
|
+
afterEach(async () => { await tester.afterEach(); });
|
|
1289
|
+
|
|
1290
|
+
it('should check existing CDS view and return normalized response', async () => {
|
|
1291
|
+
await tester.run(async (context: LambdaTesterContext) => {
|
|
1292
|
+
const { connection, params } = context;
|
|
1293
|
+
const checkLogger = createTestLogger('check-view');
|
|
1294
|
+
const response = await tester.invokeToolOrHandler(
|
|
1295
|
+
'CheckView',
|
|
1296
|
+
{ view_name: params.view_name },
|
|
1297
|
+
async () => {
|
|
1298
|
+
const ctx = createHandlerContext({ connection, logger: checkLogger });
|
|
1299
|
+
return handleCheckView(ctx, { view_name: params.view_name });
|
|
1300
|
+
},
|
|
1301
|
+
);
|
|
1302
|
+
|
|
1303
|
+
expect(response.isError).toBe(false);
|
|
1304
|
+
const data = parseHandlerResponse(response);
|
|
1305
|
+
assertNormalizedCheckResponse(data, params.view_name);
|
|
1306
|
+
expect(data.view_name).toBe(params.view_name.toUpperCase());
|
|
1307
|
+
});
|
|
1308
|
+
}, getTimeout('medium'));
|
|
1309
|
+
});
|
|
1310
|
+
|
|
1311
|
+
// CheckDomain
|
|
1312
|
+
describe('CheckDomain', () => {
|
|
1313
|
+
let tester: LambdaTester;
|
|
1314
|
+
|
|
1315
|
+
beforeAll(async () => {
|
|
1316
|
+
tester = new LambdaTester(
|
|
1317
|
+
'check_domain_high',
|
|
1318
|
+
'check_existing',
|
|
1319
|
+
'check-domain-high',
|
|
1320
|
+
);
|
|
1321
|
+
await tester.beforeAll(async () => {}, async () => {});
|
|
1322
|
+
}, getTimeout('long'));
|
|
1323
|
+
|
|
1324
|
+
afterAll(async () => { await tester.afterAll(async () => {}); });
|
|
1325
|
+
beforeEach(async () => { await tester.beforeEach(async () => {}); });
|
|
1326
|
+
afterEach(async () => { await tester.afterEach(); });
|
|
1327
|
+
|
|
1328
|
+
it('should check existing domain and return normalized response', async () => {
|
|
1329
|
+
await tester.run(async (context: LambdaTesterContext) => {
|
|
1330
|
+
const { connection, params } = context;
|
|
1331
|
+
const checkLogger = createTestLogger('check-domain');
|
|
1332
|
+
const response = await tester.invokeToolOrHandler(
|
|
1333
|
+
'CheckDomain',
|
|
1334
|
+
{ domain_name: params.domain_name },
|
|
1335
|
+
async () => {
|
|
1336
|
+
const ctx = createHandlerContext({ connection, logger: checkLogger });
|
|
1337
|
+
return handleCheckDomain(ctx, { domain_name: params.domain_name });
|
|
1338
|
+
},
|
|
1339
|
+
);
|
|
1340
|
+
|
|
1341
|
+
expect(response.isError).toBe(false);
|
|
1342
|
+
const data = parseHandlerResponse(response);
|
|
1343
|
+
assertNormalizedCheckResponse(data, params.domain_name);
|
|
1344
|
+
expect(data.domain_name).toBe(params.domain_name.toUpperCase());
|
|
1345
|
+
});
|
|
1346
|
+
}, getTimeout('medium'));
|
|
1347
|
+
});
|
|
1348
|
+
|
|
1349
|
+
// CheckDataElement
|
|
1350
|
+
describe('CheckDataElement', () => {
|
|
1351
|
+
let tester: LambdaTester;
|
|
1352
|
+
|
|
1353
|
+
beforeAll(async () => {
|
|
1354
|
+
tester = new LambdaTester(
|
|
1355
|
+
'check_data_element_high',
|
|
1356
|
+
'check_existing',
|
|
1357
|
+
'check-dtel-high',
|
|
1358
|
+
);
|
|
1359
|
+
await tester.beforeAll(async () => {}, async () => {});
|
|
1360
|
+
}, getTimeout('long'));
|
|
1361
|
+
|
|
1362
|
+
afterAll(async () => { await tester.afterAll(async () => {}); });
|
|
1363
|
+
beforeEach(async () => { await tester.beforeEach(async () => {}); });
|
|
1364
|
+
afterEach(async () => { await tester.afterEach(); });
|
|
1365
|
+
|
|
1366
|
+
it('should check existing data element and return normalized response', async () => {
|
|
1367
|
+
await tester.run(async (context: LambdaTesterContext) => {
|
|
1368
|
+
const { connection, params } = context;
|
|
1369
|
+
const checkLogger = createTestLogger('check-dtel');
|
|
1370
|
+
const response = await tester.invokeToolOrHandler(
|
|
1371
|
+
'CheckDataElement',
|
|
1372
|
+
{ data_element_name: params.data_element_name },
|
|
1373
|
+
async () => {
|
|
1374
|
+
const ctx = createHandlerContext({ connection, logger: checkLogger });
|
|
1375
|
+
return handleCheckDataElement(ctx, { data_element_name: params.data_element_name });
|
|
1376
|
+
},
|
|
1377
|
+
);
|
|
1378
|
+
|
|
1379
|
+
expect(response.isError).toBe(false);
|
|
1380
|
+
const data = parseHandlerResponse(response);
|
|
1381
|
+
assertNormalizedCheckResponse(data, params.data_element_name);
|
|
1382
|
+
expect(data.data_element_name).toBe(params.data_element_name.toUpperCase());
|
|
1383
|
+
});
|
|
1384
|
+
}, getTimeout('medium'));
|
|
1385
|
+
});
|
|
1386
|
+
|
|
1387
|
+
// CheckTable
|
|
1388
|
+
describe('CheckTable', () => {
|
|
1389
|
+
let tester: LambdaTester;
|
|
1390
|
+
|
|
1391
|
+
beforeAll(async () => {
|
|
1392
|
+
tester = new LambdaTester(
|
|
1393
|
+
'check_table_high',
|
|
1394
|
+
'check_existing',
|
|
1395
|
+
'check-table-high',
|
|
1396
|
+
);
|
|
1397
|
+
await tester.beforeAll(async () => {}, async () => {});
|
|
1398
|
+
}, getTimeout('long'));
|
|
1399
|
+
|
|
1400
|
+
afterAll(async () => { await tester.afterAll(async () => {}); });
|
|
1401
|
+
beforeEach(async () => { await tester.beforeEach(async () => {}); });
|
|
1402
|
+
afterEach(async () => { await tester.afterEach(); });
|
|
1403
|
+
|
|
1404
|
+
it('should check existing table and return normalized response', async () => {
|
|
1405
|
+
await tester.run(async (context: LambdaTesterContext) => {
|
|
1406
|
+
const { connection, params } = context;
|
|
1407
|
+
const checkLogger = createTestLogger('check-table');
|
|
1408
|
+
const response = await tester.invokeToolOrHandler(
|
|
1409
|
+
'CheckTable',
|
|
1410
|
+
{ table_name: params.table_name },
|
|
1411
|
+
async () => {
|
|
1412
|
+
const ctx = createHandlerContext({ connection, logger: checkLogger });
|
|
1413
|
+
return handleCheckTable(ctx, { table_name: params.table_name });
|
|
1414
|
+
},
|
|
1415
|
+
);
|
|
1416
|
+
|
|
1417
|
+
expect(response.isError).toBe(false);
|
|
1418
|
+
const data = parseHandlerResponse(response);
|
|
1419
|
+
assertNormalizedCheckResponse(data, params.table_name);
|
|
1420
|
+
expect(data.table_name).toBe(params.table_name.toUpperCase());
|
|
1421
|
+
});
|
|
1422
|
+
}, getTimeout('medium'));
|
|
1423
|
+
});
|
|
1424
|
+
|
|
1425
|
+
// CheckStructure
|
|
1426
|
+
describe('CheckStructure', () => {
|
|
1427
|
+
let tester: LambdaTester;
|
|
1428
|
+
|
|
1429
|
+
beforeAll(async () => {
|
|
1430
|
+
tester = new LambdaTester(
|
|
1431
|
+
'check_structure_high',
|
|
1432
|
+
'check_existing',
|
|
1433
|
+
'check-structure-high',
|
|
1434
|
+
);
|
|
1435
|
+
await tester.beforeAll(async () => {}, async () => {});
|
|
1436
|
+
}, getTimeout('long'));
|
|
1437
|
+
|
|
1438
|
+
afterAll(async () => { await tester.afterAll(async () => {}); });
|
|
1439
|
+
beforeEach(async () => { await tester.beforeEach(async () => {}); });
|
|
1440
|
+
afterEach(async () => { await tester.afterEach(); });
|
|
1441
|
+
|
|
1442
|
+
it('should check existing structure and return normalized response', async () => {
|
|
1443
|
+
await tester.run(async (context: LambdaTesterContext) => {
|
|
1444
|
+
const { connection, params } = context;
|
|
1445
|
+
const checkLogger = createTestLogger('check-structure');
|
|
1446
|
+
const response = await tester.invokeToolOrHandler(
|
|
1447
|
+
'CheckStructure',
|
|
1448
|
+
{ structure_name: params.structure_name },
|
|
1449
|
+
async () => {
|
|
1450
|
+
const ctx = createHandlerContext({ connection, logger: checkLogger });
|
|
1451
|
+
return handleCheckStructure(ctx, { structure_name: params.structure_name });
|
|
1452
|
+
},
|
|
1453
|
+
);
|
|
1454
|
+
|
|
1455
|
+
expect(response.isError).toBe(false);
|
|
1456
|
+
const data = parseHandlerResponse(response);
|
|
1457
|
+
assertNormalizedCheckResponse(data, params.structure_name);
|
|
1458
|
+
expect(data.structure_name).toBe(params.structure_name.toUpperCase());
|
|
1459
|
+
});
|
|
1460
|
+
}, getTimeout('medium'));
|
|
1461
|
+
});
|
|
1462
|
+
|
|
1463
|
+
// CheckInterface
|
|
1464
|
+
describe('CheckInterface', () => {
|
|
1465
|
+
let tester: LambdaTester;
|
|
1466
|
+
|
|
1467
|
+
beforeAll(async () => {
|
|
1468
|
+
tester = new LambdaTester(
|
|
1469
|
+
'check_interface_high',
|
|
1470
|
+
'check_existing',
|
|
1471
|
+
'check-interface-high',
|
|
1472
|
+
);
|
|
1473
|
+
await tester.beforeAll(async () => {}, async () => {});
|
|
1474
|
+
}, getTimeout('long'));
|
|
1475
|
+
|
|
1476
|
+
afterAll(async () => { await tester.afterAll(async () => {}); });
|
|
1477
|
+
beforeEach(async () => { await tester.beforeEach(async () => {}); });
|
|
1478
|
+
afterEach(async () => { await tester.afterEach(); });
|
|
1479
|
+
|
|
1480
|
+
it('should check existing interface and return normalized response', async () => {
|
|
1481
|
+
await tester.run(async (context: LambdaTesterContext) => {
|
|
1482
|
+
const { connection, params } = context;
|
|
1483
|
+
const checkLogger = createTestLogger('check-interface');
|
|
1484
|
+
const response = await tester.invokeToolOrHandler(
|
|
1485
|
+
'CheckInterface',
|
|
1486
|
+
{ interface_name: params.interface_name },
|
|
1487
|
+
async () => {
|
|
1488
|
+
const ctx = createHandlerContext({ connection, logger: checkLogger });
|
|
1489
|
+
return handleCheckInterface(ctx, { interface_name: params.interface_name });
|
|
1490
|
+
},
|
|
1491
|
+
);
|
|
1492
|
+
|
|
1493
|
+
expect(response.isError).toBe(false);
|
|
1494
|
+
const data = parseHandlerResponse(response);
|
|
1495
|
+
assertNormalizedCheckResponse(data, params.interface_name);
|
|
1496
|
+
expect(data.interface_name).toBe(params.interface_name.toUpperCase());
|
|
1497
|
+
});
|
|
1498
|
+
}, getTimeout('medium'));
|
|
1499
|
+
});
|
|
1500
|
+
|
|
1501
|
+
// CheckPackage
|
|
1502
|
+
describe('CheckPackage', () => {
|
|
1503
|
+
let tester: LambdaTester;
|
|
1504
|
+
|
|
1505
|
+
beforeAll(async () => {
|
|
1506
|
+
tester = new LambdaTester(
|
|
1507
|
+
'check_package_high',
|
|
1508
|
+
'check_existing',
|
|
1509
|
+
'check-package-high',
|
|
1510
|
+
);
|
|
1511
|
+
await tester.beforeAll(async () => {}, async () => {});
|
|
1512
|
+
}, getTimeout('long'));
|
|
1513
|
+
|
|
1514
|
+
afterAll(async () => { await tester.afterAll(async () => {}); });
|
|
1515
|
+
beforeEach(async () => { await tester.beforeEach(async () => {}); });
|
|
1516
|
+
afterEach(async () => { await tester.afterEach(); });
|
|
1517
|
+
|
|
1518
|
+
it('should check existing package and return normalized response', async () => {
|
|
1519
|
+
await tester.run(async (context: LambdaTesterContext) => {
|
|
1520
|
+
const { connection, params } = context;
|
|
1521
|
+
const checkLogger = createTestLogger('check-package');
|
|
1522
|
+
const response = await tester.invokeToolOrHandler(
|
|
1523
|
+
'CheckPackage',
|
|
1524
|
+
{ package_name: params.package_name, super_package: params.super_package },
|
|
1525
|
+
async () => {
|
|
1526
|
+
const ctx = createHandlerContext({ connection, logger: checkLogger });
|
|
1527
|
+
return handleCheckPackage(ctx, {
|
|
1528
|
+
package_name: params.package_name,
|
|
1529
|
+
super_package: params.super_package,
|
|
1530
|
+
});
|
|
1531
|
+
},
|
|
1532
|
+
);
|
|
1533
|
+
|
|
1534
|
+
expect(response.isError).toBe(false);
|
|
1535
|
+
const data = parseHandlerResponse(response);
|
|
1536
|
+
assertNormalizedCheckResponse(data, params.package_name);
|
|
1537
|
+
expect(data.package_name).toBe(params.package_name.toUpperCase());
|
|
1538
|
+
});
|
|
1539
|
+
}, getTimeout('medium'));
|
|
1540
|
+
});
|
|
1541
|
+
|
|
1542
|
+
// CheckProgram (onprem/legacy only)
|
|
1543
|
+
describe('CheckProgram', () => {
|
|
1544
|
+
let tester: LambdaTester;
|
|
1545
|
+
|
|
1546
|
+
beforeAll(async () => {
|
|
1547
|
+
tester = new LambdaTester(
|
|
1548
|
+
'check_program_high',
|
|
1549
|
+
'check_existing',
|
|
1550
|
+
'check-program-high',
|
|
1551
|
+
);
|
|
1552
|
+
await tester.beforeAll(async () => {}, async () => {});
|
|
1553
|
+
}, getTimeout('long'));
|
|
1554
|
+
|
|
1555
|
+
afterAll(async () => { await tester.afterAll(async () => {}); });
|
|
1556
|
+
beforeEach(async () => { await tester.beforeEach(async () => {}); });
|
|
1557
|
+
afterEach(async () => { await tester.afterEach(); });
|
|
1558
|
+
|
|
1559
|
+
it('should check existing program and return normalized response', async () => {
|
|
1560
|
+
await tester.run(async (context: LambdaTesterContext) => {
|
|
1561
|
+
const { connection, params } = context;
|
|
1562
|
+
const checkLogger = createTestLogger('check-program');
|
|
1563
|
+
const response = await tester.invokeToolOrHandler(
|
|
1564
|
+
'CheckProgram',
|
|
1565
|
+
{ program_name: params.program_name },
|
|
1566
|
+
async () => {
|
|
1567
|
+
const ctx = createHandlerContext({ connection, logger: checkLogger });
|
|
1568
|
+
return handleCheckProgram(ctx, { program_name: params.program_name });
|
|
1569
|
+
},
|
|
1570
|
+
);
|
|
1571
|
+
|
|
1572
|
+
expect(response.isError).toBe(false);
|
|
1573
|
+
const data = parseHandlerResponse(response);
|
|
1574
|
+
assertNormalizedCheckResponse(data, params.program_name);
|
|
1575
|
+
expect(data.program_name).toBe(params.program_name.toUpperCase());
|
|
1576
|
+
});
|
|
1577
|
+
}, getTimeout('medium'));
|
|
1578
|
+
});
|
|
1579
|
+
|
|
1580
|
+
// CheckFunctionGroup
|
|
1581
|
+
describe('CheckFunctionGroup', () => {
|
|
1582
|
+
let tester: LambdaTester;
|
|
1583
|
+
|
|
1584
|
+
beforeAll(async () => {
|
|
1585
|
+
tester = new LambdaTester(
|
|
1586
|
+
'check_function_group_high',
|
|
1587
|
+
'check_existing',
|
|
1588
|
+
'check-fgrp-high',
|
|
1589
|
+
);
|
|
1590
|
+
await tester.beforeAll(async () => {}, async () => {});
|
|
1591
|
+
}, getTimeout('long'));
|
|
1592
|
+
|
|
1593
|
+
afterAll(async () => { await tester.afterAll(async () => {}); });
|
|
1594
|
+
beforeEach(async () => { await tester.beforeEach(async () => {}); });
|
|
1595
|
+
afterEach(async () => { await tester.afterEach(); });
|
|
1596
|
+
|
|
1597
|
+
it('should check existing function group and return normalized response', async () => {
|
|
1598
|
+
await tester.run(async (context: LambdaTesterContext) => {
|
|
1599
|
+
const { connection, params } = context;
|
|
1600
|
+
const checkLogger = createTestLogger('check-fgrp');
|
|
1601
|
+
const response = await tester.invokeToolOrHandler(
|
|
1602
|
+
'CheckFunctionGroup',
|
|
1603
|
+
{ function_group_name: params.function_group_name },
|
|
1604
|
+
async () => {
|
|
1605
|
+
const ctx = createHandlerContext({ connection, logger: checkLogger });
|
|
1606
|
+
return handleCheckFunctionGroup(ctx, { function_group_name: params.function_group_name });
|
|
1607
|
+
},
|
|
1608
|
+
);
|
|
1609
|
+
|
|
1610
|
+
expect(response.isError).toBe(false);
|
|
1611
|
+
const data = parseHandlerResponse(response);
|
|
1612
|
+
assertNormalizedCheckResponse(data, params.function_group_name);
|
|
1613
|
+
expect(data.function_group_name).toBe(params.function_group_name.toUpperCase());
|
|
1614
|
+
});
|
|
1615
|
+
}, getTimeout('medium'));
|
|
1616
|
+
});
|
|
1617
|
+
|
|
1618
|
+
// CheckFunctionModule
|
|
1619
|
+
describe('CheckFunctionModule', () => {
|
|
1620
|
+
let tester: LambdaTester;
|
|
1621
|
+
|
|
1622
|
+
beforeAll(async () => {
|
|
1623
|
+
tester = new LambdaTester(
|
|
1624
|
+
'check_function_module_high',
|
|
1625
|
+
'check_existing',
|
|
1626
|
+
'check-fm-high',
|
|
1627
|
+
);
|
|
1628
|
+
await tester.beforeAll(async () => {}, async () => {});
|
|
1629
|
+
}, getTimeout('long'));
|
|
1630
|
+
|
|
1631
|
+
afterAll(async () => { await tester.afterAll(async () => {}); });
|
|
1632
|
+
beforeEach(async () => { await tester.beforeEach(async () => {}); });
|
|
1633
|
+
afterEach(async () => { await tester.afterEach(); });
|
|
1634
|
+
|
|
1635
|
+
it('should check existing function module and return normalized response', async () => {
|
|
1636
|
+
await tester.run(async (context: LambdaTesterContext) => {
|
|
1637
|
+
const { connection, params } = context;
|
|
1638
|
+
const checkLogger = createTestLogger('check-fm');
|
|
1639
|
+
const response = await tester.invokeToolOrHandler(
|
|
1640
|
+
'CheckFunctionModule',
|
|
1641
|
+
{
|
|
1642
|
+
function_group_name: params.function_group_name,
|
|
1643
|
+
function_module_name: params.function_module_name,
|
|
1644
|
+
},
|
|
1645
|
+
async () => {
|
|
1646
|
+
const ctx = createHandlerContext({ connection, logger: checkLogger });
|
|
1647
|
+
return handleCheckFunctionModule(ctx, {
|
|
1648
|
+
function_group_name: params.function_group_name,
|
|
1649
|
+
function_module_name: params.function_module_name,
|
|
1650
|
+
});
|
|
1651
|
+
},
|
|
1652
|
+
);
|
|
1653
|
+
|
|
1654
|
+
expect(response.isError).toBe(false);
|
|
1655
|
+
const data = parseHandlerResponse(response);
|
|
1656
|
+
assertNormalizedCheckResponse(data, params.function_module_name);
|
|
1657
|
+
expect(data.function_module_name).toBe(params.function_module_name.toUpperCase());
|
|
1658
|
+
});
|
|
1659
|
+
}, getTimeout('medium'));
|
|
1660
|
+
});
|
|
1661
|
+
|
|
1662
|
+
// CheckMetadataExtension
|
|
1663
|
+
describe('CheckMetadataExtension', () => {
|
|
1664
|
+
let tester: LambdaTester;
|
|
1665
|
+
|
|
1666
|
+
beforeAll(async () => {
|
|
1667
|
+
tester = new LambdaTester(
|
|
1668
|
+
'check_metadata_extension_high',
|
|
1669
|
+
'check_existing',
|
|
1670
|
+
'check-ddlx-high',
|
|
1671
|
+
);
|
|
1672
|
+
await tester.beforeAll(async () => {}, async () => {});
|
|
1673
|
+
}, getTimeout('long'));
|
|
1674
|
+
|
|
1675
|
+
afterAll(async () => { await tester.afterAll(async () => {}); });
|
|
1676
|
+
beforeEach(async () => { await tester.beforeEach(async () => {}); });
|
|
1677
|
+
afterEach(async () => { await tester.afterEach(); });
|
|
1678
|
+
|
|
1679
|
+
it('should check existing metadata extension and return normalized response', async () => {
|
|
1680
|
+
await tester.run(async (context: LambdaTesterContext) => {
|
|
1681
|
+
const { connection, params } = context;
|
|
1682
|
+
const checkLogger = createTestLogger('check-ddlx');
|
|
1683
|
+
const response = await tester.invokeToolOrHandler(
|
|
1684
|
+
'CheckMetadataExtension',
|
|
1685
|
+
{ name: params.name },
|
|
1686
|
+
async () => {
|
|
1687
|
+
const ctx = createHandlerContext({ connection, logger: checkLogger });
|
|
1688
|
+
return handleCheckMetadataExtension(ctx, { name: params.name });
|
|
1689
|
+
},
|
|
1690
|
+
);
|
|
1691
|
+
|
|
1692
|
+
expect(response.isError).toBe(false);
|
|
1693
|
+
const data = parseHandlerResponse(response);
|
|
1694
|
+
assertNormalizedCheckResponse(data, params.name);
|
|
1695
|
+
expect(data.name).toBe(params.name.toUpperCase());
|
|
1696
|
+
});
|
|
1697
|
+
}, getTimeout('medium'));
|
|
1698
|
+
});
|
|
1699
|
+
});
|
|
1700
|
+
```
|
|
1701
|
+
|
|
1702
|
+
- [ ] **Step 2: Run unit tests to verify no compile errors**
|
|
1703
|
+
|
|
1704
|
+
Run: `npx tsc --noEmit`
|
|
1705
|
+
Expected: No errors
|
|
1706
|
+
|
|
1707
|
+
- [ ] **Step 3: Commit**
|
|
1708
|
+
|
|
1709
|
+
```bash
|
|
1710
|
+
git add src/__tests__/integration/high/check/CheckHighHandlers.test.ts
|
|
1711
|
+
git commit -m "feat: add integration tests for high-level Check handlers (#54)"
|
|
1712
|
+
```
|
|
1713
|
+
|
|
1714
|
+
---
|
|
1715
|
+
|
|
1716
|
+
### Task 18: Verify build and run unit tests
|
|
1717
|
+
|
|
1718
|
+
**Files:** None (verification only)
|
|
1719
|
+
|
|
1720
|
+
- [ ] **Step 1: Run TypeScript compilation**
|
|
1721
|
+
|
|
1722
|
+
Run: `npx tsc --noEmit`
|
|
1723
|
+
Expected: No errors
|
|
1724
|
+
|
|
1725
|
+
- [ ] **Step 2: Run unit tests**
|
|
1726
|
+
|
|
1727
|
+
Run: `npx jest src/__tests__/unit/normalizeCheckResponse.test.ts --no-coverage`
|
|
1728
|
+
Expected: All 3 tests pass
|
|
1729
|
+
|
|
1730
|
+
- [ ] **Step 3: Run lint**
|
|
1731
|
+
|
|
1732
|
+
Run: `npm run lint` (or `npx biome check src/lib/normalizeCheckResponse.ts src/handlers/*/high/handleCheck*.ts`)
|
|
1733
|
+
Expected: No errors. Fix any lint issues before committing.
|
|
1734
|
+
|
|
1735
|
+
- [ ] **Step 4: Final commit if lint fixes needed**
|
|
1736
|
+
|
|
1737
|
+
```bash
|
|
1738
|
+
git add -u
|
|
1739
|
+
git commit -m "fix: lint fixes for high-level Check handlers (#54)"
|
|
1740
|
+
```
|