@abaplint/cli 2.119.17 → 2.119.20

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.
Files changed (2) hide show
  1. package/build/cli.js +34 -1
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -30857,6 +30857,12 @@ class CallFunction {
30857
30857
  for (const s of node.findDirectExpressions(Expressions.Source)) {
30858
30858
  source_1.Source.runSyntax(s, input);
30859
30859
  }
30860
+ for (const d of node.findDirectExpressions(Expressions.Destination)) {
30861
+ const source = d.findFirstExpression(Expressions.Source);
30862
+ if (source) {
30863
+ source_1.Source.runSyntax(source, input);
30864
+ }
30865
+ }
30860
30866
  const fp = node.findDirectExpression(Expressions.FunctionParameters);
30861
30867
  if (fp) {
30862
30868
  function_parameters_1.FunctionParameters.runSyntax(fp, input);
@@ -32411,11 +32417,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
32411
32417
  exports.FetchNextCursor = void 0;
32412
32418
  const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
32413
32419
  const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
32420
+ const sql_source_1 = __webpack_require__(/*! ../expressions/sql_source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_source.js");
32414
32421
  class FetchNextCursor {
32415
32422
  runSyntax(node, input) {
32416
32423
  for (const t of node.findAllExpressions(Expressions.Target)) {
32417
32424
  target_1.Target.runSyntax(t, input);
32418
32425
  }
32426
+ for (const s of node.findAllExpressions(Expressions.SQLSourceSimple)) {
32427
+ sql_source_1.SQLSource.runSyntax(s, input);
32428
+ }
32419
32429
  }
32420
32430
  }
32421
32431
  exports.FetchNextCursor = FetchNextCursor;
@@ -43318,6 +43328,7 @@ class Config {
43318
43328
  skipGeneratedProxyInterfaces: false,
43319
43329
  useApackDependencies: false,
43320
43330
  skipIncludesWithoutMain: false,
43331
+ errorOnDuplicateFilenames: false,
43321
43332
  },
43322
43333
  dependencies: [{
43323
43334
  url: "https://github.com/abaplint/deps",
@@ -43381,6 +43392,9 @@ class Config {
43381
43392
  if (this.config.global.skipIncludesWithoutMain === undefined) {
43382
43393
  this.config.global.skipIncludesWithoutMain = false;
43383
43394
  }
43395
+ if (this.config.global.errorOnDuplicateFilenames === undefined) {
43396
+ this.config.global.errorOnDuplicateFilenames = false;
43397
+ }
43384
43398
  this.checkVersion();
43385
43399
  }
43386
43400
  get() {
@@ -56298,7 +56312,7 @@ class Registry {
56298
56312
  }
56299
56313
  static abaplintVersion() {
56300
56314
  // magic, see build script "version.sh"
56301
- return "2.119.17";
56315
+ return "2.119.19";
56302
56316
  }
56303
56317
  getDDICReferences() {
56304
56318
  return this.ddicReferences;
@@ -56414,6 +56428,9 @@ class Registry {
56414
56428
  continue;
56415
56429
  }
56416
56430
  let found = this.findOrCreate(f.getObjectName(), f.getObjectType());
56431
+ if (this.conf.getGlobal().errorOnDuplicateFilenames === true) {
56432
+ this.checkDuplicateFilename(filename, found.getFiles());
56433
+ }
56417
56434
  if (dependency === false && found && this.isDependency(found)) {
56418
56435
  this.removeDependency(found);
56419
56436
  found = this.findOrCreate(f.getObjectName(), f.getObjectType());
@@ -56422,6 +56439,22 @@ class Registry {
56422
56439
  }
56423
56440
  return this;
56424
56441
  }
56442
+ checkDuplicateFilename(filename, files) {
56443
+ const basename = Registry.filenameBasename(filename);
56444
+ if (basename === "PACKAGE.DEVC.XML") {
56445
+ return;
56446
+ }
56447
+ for (const existingFile of files) {
56448
+ if (Registry.filenameBasename(existingFile.getFilename()) === basename) {
56449
+ throw new Error("Duplicate filename: " + filename + " already exists as " + existingFile.getFilename());
56450
+ }
56451
+ }
56452
+ }
56453
+ static filenameBasename(filename) {
56454
+ const normalized = filename.replace(/\\/g, "/");
56455
+ const last = normalized.split("/").pop();
56456
+ return (last !== null && last !== void 0 ? last : normalized).toUpperCase();
56457
+ }
56425
56458
  addFiles(files) {
56426
56459
  this._addFiles(files, false);
56427
56460
  return this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.119.17",
3
+ "version": "2.119.20",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.119.17",
41
+ "@abaplint/core": "^2.119.19",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",