@mcp-abap-adt/core 2.7.4 → 3.0.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 +5 -0
- package/dist/handlers/behavior_implementation/high/handleCreateBehaviorImplementation.d.ts +1 -11
- package/dist/handlers/behavior_implementation/high/handleCreateBehaviorImplementation.d.ts.map +1 -1
- package/dist/handlers/behavior_implementation/high/handleCreateBehaviorImplementation.js +11 -57
- package/dist/handlers/behavior_implementation/high/handleCreateBehaviorImplementation.js.map +1 -1
- package/dist/handlers/class/high/handleCreateClass.d.ts +1 -11
- package/dist/handlers/class/high/handleCreateClass.d.ts.map +1 -1
- package/dist/handlers/class/high/handleCreateClass.js +7 -36
- package/dist/handlers/class/high/handleCreateClass.js.map +1 -1
- package/dist/handlers/compact/high/compactMatrix.js +4 -4
- package/dist/handlers/compact/high/compactMatrix.js.map +1 -1
- package/dist/handlers/compact/high/compactRouter.d.ts.map +1 -1
- package/dist/handlers/compact/high/compactRouter.js +0 -8
- package/dist/handlers/compact/high/compactRouter.js.map +1 -1
- package/dist/handlers/compact/high/compactSchemas.d.ts +0 -4
- package/dist/handlers/compact/high/compactSchemas.d.ts.map +1 -1
- package/dist/handlers/compact/high/compactSchemas.js +0 -1
- package/dist/handlers/compact/high/compactSchemas.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerCreate.d.ts +1 -5
- package/dist/handlers/compact/high/handleHandlerCreate.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerCreate.js +1 -1
- package/dist/handlers/compact/high/handleHandlerCreate.js.map +1 -1
- package/dist/handlers/function/high/handleCreateFunctionModule.d.ts +2 -18
- package/dist/handlers/function/high/handleCreateFunctionModule.d.ts.map +1 -1
- package/dist/handlers/function/high/handleCreateFunctionModule.js +13 -76
- package/dist/handlers/function/high/handleCreateFunctionModule.js.map +1 -1
- package/dist/handlers/interface/high/handleCreateInterface.d.ts +3 -21
- package/dist/handlers/interface/high/handleCreateInterface.d.ts.map +1 -1
- package/dist/handlers/interface/high/handleCreateInterface.js +17 -187
- package/dist/handlers/interface/high/handleCreateInterface.js.map +1 -1
- package/dist/handlers/program/high/handleCreateProgram.d.ts +3 -10
- package/dist/handlers/program/high/handleCreateProgram.d.ts.map +1 -1
- package/dist/handlers/program/high/handleCreateProgram.js +22 -242
- package/dist/handlers/program/high/handleCreateProgram.js.map +1 -1
- package/dist/handlers/table/high/handleCreateTable.d.ts +4 -19
- package/dist/handlers/table/high/handleCreateTable.d.ts.map +1 -1
- package/dist/handlers/table/high/handleCreateTable.js +7 -106
- package/dist/handlers/table/high/handleCreateTable.js.map +1 -1
- package/dist/handlers/unit_test/high/handleCreateCdsUnitTest.d.ts +4 -12
- package/dist/handlers/unit_test/high/handleCreateCdsUnitTest.d.ts.map +1 -1
- package/dist/handlers/unit_test/high/handleCreateCdsUnitTest.js +6 -24
- package/dist/handlers/unit_test/high/handleCreateCdsUnitTest.js.map +1 -1
- package/dist/handlers/view/high/handleCreateView.d.ts +4 -11
- package/dist/handlers/view/high/handleCreateView.d.ts.map +1 -1
- package/dist/handlers/view/high/handleCreateView.js +25 -189
- package/dist/handlers/view/high/handleCreateView.js.map +1 -1
- package/dist/lib/handlers/groups/HighLevelHandlersGroup.d.ts.map +1 -1
- package/dist/lib/handlers/groups/HighLevelHandlersGroup.js +0 -36
- package/dist/lib/handlers/groups/HighLevelHandlersGroup.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* CreateProgram Handler - ABAP Program Creation via ADT API
|
|
4
4
|
*
|
|
5
|
-
* Workflow: validate -> create
|
|
5
|
+
* Workflow: validate -> create (object in initial state)
|
|
6
|
+
* Source code is set via UpdateProgram handler.
|
|
6
7
|
*/
|
|
7
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
9
|
exports.TOOL_DEFINITION = void 0;
|
|
9
10
|
exports.handleCreateProgram = handleCreateProgram;
|
|
10
|
-
const fast_xml_parser_1 = require("fast-xml-parser");
|
|
11
11
|
const clients_1 = require("../../../lib/clients");
|
|
12
12
|
const utils_1 = require("../../../lib/utils");
|
|
13
13
|
const transportValidation_js_1 = require("../../../utils/transportValidation.js");
|
|
14
14
|
exports.TOOL_DEFINITION = {
|
|
15
15
|
name: 'CreateProgram',
|
|
16
|
-
description: 'Create a new ABAP program (report) in SAP system
|
|
16
|
+
description: 'Create a new ABAP program (report) in SAP system. Creates the program object in initial state. Use UpdateProgram to set source code afterwards.',
|
|
17
17
|
inputSchema: {
|
|
18
18
|
type: 'object',
|
|
19
19
|
properties: {
|
|
@@ -49,66 +49,10 @@ exports.TOOL_DEFINITION = {
|
|
|
49
49
|
type: 'string',
|
|
50
50
|
description: "Application area (e.g., 'S' for System, 'M' for Materials Management). Default: '*'",
|
|
51
51
|
},
|
|
52
|
-
source_code: {
|
|
53
|
-
type: 'string',
|
|
54
|
-
description: 'Complete ABAP program source code. If not provided, generates minimal template based on program_type.',
|
|
55
|
-
},
|
|
56
|
-
activate: {
|
|
57
|
-
type: 'boolean',
|
|
58
|
-
description: 'Activate program after creation. Default: true. Set to false for batch operations (activate multiple objects later).',
|
|
59
|
-
},
|
|
60
52
|
},
|
|
61
53
|
required: ['program_name', 'package_name'],
|
|
62
54
|
},
|
|
63
55
|
};
|
|
64
|
-
/**
|
|
65
|
-
* Convert readable program type to SAP internal code
|
|
66
|
-
*/
|
|
67
|
-
function convertProgramType(programType) {
|
|
68
|
-
const typeMap = {
|
|
69
|
-
executable: '1',
|
|
70
|
-
include: 'I',
|
|
71
|
-
module_pool: 'M',
|
|
72
|
-
function_group: 'F',
|
|
73
|
-
class_pool: 'K',
|
|
74
|
-
interface_pool: 'J',
|
|
75
|
-
};
|
|
76
|
-
return typeMap[programType || 'executable'] || '1';
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Generate minimal program source code if not provided
|
|
80
|
-
*/
|
|
81
|
-
function generateProgramTemplate(programName, programType, description) {
|
|
82
|
-
const upperName = programName.toUpperCase();
|
|
83
|
-
switch (programType) {
|
|
84
|
-
case 'I': // Include
|
|
85
|
-
return `*&---------------------------------------------------------------------*
|
|
86
|
-
*& Include ${upperName}
|
|
87
|
-
*& ${description}
|
|
88
|
-
*&---------------------------------------------------------------------*
|
|
89
|
-
|
|
90
|
-
" Include program logic here
|
|
91
|
-
`;
|
|
92
|
-
case 'M': // Module Pool
|
|
93
|
-
return `*&---------------------------------------------------------------------*
|
|
94
|
-
*& Module Pool ${upperName}
|
|
95
|
-
*& ${description}
|
|
96
|
-
*&---------------------------------------------------------------------*
|
|
97
|
-
|
|
98
|
-
PROGRAM ${upperName}.
|
|
99
|
-
`;
|
|
100
|
-
default:
|
|
101
|
-
return `*&---------------------------------------------------------------------*
|
|
102
|
-
*& Report ${upperName}
|
|
103
|
-
*& ${description}
|
|
104
|
-
*&---------------------------------------------------------------------*
|
|
105
|
-
REPORT ${upperName}.
|
|
106
|
-
|
|
107
|
-
START-OF-SELECTION.
|
|
108
|
-
WRITE: / 'Program ${upperName} executed successfully.'.
|
|
109
|
-
`;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
56
|
async function handleCreateProgram(context, params) {
|
|
113
57
|
const { connection, logger } = context;
|
|
114
58
|
const args = params;
|
|
@@ -128,30 +72,9 @@ async function handleCreateProgram(context, params) {
|
|
|
128
72
|
return (0, utils_1.return_error)(error);
|
|
129
73
|
}
|
|
130
74
|
const programName = args.program_name.toUpperCase();
|
|
131
|
-
logger?.info(`Starting program creation: ${programName}
|
|
132
|
-
// Connection setup
|
|
133
|
-
try {
|
|
134
|
-
// Get connection from session context (set by ProtocolHandler)
|
|
135
|
-
// Connection is managed and cached per session, with proper token refresh via AuthBroker
|
|
136
|
-
logger?.debug(`Created separate connection for handler call: ${programName}`);
|
|
137
|
-
}
|
|
138
|
-
catch (connectionError) {
|
|
139
|
-
const errorMessage = connectionError instanceof Error
|
|
140
|
-
? connectionError.message
|
|
141
|
-
: String(connectionError);
|
|
142
|
-
logger?.error(`Failed to create connection: ${errorMessage}`);
|
|
143
|
-
return (0, utils_1.return_error)(new Error(`Failed to create connection: ${errorMessage}`));
|
|
144
|
-
}
|
|
75
|
+
logger?.info(`Starting program creation: ${programName}`);
|
|
145
76
|
try {
|
|
146
|
-
// Generate source code if not provided
|
|
147
|
-
const programType = convertProgramType(args.program_type);
|
|
148
|
-
const sourceCode = args.source_code ||
|
|
149
|
-
generateProgramTemplate(programName, programType, args.description || programName);
|
|
150
|
-
// Create client
|
|
151
77
|
const client = (0, clients_1.createAdtClient)(connection);
|
|
152
|
-
const shouldActivate = args.activate !== false; // Default to true if not specified
|
|
153
|
-
let lockHandle;
|
|
154
|
-
let activateResponse;
|
|
155
78
|
// Validate
|
|
156
79
|
logger?.debug(`Validating program: ${programName}`);
|
|
157
80
|
const validationState = await client.getProgram().validate({
|
|
@@ -179,167 +102,24 @@ async function handleCreateProgram(context, params) {
|
|
|
179
102
|
application: args.application,
|
|
180
103
|
});
|
|
181
104
|
logger?.info(`Program created: ${programName}`);
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
checkNewCodePassed = true;
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
logger?.error(`New code check failed: ${programName} - ${checkError instanceof Error ? checkError.message : String(checkError)}`);
|
|
204
|
-
throw new Error(`New code check failed: ${checkError instanceof Error ? checkError.message : String(checkError)}`);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
// Update (only if check passed)
|
|
208
|
-
if (checkNewCodePassed) {
|
|
209
|
-
logger?.debug(`Updating program source code: ${programName}`);
|
|
210
|
-
await client.getProgram().update({
|
|
211
|
-
programName,
|
|
212
|
-
sourceCode,
|
|
213
|
-
transportRequest: args.transport_request,
|
|
214
|
-
}, { lockHandle: lockHandle });
|
|
215
|
-
logger?.info(`Program source code updated: ${programName}`);
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
logger?.warn(`Skipping update - new code check failed: ${programName}`);
|
|
219
|
-
}
|
|
220
|
-
// Unlock (MANDATORY)
|
|
221
|
-
logger?.debug(`Unlocking program: ${programName}`);
|
|
222
|
-
await client.getProgram().unlock({ programName }, lockHandle);
|
|
223
|
-
logger?.info(`Program unlocked: ${programName}`);
|
|
224
|
-
// Check inactive version (after unlock)
|
|
225
|
-
logger?.debug(`Checking inactive version: ${programName}`);
|
|
226
|
-
try {
|
|
227
|
-
await (0, utils_1.safeCheckOperation)(() => client.getProgram().check({ programName }, 'inactive'), programName, {
|
|
228
|
-
debug: (message) => logger?.debug(message),
|
|
229
|
-
});
|
|
230
|
-
logger?.debug(`Inactive version check completed: ${programName}`);
|
|
231
|
-
}
|
|
232
|
-
catch (checkError) {
|
|
233
|
-
if (checkError.isAlreadyChecked) {
|
|
234
|
-
logger?.debug(`Program ${programName} was already checked - continuing`);
|
|
235
|
-
}
|
|
236
|
-
else {
|
|
237
|
-
logger?.warn(`Inactive version check had issues: ${programName} - ${checkError instanceof Error ? checkError.message : String(checkError)}`);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
// Activate if requested
|
|
241
|
-
if (shouldActivate) {
|
|
242
|
-
logger?.debug(`Activating program: ${programName}`);
|
|
243
|
-
try {
|
|
244
|
-
const activateState = await client.getProgram().activate({
|
|
245
|
-
programName,
|
|
246
|
-
});
|
|
247
|
-
activateResponse = activateState.activateResult;
|
|
248
|
-
logger?.info(`Program activated: ${programName}`);
|
|
249
|
-
}
|
|
250
|
-
catch (activationError) {
|
|
251
|
-
logger?.error(`Activation failed: ${programName} - ${activationError instanceof Error ? activationError.message : String(activationError)}`);
|
|
252
|
-
throw new Error(`Activation failed: ${activationError instanceof Error ? activationError.message : String(activationError)}`);
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
else {
|
|
256
|
-
logger?.debug(`Skipping activation for: ${programName}`);
|
|
257
|
-
}
|
|
258
|
-
// Parse activation warnings if activation was performed
|
|
259
|
-
let activationWarnings = [];
|
|
260
|
-
if (shouldActivate &&
|
|
261
|
-
activateResponse &&
|
|
262
|
-
typeof activateResponse.data === 'string' &&
|
|
263
|
-
activateResponse.data.includes('<chkl:messages')) {
|
|
264
|
-
const parser = new fast_xml_parser_1.XMLParser({
|
|
265
|
-
ignoreAttributes: false,
|
|
266
|
-
attributeNamePrefix: '@_',
|
|
267
|
-
});
|
|
268
|
-
const result = parser.parse(activateResponse.data);
|
|
269
|
-
const messages = result?.['chkl:messages']?.msg;
|
|
270
|
-
if (messages) {
|
|
271
|
-
const msgArray = Array.isArray(messages) ? messages : [messages];
|
|
272
|
-
activationWarnings = msgArray.map((msg) => `${msg['@_type']}: ${msg.shortText?.txt || 'Unknown'}`);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
logger?.info(`CreateProgram completed successfully: ${programName}`);
|
|
276
|
-
const result = {
|
|
277
|
-
success: true,
|
|
278
|
-
program_name: programName,
|
|
279
|
-
package_name: args.package_name,
|
|
280
|
-
transport_request: args.transport_request || null,
|
|
281
|
-
program_type: args.program_type || 'executable',
|
|
282
|
-
type: 'PROG/P',
|
|
283
|
-
message: shouldActivate
|
|
284
|
-
? `Program ${programName} created and activated successfully`
|
|
285
|
-
: `Program ${programName} created successfully (not activated)`,
|
|
286
|
-
uri: `/sap/bc/adt/programs/programs/${(0, utils_1.encodeSapObjectName)(programName).toLowerCase()}`,
|
|
287
|
-
steps_completed: [
|
|
288
|
-
'validate',
|
|
289
|
-
'create',
|
|
290
|
-
'lock',
|
|
291
|
-
'check_new_code',
|
|
292
|
-
'update',
|
|
293
|
-
'unlock',
|
|
294
|
-
'check_inactive',
|
|
295
|
-
...(shouldActivate ? ['activate'] : []),
|
|
296
|
-
],
|
|
297
|
-
activation_warnings: activationWarnings.length > 0 ? activationWarnings : undefined,
|
|
298
|
-
};
|
|
299
|
-
return (0, utils_1.return_response)({
|
|
300
|
-
data: JSON.stringify(result, null, 2),
|
|
301
|
-
status: 200,
|
|
302
|
-
statusText: 'OK',
|
|
303
|
-
headers: {},
|
|
304
|
-
config: {},
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
catch (workflowError) {
|
|
308
|
-
// On error, ensure we attempt unlock
|
|
309
|
-
try {
|
|
310
|
-
if (lockHandle) {
|
|
311
|
-
logger?.warn(`Attempting unlock after error for program ${programName}`);
|
|
312
|
-
await client.getProgram().unlock({ programName }, lockHandle);
|
|
313
|
-
logger?.warn(`Unlocked program after error: ${programName}`);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
catch (unlockError) {
|
|
317
|
-
logger?.error(`Failed to unlock program after error: ${programName} - ${unlockError instanceof Error ? unlockError.message : String(unlockError)}`);
|
|
318
|
-
}
|
|
319
|
-
// Parse error message
|
|
320
|
-
let errorMessage = workflowError instanceof Error
|
|
321
|
-
? workflowError.message
|
|
322
|
-
: String(workflowError);
|
|
323
|
-
// Attempt to parse ADT XML error
|
|
324
|
-
try {
|
|
325
|
-
const parser = new fast_xml_parser_1.XMLParser({
|
|
326
|
-
ignoreAttributes: false,
|
|
327
|
-
attributeNamePrefix: '@_',
|
|
328
|
-
});
|
|
329
|
-
const errorData = workflowError?.response?.data
|
|
330
|
-
? parser.parse(workflowError.response.data)
|
|
331
|
-
: null;
|
|
332
|
-
const errorMsg = errorData?.['exc:exception']?.message?.['#text'] ||
|
|
333
|
-
errorData?.['exc:exception']?.message;
|
|
334
|
-
if (errorMsg) {
|
|
335
|
-
errorMessage = `SAP Error: ${errorMsg}`;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
catch {
|
|
339
|
-
// ignore parse errors
|
|
340
|
-
}
|
|
341
|
-
return (0, utils_1.return_error)(new Error(errorMessage));
|
|
342
|
-
}
|
|
105
|
+
const result = {
|
|
106
|
+
success: true,
|
|
107
|
+
program_name: programName,
|
|
108
|
+
package_name: args.package_name,
|
|
109
|
+
transport_request: args.transport_request || null,
|
|
110
|
+
program_type: args.program_type || 'executable',
|
|
111
|
+
type: 'PROG/P',
|
|
112
|
+
message: `Program ${programName} created successfully. Use UpdateProgram to set source code.`,
|
|
113
|
+
uri: `/sap/bc/adt/programs/programs/${(0, utils_1.encodeSapObjectName)(programName).toLowerCase()}`,
|
|
114
|
+
steps_completed: ['validate', 'create'],
|
|
115
|
+
};
|
|
116
|
+
return (0, utils_1.return_response)({
|
|
117
|
+
data: JSON.stringify(result, null, 2),
|
|
118
|
+
status: 200,
|
|
119
|
+
statusText: 'OK',
|
|
120
|
+
headers: {},
|
|
121
|
+
config: {},
|
|
122
|
+
});
|
|
343
123
|
}
|
|
344
124
|
catch (error) {
|
|
345
125
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleCreateProgram.js","sourceRoot":"","sources":["../../../../src/handlers/program/high/handleCreateProgram.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA+IH,kDAyTC;AArcD,qDAA4C;AAC5C,kDAAuD;AAEvD,8CAO4B;AAC5B,kFAAiF;AAEpE,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,eAAe;IACrB,WAAW,EACT,4KAA4K;IAC9K,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,kGAAkG;aACrG;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,kEAAkE;aACrE;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sDAAsD;aACpE;YACD,iBAAiB,EAAE;gBACjB,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,mFAAmF;aACtF;YACD,YAA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,CAAC;IACH,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,MAAM,EAAE,KAAK,CAAC,0BAA0B,WAAW,KAAK,YAAY,EAAE,CAAC,CAAC;QACxE,OAAO,IAAA,oBAAY,EACjB,IAAI,KAAK,CAAC,4BAA4B,WAAW,KAAK,YAAY,EAAE,CAAC,CACtE,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"handleCreateProgram.js","sourceRoot":"","sources":["../../../../src/handlers/program/high/handleCreateProgram.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAwEH,kDA+FC;AApKD,kDAAuD;AAEvD,8CAM4B;AAC5B,kFAAiF;AAEpE,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,eAAe;IACrB,WAAW,EACT,iJAAiJ;IACnJ,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,kGAAkG;aACrG;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,kEAAkE;aACrE;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sDAAsD;aACpE;YACD,iBAAiB,EAAE;gBACjB,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,mFAAmF;aACtF;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,wIAAwI;gBAC1I,IAAI,EAAE;oBACJ,YAAY;oBACZ,SAAS;oBACT,aAAa;oBACb,gBAAgB;oBAChB,YAAY;oBACZ,gBAAgB;iBACjB;aACF;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAC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,CAAC,CAAC,WAAW,EAAE,EAAE;YACtF,eAAe,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;SACxC,CAAC;QAEF,OAAO,IAAA,uBAAe,EAAC;YACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;YACrC,MAAM,EAAE,GAAG;YACX,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE,EAAE;YACX,MAAM,EAAE,EAAS;SAClB,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,MAAM,EAAE,KAAK,CAAC,0BAA0B,WAAW,KAAK,YAAY,EAAE,CAAC,CAAC;QACxE,OAAO,IAAA,oBAAY,EACjB,IAAI,KAAK,CAAC,4BAA4B,WAAW,KAAK,YAAY,EAAE,CAAC,CACtE,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CreateTable Handler - ABAP Table Creation via ADT API
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Workflow: validate -> create -> lock -> check (new code) -> update (if check OK) -> unlock -> check (inactive version) -> (activate)
|
|
4
|
+
* Workflow: validate -> create (object in initial state)
|
|
5
|
+
* DDL code is set via UpdateTable handler.
|
|
8
6
|
*/
|
|
9
7
|
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
10
8
|
export declare const TOOL_DEFINITION: {
|
|
11
9
|
readonly name: "CreateTable";
|
|
12
|
-
readonly description: "Create a new ABAP table via the ADT API
|
|
10
|
+
readonly description: "Create a new ABAP table via the ADT API. Creates the table object in initial state. Use UpdateTable to set DDL code afterwards.";
|
|
13
11
|
readonly inputSchema: {
|
|
14
12
|
readonly type: "object";
|
|
15
13
|
readonly properties: {
|
|
@@ -17,10 +15,6 @@ export declare const TOOL_DEFINITION: {
|
|
|
17
15
|
readonly type: "string";
|
|
18
16
|
readonly description: "Table name (e.g., ZZ_TEST_TABLE_001). Must follow SAP naming conventions.";
|
|
19
17
|
};
|
|
20
|
-
readonly ddl_code: {
|
|
21
|
-
readonly type: "string";
|
|
22
|
-
readonly description: "Complete DDL code for table creation. Example: '@EndUserText.label : \\'My Table\\' @AbapCatalog.tableCategory : #TRANSPARENT define table ztst_table { key client : abap.clnt not null; key id : abap.char(10); name : abap.char(255); }'";
|
|
23
|
-
};
|
|
24
18
|
readonly description: {
|
|
25
19
|
readonly type: "string";
|
|
26
20
|
readonly description: "Table description for validation and creation.";
|
|
@@ -33,27 +27,18 @@ export declare const TOOL_DEFINITION: {
|
|
|
33
27
|
readonly type: "string";
|
|
34
28
|
readonly description: "Transport request number (e.g., E19K905635). Required for transportable packages.";
|
|
35
29
|
};
|
|
36
|
-
readonly activate: {
|
|
37
|
-
readonly type: "boolean";
|
|
38
|
-
readonly description: "Activate table after creation. Default: true. Set to false for batch operations (activate multiple objects later).";
|
|
39
|
-
};
|
|
40
30
|
};
|
|
41
|
-
readonly required: readonly ["table_name", "
|
|
31
|
+
readonly required: readonly ["table_name", "package_name"];
|
|
42
32
|
};
|
|
43
33
|
};
|
|
44
34
|
interface CreateTableArgs {
|
|
45
35
|
table_name: string;
|
|
46
|
-
ddl_code: string;
|
|
47
36
|
description?: string;
|
|
48
37
|
package_name: string;
|
|
49
38
|
transport_request?: string;
|
|
50
|
-
activate?: boolean;
|
|
51
39
|
}
|
|
52
40
|
/**
|
|
53
41
|
* Main handler for CreateTable MCP tool
|
|
54
|
-
*
|
|
55
|
-
* Uses TableBuilder from @mcp-abap-adt/adt-clients for all operations
|
|
56
|
-
* Session and lock management handled internally by builder
|
|
57
42
|
*/
|
|
58
43
|
export declare function handleCreateTable(context: HandlerContext, args: CreateTableArgs): Promise<any>;
|
|
59
44
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleCreateTable.d.ts","sourceRoot":"","sources":["../../../../src/handlers/table/high/handleCreateTable.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"handleCreateTable.d.ts","sourceRoot":"","sources":["../../../../src/handlers/table/high/handleCreateTable.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAUvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;CA4BlB,CAAC;AAEX,UAAU,eAAe;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,GAAG,CAAC,CAuFd"}
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* CreateTable Handler - ABAP Table Creation via ADT API
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* Workflow: validate -> create -> lock -> check (new code) -> update (if check OK) -> unlock -> check (inactive version) -> (activate)
|
|
5
|
+
* Workflow: validate -> create (object in initial state)
|
|
6
|
+
* DDL code is set via UpdateTable handler.
|
|
9
7
|
*/
|
|
10
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
9
|
exports.TOOL_DEFINITION = void 0;
|
|
@@ -15,7 +13,7 @@ const utils_1 = require("../../../lib/utils");
|
|
|
15
13
|
const transportValidation_js_1 = require("../../../utils/transportValidation.js");
|
|
16
14
|
exports.TOOL_DEFINITION = {
|
|
17
15
|
name: 'CreateTable',
|
|
18
|
-
description: 'Create a new ABAP table via the ADT API
|
|
16
|
+
description: 'Create a new ABAP table via the ADT API. Creates the table object in initial state. Use UpdateTable to set DDL code afterwards.',
|
|
19
17
|
inputSchema: {
|
|
20
18
|
type: 'object',
|
|
21
19
|
properties: {
|
|
@@ -23,10 +21,6 @@ exports.TOOL_DEFINITION = {
|
|
|
23
21
|
type: 'string',
|
|
24
22
|
description: 'Table name (e.g., ZZ_TEST_TABLE_001). Must follow SAP naming conventions.',
|
|
25
23
|
},
|
|
26
|
-
ddl_code: {
|
|
27
|
-
type: 'string',
|
|
28
|
-
description: "Complete DDL code for table creation. Example: '@EndUserText.label : \\'My Table\\' @AbapCatalog.tableCategory : #TRANSPARENT define table ztst_table { key client : abap.clnt not null; key id : abap.char(10); name : abap.char(255); }'",
|
|
29
|
-
},
|
|
30
24
|
description: {
|
|
31
25
|
type: 'string',
|
|
32
26
|
description: 'Table description for validation and creation.',
|
|
@@ -39,19 +33,12 @@ exports.TOOL_DEFINITION = {
|
|
|
39
33
|
type: 'string',
|
|
40
34
|
description: 'Transport request number (e.g., E19K905635). Required for transportable packages.',
|
|
41
35
|
},
|
|
42
|
-
activate: {
|
|
43
|
-
type: 'boolean',
|
|
44
|
-
description: 'Activate table after creation. Default: true. Set to false for batch operations (activate multiple objects later).',
|
|
45
|
-
},
|
|
46
36
|
},
|
|
47
|
-
required: ['table_name', '
|
|
37
|
+
required: ['table_name', 'package_name'],
|
|
48
38
|
},
|
|
49
39
|
};
|
|
50
40
|
/**
|
|
51
41
|
* Main handler for CreateTable MCP tool
|
|
52
|
-
*
|
|
53
|
-
* Uses TableBuilder from @mcp-abap-adt/adt-clients for all operations
|
|
54
|
-
* Session and lock management handled internally by builder
|
|
55
42
|
*/
|
|
56
43
|
async function handleCreateTable(context, args) {
|
|
57
44
|
const { connection, logger } = context;
|
|
@@ -61,9 +48,6 @@ async function handleCreateTable(context, args) {
|
|
|
61
48
|
if (!createTableArgs?.table_name) {
|
|
62
49
|
throw new utils_1.McpError(utils_1.ErrorCode.InvalidParams, 'Table name is required');
|
|
63
50
|
}
|
|
64
|
-
if (!createTableArgs?.ddl_code) {
|
|
65
|
-
throw new utils_1.McpError(utils_1.ErrorCode.InvalidParams, 'DDL code is required');
|
|
66
|
-
}
|
|
67
51
|
if (!createTableArgs?.package_name) {
|
|
68
52
|
throw new utils_1.McpError(utils_1.ErrorCode.InvalidParams, 'Package name is required');
|
|
69
53
|
}
|
|
@@ -74,7 +58,6 @@ async function handleCreateTable(context, args) {
|
|
|
74
58
|
try {
|
|
75
59
|
// Create client
|
|
76
60
|
const client = (0, clients_1.createAdtClient)(connection);
|
|
77
|
-
const shouldActivate = createTableArgs.activate !== false; // Default to true if not specified
|
|
78
61
|
// Validate
|
|
79
62
|
await client.getTable().validate({
|
|
80
63
|
tableName,
|
|
@@ -86,99 +69,17 @@ async function handleCreateTable(context, args) {
|
|
|
86
69
|
tableName,
|
|
87
70
|
packageName: createTableArgs.package_name,
|
|
88
71
|
description: createTableArgs.description || tableName,
|
|
89
|
-
ddlCode:
|
|
72
|
+
ddlCode: '',
|
|
90
73
|
transportRequest: createTableArgs.transport_request,
|
|
91
74
|
});
|
|
92
|
-
|
|
93
|
-
const lockHandle = await client.getTable().lock({ tableName });
|
|
94
|
-
try {
|
|
95
|
-
// Step 1: Check new code BEFORE update (with ddlCode and version='inactive')
|
|
96
|
-
logger?.info(`[CreateTable] Checking new DDL code before update: ${tableName}`);
|
|
97
|
-
let checkNewCodePassed = false;
|
|
98
|
-
try {
|
|
99
|
-
await (0, utils_1.safeCheckOperation)(() => client
|
|
100
|
-
.getTable()
|
|
101
|
-
.check({ tableName, ddlCode: createTableArgs.ddl_code }, 'inactive'), tableName, {
|
|
102
|
-
debug: (message) => logger?.debug(`[CreateTable] ${message}`),
|
|
103
|
-
});
|
|
104
|
-
checkNewCodePassed = true;
|
|
105
|
-
logger?.info(`[CreateTable] New code check passed: ${tableName}`);
|
|
106
|
-
}
|
|
107
|
-
catch (checkError) {
|
|
108
|
-
// If error was marked as "already checked", continue silently
|
|
109
|
-
if (checkError.isAlreadyChecked) {
|
|
110
|
-
logger?.info(`[CreateTable] Table ${tableName} was already checked - this is OK, continuing`);
|
|
111
|
-
checkNewCodePassed = true;
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
// Real check error - don't update if check failed
|
|
115
|
-
logger?.error(`[CreateTable] New code check failed: ${tableName}`, {
|
|
116
|
-
error: checkError instanceof Error
|
|
117
|
-
? checkError.message
|
|
118
|
-
: String(checkError),
|
|
119
|
-
});
|
|
120
|
-
throw new Error(`New code check failed: ${checkError instanceof Error ? checkError.message : String(checkError)}`);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
// Step 2: Update (only if check passed)
|
|
124
|
-
if (checkNewCodePassed) {
|
|
125
|
-
logger?.info(`[CreateTable] Updating table with DDL code: ${tableName}`);
|
|
126
|
-
await client.getTable().update({
|
|
127
|
-
tableName,
|
|
128
|
-
ddlCode: createTableArgs.ddl_code,
|
|
129
|
-
transportRequest: createTableArgs.transport_request,
|
|
130
|
-
}, { lockHandle });
|
|
131
|
-
logger?.info(`[CreateTable] Table source code updated: ${tableName}`);
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
logger?.info(`[CreateTable] Skipping update - new code check failed: ${tableName}`);
|
|
135
|
-
}
|
|
136
|
-
// Step 3: Unlock (MANDATORY after lock)
|
|
137
|
-
await client.getTable().unlock({ tableName }, lockHandle);
|
|
138
|
-
logger?.info(`[CreateTable] Table unlocked: ${tableName}`);
|
|
139
|
-
// Step 4: Check inactive version (after unlock)
|
|
140
|
-
logger?.info(`[CreateTable] Checking inactive version: ${tableName}`);
|
|
141
|
-
try {
|
|
142
|
-
await (0, utils_1.safeCheckOperation)(() => client.getTable().check({ tableName }, 'inactive'), tableName, {
|
|
143
|
-
debug: (message) => logger?.debug(`[CreateTable] ${message}`),
|
|
144
|
-
});
|
|
145
|
-
logger?.info(`[CreateTable] Inactive version check completed: ${tableName}`);
|
|
146
|
-
}
|
|
147
|
-
catch (checkError) {
|
|
148
|
-
// If error was marked as "already checked", continue silently
|
|
149
|
-
if (checkError.isAlreadyChecked) {
|
|
150
|
-
logger?.info(`[CreateTable] Table ${tableName} was already checked - continuing`);
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
// Log warning but don't fail - inactive check is informational
|
|
154
|
-
logger?.warn(`[CreateTable] Inactive version check had issues: ${tableName} | ${checkError instanceof Error ? checkError.message : String(checkError)}`);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
// Activate
|
|
158
|
-
if (shouldActivate) {
|
|
159
|
-
await client.getTable().activate({ tableName });
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
catch (error) {
|
|
163
|
-
// Unlock on error (principle 1: if lock was done, unlock is mandatory)
|
|
164
|
-
try {
|
|
165
|
-
await client.getTable().unlock({ tableName }, lockHandle);
|
|
166
|
-
}
|
|
167
|
-
catch (unlockError) {
|
|
168
|
-
logger?.error(`Failed to unlock table after error: ${unlockError instanceof Error ? unlockError.message : String(unlockError)}`);
|
|
169
|
-
}
|
|
170
|
-
// Principle 2: first error and exit
|
|
171
|
-
throw error;
|
|
172
|
-
}
|
|
173
|
-
logger?.info(`✅ CreateTable completed successfully: ${tableName}`);
|
|
75
|
+
logger?.info(`Table created: ${tableName}`);
|
|
174
76
|
return (0, utils_1.return_response)({
|
|
175
77
|
data: JSON.stringify({
|
|
176
78
|
success: true,
|
|
177
79
|
table_name: tableName,
|
|
178
80
|
package_name: createTableArgs.package_name,
|
|
179
81
|
transport_request: createTableArgs.transport_request || 'local',
|
|
180
|
-
|
|
181
|
-
message: `Table ${tableName} created successfully${shouldActivate ? ' and activated' : ''}`,
|
|
82
|
+
message: `Table ${tableName} created successfully. Use UpdateTable to set DDL code.`,
|
|
182
83
|
}),
|
|
183
84
|
});
|
|
184
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleCreateTable.js","sourceRoot":"","sources":["../../../../src/handlers/table/high/handleCreateTable.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"handleCreateTable.js","sourceRoot":"","sources":["../../../../src/handlers/table/high/handleCreateTable.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAqDH,8CA0FC;AA7ID,kDAAuD;AAEvD,8CAM4B;AAC5B,kFAAiF;AAEpE,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,iIAAiI;IACnI,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,2EAA2E;aAC9E;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gDAAgD;aAC9D;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wDAAwD;aACtE;YACD,iBAAiB,EAAE;gBACjB,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,mFAAmF;aACtF;SACF;QACD,QAAQ,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;KACzC;CACO,CAAC;AASX;;GAEG;AACI,KAAK,UAAU,iBAAiB,CACrC,OAAuB,EACvB,IAAqB;IAErB,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IACvC,IAAI,CAAC;QACH,MAAM,eAAe,GAAG,IAAuB,CAAC;QAEhD,+BAA+B;QAC/B,IAAI,CAAC,eAAe,EAAE,UAAU,EAAE,CAAC;YACjC,MAAM,IAAI,gBAAQ,CAAC,iBAAS,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAC;QACxE,CAAC;QACD,IAAI,CAAC,eAAe,EAAE,YAAY,EAAE,CAAC;YACnC,MAAM,IAAI,gBAAQ,CAAC,iBAAS,CAAC,aAAa,EAAE,0BAA0B,CAAC,CAAC;QAC1E,CAAC;QAED,6DAA6D;QAC7D,IAAA,iDAAwB,EACtB,e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,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,gBAAgB,CAAC;gBACzC,KAAK,CAAC,QAAQ,EAAE,MAAM,KAAK,GAAG,EAC9B,CAAC;gBACD,MAAM,IAAI,gBAAQ,CAChB,iBAAS,CAAC,aAAa,EACvB,SAAS,SAAS,kEAAkE,CACrF,CAAC;YACJ,CAAC;YAED,MAAM,YAAY,GAAG,KAAK,CAAC,QAAQ,EAAE,IAAI;gBACvC,CAAC,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ;oBACvC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI;oBACrB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACvC,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;YAEnC,MAAM,IAAI,gBAAQ,CAChB,iBAAS,CAAC,aAAa,EACvB,0BAA0B,SAAS,KAAK,YAAY,EAAE,CACvD,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,IAAI,KAAK,YAAY,gBAAQ,EAAE,CAAC;YAC9B,MAAM,KAAK,CAAC;QACd,CAAC;QACD,OAAO,IAAA,oBAAY,EAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
7
7
|
export declare const TOOL_DEFINITION: {
|
|
8
8
|
readonly name: "CreateCdsUnitTest";
|
|
9
|
-
readonly description: "Create a CDS unit test class with CDS validation
|
|
9
|
+
readonly description: "Create a CDS unit test class with CDS validation. Creates the test class in initial state.";
|
|
10
10
|
readonly inputSchema: {
|
|
11
11
|
readonly type: "object";
|
|
12
12
|
readonly properties: {
|
|
@@ -22,14 +22,6 @@ export declare const TOOL_DEFINITION: {
|
|
|
22
22
|
readonly type: "string";
|
|
23
23
|
readonly description: "CDS view name to validate for unit test doubles.";
|
|
24
24
|
};
|
|
25
|
-
readonly class_template: {
|
|
26
|
-
readonly type: "string";
|
|
27
|
-
readonly description: "ABAP class template used for CDS unit tests.";
|
|
28
|
-
};
|
|
29
|
-
readonly test_class_source: {
|
|
30
|
-
readonly type: "string";
|
|
31
|
-
readonly description: "Local test class ABAP source code.";
|
|
32
|
-
};
|
|
33
25
|
readonly description: {
|
|
34
26
|
readonly type: "string";
|
|
35
27
|
readonly description: "Optional description for the global test class.";
|
|
@@ -39,15 +31,15 @@ export declare const TOOL_DEFINITION: {
|
|
|
39
31
|
readonly description: "Transport request number (required for transportable packages).";
|
|
40
32
|
};
|
|
41
33
|
};
|
|
42
|
-
readonly required: readonly ["class_name", "package_name", "cds_view_name"
|
|
34
|
+
readonly required: readonly ["class_name", "package_name", "cds_view_name"];
|
|
43
35
|
};
|
|
44
36
|
};
|
|
45
37
|
interface CreateCdsUnitTestArgs {
|
|
46
38
|
class_name: string;
|
|
47
39
|
package_name: string;
|
|
48
40
|
cds_view_name: string;
|
|
49
|
-
class_template
|
|
50
|
-
test_class_source
|
|
41
|
+
class_template?: string;
|
|
42
|
+
test_class_source?: string;
|
|
51
43
|
description?: string;
|
|
52
44
|
transport_request?: string;
|
|
53
45
|
}
|