@abaplint/transpiler-cli 2.13.78 → 2.13.80
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/build/bundle.js +177 -24
- package/package.json +4 -4
package/build/bundle.js
CHANGED
|
@@ -149,6 +149,24 @@ class FileOperations {
|
|
|
149
149
|
}
|
|
150
150
|
fs.rmSync(p, { recursive: true });
|
|
151
151
|
}
|
|
152
|
+
/** posix + absolute make glob return forward slashed absolute paths on all
|
|
153
|
+
platforms, but on Windows in fully resolved UNC form, ie. //?/C:/foo.
|
|
154
|
+
path.relative() does not consider //?/C: and C: the same root, and would
|
|
155
|
+
return the full path instead of a relative one, so strip the prefix */
|
|
156
|
+
static stripNamespace(filename) {
|
|
157
|
+
if (filename.startsWith("//?/UNC/")) {
|
|
158
|
+
return "//" + filename.substring("//?/UNC/".length);
|
|
159
|
+
}
|
|
160
|
+
else if (filename.startsWith("//?/")) {
|
|
161
|
+
return filename.substring("//?/".length);
|
|
162
|
+
}
|
|
163
|
+
return filename;
|
|
164
|
+
}
|
|
165
|
+
static globSync(pattern) {
|
|
166
|
+
// backslashes are escape characters in glob patterns, always hand it forward slashes
|
|
167
|
+
const normalized = pattern.split(path.sep).join("/");
|
|
168
|
+
return glob.sync(normalized, { nodir: true, absolute: true, posix: true }).map(f => this.stripNamespace(f));
|
|
169
|
+
}
|
|
152
170
|
static setupPLimit() {
|
|
153
171
|
let concurrency = os.cpus().length;
|
|
154
172
|
if (concurrency > 8) {
|
|
@@ -181,7 +199,7 @@ class FileOperations {
|
|
|
181
199
|
const folders = Array.isArray(config.input_folder) ? config.input_folder : [config.input_folder];
|
|
182
200
|
const filesToRead = [];
|
|
183
201
|
for (const folder of folders) {
|
|
184
|
-
for (const filename of
|
|
202
|
+
for (const filename of this.globSync(folder + "/**")) {
|
|
185
203
|
if (inputFilters.length > 0 && inputFilters.some(a => a.test(filename)) === false) {
|
|
186
204
|
skipped++;
|
|
187
205
|
continue;
|
|
@@ -278,7 +296,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
278
296
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
279
297
|
const fs = __importStar(__webpack_require__(/*! fs */ "fs"));
|
|
280
298
|
const path = __importStar(__webpack_require__(/*! path */ "path"));
|
|
281
|
-
const glob = __importStar(__webpack_require__(/*! glob */ "./node_modules/glob/dist/commonjs/index.min.js"));
|
|
282
299
|
const childProcess = __importStar(__webpack_require__(/*! child_process */ "child_process"));
|
|
283
300
|
const os = __importStar(__webpack_require__(/*! os */ "os"));
|
|
284
301
|
const module_1 = __webpack_require__(/*! module */ "module");
|
|
@@ -327,7 +344,7 @@ async function loadLib(config) {
|
|
|
327
344
|
const excludeFilters = (lib.exclude_filter ?? []).map(pattern => new RegExp(pattern, "i"));
|
|
328
345
|
const filesToRead = [];
|
|
329
346
|
for (const pattern of patterns) {
|
|
330
|
-
for (const filename of
|
|
347
|
+
for (const filename of file_operations_1.FileOperations.globSync(dir + pattern)) {
|
|
331
348
|
if (filename.endsWith(".clas.testclasses.abap")) {
|
|
332
349
|
continue;
|
|
333
350
|
}
|
|
@@ -24813,6 +24830,7 @@ exports.ABAPFileInformationParser = void 0;
|
|
|
24813
24830
|
const Structures = __importStar(__webpack_require__(/*! ../3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js"));
|
|
24814
24831
|
const Expressions = __importStar(__webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js"));
|
|
24815
24832
|
const Statements = __importStar(__webpack_require__(/*! ../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js"));
|
|
24833
|
+
const nodes_1 = __webpack_require__(/*! ../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
24816
24834
|
const _identifier_1 = __webpack_require__(/*! ./_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
|
|
24817
24835
|
const Tokens = __importStar(__webpack_require__(/*! ../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js"));
|
|
24818
24836
|
const visibility_1 = __webpack_require__(/*! ./visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
|
|
@@ -24952,6 +24970,7 @@ class ABAPFileInformationParser {
|
|
|
24952
24970
|
riskLevel,
|
|
24953
24971
|
isAbstract: (cdef === null || cdef === void 0 ? void 0 : cdef.findDirectTokenByText("ABSTRACT")) !== undefined,
|
|
24954
24972
|
isSharedMemory: concat.includes(" SHARED MEMORY ENABLED"),
|
|
24973
|
+
behaviorDefinitionName: this.findBehaviorDefinitionName(cdef),
|
|
24955
24974
|
isFinal: found.findFirstExpression(Expressions.ClassFinal) !== undefined,
|
|
24956
24975
|
aliases,
|
|
24957
24976
|
attributes,
|
|
@@ -24961,6 +24980,20 @@ class ABAPFileInformationParser {
|
|
|
24961
24980
|
return classes;
|
|
24962
24981
|
}
|
|
24963
24982
|
///////////////////
|
|
24983
|
+
/** "FOR BEHAVIOR OF" and "FOR EVENTS OF" both use the BehaviorDefinitionName expression,
|
|
24984
|
+
* so look at the token two positions before the expression to tell them apart */
|
|
24985
|
+
findBehaviorDefinitionName(cdef) {
|
|
24986
|
+
const children = (cdef === null || cdef === void 0 ? void 0 : cdef.getChildren()) || [];
|
|
24987
|
+
for (let i = 2; i < children.length; i++) {
|
|
24988
|
+
const child = children[i];
|
|
24989
|
+
if (child instanceof nodes_1.ExpressionNode
|
|
24990
|
+
&& child.get() instanceof Expressions.BehaviorDefinitionName
|
|
24991
|
+
&& children[i - 2].concatTokens().toUpperCase() === "BEHAVIOR") {
|
|
24992
|
+
return child.concatTokens();
|
|
24993
|
+
}
|
|
24994
|
+
}
|
|
24995
|
+
return undefined;
|
|
24996
|
+
}
|
|
24964
24997
|
getImplementing(input) {
|
|
24965
24998
|
const ret = [];
|
|
24966
24999
|
for (const node of input.findAllStatements(Statements.InterfaceDef)) {
|
|
@@ -26656,6 +26689,18 @@ class CurrentScope {
|
|
|
26656
26689
|
}
|
|
26657
26690
|
return undefined;
|
|
26658
26691
|
}
|
|
26692
|
+
/** the BDEF from "FOR BEHAVIOR OF" of the enclosing global class, undefined if not a behavior pool */
|
|
26693
|
+
findBehaviorDefinition() {
|
|
26694
|
+
var _a;
|
|
26695
|
+
if (this.parentObj.getType() !== "CLAS") {
|
|
26696
|
+
return undefined;
|
|
26697
|
+
}
|
|
26698
|
+
const name = (_a = this.parentObj.getClassDefinition()) === null || _a === void 0 ? void 0 : _a.behaviorDefinitionName;
|
|
26699
|
+
if (name === undefined) {
|
|
26700
|
+
return undefined;
|
|
26701
|
+
}
|
|
26702
|
+
return this.reg.getObject("BDEF", name);
|
|
26703
|
+
}
|
|
26659
26704
|
isBadiDef(name) {
|
|
26660
26705
|
const upper = name.toUpperCase();
|
|
26661
26706
|
for (const enhs of this.reg.getObjectsByType("ENHS")) {
|
|
@@ -28965,7 +29010,7 @@ class BasicTypes {
|
|
|
28965
29010
|
return undefined;
|
|
28966
29011
|
}
|
|
28967
29012
|
parseTable(node, name) {
|
|
28968
|
-
var _a, _b, _c
|
|
29013
|
+
var _a, _b, _c;
|
|
28969
29014
|
const typename = node.findFirstExpression(Expressions.TypeName) || node.findFirstExpression(Expressions.EntityAssociation);
|
|
28970
29015
|
const text = (_a = node.findFirstExpression(Expressions.TypeTable)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
28971
29016
|
if (text === undefined) {
|
|
@@ -29102,25 +29147,31 @@ class BasicTypes {
|
|
|
29102
29147
|
return new Types.TableType(structure, options);
|
|
29103
29148
|
}
|
|
29104
29149
|
else if (typename && this.isRAPTableFor(text)) {
|
|
29105
|
-
|
|
29106
|
-
const ddlsName = this.getRAPBaseEntityName(name);
|
|
29107
|
-
const type = (_d = this.input.scope.getDDIC().lookupDDLS(ddlsName)) === null || _d === void 0 ? void 0 : _d.type;
|
|
29108
|
-
if (type) {
|
|
29109
|
-
return new Types.TableType(basic_1.VoidType.get("RAP-TODO"), options);
|
|
29110
|
-
}
|
|
29111
|
-
else if (this.isRAPDerivedEntityName(name)) {
|
|
29112
|
-
return Types.VoidType.get(name);
|
|
29113
|
-
}
|
|
29114
|
-
else if (this.input.scope.getDDIC().inErrorNamespace(ddlsName)) {
|
|
29115
|
-
return new Types.UnknownType(`DDLS ${ddlsName} not found`);
|
|
29116
|
-
}
|
|
29117
|
-
else {
|
|
29118
|
-
return Types.VoidType.get(name);
|
|
29119
|
-
}
|
|
29150
|
+
return this.rapTableFor(typename.concatTokens(), options);
|
|
29120
29151
|
}
|
|
29121
29152
|
// fallback to old style syntax, OCCURS etc
|
|
29122
29153
|
return this.parseType(node, name);
|
|
29123
29154
|
}
|
|
29155
|
+
/** type of a RAP derived table type, ie the "TABLE FOR LOCK zentity" part of a type */
|
|
29156
|
+
rapTableFor(entityName, options) {
|
|
29157
|
+
var _a;
|
|
29158
|
+
const ddlsName = this.resolveRAPAlias(this.getRAPBaseEntityName(entityName));
|
|
29159
|
+
if ((_a = this.input.scope.getDDIC().lookupDDLS(ddlsName)) === null || _a === void 0 ? void 0 : _a.type) {
|
|
29160
|
+
return new Types.TableType(basic_1.VoidType.get("RAP-TODO"), options !== null && options !== void 0 ? options : {
|
|
29161
|
+
withHeader: false,
|
|
29162
|
+
keyType: Types.TableKeyType.user,
|
|
29163
|
+
primaryKey: { name: "primary_key", type: basic_1.TableAccessType.standard, isUnique: false, keyFields: [] },
|
|
29164
|
+
secondary: [],
|
|
29165
|
+
});
|
|
29166
|
+
}
|
|
29167
|
+
else if (this.isRAPDerivedEntityName(entityName)) {
|
|
29168
|
+
return Types.VoidType.get(entityName);
|
|
29169
|
+
}
|
|
29170
|
+
else if (this.input.scope.getDDIC().inErrorNamespace(ddlsName)) {
|
|
29171
|
+
return new Types.UnknownType(`DDLS ${ddlsName} not found`);
|
|
29172
|
+
}
|
|
29173
|
+
return Types.VoidType.get(entityName);
|
|
29174
|
+
}
|
|
29124
29175
|
parseType(node, qualifiedName) {
|
|
29125
29176
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
29126
29177
|
const typeName = node.findFirstExpression(Expressions.TypeName);
|
|
@@ -29314,6 +29365,12 @@ class BasicTypes {
|
|
|
29314
29365
|
const splitAt = Math.min(...candidates);
|
|
29315
29366
|
return name.substring(0, splitAt);
|
|
29316
29367
|
}
|
|
29368
|
+
/** inside a behavior pool the entities are referenced via the aliases defined in the BDEF */
|
|
29369
|
+
resolveRAPAlias(name) {
|
|
29370
|
+
var _a;
|
|
29371
|
+
var _b;
|
|
29372
|
+
return (_b = (_a = this.input.scope.findBehaviorDefinition()) === null || _a === void 0 ? void 0 : _a.findEntityNameByAlias(name)) !== null && _b !== void 0 ? _b : name;
|
|
29373
|
+
}
|
|
29317
29374
|
isRAPDerivedEntityName(name) {
|
|
29318
29375
|
return name.includes("\\") || name.includes("~");
|
|
29319
29376
|
}
|
|
@@ -53884,6 +53941,7 @@ const _typed_identifier_1 = __webpack_require__(/*! ./_typed_identifier */ "./no
|
|
|
53884
53941
|
const basic_1 = __webpack_require__(/*! ./basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
53885
53942
|
const method_def_returning_1 = __webpack_require__(/*! ../5_syntax/expressions/method_def_returning */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_def_returning.js");
|
|
53886
53943
|
const method_param_1 = __webpack_require__(/*! ../5_syntax/expressions/method_param */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_param.js");
|
|
53944
|
+
const basic_types_1 = __webpack_require__(/*! ../5_syntax/basic_types */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js");
|
|
53887
53945
|
const _object_oriented_1 = __webpack_require__(/*! ../5_syntax/_object_oriented */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js");
|
|
53888
53946
|
const _reference_1 = __webpack_require__(/*! ../5_syntax/_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
|
|
53889
53947
|
const identifier_1 = __webpack_require__(/*! ../1_lexer/tokens/identifier */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/identifier.js");
|
|
@@ -54071,24 +54129,37 @@ class MethodParameters {
|
|
|
54071
54129
|
}
|
|
54072
54130
|
}
|
|
54073
54131
|
workaroundRAP(node, input, parentName) {
|
|
54132
|
+
var _a;
|
|
54074
54133
|
const resultName = node.findExpressionAfterToken("RESULT");
|
|
54075
54134
|
const concat = node.concatTokens().toUpperCase();
|
|
54076
54135
|
const isRap = node.findExpressionAfterToken("IMPORTING")
|
|
54077
54136
|
|| (concat.includes(" IMPORTING REQUEST ") ? node.findExpressionAfterToken("REQUEST") : undefined);
|
|
54078
54137
|
if (isRap) {
|
|
54138
|
+
// "FOR LOCK" handlers have a well defined signature, so the types can be derived
|
|
54139
|
+
const lockEntity = concat.includes(" FOR LOCK ")
|
|
54140
|
+
? (_a = node.findExpressionAfterToken("LOCK")) === null || _a === void 0 ? void 0 : _a.concatTokens()
|
|
54141
|
+
: undefined;
|
|
54079
54142
|
for (const foo of node.findDirectExpressions(Expressions.MethodParamName)) {
|
|
54080
54143
|
if (foo === resultName) {
|
|
54081
54144
|
continue;
|
|
54082
54145
|
}
|
|
54083
|
-
|
|
54146
|
+
const type = lockEntity === undefined
|
|
54147
|
+
? basic_1.VoidType.get("RapMethodParameter")
|
|
54148
|
+
: new basic_types_1.BasicTypes(input).rapTableFor(lockEntity);
|
|
54149
|
+
this.importing.push(new _typed_identifier_1.TypedIdentifier(foo.getFirstToken(), input.filename, type, ["importing" /* IdentifierMeta.MethodImporting */]));
|
|
54150
|
+
}
|
|
54151
|
+
if (lockEntity !== undefined) {
|
|
54152
|
+
// note: "mapped" is not part of the signature for "FOR LOCK"
|
|
54153
|
+
const token = isRap.getFirstToken();
|
|
54154
|
+
this.exporting.push(new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(token.getStart(), "failed"), input.filename, basic_1.VoidType.get(`RESPONSE FOR FAILED EARLY ${lockEntity}`), ["exporting" /* IdentifierMeta.MethodExporting */]));
|
|
54155
|
+
this.exporting.push(new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(token.getStart(), "reported"), input.filename, basic_1.VoidType.get(`RESPONSE FOR REPORTED EARLY ${lockEntity}`), ["exporting" /* IdentifierMeta.MethodExporting */]));
|
|
54084
54156
|
}
|
|
54085
|
-
if (concat.includes(" FOR VALIDATE ")
|
|
54157
|
+
else if (concat.includes(" FOR VALIDATE ")
|
|
54086
54158
|
|| concat.includes(" FOR BEHAVIOR ")
|
|
54087
54159
|
|| concat.includes(" FOR DETERMINE ")
|
|
54088
54160
|
|| concat.includes(" FOR FEATURES ")
|
|
54089
54161
|
|| concat.includes(" FOR INSTANCE FEATURES ")
|
|
54090
54162
|
|| concat.includes(" FOR GLOBAL AUTHORIZATION ")
|
|
54091
|
-
|| concat.includes(" FOR LOCK ")
|
|
54092
54163
|
|| concat.includes(" FOR PRECHECK ")
|
|
54093
54164
|
|| concat.includes(" FOR NUMBERING ")
|
|
54094
54165
|
|| concat.includes(" FOR READ ")
|
|
@@ -62047,6 +62118,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
62047
62118
|
exports.BehaviorDefinition = void 0;
|
|
62048
62119
|
const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
|
|
62049
62120
|
class BehaviorDefinition extends _abstract_object_1.AbstractObject {
|
|
62121
|
+
constructor() {
|
|
62122
|
+
super(...arguments);
|
|
62123
|
+
this.parsedData = undefined;
|
|
62124
|
+
}
|
|
62050
62125
|
getType() {
|
|
62051
62126
|
return "BDEF";
|
|
62052
62127
|
}
|
|
@@ -62060,6 +62135,49 @@ class BehaviorDefinition extends _abstract_object_1.AbstractObject {
|
|
|
62060
62135
|
// todo
|
|
62061
62136
|
return undefined;
|
|
62062
62137
|
}
|
|
62138
|
+
setDirty() {
|
|
62139
|
+
this.parsedData = undefined;
|
|
62140
|
+
super.setDirty();
|
|
62141
|
+
}
|
|
62142
|
+
findSourceFile() {
|
|
62143
|
+
return this.getFiles().find(f => f.getFilename().endsWith(".asbdef"));
|
|
62144
|
+
}
|
|
62145
|
+
listEntities() {
|
|
62146
|
+
return this.parseSource().entities;
|
|
62147
|
+
}
|
|
62148
|
+
/** finds the entity name for a given alias, undefined if the alias is not defined */
|
|
62149
|
+
findEntityNameByAlias(alias) {
|
|
62150
|
+
var _a;
|
|
62151
|
+
const upper = alias.toUpperCase();
|
|
62152
|
+
for (const entity of this.listEntities()) {
|
|
62153
|
+
if (((_a = entity.alias) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === upper) {
|
|
62154
|
+
return entity.name;
|
|
62155
|
+
}
|
|
62156
|
+
}
|
|
62157
|
+
return undefined;
|
|
62158
|
+
}
|
|
62159
|
+
/////////////////////////
|
|
62160
|
+
parseSource() {
|
|
62161
|
+
var _a;
|
|
62162
|
+
if (this.parsedData !== undefined) {
|
|
62163
|
+
return this.parsedData;
|
|
62164
|
+
}
|
|
62165
|
+
this.parsedData = { entities: [] };
|
|
62166
|
+
const raw = (_a = this.findSourceFile()) === null || _a === void 0 ? void 0 : _a.getRaw();
|
|
62167
|
+
if (raw === undefined) {
|
|
62168
|
+
return this.parsedData;
|
|
62169
|
+
}
|
|
62170
|
+
// BDEF uses "//" for line comments
|
|
62171
|
+
const stripped = raw.replace(/\/\/.*$/gm, "");
|
|
62172
|
+
// eg. "define behavior for ZI_Booking alias Booking", also "define abstract behavior for ..."
|
|
62173
|
+
const regex = /\bdefine\s+(?:\w+\s+)*?behavior\s+for\s+([\w/]+)(?:\s+alias\s+(\w+))?/gi;
|
|
62174
|
+
let match = regex.exec(stripped);
|
|
62175
|
+
while (match !== null) {
|
|
62176
|
+
this.parsedData.entities.push({ name: match[1], alias: match[2] });
|
|
62177
|
+
match = regex.exec(stripped);
|
|
62178
|
+
}
|
|
62179
|
+
return this.parsedData;
|
|
62180
|
+
}
|
|
62063
62181
|
}
|
|
62064
62182
|
exports.BehaviorDefinition = BehaviorDefinition;
|
|
62065
62183
|
//# sourceMappingURL=behavior_definition.js.map
|
|
@@ -65564,6 +65682,7 @@ exports.LockObject = void 0;
|
|
|
65564
65682
|
const basic_1 = __webpack_require__(/*! ../abap/types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
65565
65683
|
const ddic_1 = __webpack_require__(/*! ../ddic */ "./node_modules/@abaplint/core/build/src/ddic.js");
|
|
65566
65684
|
const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
|
|
65685
|
+
const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "./node_modules/@abaplint/core/build/src/xml_utils.js");
|
|
65567
65686
|
class LockObject extends _abstract_object_1.AbstractObject {
|
|
65568
65687
|
getType() {
|
|
65569
65688
|
return "ENQU";
|
|
@@ -65584,6 +65703,11 @@ class LockObject extends _abstract_object_1.AbstractObject {
|
|
|
65584
65703
|
this.parse();
|
|
65585
65704
|
return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.primaryTable;
|
|
65586
65705
|
}
|
|
65706
|
+
getParameters() {
|
|
65707
|
+
var _a;
|
|
65708
|
+
this.parse();
|
|
65709
|
+
return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.parameters;
|
|
65710
|
+
}
|
|
65587
65711
|
parseType(reg) {
|
|
65588
65712
|
var _a;
|
|
65589
65713
|
this.parse();
|
|
@@ -65608,7 +65732,7 @@ class LockObject extends _abstract_object_1.AbstractObject {
|
|
|
65608
65732
|
}
|
|
65609
65733
|
}
|
|
65610
65734
|
parse() {
|
|
65611
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
65735
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
65612
65736
|
if (this.parsedXML) {
|
|
65613
65737
|
return { updated: false, runtime: 0 };
|
|
65614
65738
|
}
|
|
@@ -65622,6 +65746,18 @@ class LockObject extends _abstract_object_1.AbstractObject {
|
|
|
65622
65746
|
}
|
|
65623
65747
|
this.parsedXML.primaryTable = (_f = (_e = (_d = (_c = parsed.abapGit) === null || _c === void 0 ? void 0 : _c["asx:abap"]) === null || _d === void 0 ? void 0 : _d["asx:values"]) === null || _e === void 0 ? void 0 : _e.DD25V) === null || _f === void 0 ? void 0 : _f.ROOTTAB;
|
|
65624
65748
|
this.parsedXML.description = (_k = (_j = (_h = (_g = parsed.abapGit) === null || _g === void 0 ? void 0 : _g["asx:abap"]) === null || _h === void 0 ? void 0 : _h["asx:values"]) === null || _j === void 0 ? void 0 : _j.DD25V) === null || _k === void 0 ? void 0 : _k.DDTEXT;
|
|
65749
|
+
this.parsedXML.parameters = [];
|
|
65750
|
+
const parameters = (_o = (_m = (_l = parsed.abapGit) === null || _l === void 0 ? void 0 : _l["asx:abap"]) === null || _m === void 0 ? void 0 : _m["asx:values"]) === null || _o === void 0 ? void 0 : _o.DD27P_TABLE;
|
|
65751
|
+
for (const parameter of (0, xml_utils_1.xmlToArray)(parameters === null || parameters === void 0 ? void 0 : parameters.DD27P)) {
|
|
65752
|
+
if (typeof (parameter === null || parameter === void 0 ? void 0 : parameter.VIEWFIELD) !== "string") {
|
|
65753
|
+
continue;
|
|
65754
|
+
}
|
|
65755
|
+
this.parsedXML.parameters.push({
|
|
65756
|
+
VIEWFIELD: parameter.VIEWFIELD,
|
|
65757
|
+
TABNAME: parameter.TABNAME,
|
|
65758
|
+
FIELDNAME: parameter.FIELDNAME,
|
|
65759
|
+
});
|
|
65760
|
+
}
|
|
65625
65761
|
const end = Date.now();
|
|
65626
65762
|
return { updated: true, runtime: end - start };
|
|
65627
65763
|
}
|
|
@@ -70628,7 +70764,7 @@ class Registry {
|
|
|
70628
70764
|
}
|
|
70629
70765
|
static abaplintVersion() {
|
|
70630
70766
|
// magic, see build script "version.js"
|
|
70631
|
-
return "2.120.
|
|
70767
|
+
return "2.120.44";
|
|
70632
70768
|
}
|
|
70633
70769
|
getDDICReferences() {
|
|
70634
70770
|
return this.ddicReferences;
|
|
@@ -100556,6 +100692,7 @@ class XMLConsistency {
|
|
|
100556
100692
|
* XML is well-formed and parseable
|
|
100557
100693
|
* Naming for CLAS and INTF objects
|
|
100558
100694
|
* QUAN fields in TABL objects have reference table and field values
|
|
100695
|
+
* Lock parameter names in ENQU objects are max 16 characters
|
|
100559
100696
|
* Texts and translations do not exceed maximum allowed length.`,
|
|
100560
100697
|
tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.Syntax],
|
|
100561
100698
|
};
|
|
@@ -100613,6 +100750,9 @@ class XMLConsistency {
|
|
|
100613
100750
|
else if (obj instanceof Objects.Table) {
|
|
100614
100751
|
issues.push(...this.runTable(obj, file));
|
|
100615
100752
|
}
|
|
100753
|
+
else if (obj instanceof Objects.LockObject) {
|
|
100754
|
+
issues.push(...this.runLockObject(obj, file));
|
|
100755
|
+
}
|
|
100616
100756
|
if (obj instanceof _abap_object_1.ABAPObject) {
|
|
100617
100757
|
issues.push(...this.runTextPool(obj, file));
|
|
100618
100758
|
}
|
|
@@ -100796,6 +100936,19 @@ class XMLConsistency {
|
|
|
100796
100936
|
}
|
|
100797
100937
|
return issues;
|
|
100798
100938
|
}
|
|
100939
|
+
runLockObject(obj, file) {
|
|
100940
|
+
var _a;
|
|
100941
|
+
const maxParameterLength = 16;
|
|
100942
|
+
const issues = [];
|
|
100943
|
+
for (const parameter of (_a = obj.getParameters()) !== null && _a !== void 0 ? _a : []) {
|
|
100944
|
+
if (parameter.VIEWFIELD.length > maxParameterLength) {
|
|
100945
|
+
const message = `Lock parameter ${parameter.VIEWFIELD} exceeds maximum length of ` +
|
|
100946
|
+
`${maxParameterLength} characters (actual: ${parameter.VIEWFIELD.length})`;
|
|
100947
|
+
issues.push(issue_1.Issue.atRow(file, 1, message, this.getMetadata().key, this.conf.severity));
|
|
100948
|
+
}
|
|
100949
|
+
}
|
|
100950
|
+
return issues;
|
|
100951
|
+
}
|
|
100799
100952
|
runTable(obj, file) {
|
|
100800
100953
|
var _a, _b;
|
|
100801
100954
|
var _c;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.80",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"author": "abaplint",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@abaplint/core": "^2.120.
|
|
31
|
-
"@abaplint/transpiler": "^2.13.
|
|
30
|
+
"@abaplint/core": "^2.120.44",
|
|
31
|
+
"@abaplint/transpiler": "^2.13.79",
|
|
32
32
|
"@types/glob": "^9.0.0",
|
|
33
33
|
"@types/node": "^26.4.1",
|
|
34
34
|
"@types/progress": "^2.0.7",
|
|
35
|
-
"glob": "
|
|
35
|
+
"glob": "^13.0.6",
|
|
36
36
|
"p-limit": "^7.3.2",
|
|
37
37
|
"progress": "^2.0.3",
|
|
38
38
|
"ts-json-schema-generator": "^2.9.0",
|