abapgit-agent 1.15.3 → 1.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abap/CLAUDE.md +61 -12
- package/abap/guidelines/abaplint.md +35 -0
- package/abap/guidelines/common-errors.md +78 -1
- package/abap/guidelines/string-template.md +84 -0
- package/package.json +2 -1
- package/src/commands/drop.js +171 -0
- package/src/commands/dump.js +30 -0
- package/src/commands/health.js +12 -0
- package/src/commands/help.js +32 -1
- package/src/commands/index.js +2 -1
- package/src/commands/inspect.js +23 -0
- package/src/commands/lint.js +26 -0
- package/src/commands/list.js +25 -0
- package/src/commands/preview.js +30 -0
- package/src/commands/pull.js +32 -0
- package/src/commands/run.js +21 -0
- package/src/commands/status.js +13 -0
- package/src/commands/syntax.js +143 -17
- package/src/commands/tree.js +22 -0
- package/src/commands/unit.js +23 -0
- package/src/commands/upgrade.js +28 -0
- package/src/commands/view.js +29 -0
- package/src/commands/where.js +24 -0
- package/src/utils/abap-reference.js +9 -10
package/src/commands/where.js
CHANGED
|
@@ -11,6 +11,30 @@ module.exports = {
|
|
|
11
11
|
async execute(args, context) {
|
|
12
12
|
const { loadConfig, AbapHttp } = context;
|
|
13
13
|
|
|
14
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
15
|
+
console.log(`
|
|
16
|
+
Usage:
|
|
17
|
+
abapgit-agent where --objects <obj1>,<obj2>,... [--type <type>] [--limit <n>] [--offset <n>] [--json]
|
|
18
|
+
|
|
19
|
+
Description:
|
|
20
|
+
Find where-used list for ABAP objects (classes, interfaces, programs, etc.).
|
|
21
|
+
|
|
22
|
+
Parameters:
|
|
23
|
+
--objects <obj1,...> Comma-separated object names (required).
|
|
24
|
+
--type <type> Object type (e.g. CLAS, INTF — auto-detected if omitted).
|
|
25
|
+
--limit <n> Maximum number of results (default: 50).
|
|
26
|
+
--offset <n> Skip first N results (for pagination).
|
|
27
|
+
--json Output as JSON.
|
|
28
|
+
|
|
29
|
+
Examples:
|
|
30
|
+
abapgit-agent where --objects ZCL_MY_CLASS
|
|
31
|
+
abapgit-agent where --objects ZIF_MY_INTERFACE
|
|
32
|
+
abapgit-agent where --objects ZCL_MY_CLASS --limit 20
|
|
33
|
+
abapgit-agent where --objects ZCL_MY_CLASS --offset 50 --limit 20
|
|
34
|
+
`);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
14
38
|
const objectsArgIndex = args.indexOf('--objects');
|
|
15
39
|
if (objectsArgIndex === -1 || objectsArgIndex + 1 >= args.length) {
|
|
16
40
|
console.error('Error: --objects parameter required');
|
|
@@ -531,8 +531,8 @@ async function getTopic(topic) {
|
|
|
531
531
|
return {
|
|
532
532
|
topic,
|
|
533
533
|
file: guidelineFile,
|
|
534
|
-
content: content.slice(0,
|
|
535
|
-
truncated: content.length >
|
|
534
|
+
content: content.slice(0, 20000),
|
|
535
|
+
truncated: content.length > 20000,
|
|
536
536
|
totalLength: content.length,
|
|
537
537
|
source: 'guidelines'
|
|
538
538
|
};
|
|
@@ -616,8 +616,8 @@ async function getTopic(topic) {
|
|
|
616
616
|
return {
|
|
617
617
|
topic,
|
|
618
618
|
file: exactMatch,
|
|
619
|
-
content: content.slice(0,
|
|
620
|
-
truncated: content.length >
|
|
619
|
+
content: content.slice(0, 20000),
|
|
620
|
+
truncated: content.length > 20000,
|
|
621
621
|
totalLength: content.length,
|
|
622
622
|
source: 'built-in guidelines'
|
|
623
623
|
};
|
|
@@ -630,8 +630,8 @@ async function getTopic(topic) {
|
|
|
630
630
|
return {
|
|
631
631
|
topic,
|
|
632
632
|
file: partialMatches[0],
|
|
633
|
-
content: content.slice(0,
|
|
634
|
-
truncated: content.length >
|
|
633
|
+
content: content.slice(0, 20000),
|
|
634
|
+
truncated: content.length > 20000,
|
|
635
635
|
totalLength: content.length,
|
|
636
636
|
source: 'built-in guidelines'
|
|
637
637
|
};
|
|
@@ -814,11 +814,10 @@ function displayTopic(result) {
|
|
|
814
814
|
console.log(' ' + '─'.repeat(60));
|
|
815
815
|
console.log('');
|
|
816
816
|
|
|
817
|
-
// Display
|
|
818
|
-
const lines = result.content.split('\n')
|
|
817
|
+
// Display full content (char limit already applied when reading)
|
|
818
|
+
const lines = result.content.split('\n');
|
|
819
819
|
lines.forEach(line => {
|
|
820
|
-
|
|
821
|
-
console.log(` ${trimmed}`);
|
|
820
|
+
console.log(` ${line}`);
|
|
822
821
|
});
|
|
823
822
|
|
|
824
823
|
if (result.truncated) {
|