@abaplint/transpiler-cli 2.3.120 → 2.3.122

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/bundle.js +8 -6
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -66364,18 +66364,18 @@ class DatabaseSetup {
66364
66364
  constructor(reg) {
66365
66365
  this.reg = reg;
66366
66366
  }
66367
- run() {
66367
+ run(options) {
66368
66368
  return {
66369
66369
  schemas: {
66370
66370
  sqlite: new sqlite_database_schema_1.SQLiteDatabaseSchema(this.reg).run(),
66371
66371
  hdb: ["todo"],
66372
66372
  pg: ["todo"],
66373
66373
  },
66374
- insert: this.buildInsert(),
66374
+ insert: this.buildInsert(options),
66375
66375
  };
66376
66376
  }
66377
66377
  ////////////////////
66378
- buildInsert() {
66378
+ buildInsert(options) {
66379
66379
  // note: avoid hitting maximum statement size by splitting into multiple statements
66380
66380
  const insert = [];
66381
66381
  // INSERT data
@@ -66385,7 +66385,9 @@ class DatabaseSetup {
66385
66385
  }
66386
66386
  else if (obj instanceof abaplint.Objects.Class
66387
66387
  || obj instanceof abaplint.Objects.Interface) {
66388
- insert.push(this.insertREPOSRC(obj));
66388
+ if ((options === null || options === void 0 ? void 0 : options.skipReposrc) !== true) {
66389
+ insert.push(this.insertREPOSRC(obj));
66390
+ }
66389
66391
  }
66390
66392
  }
66391
66393
  insert.push(this.insertT000());
@@ -68498,7 +68500,7 @@ class SQLCondTranspiler {
68498
68500
  const chain = (_a = c.findDirectExpression(abaplint.Expressions.Dynamic)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(abaplint.Expressions.FieldChain);
68499
68501
  if (chain) {
68500
68502
  const code = new field_chain_1.FieldChainTranspiler(true).transpile(chain, traversal).getCode();
68501
- ret += `" + ${code} + "`;
68503
+ ret += `" + (${code} === "" ? "1 = 1" : ${code}) + "`;
68502
68504
  }
68503
68505
  else {
68504
68506
  throw new Error("SQL Condition, transpiler todo, dyn cond, " + c.concatTokens());
@@ -69369,7 +69371,7 @@ class Transpiler {
69369
69371
  reg.parse();
69370
69372
  new keywords_1.Keywords((_a = this.options) === null || _a === void 0 ? void 0 : _a.keywords).handle(reg);
69371
69373
  this.validate(reg);
69372
- const dbSetup = new db_1.DatabaseSetup(reg).run();
69374
+ const dbSetup = new db_1.DatabaseSetup(reg).run(this.options);
69373
69375
  const output = {
69374
69376
  objects: [],
69375
69377
  unitTestScript: new unit_test_1.UnitTest().unitTestScript(reg, (_b = this.options) === null || _b === void 0 ? void 0 : _b.skip, (_c = this.options) === null || _c === void 0 ? void 0 : _c.only),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.3.120",
3
+ "version": "2.3.122",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "bin": {
6
6
  "abap_transpile": "./abap_transpile"
@@ -25,7 +25,7 @@
25
25
  "author": "abaplint",
26
26
  "license": "MIT",
27
27
  "devDependencies": {
28
- "@abaplint/transpiler": "^2.3.120",
28
+ "@abaplint/transpiler": "^2.3.122",
29
29
  "@types/glob": "^7.2.0",
30
30
  "glob": "=7.2.0",
31
31
  "@types/progress": "^2.0.5",