@abapify/adt-plugin-gcts 0.4.38 → 0.4.39
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 +35 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-CNh9ExCG.mjs";
|
|
2
2
|
import { createPlugin, registerFormatPlugin } from "@abapify/adt-plugin";
|
|
3
|
-
import { AdkClass, AdkDataElement, AdkDomain, AdkFunctionGroup,
|
|
3
|
+
import { AdkClass, AdkDataElement, AdkDomain, AdkFunctionGroup, AdkInterface, AdkPackage, AdkProgram, AdkTable, AdkTableType, createAdk, getMainType, getTypeForKind } from "@abapify/adk";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { dirname, join, resolve, sep } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -1422,33 +1422,57 @@ const functionGroupHandler = createHandler(AdkFunctionGroup, {
|
|
|
1422
1422
|
* FUNC (function module) handler for gCTS / AFF format.
|
|
1423
1423
|
*
|
|
1424
1424
|
* Projects ADK function module data to the AFF func-v1.json schema shape.
|
|
1425
|
-
* A function module is a child of a function group, but it can also be
|
|
1426
|
-
* serialized as its own ADK object (FUNC) for the gCTS file format.
|
|
1427
1425
|
*/
|
|
1428
|
-
const
|
|
1426
|
+
const RELEASE_STATE_MAP = {
|
|
1427
|
+
notReleased: "notReleased",
|
|
1428
|
+
internal: "releasedSapInternal",
|
|
1429
|
+
external: "released",
|
|
1430
|
+
obsolete: "obsolete",
|
|
1431
|
+
markedForRelease: "releasePlanned"
|
|
1432
|
+
};
|
|
1433
|
+
const functionModuleHandler = createHandler("FUNC", {
|
|
1429
1434
|
toMetadata(func) {
|
|
1430
1435
|
const data = func.dataSync ?? {};
|
|
1431
1436
|
const meta = {
|
|
1432
1437
|
formatVersion: "1",
|
|
1433
|
-
header: { description: func.description ?? data.description ?? "" },
|
|
1438
|
+
header: { description: func.description ?? data.description ?? func.name ?? "" },
|
|
1434
1439
|
processingType: data.processingType ?? "normal",
|
|
1435
1440
|
includeNumber: data.includeNumber ?? "0000"
|
|
1436
1441
|
};
|
|
1437
|
-
if (data.
|
|
1438
|
-
|
|
1439
|
-
|
|
1442
|
+
if (typeof data.basXMLEnabled === "boolean" || typeof data.rfcScope === "string" || typeof data.rfcVersion === "string" || typeof data.abapFromJava === "boolean" || typeof data.javaFromAbap === "boolean" || typeof data.javaRemote === "boolean") meta.rfcProperties = {
|
|
1443
|
+
basxmlEnabled: data.basXMLEnabled === true,
|
|
1444
|
+
rfcScope: data.rfcScope ?? "notClassified",
|
|
1445
|
+
rfcVersion: data.rfcVersion ?? "any",
|
|
1446
|
+
abapFromJava: data.abapFromJava,
|
|
1447
|
+
javaFromAbap: data.javaFromAbap,
|
|
1448
|
+
javaRemote: data.javaRemote
|
|
1449
|
+
};
|
|
1450
|
+
if (typeof data.updateTaskKind === "string") meta.updateProperties = { updateTaskKind: data.updateTaskKind };
|
|
1451
|
+
if (typeof data.releaseState === "string") {
|
|
1452
|
+
const mapped = RELEASE_STATE_MAP[data.releaseState];
|
|
1453
|
+
if (mapped) meta.releaseState = mapped;
|
|
1454
|
+
}
|
|
1455
|
+
if (typeof data.releaseDate === "string") meta.releaseDate = data.releaseDate;
|
|
1440
1456
|
if (typeof data.global === "boolean") meta.global = data.global;
|
|
1441
1457
|
if (typeof data.exceptionClasses === "boolean") meta.exceptionClasses = data.exceptionClasses;
|
|
1458
|
+
if (typeof data.application === "string") meta.application = data.application;
|
|
1459
|
+
if (typeof data.client === "string") meta.client = data.client;
|
|
1460
|
+
if (typeof data.activeFunctionExit === "string") meta.activeFunctionExit = data.activeFunctionExit;
|
|
1461
|
+
if (typeof data.notExecutable === "boolean") meta.notExecutable = data.notExecutable;
|
|
1462
|
+
if (typeof data.editLocked === "boolean") meta.editLocked = data.editLocked;
|
|
1442
1463
|
return meta;
|
|
1443
1464
|
},
|
|
1444
1465
|
getSource: (func) => typeof func.getSource === "function" ? func.getSource() : "",
|
|
1445
1466
|
fromMetadata: (meta) => ({
|
|
1446
1467
|
name: "",
|
|
1447
1468
|
description: meta.header.description,
|
|
1448
|
-
language:
|
|
1449
|
-
masterLanguage:
|
|
1469
|
+
language: void 0,
|
|
1470
|
+
masterLanguage: void 0,
|
|
1450
1471
|
processingType: meta.processingType,
|
|
1451
|
-
includeNumber: meta.includeNumber
|
|
1472
|
+
includeNumber: meta.includeNumber,
|
|
1473
|
+
releaseState: meta.releaseState,
|
|
1474
|
+
global: meta.global,
|
|
1475
|
+
exceptionClasses: meta.exceptionClasses
|
|
1452
1476
|
})
|
|
1453
1477
|
});
|
|
1454
1478
|
|