@mcp-abap-adt/core 2.4.0 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/dist/handlers/service_binding/high/handleCreateServiceBinding.d.ts +83 -0
- package/dist/handlers/service_binding/high/handleCreateServiceBinding.d.ts.map +1 -0
- package/dist/handlers/service_binding/high/handleCreateServiceBinding.js +147 -0
- package/dist/handlers/service_binding/high/handleCreateServiceBinding.js.map +1 -0
- package/dist/handlers/service_binding/high/handleDeleteServiceBinding.d.ts +39 -0
- package/dist/handlers/service_binding/high/handleDeleteServiceBinding.d.ts.map +1 -0
- package/dist/handlers/service_binding/high/handleDeleteServiceBinding.js +67 -0
- package/dist/handlers/service_binding/high/handleDeleteServiceBinding.js.map +1 -0
- package/dist/handlers/service_binding/high/handleGetServiceBinding.d.ts +35 -0
- package/dist/handlers/service_binding/high/handleGetServiceBinding.d.ts.map +1 -0
- package/dist/handlers/service_binding/high/handleGetServiceBinding.js +63 -0
- package/dist/handlers/service_binding/high/handleGetServiceBinding.js.map +1 -0
- package/dist/handlers/service_binding/high/handleListServiceBindingTypes.d.ts +28 -0
- package/dist/handlers/service_binding/high/handleListServiceBindingTypes.d.ts.map +1 -0
- package/dist/handlers/service_binding/high/handleListServiceBindingTypes.js +46 -0
- package/dist/handlers/service_binding/high/handleListServiceBindingTypes.js.map +1 -0
- package/dist/handlers/service_binding/high/handleListServiceBindings.d.ts +44 -0
- package/dist/handlers/service_binding/high/handleListServiceBindings.d.ts.map +1 -0
- package/dist/handlers/service_binding/high/handleListServiceBindings.js +211 -0
- package/dist/handlers/service_binding/high/handleListServiceBindings.js.map +1 -0
- package/dist/handlers/service_binding/high/handleUpdateServiceBinding.d.ts +59 -0
- package/dist/handlers/service_binding/high/handleUpdateServiceBinding.d.ts.map +1 -0
- package/dist/handlers/service_binding/high/handleUpdateServiceBinding.js +98 -0
- package/dist/handlers/service_binding/high/handleUpdateServiceBinding.js.map +1 -0
- package/dist/handlers/service_binding/high/handleValidateServiceBinding.d.ts +47 -0
- package/dist/handlers/service_binding/high/handleValidateServiceBinding.d.ts.map +1 -0
- package/dist/handlers/service_binding/high/handleValidateServiceBinding.js +74 -0
- package/dist/handlers/service_binding/high/handleValidateServiceBinding.js.map +1 -0
- package/dist/handlers/service_binding/high/serviceBindingPayloadUtils.d.ts +4 -0
- package/dist/handlers/service_binding/high/serviceBindingPayloadUtils.d.ts.map +1 -0
- package/dist/handlers/service_binding/high/serviceBindingPayloadUtils.js +48 -0
- package/dist/handlers/service_binding/high/serviceBindingPayloadUtils.js.map +1 -0
- package/dist/handlers/service_binding/high/serviceBindingXmlBuilder.d.ts +11 -0
- package/dist/handlers/service_binding/high/serviceBindingXmlBuilder.d.ts.map +1 -0
- package/dist/handlers/service_binding/high/serviceBindingXmlBuilder.js +27 -0
- package/dist/handlers/service_binding/high/serviceBindingXmlBuilder.js.map +1 -0
- package/dist/handlers/system/readonly/handleGetAllTypes.d.ts +1 -5
- package/dist/handlers/system/readonly/handleGetAllTypes.d.ts.map +1 -1
- package/dist/handlers/system/readonly/handleGetAllTypes.js +6 -8
- package/dist/handlers/system/readonly/handleGetAllTypes.js.map +1 -1
- package/dist/handlers/system/readonly/handleGetObjectStructure.d.ts +7 -6
- package/dist/handlers/system/readonly/handleGetObjectStructure.d.ts.map +1 -1
- package/dist/handlers/system/readonly/handleGetObjectStructure.js +13 -11
- package/dist/handlers/system/readonly/handleGetObjectStructure.js.map +1 -1
- package/dist/handlers/system/readonly/handleGetSqlQuery.d.ts +0 -5
- package/dist/handlers/system/readonly/handleGetSqlQuery.d.ts.map +1 -1
- package/dist/handlers/system/readonly/handleGetSqlQuery.js +5 -10
- package/dist/handlers/system/readonly/handleGetSqlQuery.js.map +1 -1
- package/dist/handlers/system/readonly/handleRuntimeAnalyzeDump.d.ts +40 -0
- package/dist/handlers/system/readonly/handleRuntimeAnalyzeDump.d.ts.map +1 -0
- package/dist/handlers/system/readonly/handleRuntimeAnalyzeDump.js +111 -0
- package/dist/handlers/system/readonly/handleRuntimeAnalyzeDump.js.map +1 -0
- package/dist/handlers/system/readonly/handleRuntimeAnalyzeProfilerTrace.d.ts +43 -0
- package/dist/handlers/system/readonly/handleRuntimeAnalyzeProfilerTrace.d.ts.map +1 -0
- package/dist/handlers/system/readonly/handleRuntimeAnalyzeProfilerTrace.js +137 -0
- package/dist/handlers/system/readonly/handleRuntimeAnalyzeProfilerTrace.js.map +1 -0
- package/dist/handlers/system/readonly/handleRuntimeGetDumpById.d.ts +7 -0
- package/dist/handlers/system/readonly/handleRuntimeGetDumpById.d.ts.map +1 -1
- package/dist/handlers/system/readonly/handleRuntimeGetDumpById.js +11 -1
- package/dist/handlers/system/readonly/handleRuntimeGetDumpById.js.map +1 -1
- package/dist/handlers/system/readonly/handleRuntimeRunClassWithProfiling.d.ts +84 -0
- package/dist/handlers/system/readonly/handleRuntimeRunClassWithProfiling.d.ts.map +1 -0
- package/dist/handlers/system/readonly/handleRuntimeRunClassWithProfiling.js +85 -0
- package/dist/handlers/system/readonly/handleRuntimeRunClassWithProfiling.js.map +1 -0
- package/dist/handlers/system/readonly/handleRuntimeRunProgramWithProfiling.d.ts +84 -0
- package/dist/handlers/system/readonly/handleRuntimeRunProgramWithProfiling.d.ts.map +1 -0
- package/dist/handlers/system/readonly/handleRuntimeRunProgramWithProfiling.js +85 -0
- package/dist/handlers/system/readonly/handleRuntimeRunProgramWithProfiling.js.map +1 -0
- package/dist/handlers/system/readonly/runtimeDumpReadCompat.d.ts +8 -0
- package/dist/handlers/system/readonly/runtimeDumpReadCompat.d.ts.map +1 -0
- package/dist/handlers/system/readonly/runtimeDumpReadCompat.js +55 -0
- package/dist/handlers/system/readonly/runtimeDumpReadCompat.js.map +1 -0
- package/dist/lib/handlers/groups/HighLevelHandlersGroup.d.ts.map +1 -1
- package/dist/lib/handlers/groups/HighLevelHandlersGroup.js +145 -88
- package/dist/lib/handlers/groups/HighLevelHandlersGroup.js.map +1 -1
- package/dist/lib/handlers/groups/SystemHandlersGroup.d.ts.map +1 -1
- package/dist/lib/handlers/groups/SystemHandlersGroup.js +36 -0
- package/dist/lib/handlers/groups/SystemHandlersGroup.js.map +1 -1
- package/dist/server/SseServer.d.ts +1 -0
- package/dist/server/SseServer.d.ts.map +1 -1
- package/dist/server/SseServer.js +6 -4
- package/dist/server/SseServer.js.map +1 -1
- package/dist/server/StreamableHttpServer.d.ts +1 -0
- package/dist/server/StreamableHttpServer.d.ts.map +1 -1
- package/dist/server/StreamableHttpServer.js +6 -4
- package/dist/server/StreamableHttpServer.js.map +1 -1
- package/dist/server/launcher.js +5 -0
- package/dist/server/launcher.js.map +1 -1
- package/docs/development/tests/test-config.yaml.template +36 -0
- package/package.json +9 -9
|
@@ -15,6 +15,12 @@ exports.TOOL_DEFINITION = {
|
|
|
15
15
|
type: 'string',
|
|
16
16
|
description: 'Runtime dump ID (for example: 694AB694097211F1929806D06D234D38).',
|
|
17
17
|
},
|
|
18
|
+
view: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
enum: ['default', 'summary', 'formatted'],
|
|
21
|
+
description: 'Dump view mode: default payload, summary section, or formatted long text.',
|
|
22
|
+
default: 'default',
|
|
23
|
+
},
|
|
18
24
|
},
|
|
19
25
|
required: ['dump_id'],
|
|
20
26
|
},
|
|
@@ -25,12 +31,16 @@ async function handleRuntimeGetDumpById(context, args) {
|
|
|
25
31
|
if (!args?.dump_id) {
|
|
26
32
|
throw new Error('Parameter "dump_id" is required');
|
|
27
33
|
}
|
|
34
|
+
const view = args.view ?? 'default';
|
|
28
35
|
const runtimeClient = new adt_clients_1.AdtRuntimeClient(connection, logger);
|
|
29
|
-
const response = await runtimeClient.getRuntimeDumpById(args.dump_id
|
|
36
|
+
const response = await runtimeClient.getRuntimeDumpById(args.dump_id, {
|
|
37
|
+
view,
|
|
38
|
+
});
|
|
30
39
|
return (0, utils_1.return_response)({
|
|
31
40
|
data: JSON.stringify({
|
|
32
41
|
success: true,
|
|
33
42
|
dump_id: args.dump_id,
|
|
43
|
+
view,
|
|
34
44
|
status: response.status,
|
|
35
45
|
payload: (0, runtimePayloadParser_1.parseRuntimePayloadToJson)(response.data),
|
|
36
46
|
}, null, 2),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleRuntimeGetDumpById.js","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleRuntimeGetDumpById.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"handleRuntimeGetDumpById.js","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleRuntimeGetDumpById.ts"],"names":[],"mappings":";;;AAkCA,4DAsCC;AAxED,2DAA6D;AAE7D,8CAAmE;AACnE,iEAAmE;AAEtD,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EACT,sFAAsF;IACxF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,kEAAkE;aACrE;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC;gBACzC,WAAW,EACT,2EAA2E;gBAC7E,OAAO,EAAE,SAAS;aACnB;SACF;QACD,QAAQ,EAAE,CAAC,SAAS,CAAC;KACtB;CACO,CAAC;AAOJ,KAAK,UAAU,wBAAwB,CAC5C,OAAuB,EACvB,IAA4B;IAE5B,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAEvC,IAAI,CAAC;QACH,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC;QACpC,MAAM,aAAa,GAAG,IAAI,8BAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAC/D,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,EAAE;YACpE,IAAI;SACL,CAAC,CAAC;QAEH,OAAO,IAAA,uBAAe,EAAC;YACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;gBACE,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,IAAI;gBACJ,MAAM,EAAE,QAAQ,CAAC,MAAM;gBACvB,OAAO,EAAE,IAAA,gDAAyB,EAAC,QAAQ,CAAC,IAAI,CAAC;aAClD,EACD,IAAI,EACJ,CAAC,CACF;YACD,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,UAAU,EAAE,QAAQ,CAAC,UAAU;YAC/B,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,MAAM,EAAE,QAAQ,CAAC,MAAM;SACxB,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,MAAM,EAAE,KAAK,CAAC,mCAAmC,EAAE,KAAK,CAAC,CAAC;QAC1D,OAAO,IAAA,oBAAY,EAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
2
|
+
export declare const TOOL_DEFINITION: {
|
|
3
|
+
readonly name: "RuntimeRunClassWithProfiling";
|
|
4
|
+
readonly description: "[runtime] Execute ABAP class with profiler enabled and return created profilerId + traceId.";
|
|
5
|
+
readonly inputSchema: {
|
|
6
|
+
readonly type: "object";
|
|
7
|
+
readonly properties: {
|
|
8
|
+
readonly class_name: {
|
|
9
|
+
readonly type: "string";
|
|
10
|
+
readonly description: "ABAP class name to execute.";
|
|
11
|
+
};
|
|
12
|
+
readonly description: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly description: "Profiler trace description.";
|
|
15
|
+
};
|
|
16
|
+
readonly all_procedural_units: {
|
|
17
|
+
readonly type: "boolean";
|
|
18
|
+
};
|
|
19
|
+
readonly all_misc_abap_statements: {
|
|
20
|
+
readonly type: "boolean";
|
|
21
|
+
};
|
|
22
|
+
readonly all_internal_table_events: {
|
|
23
|
+
readonly type: "boolean";
|
|
24
|
+
};
|
|
25
|
+
readonly all_dynpro_events: {
|
|
26
|
+
readonly type: "boolean";
|
|
27
|
+
};
|
|
28
|
+
readonly aggregate: {
|
|
29
|
+
readonly type: "boolean";
|
|
30
|
+
};
|
|
31
|
+
readonly explicit_on_off: {
|
|
32
|
+
readonly type: "boolean";
|
|
33
|
+
};
|
|
34
|
+
readonly with_rfc_tracing: {
|
|
35
|
+
readonly type: "boolean";
|
|
36
|
+
};
|
|
37
|
+
readonly all_system_kernel_events: {
|
|
38
|
+
readonly type: "boolean";
|
|
39
|
+
};
|
|
40
|
+
readonly sql_trace: {
|
|
41
|
+
readonly type: "boolean";
|
|
42
|
+
};
|
|
43
|
+
readonly all_db_events: {
|
|
44
|
+
readonly type: "boolean";
|
|
45
|
+
};
|
|
46
|
+
readonly max_size_for_trace_file: {
|
|
47
|
+
readonly type: "number";
|
|
48
|
+
};
|
|
49
|
+
readonly amdp_trace: {
|
|
50
|
+
readonly type: "boolean";
|
|
51
|
+
};
|
|
52
|
+
readonly max_time_for_tracing: {
|
|
53
|
+
readonly type: "number";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly required: readonly ["class_name"];
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
interface RuntimeRunClassWithProfilingArgs {
|
|
60
|
+
class_name: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
all_procedural_units?: boolean;
|
|
63
|
+
all_misc_abap_statements?: boolean;
|
|
64
|
+
all_internal_table_events?: boolean;
|
|
65
|
+
all_dynpro_events?: boolean;
|
|
66
|
+
aggregate?: boolean;
|
|
67
|
+
explicit_on_off?: boolean;
|
|
68
|
+
with_rfc_tracing?: boolean;
|
|
69
|
+
all_system_kernel_events?: boolean;
|
|
70
|
+
sql_trace?: boolean;
|
|
71
|
+
all_db_events?: boolean;
|
|
72
|
+
max_size_for_trace_file?: number;
|
|
73
|
+
amdp_trace?: boolean;
|
|
74
|
+
max_time_for_tracing?: number;
|
|
75
|
+
}
|
|
76
|
+
export declare function handleRuntimeRunClassWithProfiling(context: HandlerContext, args: RuntimeRunClassWithProfilingArgs): Promise<{
|
|
77
|
+
isError: boolean;
|
|
78
|
+
content: {
|
|
79
|
+
type: string;
|
|
80
|
+
text: any;
|
|
81
|
+
}[];
|
|
82
|
+
}>;
|
|
83
|
+
export {};
|
|
84
|
+
//# sourceMappingURL=handleRuntimeRunClassWithProfiling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleRuntimeRunClassWithProfiling.d.ts","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleRuntimeRunClassWithProfiling.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BlB,CAAC;AAEX,UAAU,gCAAgC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAsB,kCAAkC,CACtD,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,gCAAgC;;;;;;GAyDvC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_DEFINITION = void 0;
|
|
4
|
+
exports.handleRuntimeRunClassWithProfiling = handleRuntimeRunClassWithProfiling;
|
|
5
|
+
const adt_clients_1 = require("@mcp-abap-adt/adt-clients");
|
|
6
|
+
const utils_1 = require("../../../lib/utils");
|
|
7
|
+
exports.TOOL_DEFINITION = {
|
|
8
|
+
name: 'RuntimeRunClassWithProfiling',
|
|
9
|
+
description: '[runtime] Execute ABAP class with profiler enabled and return created profilerId + traceId.',
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
class_name: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: 'ABAP class name to execute.',
|
|
16
|
+
},
|
|
17
|
+
description: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
description: 'Profiler trace description.',
|
|
20
|
+
},
|
|
21
|
+
all_procedural_units: { type: 'boolean' },
|
|
22
|
+
all_misc_abap_statements: { type: 'boolean' },
|
|
23
|
+
all_internal_table_events: { type: 'boolean' },
|
|
24
|
+
all_dynpro_events: { type: 'boolean' },
|
|
25
|
+
aggregate: { type: 'boolean' },
|
|
26
|
+
explicit_on_off: { type: 'boolean' },
|
|
27
|
+
with_rfc_tracing: { type: 'boolean' },
|
|
28
|
+
all_system_kernel_events: { type: 'boolean' },
|
|
29
|
+
sql_trace: { type: 'boolean' },
|
|
30
|
+
all_db_events: { type: 'boolean' },
|
|
31
|
+
max_size_for_trace_file: { type: 'number' },
|
|
32
|
+
amdp_trace: { type: 'boolean' },
|
|
33
|
+
max_time_for_tracing: { type: 'number' },
|
|
34
|
+
},
|
|
35
|
+
required: ['class_name'],
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
async function handleRuntimeRunClassWithProfiling(context, args) {
|
|
39
|
+
const { connection, logger } = context;
|
|
40
|
+
try {
|
|
41
|
+
if (!args?.class_name) {
|
|
42
|
+
throw new Error('Parameter "class_name" is required');
|
|
43
|
+
}
|
|
44
|
+
const className = args.class_name.trim().toUpperCase();
|
|
45
|
+
const executor = new adt_clients_1.AdtExecutor(connection, logger);
|
|
46
|
+
const classExecutor = executor.getClassExecutor();
|
|
47
|
+
const result = await classExecutor.runWithProfiling({ className }, {
|
|
48
|
+
profilerParameters: {
|
|
49
|
+
description: args.description,
|
|
50
|
+
allProceduralUnits: args.all_procedural_units,
|
|
51
|
+
allMiscAbapStatements: args.all_misc_abap_statements,
|
|
52
|
+
allInternalTableEvents: args.all_internal_table_events,
|
|
53
|
+
allDynproEvents: args.all_dynpro_events,
|
|
54
|
+
aggregate: args.aggregate,
|
|
55
|
+
explicitOnOff: args.explicit_on_off,
|
|
56
|
+
withRfcTracing: args.with_rfc_tracing,
|
|
57
|
+
allSystemKernelEvents: args.all_system_kernel_events,
|
|
58
|
+
sqlTrace: args.sql_trace,
|
|
59
|
+
allDbEvents: args.all_db_events,
|
|
60
|
+
maxSizeForTraceFile: args.max_size_for_trace_file,
|
|
61
|
+
amdpTrace: args.amdp_trace,
|
|
62
|
+
maxTimeForTracing: args.max_time_for_tracing,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
return (0, utils_1.return_response)({
|
|
66
|
+
data: JSON.stringify({
|
|
67
|
+
success: true,
|
|
68
|
+
class_name: className,
|
|
69
|
+
profiler_id: result.profilerId,
|
|
70
|
+
trace_id: result.traceId,
|
|
71
|
+
run_status: result.response?.status,
|
|
72
|
+
trace_requests_status: result.traceRequestsResponse?.status,
|
|
73
|
+
}, null, 2),
|
|
74
|
+
status: result.response?.status,
|
|
75
|
+
statusText: result.response?.statusText,
|
|
76
|
+
headers: result.response?.headers,
|
|
77
|
+
config: result.response?.config,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
logger?.error('Error running class with profiling:', error);
|
|
82
|
+
return (0, utils_1.return_error)(error);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=handleRuntimeRunClassWithProfiling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleRuntimeRunClassWithProfiling.js","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleRuntimeRunClassWithProfiling.ts"],"names":[],"mappings":";;;AAuDA,gFA2DC;AAlHD,2DAAwD;AAExD,8CAAmE;AAEtD,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,8BAA8B;IACpC,WAAW,EACT,6FAA6F;IAC/F,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6BAA6B;aAC3C;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6BAA6B;aAC3C;YACD,oBAAoB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACzC,wBAAwB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC7C,yBAAyB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9C,iBAAiB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACtC,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9B,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACpC,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACrC,wBAAwB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC7C,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;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AW,EAAE,IAAI,CAAC,aAAa;gBAC/B,mBAAmB,EAAE,IAAI,CAAC,uBAAuB;gBACjD,SAAS,EAAE,IAAI,CAAC,UAAU;gBAC1B,iBAAiB,EAAE,IAAI,CAAC,oBAAoB;aAC7C;SACF,CACF,CAAC;QAEF,OAAO,IAAA,uBAAe,EAAC;YACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;gBACE,OAAO,EAAE,IAAI;gBACb,UAAU,EAAE,SAAS;gBACrB,WAAW,EAAE,MAAM,CAAC,UAAU;gBAC9B,QAAQ,EAAE,MAAM,CAAC,OAAO;gBACxB,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM;gBACnC,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM;aAC5D,EACD,IAAI,EACJ,CAAC,CACF;YACD,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM;YAC/B,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,UAAU;YACvC,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO;YACjC,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM;SAChC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,MAAM,EAAE,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;QAC5D,OAAO,IAAA,oBAAY,EAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
2
|
+
export declare const TOOL_DEFINITION: {
|
|
3
|
+
readonly name: "RuntimeRunProgramWithProfiling";
|
|
4
|
+
readonly description: "[runtime] Execute ABAP program with profiler enabled and return created profilerId + traceId.";
|
|
5
|
+
readonly inputSchema: {
|
|
6
|
+
readonly type: "object";
|
|
7
|
+
readonly properties: {
|
|
8
|
+
readonly program_name: {
|
|
9
|
+
readonly type: "string";
|
|
10
|
+
readonly description: "ABAP program name to execute.";
|
|
11
|
+
};
|
|
12
|
+
readonly description: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly description: "Profiler trace description.";
|
|
15
|
+
};
|
|
16
|
+
readonly all_procedural_units: {
|
|
17
|
+
readonly type: "boolean";
|
|
18
|
+
};
|
|
19
|
+
readonly all_misc_abap_statements: {
|
|
20
|
+
readonly type: "boolean";
|
|
21
|
+
};
|
|
22
|
+
readonly all_internal_table_events: {
|
|
23
|
+
readonly type: "boolean";
|
|
24
|
+
};
|
|
25
|
+
readonly all_dynpro_events: {
|
|
26
|
+
readonly type: "boolean";
|
|
27
|
+
};
|
|
28
|
+
readonly aggregate: {
|
|
29
|
+
readonly type: "boolean";
|
|
30
|
+
};
|
|
31
|
+
readonly explicit_on_off: {
|
|
32
|
+
readonly type: "boolean";
|
|
33
|
+
};
|
|
34
|
+
readonly with_rfc_tracing: {
|
|
35
|
+
readonly type: "boolean";
|
|
36
|
+
};
|
|
37
|
+
readonly all_system_kernel_events: {
|
|
38
|
+
readonly type: "boolean";
|
|
39
|
+
};
|
|
40
|
+
readonly sql_trace: {
|
|
41
|
+
readonly type: "boolean";
|
|
42
|
+
};
|
|
43
|
+
readonly all_db_events: {
|
|
44
|
+
readonly type: "boolean";
|
|
45
|
+
};
|
|
46
|
+
readonly max_size_for_trace_file: {
|
|
47
|
+
readonly type: "number";
|
|
48
|
+
};
|
|
49
|
+
readonly amdp_trace: {
|
|
50
|
+
readonly type: "boolean";
|
|
51
|
+
};
|
|
52
|
+
readonly max_time_for_tracing: {
|
|
53
|
+
readonly type: "number";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly required: readonly ["program_name"];
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
interface RuntimeRunProgramWithProfilingArgs {
|
|
60
|
+
program_name: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
all_procedural_units?: boolean;
|
|
63
|
+
all_misc_abap_statements?: boolean;
|
|
64
|
+
all_internal_table_events?: boolean;
|
|
65
|
+
all_dynpro_events?: boolean;
|
|
66
|
+
aggregate?: boolean;
|
|
67
|
+
explicit_on_off?: boolean;
|
|
68
|
+
with_rfc_tracing?: boolean;
|
|
69
|
+
all_system_kernel_events?: boolean;
|
|
70
|
+
sql_trace?: boolean;
|
|
71
|
+
all_db_events?: boolean;
|
|
72
|
+
max_size_for_trace_file?: number;
|
|
73
|
+
amdp_trace?: boolean;
|
|
74
|
+
max_time_for_tracing?: number;
|
|
75
|
+
}
|
|
76
|
+
export declare function handleRuntimeRunProgramWithProfiling(context: HandlerContext, args: RuntimeRunProgramWithProfilingArgs): Promise<{
|
|
77
|
+
isError: boolean;
|
|
78
|
+
content: {
|
|
79
|
+
type: string;
|
|
80
|
+
text: any;
|
|
81
|
+
}[];
|
|
82
|
+
}>;
|
|
83
|
+
export {};
|
|
84
|
+
//# sourceMappingURL=handleRuntimeRunProgramWithProfiling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleRuntimeRunProgramWithProfiling.d.ts","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleRuntimeRunProgramWithProfiling.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BlB,CAAC;AAEX,UAAU,kCAAkC;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAsB,oCAAoC,CACxD,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,kCAAkC;;;;;;GAyDzC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_DEFINITION = void 0;
|
|
4
|
+
exports.handleRuntimeRunProgramWithProfiling = handleRuntimeRunProgramWithProfiling;
|
|
5
|
+
const adt_clients_1 = require("@mcp-abap-adt/adt-clients");
|
|
6
|
+
const utils_1 = require("../../../lib/utils");
|
|
7
|
+
exports.TOOL_DEFINITION = {
|
|
8
|
+
name: 'RuntimeRunProgramWithProfiling',
|
|
9
|
+
description: '[runtime] Execute ABAP program with profiler enabled and return created profilerId + traceId.',
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
program_name: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: 'ABAP program name to execute.',
|
|
16
|
+
},
|
|
17
|
+
description: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
description: 'Profiler trace description.',
|
|
20
|
+
},
|
|
21
|
+
all_procedural_units: { type: 'boolean' },
|
|
22
|
+
all_misc_abap_statements: { type: 'boolean' },
|
|
23
|
+
all_internal_table_events: { type: 'boolean' },
|
|
24
|
+
all_dynpro_events: { type: 'boolean' },
|
|
25
|
+
aggregate: { type: 'boolean' },
|
|
26
|
+
explicit_on_off: { type: 'boolean' },
|
|
27
|
+
with_rfc_tracing: { type: 'boolean' },
|
|
28
|
+
all_system_kernel_events: { type: 'boolean' },
|
|
29
|
+
sql_trace: { type: 'boolean' },
|
|
30
|
+
all_db_events: { type: 'boolean' },
|
|
31
|
+
max_size_for_trace_file: { type: 'number' },
|
|
32
|
+
amdp_trace: { type: 'boolean' },
|
|
33
|
+
max_time_for_tracing: { type: 'number' },
|
|
34
|
+
},
|
|
35
|
+
required: ['program_name'],
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
async function handleRuntimeRunProgramWithProfiling(context, args) {
|
|
39
|
+
const { connection, logger } = context;
|
|
40
|
+
try {
|
|
41
|
+
if (!args?.program_name) {
|
|
42
|
+
throw new Error('Parameter "program_name" is required');
|
|
43
|
+
}
|
|
44
|
+
const programName = args.program_name.trim().toUpperCase();
|
|
45
|
+
const executor = new adt_clients_1.AdtExecutor(connection, logger);
|
|
46
|
+
const programExecutor = executor.getProgramExecutor();
|
|
47
|
+
const result = await programExecutor.runWithProfiling({ programName }, {
|
|
48
|
+
profilerParameters: {
|
|
49
|
+
description: args.description,
|
|
50
|
+
allProceduralUnits: args.all_procedural_units,
|
|
51
|
+
allMiscAbapStatements: args.all_misc_abap_statements,
|
|
52
|
+
allInternalTableEvents: args.all_internal_table_events,
|
|
53
|
+
allDynproEvents: args.all_dynpro_events,
|
|
54
|
+
aggregate: args.aggregate,
|
|
55
|
+
explicitOnOff: args.explicit_on_off,
|
|
56
|
+
withRfcTracing: args.with_rfc_tracing,
|
|
57
|
+
allSystemKernelEvents: args.all_system_kernel_events,
|
|
58
|
+
sqlTrace: args.sql_trace,
|
|
59
|
+
allDbEvents: args.all_db_events,
|
|
60
|
+
maxSizeForTraceFile: args.max_size_for_trace_file,
|
|
61
|
+
amdpTrace: args.amdp_trace,
|
|
62
|
+
maxTimeForTracing: args.max_time_for_tracing,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
return (0, utils_1.return_response)({
|
|
66
|
+
data: JSON.stringify({
|
|
67
|
+
success: true,
|
|
68
|
+
program_name: programName,
|
|
69
|
+
profiler_id: result.profilerId,
|
|
70
|
+
trace_id: result.traceId,
|
|
71
|
+
run_status: result.response?.status,
|
|
72
|
+
trace_requests_status: result.traceRequestsResponse?.status,
|
|
73
|
+
}, null, 2),
|
|
74
|
+
status: result.response?.status,
|
|
75
|
+
statusText: result.response?.statusText,
|
|
76
|
+
headers: result.response?.headers,
|
|
77
|
+
config: result.response?.config,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
logger?.error('Error running program with profiling:', error);
|
|
82
|
+
return (0, utils_1.return_error)(error);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=handleRuntimeRunProgramWithProfiling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleRuntimeRunProgramWithProfiling.js","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleRuntimeRunProgramWithProfiling.ts"],"names":[],"mappings":";;;AAuDA,oFA2DC;AAlHD,2DAAwD;AAExD,8CAAmE;AAEtD,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,gCAAgC;IACtC,WAAW,EACT,+FAA+F;IACjG,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+BAA+B;aAC7C;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6BAA6B;aAC3C;YACD,oBAAoB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACzC,wBAAwB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC7C,yBAAyB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9C,iBAAiB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACtC,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9B,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;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EAAE,IAAI,CAAC,eAAe;gBACnC,cAAc,EAAE,IAAI,CAAC,gBAAgB;gBACrC,qBAAqB,EAAE,IAAI,CAAC,wBAAwB;gBACpD,QAAQ,EAAE,IAAI,CAAC,SAAS;gBACxB,WAAW,EAAE,IAAI,CAAC,aAAa;gBAC/B,mBAAmB,EAAE,IAAI,CAAC,uBAAuB;gBACjD,SAAS,EAAE,IAAI,CAAC,UAAU;gBAC1B,iBAAiB,EAAE,IAAI,CAAC,oBAAoB;aAC7C;SACF,CACF,CAAC;QAEF,OAAO,IAAA,uBAAe,EAAC;YACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;gBACE,OAAO,EAAE,IAAI;gBACb,YAAY,EAAE,WAAW;gBACzB,WAAW,EAAE,MAAM,CAAC,UAAU;gBAC9B,QAAQ,EAAE,MAAM,CAAC,OAAO;gBACxB,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM;gBACnC,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM;aAC5D,EACD,IAAI,EACJ,CAAC,CACF;YACD,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM;YAC/B,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,UAAU;YACvC,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO;YACjC,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM;SAChC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,MAAM,EAAE,KAAK,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC;QAC9D,OAAO,IAAA,oBAAY,EAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IAdtResponse as AxiosResponse, IAbapConnection, ILogger } from '@mcp-abap-adt/interfaces';
|
|
2
|
+
export type RuntimeDumpView = 'default' | 'summary' | 'formatted';
|
|
3
|
+
/**
|
|
4
|
+
* Compatibility reader for runtime dumps.
|
|
5
|
+
* Tries adt-clients API first; falls back to direct ADT endpoint for stale client builds.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readRuntimeDumpByIdCompat(connection: IAbapConnection, logger: ILogger | undefined, dumpId: string, view: RuntimeDumpView): Promise<AxiosResponse>;
|
|
8
|
+
//# sourceMappingURL=runtimeDumpReadCompat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtimeDumpReadCompat.d.ts","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/runtimeDumpReadCompat.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,IAAI,aAAa,EAC7B,eAAe,EACf,OAAO,EACR,MAAM,0BAA0B,CAAC;AAGlC,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;AA6BlE;;;GAGG;AACH,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,eAAe,EAC3B,MAAM,EAAE,OAAO,GAAG,SAAS,EAC3B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,aAAa,CAAC,CA8BxB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readRuntimeDumpByIdCompat = readRuntimeDumpByIdCompat;
|
|
4
|
+
const adt_clients_1 = require("@mcp-abap-adt/adt-clients");
|
|
5
|
+
const utils_1 = require("../../../lib/utils");
|
|
6
|
+
function normalizeDumpId(dumpId) {
|
|
7
|
+
const normalized = dumpId?.trim();
|
|
8
|
+
if (!normalized) {
|
|
9
|
+
throw new Error('Runtime dump ID is required');
|
|
10
|
+
}
|
|
11
|
+
if (normalized.includes('/')) {
|
|
12
|
+
throw new Error('Runtime dump ID must not contain "/"');
|
|
13
|
+
}
|
|
14
|
+
return normalized;
|
|
15
|
+
}
|
|
16
|
+
function resolveDumpRequest(view) {
|
|
17
|
+
if (view === 'summary') {
|
|
18
|
+
return { suffix: '/summary', accept: 'text/html' };
|
|
19
|
+
}
|
|
20
|
+
if (view === 'formatted') {
|
|
21
|
+
return { suffix: '/formatted', accept: 'text/plain' };
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
suffix: '',
|
|
25
|
+
accept: 'application/vnd.sap.adt.runtime.dump.v1+xml',
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Compatibility reader for runtime dumps.
|
|
30
|
+
* Tries adt-clients API first; falls back to direct ADT endpoint for stale client builds.
|
|
31
|
+
*/
|
|
32
|
+
async function readRuntimeDumpByIdCompat(connection, logger, dumpId, view) {
|
|
33
|
+
const runtimeClient = new adt_clients_1.AdtRuntimeClient(connection, logger);
|
|
34
|
+
try {
|
|
35
|
+
return await runtimeClient.getRuntimeDumpById(dumpId, { view });
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
const normalized = normalizeDumpId(dumpId);
|
|
39
|
+
const req = resolveDumpRequest(view);
|
|
40
|
+
logger?.debug?.('Runtime dump read via AdtRuntimeClient failed, using compatibility fallback', {
|
|
41
|
+
dumpId: normalized,
|
|
42
|
+
view,
|
|
43
|
+
error: error instanceof Error ? error.message : String(error),
|
|
44
|
+
});
|
|
45
|
+
return connection.makeAdtRequest({
|
|
46
|
+
url: `/sap/bc/adt/runtime/dump/${normalized}${req.suffix}`,
|
|
47
|
+
method: 'GET',
|
|
48
|
+
timeout: (0, utils_1.getTimeout)('default'),
|
|
49
|
+
headers: {
|
|
50
|
+
Accept: req.accept,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=runtimeDumpReadCompat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtimeDumpReadCompat.js","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/runtimeDumpReadCompat.ts"],"names":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AA6E,EAC7E;YACE,MAAM,EAAE,UAAU;YAClB,IAAI;YACJ,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;SAC9D,CACF,CAAC;QACF,OAAO,UAAU,CAAC,cAAc,CAAC;YAC/B,GAAG,EAAE,4BAA4B,UAAU,GAAG,GAAG,CAAC,MAAM,EAAE;YAC1D,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,IAAA,kBAAU,EAAC,SAAS,CAAC;YAC9B,OAAO,EAAE;gBACP,MAAM,EAAE,GAAG,CAAC,MAAM;aACnB;SACF,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HighLevelHandlersGroup.d.ts","sourceRoot":"","sources":["../../../../src/lib/handlers/groups/HighLevelHandlersGroup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HighLevelHandlersGroup.d.ts","sourceRoot":"","sources":["../../../../src/lib/handlers/groups/HighLevelHandlersGroup.ts"],"names":[],"mappings":"AA0XA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,gBAAgB;IAC1D,SAAS,CAAC,SAAS,SAAuB;IAE1C;;OAEG;IACH,WAAW,IAAI,YAAY,EAAE;CA0vB9B"}
|