@abaplint/cli 2.113.156 → 2.113.157

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 +19 -12
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -99,6 +99,14 @@ class FileOperations {
99
99
  }
100
100
  fs.rmSync(dir, { recursive: true });
101
101
  }
102
+ static toUnixPath(path) {
103
+ if (os.platform() === "win32") {
104
+ return path.replace(/[\\/]+/g, "/").replace(/^([a-zA-Z]+:|\.\/)/, "");
105
+ }
106
+ else {
107
+ return path;
108
+ }
109
+ }
102
110
  static loadFileNames(arg, error = true) {
103
111
  const files = glob.sync(arg, { nodir: true, absolute: true, posix: true });
104
112
  if (files.length === 0 && error) {
@@ -966,14 +974,10 @@ async function loadDependencies(config, compress, bar, base) {
966
974
  continue;
967
975
  }
968
976
  }
969
- const toUnixPath = (path) => path.replace(/[\\/]+/g, "/").replace(/^([a-zA-Z]+:|\.\/)/, "");
970
977
  if (d.url) {
971
978
  process.stderr.write("Clone: " + d.url + "\n");
972
979
  let dir = fs.mkdtempSync(path.join(os.tmpdir(), "abaplint-"));
973
- if (os.platform() === "win32") {
974
- // must be converted to posix for glob patterns like "/{foo,src}/**/*.*" to work
975
- dir = toUnixPath(dir);
976
- }
980
+ dir = file_operations_1.FileOperations.toUnixPath(dir);
977
981
  let branch = "";
978
982
  if (d.branch) {
979
983
  branch = "-b " + d.branch + " ";
@@ -1163,16 +1167,18 @@ class Rename {
1163
1167
  }
1164
1168
  ////////////////////////
1165
1169
  write(rconfig, base, fs) {
1166
- const outputFolder = base + path.sep + rconfig.output;
1170
+ const outputFolder = base + path.posix.sep + rconfig.output;
1167
1171
  console.log("Base: " + base);
1168
1172
  console.log("Output folder: " + outputFolder);
1169
1173
  file_operations_1.FileOperations.deleteFolderRecursive(outputFolder);
1174
+ const myBase = file_operations_1.FileOperations.toUnixPath(path.resolve(base));
1170
1175
  for (const o of this.reg.getObjects()) {
1171
1176
  if (this.reg.isDependency(o) === true) {
1172
1177
  continue;
1173
1178
  }
1174
1179
  for (const f of o.getFiles()) {
1175
- const n = outputFolder + f.getFilename().replace(base, "");
1180
+ // yea, ffs
1181
+ const n = outputFolder + f.getFilename().replace(myBase, "").replace("//?/C:", "");
1176
1182
  console.log("Write " + n);
1177
1183
  fs.mkdirSync(path.dirname(n), { recursive: true });
1178
1184
  fs.writeFileSync(n, f.getRaw());
@@ -28136,15 +28142,16 @@ class Source {
28136
28142
  }
28137
28143
  case "REF":
28138
28144
  {
28139
- const foundType = this.determineType(node, input, targetType);
28145
+ let foundType = this.determineType(node, input, targetType);
28140
28146
  const s = Source.runSyntax(node.findDirectExpression(Expressions.Source), input);
28141
28147
  if (foundType === undefined && s) {
28142
- return new basic_1.DataReference(s);
28148
+ foundType = new basic_1.DataReference(s);
28143
28149
  }
28144
28150
  else if (foundType) {
28145
- return new basic_1.DataReference(foundType);
28151
+ foundType = new basic_1.DataReference(foundType);
28146
28152
  }
28147
- return undefined;
28153
+ this.addIfInferred(node, input, foundType);
28154
+ return foundType;
28148
28155
  }
28149
28156
  case "FILTER":
28150
28157
  {
@@ -54759,7 +54766,7 @@ class Registry {
54759
54766
  }
54760
54767
  static abaplintVersion() {
54761
54768
  // magic, see build script "version.sh"
54762
- return "2.113.155";
54769
+ return "2.113.157";
54763
54770
  }
54764
54771
  getDDICReferences() {
54765
54772
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.156",
3
+ "version": "2.113.157",
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.113.155",
41
+ "@abaplint/core": "^2.113.156",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",