@abapify/adt-plugin-abapgit 0.4.19 → 0.4.21
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/dist/index.mjs +23 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FormatMaterializationError, createPlugin, registerFormatPlugin } from "@abapify/adt-plugin";
|
|
2
2
|
import { basename, dirname, isAbsolute, join, posix, relative, sep } from "node:path";
|
|
3
|
-
import { AdkClass, AdkDataElement, AdkDomain, AdkInterface, AdkPackage,
|
|
3
|
+
import { AdkClass, AdkDataElement, AdkDomain, AdkInclude, AdkInterface, AdkPackage, AdkStructure, AdkTable, AdkTableType, createAdk, getMainType, getTypeForKind } from "@abapify/adk";
|
|
4
4
|
import { typedSchema } from "@abapify/ts-xsd";
|
|
5
5
|
import { parse } from "@abapify/acds";
|
|
6
6
|
import { tablesettings } from "@abapify/adt-schemas";
|
|
@@ -19442,7 +19442,16 @@ const packageHandler = createHandler(AdkPackage, {
|
|
|
19442
19442
|
/**
|
|
19443
19443
|
* Program (PROG) object handler for abapGit format
|
|
19444
19444
|
*/
|
|
19445
|
-
|
|
19445
|
+
function programSubc(obj) {
|
|
19446
|
+
if (obj.kind === AdkInclude.kind) return "I";
|
|
19447
|
+
if (!obj.isLoaded) return "1";
|
|
19448
|
+
switch (obj.dataSync.programType) {
|
|
19449
|
+
case "modulePool": return "M";
|
|
19450
|
+
case "subroutinePool": return "S";
|
|
19451
|
+
default: return "1";
|
|
19452
|
+
}
|
|
19453
|
+
}
|
|
19454
|
+
const programHandler = createHandler("PROG", {
|
|
19446
19455
|
schema: prog,
|
|
19447
19456
|
version: "v1.0.0",
|
|
19448
19457
|
serializer: "LCL_OBJECT_PROG",
|
|
@@ -19450,7 +19459,7 @@ const programHandler = createHandler(AdkProgram, {
|
|
|
19450
19459
|
toAbapGit: (obj) => ({ PROGDIR: {
|
|
19451
19460
|
NAME: obj.name ?? "",
|
|
19452
19461
|
STATE: "A",
|
|
19453
|
-
SUBC:
|
|
19462
|
+
SUBC: programSubc(obj),
|
|
19454
19463
|
FIXPT: "X",
|
|
19455
19464
|
UNICODE: "X"
|
|
19456
19465
|
} }),
|
|
@@ -19459,13 +19468,20 @@ const programHandler = createHandler(AdkProgram, {
|
|
|
19459
19468
|
const rawItems = TPOOL?.item ?? [];
|
|
19460
19469
|
const descriptionEntry = (Array.isArray(rawItems) ? rawItems : [rawItems]).find((t) => t.ID === "R");
|
|
19461
19470
|
const subc = String(PROGDIR?.SUBC ?? "");
|
|
19462
|
-
|
|
19471
|
+
const data = {
|
|
19463
19472
|
name: (PROGDIR?.NAME ?? "").toUpperCase(),
|
|
19464
|
-
type: "PROG/P",
|
|
19465
19473
|
description: descriptionEntry?.ENTRY ?? "Program",
|
|
19466
19474
|
fixPointArithmetic: PROGDIR?.FIXPT === "X",
|
|
19467
|
-
activeUnicodeCheck: PROGDIR?.UNICODE === "X"
|
|
19468
|
-
|
|
19475
|
+
activeUnicodeCheck: PROGDIR?.UNICODE === "X"
|
|
19476
|
+
};
|
|
19477
|
+
if (subc === "I") return {
|
|
19478
|
+
...data,
|
|
19479
|
+
type: "PROG/I"
|
|
19480
|
+
};
|
|
19481
|
+
return {
|
|
19482
|
+
...data,
|
|
19483
|
+
type: "PROG/P",
|
|
19484
|
+
programType: subc === "M" ? "modulePool" : subc === "S" ? "subroutinePool" : "executableProgram"
|
|
19469
19485
|
};
|
|
19470
19486
|
},
|
|
19471
19487
|
setSources: (obj, sources) => {
|