abapgit-agent 1.17.3 ā 1.17.4
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/README.md +1 -0
- package/package.json +1 -1
- package/src/commands/customize.js +25 -0
- package/src/commands/import.js +9 -1
package/README.md
CHANGED
|
@@ -55,6 +55,7 @@ See [Creating New ABAP Projects](docs/install.md#creating-new-abap-projects) to
|
|
|
55
55
|
abapgit-agent init --package ZMY_PACKAGE # Initialize local config
|
|
56
56
|
abapgit-agent create # Create online repo in ABAP
|
|
57
57
|
abapgit-agent import # Import objects from ABAP to git
|
|
58
|
+
abapgit-agent import --branch main # Import to specific branch
|
|
58
59
|
abapgit-agent delete # Delete repo from ABAP
|
|
59
60
|
```
|
|
60
61
|
|
package/package.json
CHANGED
|
@@ -17,6 +17,31 @@ module.exports = {
|
|
|
17
17
|
async execute(args, context) {
|
|
18
18
|
const { loadConfig, AbapHttp, getTransport, getTransportSettings } = context;
|
|
19
19
|
|
|
20
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
21
|
+
console.log(`
|
|
22
|
+
Usage:
|
|
23
|
+
abapgit-agent customize <table> --set <field=value> [<field=value>...]
|
|
24
|
+
[--transport <TRKORR>] [--no-transport] [--json]
|
|
25
|
+
|
|
26
|
+
Description:
|
|
27
|
+
Write a single row to a SAP customizing table (delivery class C or E).
|
|
28
|
+
The row is identified by the key fields you provide via --set.
|
|
29
|
+
|
|
30
|
+
Parameters:
|
|
31
|
+
<table> Name of the customizing table (e.g. ZTABLE_CONFIG).
|
|
32
|
+
--set <field=value> One or more field=value pairs (space-separated after --set).
|
|
33
|
+
--transport <TRKORR> Record the change in this transport request.
|
|
34
|
+
--no-transport Write without a transport request (local change).
|
|
35
|
+
--json Output result as JSON.
|
|
36
|
+
|
|
37
|
+
Examples:
|
|
38
|
+
abapgit-agent customize ZTABLE_CONFIG --set KEY=APP VALUE=active
|
|
39
|
+
abapgit-agent customize ZTABLE_CONFIG --set KEY=APP VALUE=active --transport DEVK900001
|
|
40
|
+
abapgit-agent customize ZTABLE_CONFIG --set KEY=APP VALUE=active --no-transport
|
|
41
|
+
`);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
20
45
|
const jsonOutput = args.includes('--json');
|
|
21
46
|
const verbose = args.includes('--verbose');
|
|
22
47
|
const noTransport = args.includes('--no-transport');
|
package/src/commands/import.js
CHANGED
|
@@ -39,11 +39,14 @@ Prerequisites:
|
|
|
39
39
|
- Package must have objects to import
|
|
40
40
|
|
|
41
41
|
Options:
|
|
42
|
+
--branch Branch to push to. Auto-detected from current git branch if omitted.
|
|
42
43
|
--message Commit message (default: "feat: initial import from ABAP package <package>")
|
|
43
44
|
|
|
44
45
|
Examples:
|
|
45
46
|
abapgit-agent import
|
|
46
47
|
abapgit-agent import --message "Initial import from SAP"
|
|
48
|
+
abapgit-agent import --branch main
|
|
49
|
+
abapgit-agent import --branch feature/my-branch --message "Import objects"
|
|
47
50
|
`);
|
|
48
51
|
return;
|
|
49
52
|
}
|
|
@@ -87,6 +90,9 @@ Examples:
|
|
|
87
90
|
commitMessage = args[messageArgIndex + 1];
|
|
88
91
|
}
|
|
89
92
|
|
|
93
|
+
const branchArgIndex = args.indexOf('--branch');
|
|
94
|
+
const branch = branchArgIndex !== -1 ? args[branchArgIndex + 1] : gitUtils.getBranch();
|
|
95
|
+
|
|
90
96
|
if (safeguards.requireImportMessage && !commitMessage) {
|
|
91
97
|
console.error('ā Error: import requires a commit message for this project\n');
|
|
92
98
|
console.error('Please provide one with:');
|
|
@@ -99,6 +105,7 @@ Examples:
|
|
|
99
105
|
|
|
100
106
|
console.log(`\nš¦ Starting import job`);
|
|
101
107
|
console.log(` URL: ${repoUrl}`);
|
|
108
|
+
console.log(` Branch: ${branch}`);
|
|
102
109
|
if (commitMessage) {
|
|
103
110
|
console.log(` Message: ${commitMessage}`);
|
|
104
111
|
}
|
|
@@ -107,7 +114,8 @@ Examples:
|
|
|
107
114
|
const csrfToken = await http.fetchCsrfToken();
|
|
108
115
|
|
|
109
116
|
const data = {
|
|
110
|
-
url: repoUrl
|
|
117
|
+
url: repoUrl,
|
|
118
|
+
branch
|
|
111
119
|
};
|
|
112
120
|
|
|
113
121
|
if (commitMessage) {
|