@abaplint/cli 2.120.16 → 2.120.18

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 +79 -38
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -25402,7 +25402,7 @@ BuiltIn.methods = {
25402
25402
  counter: BuiltIn.counter++,
25403
25403
  mandatory: {
25404
25404
  "val": basic_1.CLikeType.get(),
25405
- "format": basic_1.CLikeType.get(),
25405
+ "format": basic_1.SimpleType.get(),
25406
25406
  },
25407
25407
  return: basic_1.StringType.get(),
25408
25408
  release: version_1.Release.v702,
@@ -25594,17 +25594,17 @@ BuiltIn.methods = {
25594
25594
  "NMAX": {
25595
25595
  counter: BuiltIn.counter++,
25596
25596
  mandatory: {
25597
- "val1": basic_1.CLikeType.get(),
25598
- "val2": basic_1.CLikeType.get(),
25597
+ "val1": basic_1.SimpleType.get(),
25598
+ "val2": basic_1.SimpleType.get(),
25599
25599
  },
25600
25600
  optional: {
25601
- "val3": basic_1.CLikeType.get(),
25602
- "val4": basic_1.CLikeType.get(),
25603
- "val5": basic_1.CLikeType.get(),
25604
- "val6": basic_1.CLikeType.get(),
25605
- "val7": basic_1.CLikeType.get(),
25606
- "val8": basic_1.CLikeType.get(),
25607
- "val9": basic_1.CLikeType.get(),
25601
+ "val3": basic_1.SimpleType.get(),
25602
+ "val4": basic_1.SimpleType.get(),
25603
+ "val5": basic_1.SimpleType.get(),
25604
+ "val6": basic_1.SimpleType.get(),
25605
+ "val7": basic_1.SimpleType.get(),
25606
+ "val8": basic_1.SimpleType.get(),
25607
+ "val9": basic_1.SimpleType.get(),
25608
25608
  },
25609
25609
  return: basic_1.IntegerType.get(),
25610
25610
  release: version_1.Release.v702,
@@ -25612,17 +25612,17 @@ BuiltIn.methods = {
25612
25612
  "NMIN": {
25613
25613
  counter: BuiltIn.counter++,
25614
25614
  mandatory: {
25615
- "val1": basic_1.CLikeType.get(),
25616
- "val2": basic_1.CLikeType.get(),
25615
+ "val1": basic_1.SimpleType.get(),
25616
+ "val2": basic_1.SimpleType.get(),
25617
25617
  },
25618
25618
  optional: {
25619
- "val3": basic_1.CLikeType.get(),
25620
- "val4": basic_1.CLikeType.get(),
25621
- "val5": basic_1.CLikeType.get(),
25622
- "val6": basic_1.CLikeType.get(),
25623
- "val7": basic_1.CLikeType.get(),
25624
- "val8": basic_1.CLikeType.get(),
25625
- "val9": basic_1.CLikeType.get(),
25619
+ "val3": basic_1.SimpleType.get(),
25620
+ "val4": basic_1.SimpleType.get(),
25621
+ "val5": basic_1.SimpleType.get(),
25622
+ "val6": basic_1.SimpleType.get(),
25623
+ "val7": basic_1.SimpleType.get(),
25624
+ "val8": basic_1.SimpleType.get(),
25625
+ "val9": basic_1.SimpleType.get(),
25626
25626
  },
25627
25627
  return: basic_1.IntegerType.get(),
25628
25628
  release: version_1.Release.v702,
@@ -25638,7 +25638,7 @@ BuiltIn.methods = {
25638
25638
  counter: BuiltIn.counter++,
25639
25639
  mandatory: {
25640
25640
  "val": basic_1.CLikeType.get(),
25641
- "occ": basic_1.CLikeType.get(),
25641
+ "occ": basic_1.SimpleType.get(),
25642
25642
  },
25643
25643
  return: basic_1.StringType.get(),
25644
25644
  release: version_1.Release.v702,
@@ -27609,7 +27609,7 @@ class TypeUtils {
27609
27609
  return this.isAssignable(source, target);
27610
27610
  }
27611
27611
  isAssignableStrict(source, target, node) {
27612
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
27612
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
27613
27613
  const calculated = node ? this.isCalculated(node) : false;
27614
27614
  /*
27615
27615
  console.dir(source);
@@ -27620,9 +27620,23 @@ class TypeUtils {
27620
27620
  && (target instanceof basic_1.XStringType || target instanceof basic_1.XSequenceType)) {
27621
27621
  return false;
27622
27622
  }
27623
+ if (target instanceof basic_1.NumericType
27624
+ && (source instanceof basic_1.CharacterType || source instanceof basic_1.StringType)
27625
+ && ((_a = source.getAbstractTypeData()) === null || _a === void 0 ? void 0 : _a.derivedFromConstant) === true) {
27626
+ const constant = node === null || node === void 0 ? void 0 : node.concatTokens();
27627
+ if (constant !== undefined
27628
+ && ((constant.startsWith("'") && constant.endsWith("'"))
27629
+ || (constant.startsWith("`") && constant.endsWith("`")))
27630
+ && /^\d*$/.test(constant.substring(1, constant.length - 1)) === false) {
27631
+ return false;
27632
+ }
27633
+ }
27623
27634
  if (calculated) {
27624
27635
  return this.isAssignable(source, target);
27625
27636
  }
27637
+ if (target instanceof basic_1.CLikeType) {
27638
+ return this.isCharLikeStrict(source);
27639
+ }
27626
27640
  if (target instanceof basic_1.PGenericType) {
27627
27641
  return source instanceof basic_1.PackedType
27628
27642
  || source instanceof basic_1.PGenericType
@@ -27633,25 +27647,25 @@ class TypeUtils {
27633
27647
  }
27634
27648
  if (source instanceof basic_1.CharacterType) {
27635
27649
  if (target instanceof basic_1.CharacterType) {
27636
- if (((_a = source.getAbstractTypeData()) === null || _a === void 0 ? void 0 : _a.derivedFromConstant) === true) {
27650
+ if (((_b = source.getAbstractTypeData()) === null || _b === void 0 ? void 0 : _b.derivedFromConstant) === true) {
27637
27651
  return source.getLength() <= target.getLength();
27638
27652
  }
27639
27653
  return source.getLength() === target.getLength();
27640
27654
  }
27641
27655
  else if (target instanceof basic_1.IntegerType) {
27642
- if (((_b = source.getAbstractTypeData()) === null || _b === void 0 ? void 0 : _b.derivedFromConstant) === true) {
27656
+ if (((_c = source.getAbstractTypeData()) === null || _c === void 0 ? void 0 : _c.derivedFromConstant) === true) {
27643
27657
  return true;
27644
27658
  }
27645
27659
  return false;
27646
27660
  }
27647
27661
  else if (target instanceof basic_1.XStringType) {
27648
- if (((_c = source.getAbstractTypeData()) === null || _c === void 0 ? void 0 : _c.derivedFromConstant) === true) {
27662
+ if (((_d = source.getAbstractTypeData()) === null || _d === void 0 ? void 0 : _d.derivedFromConstant) === true) {
27649
27663
  return (node === null || node === void 0 ? void 0 : node.concatTokens()) !== "''";
27650
27664
  }
27651
27665
  return false;
27652
27666
  }
27653
27667
  else if (target instanceof basic_1.StringType) {
27654
- if (((_d = source.getAbstractTypeData()) === null || _d === void 0 ? void 0 : _d.derivedFromConstant) === true) {
27668
+ if (((_e = source.getAbstractTypeData()) === null || _e === void 0 ? void 0 : _e.derivedFromConstant) === true) {
27655
27669
  return true;
27656
27670
  }
27657
27671
  return false;
@@ -27659,7 +27673,7 @@ class TypeUtils {
27659
27673
  }
27660
27674
  else if (source instanceof basic_1.HexType) {
27661
27675
  if (target instanceof basic_1.HexType) {
27662
- if (((_e = source.getAbstractTypeData()) === null || _e === void 0 ? void 0 : _e.derivedFromConstant) === true) {
27676
+ if (((_f = source.getAbstractTypeData()) === null || _f === void 0 ? void 0 : _f.derivedFromConstant) === true) {
27663
27677
  return source.getLength() <= target.getLength();
27664
27678
  }
27665
27679
  return source.getLength() === target.getLength();
@@ -27668,7 +27682,7 @@ class TypeUtils {
27668
27682
  return false;
27669
27683
  }
27670
27684
  else if (target instanceof basic_1.IntegerType || target instanceof basic_1.Integer8Type) {
27671
- if (((_f = source.getAbstractTypeData()) === null || _f === void 0 ? void 0 : _f.derivedFromConstant) === true) {
27685
+ if (((_g = source.getAbstractTypeData()) === null || _g === void 0 ? void 0 : _g.derivedFromConstant) === true) {
27672
27686
  return true;
27673
27687
  }
27674
27688
  return false;
@@ -27679,13 +27693,13 @@ class TypeUtils {
27679
27693
  return false;
27680
27694
  }
27681
27695
  else if (target instanceof basic_1.CharacterType) {
27682
- if (((_g = source.getAbstractTypeData()) === null || _g === void 0 ? void 0 : _g.derivedFromConstant) === true) {
27696
+ if (((_h = source.getAbstractTypeData()) === null || _h === void 0 ? void 0 : _h.derivedFromConstant) === true) {
27683
27697
  return true;
27684
27698
  }
27685
27699
  return false;
27686
27700
  }
27687
27701
  else if (target instanceof basic_1.IntegerType) {
27688
- if (((_h = source.getAbstractTypeData()) === null || _h === void 0 ? void 0 : _h.derivedFromConstant) === true) {
27702
+ if (((_j = source.getAbstractTypeData()) === null || _j === void 0 ? void 0 : _j.derivedFromConstant) === true) {
27689
27703
  return true;
27690
27704
  }
27691
27705
  return false;
@@ -27695,7 +27709,7 @@ class TypeUtils {
27695
27709
  return false;
27696
27710
  }
27697
27711
  else if (target instanceof basic_1.XSequenceType || target instanceof basic_1.XStringType) {
27698
- if (((_j = source.getAbstractTypeData()) === null || _j === void 0 ? void 0 : _j.derivedFromConstant) === true) {
27712
+ if (((_k = source.getAbstractTypeData()) === null || _k === void 0 ? void 0 : _k.derivedFromConstant) === true) {
27699
27713
  return true;
27700
27714
  }
27701
27715
  return false;
@@ -27739,7 +27753,7 @@ class TypeUtils {
27739
27753
  return false;
27740
27754
  }
27741
27755
  else if (target instanceof basic_1.Integer8Type || target instanceof basic_1.PackedType) {
27742
- if (((_k = source.getAbstractTypeData()) === null || _k === void 0 ? void 0 : _k.derivedFromConstant) === true) {
27756
+ if (((_l = source.getAbstractTypeData()) === null || _l === void 0 ? void 0 : _l.derivedFromConstant) === true) {
27743
27757
  return true;
27744
27758
  }
27745
27759
  return false;
@@ -50584,6 +50598,12 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
50584
50598
  exports.SimpleType = void 0;
50585
50599
  const _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ "../core/build/src/abap/types/basic/_abstract_type.js");
50586
50600
  class SimpleType extends _abstract_type_1.AbstractType {
50601
+ static get() {
50602
+ return this.singleton;
50603
+ }
50604
+ constructor() {
50605
+ super();
50606
+ }
50587
50607
  toText() {
50588
50608
  return "```simple```";
50589
50609
  }
@@ -50601,6 +50621,7 @@ class SimpleType extends _abstract_type_1.AbstractType {
50601
50621
  }
50602
50622
  }
50603
50623
  exports.SimpleType = SimpleType;
50624
+ SimpleType.singleton = new SimpleType();
50604
50625
  //# sourceMappingURL=simple_type.js.map
50605
50626
 
50606
50627
  /***/ },
@@ -55430,7 +55451,7 @@ class DDIC {
55430
55451
  case "ANY":
55431
55452
  return Types.AnyType.get({ qualifiedName: qualifiedName });
55432
55453
  case "SIMPLE":
55433
- return new Types.SimpleType({ qualifiedName: qualifiedName });
55454
+ return Types.SimpleType.get();
55434
55455
  case "%_C_POINTER":
55435
55456
  return new Types.HexType(8, qualifiedName);
55436
55457
  case "TABLE":
@@ -69450,7 +69471,7 @@ class Registry {
69450
69471
  }
69451
69472
  static abaplintVersion() {
69452
69473
  // magic, see build script "version.js"
69453
- return "2.120.16";
69474
+ return "2.120.18";
69454
69475
  }
69455
69476
  getDDICReferences() {
69456
69477
  return this.ddicReferences;
@@ -101329,6 +101350,28 @@ exports.Total = Total;
101329
101350
 
101330
101351
  /***/ },
101331
101352
 
101353
+ /***/ "./build/src/git_clone.js"
101354
+ /*!********************************!*\
101355
+ !*** ./build/src/git_clone.js ***!
101356
+ \********************************/
101357
+ (__unused_webpack_module, exports) {
101358
+
101359
+ "use strict";
101360
+
101361
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
101362
+ exports.buildGitCloneArguments = buildGitCloneArguments;
101363
+ function buildGitCloneArguments(url, branch) {
101364
+ const args = ["clone", "--quiet", "--depth", "1"];
101365
+ if (branch) {
101366
+ args.push("-b", branch);
101367
+ }
101368
+ args.push("--", url, ".");
101369
+ return args;
101370
+ }
101371
+ //# sourceMappingURL=git_clone.js.map
101372
+
101373
+ /***/ },
101374
+
101332
101375
  /***/ "./build/src/index.js"
101333
101376
  /*!****************************!*\
101334
101377
  !*** ./build/src/index.js ***!
@@ -101387,6 +101430,7 @@ const _format_1 = __webpack_require__(/*! ./formatters/_format */ "./build/src/f
101387
101430
  const file_operations_1 = __webpack_require__(/*! ./file_operations */ "./build/src/file_operations.js");
101388
101431
  const apack_dependency_provider_1 = __webpack_require__(/*! ./apack_dependency_provider */ "./build/src/apack_dependency_provider.js");
101389
101432
  const fixes_1 = __webpack_require__(/*! ./fixes */ "./build/src/fixes.js");
101433
+ const git_clone_1 = __webpack_require__(/*! ./git_clone */ "./build/src/git_clone.js");
101390
101434
  const rename_1 = __webpack_require__(/*! ./rename */ "./build/src/rename.js");
101391
101435
  exports.GENERIC_ERROR = "generic_error";
101392
101436
  class Progress {
@@ -101508,11 +101552,8 @@ async function loadDependencies(config, compress, bar, base) {
101508
101552
  if (d.url) {
101509
101553
  process.stderr.write("Clone: " + d.url + "\n");
101510
101554
  const dir = fs.mkdtempSync(path.join(os.tmpdir(), "abaplint-"));
101511
- let branch = "";
101512
- if (d.branch) {
101513
- branch = "-b " + d.branch + " ";
101514
- }
101515
- childProcess.execSync("git clone --quiet --depth 1 " + branch + d.url + " .", { cwd: dir, stdio: "inherit" });
101555
+ const args = (0, git_clone_1.buildGitCloneArguments)(d.url, d.branch);
101556
+ childProcess.execFileSync("git", args, { cwd: dir, stdio: "inherit" });
101516
101557
  const names = file_operations_1.FileOperations.loadFileNames(file_operations_1.FileOperations.toUnixPath(dir) + d.files);
101517
101558
  files = files.concat(await file_operations_1.FileOperations.loadFiles(compress, names, bar));
101518
101559
  file_operations_1.FileOperations.deleteFolderRecursive(dir);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.120.16",
3
+ "version": "2.120.18",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.120.16",
42
+ "@abaplint/core": "^2.120.18",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",