@abaplint/transpiler-cli 2.10.38 → 2.10.39
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/abap_transpile +1 -1
- package/build/bundle.js +138 -142
- package/package.json +3 -3
- package/schema.json +0 -161
package/abap_transpile
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
require("./build/bundle");
|
package/build/bundle.js
CHANGED
|
@@ -80657,6 +80657,7 @@ const handle_smim_1 = __webpack_require__(/*! ./handlers/handle_smim */ "./node_
|
|
|
80657
80657
|
const handle_msag_1 = __webpack_require__(/*! ./handlers/handle_msag */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_msag.js");
|
|
80658
80658
|
const handle_oa2p_1 = __webpack_require__(/*! ./handlers/handle_oa2p */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_oa2p.js");
|
|
80659
80659
|
const handle_fugr_1 = __webpack_require__(/*! ./handlers/handle_fugr */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_fugr.js");
|
|
80660
|
+
const initialization_1 = __webpack_require__(/*! ./initialization */ "./node_modules/@abaplint/transpiler/build/src/initialization.js");
|
|
80660
80661
|
class Transpiler {
|
|
80661
80662
|
constructor(options) {
|
|
80662
80663
|
this.options = options;
|
|
@@ -80681,8 +80682,8 @@ class Transpiler {
|
|
|
80681
80682
|
objects: [],
|
|
80682
80683
|
unitTestScript: new unit_test_1.UnitTest().unitTestScript(reg, this.options?.skip),
|
|
80683
80684
|
unitTestScriptOpen: new unit_test_1.UnitTest().unitTestScriptOpen(reg, this.options?.skip),
|
|
80684
|
-
initializationScript: new
|
|
80685
|
-
initializationScript2: new
|
|
80685
|
+
initializationScript: new initialization_1.Initialization().script(reg, dbSetup, this.options?.extraSetup),
|
|
80686
|
+
initializationScript2: new initialization_1.Initialization().script(reg, dbSetup, this.options?.extraSetup, true),
|
|
80686
80687
|
databaseSetup: dbSetup,
|
|
80687
80688
|
reg: reg,
|
|
80688
80689
|
};
|
|
@@ -80745,6 +80746,135 @@ exports.Transpiler = Transpiler;
|
|
|
80745
80746
|
|
|
80746
80747
|
/***/ }),
|
|
80747
80748
|
|
|
80749
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/initialization.js":
|
|
80750
|
+
/*!***********************************************************************!*\
|
|
80751
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/initialization.js ***!
|
|
80752
|
+
\***********************************************************************/
|
|
80753
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
80754
|
+
|
|
80755
|
+
"use strict";
|
|
80756
|
+
|
|
80757
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
80758
|
+
exports.Initialization = void 0;
|
|
80759
|
+
exports.escapeNamespaceFilename = escapeNamespaceFilename;
|
|
80760
|
+
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
80761
|
+
function escapeNamespaceFilename(filename) {
|
|
80762
|
+
// ES modules are resolved and cached as URLs. This means that special characters must be
|
|
80763
|
+
// percent-encoded, such as # with %23 and ? with %3F.
|
|
80764
|
+
return filename.replace(/\//g, "%23");
|
|
80765
|
+
}
|
|
80766
|
+
class Initialization {
|
|
80767
|
+
script(reg, dbSetup, extraSetup, useImport) {
|
|
80768
|
+
let ret = "";
|
|
80769
|
+
if (useImport === true) {
|
|
80770
|
+
ret = `/* eslint-disable import/newline-after-import */
|
|
80771
|
+
import "./_top.mjs";\n`;
|
|
80772
|
+
}
|
|
80773
|
+
else {
|
|
80774
|
+
ret = `/* eslint-disable import/newline-after-import */
|
|
80775
|
+
import runtime from "@abaplint/runtime";
|
|
80776
|
+
globalThis.abap = new runtime.ABAP();\n`;
|
|
80777
|
+
}
|
|
80778
|
+
ret += `${this.buildImports(reg, useImport)}
|
|
80779
|
+
|
|
80780
|
+
export async function initializeABAP() {\n`;
|
|
80781
|
+
ret += ` const sqlite = [];\n`;
|
|
80782
|
+
for (const i of dbSetup.schemas.sqlite) {
|
|
80783
|
+
ret += ` sqlite.push(\`${i}\`);\n`;
|
|
80784
|
+
}
|
|
80785
|
+
ret += ` const hdb = \`${dbSetup.schemas.hdb}\`;\n`;
|
|
80786
|
+
ret += ` const pg = [];\n`;
|
|
80787
|
+
for (const i of dbSetup.schemas.pg) {
|
|
80788
|
+
ret += ` pg.push(\`${i}\`);\n`;
|
|
80789
|
+
}
|
|
80790
|
+
ret += ` const snowflake = [];\n`;
|
|
80791
|
+
for (const i of dbSetup.schemas.snowflake) {
|
|
80792
|
+
ret += ` snowflake.push(\`${i}\`);\n`;
|
|
80793
|
+
}
|
|
80794
|
+
ret += ` const schemas = {sqlite, hdb, pg, snowflake};\n`;
|
|
80795
|
+
ret += `\n`;
|
|
80796
|
+
ret += ` const insert = [];\n`;
|
|
80797
|
+
for (const i of dbSetup.insert) {
|
|
80798
|
+
ret += ` insert.push(\`${i}\`);\n`;
|
|
80799
|
+
}
|
|
80800
|
+
ret += `\n`;
|
|
80801
|
+
if (extraSetup === undefined || extraSetup === "") {
|
|
80802
|
+
ret += `// no setup logic specified in config\n`;
|
|
80803
|
+
}
|
|
80804
|
+
else {
|
|
80805
|
+
ret += ` const {setup} = await import("${extraSetup}");\n` +
|
|
80806
|
+
` await setup(globalThis.abap, schemas, insert);\n`;
|
|
80807
|
+
}
|
|
80808
|
+
ret += `}`;
|
|
80809
|
+
return ret;
|
|
80810
|
+
}
|
|
80811
|
+
buildImports(reg, useImport) {
|
|
80812
|
+
// note: ES modules are hoised, so use the dynamic import(), due to setting of globalThis.abap
|
|
80813
|
+
// some sorting required: eg. a class constructor using constant from interface
|
|
80814
|
+
const list = [];
|
|
80815
|
+
const late = [];
|
|
80816
|
+
const imp = (filename) => {
|
|
80817
|
+
if (useImport === true) {
|
|
80818
|
+
return `import "./${filename}.mjs";`;
|
|
80819
|
+
}
|
|
80820
|
+
else {
|
|
80821
|
+
return `await import("./${filename}.mjs");`;
|
|
80822
|
+
}
|
|
80823
|
+
};
|
|
80824
|
+
for (const obj of reg.getObjects()) {
|
|
80825
|
+
if (obj instanceof abaplint.Objects.Table
|
|
80826
|
+
|| obj instanceof abaplint.Objects.DataElement
|
|
80827
|
+
|| obj instanceof abaplint.Objects.LockObject
|
|
80828
|
+
|| obj instanceof abaplint.Objects.MessageClass
|
|
80829
|
+
|| obj instanceof abaplint.Objects.MIMEObject
|
|
80830
|
+
|| obj instanceof abaplint.Objects.Oauth2Profile
|
|
80831
|
+
|| obj instanceof abaplint.Objects.WebMIME
|
|
80832
|
+
|| obj instanceof abaplint.Objects.TypePool
|
|
80833
|
+
|| obj instanceof abaplint.Objects.TableType) {
|
|
80834
|
+
list.push(imp(`${escapeNamespaceFilename(obj.getName().toLowerCase())}.${obj.getType().toLowerCase()}`));
|
|
80835
|
+
}
|
|
80836
|
+
}
|
|
80837
|
+
for (const obj of reg.getObjects()) {
|
|
80838
|
+
if (obj instanceof abaplint.Objects.FunctionGroup) {
|
|
80839
|
+
list.push(imp(`${escapeNamespaceFilename(obj.getName().toLowerCase())}.fugr`));
|
|
80840
|
+
}
|
|
80841
|
+
else if (obj instanceof abaplint.Objects.Class) {
|
|
80842
|
+
if (obj.getName().toUpperCase() !== "CL_ABAP_CHAR_UTILITIES"
|
|
80843
|
+
&& this.hasClassConstructor(reg, obj)) {
|
|
80844
|
+
// this will not solve all problems with class constors 100%, but probably good enough
|
|
80845
|
+
late.push(imp(`${escapeNamespaceFilename(obj.getName().toLowerCase())}.${obj.getType().toLowerCase()}`));
|
|
80846
|
+
}
|
|
80847
|
+
else {
|
|
80848
|
+
list.push(imp(`${escapeNamespaceFilename(obj.getName().toLowerCase())}.${obj.getType().toLowerCase()}`));
|
|
80849
|
+
}
|
|
80850
|
+
}
|
|
80851
|
+
else if (obj instanceof abaplint.Objects.Interface) {
|
|
80852
|
+
list.push(imp(`${escapeNamespaceFilename(obj.getName().toLowerCase())}.${obj.getType().toLowerCase()}`));
|
|
80853
|
+
}
|
|
80854
|
+
}
|
|
80855
|
+
return [...list.sort(), ...late].join("\n");
|
|
80856
|
+
}
|
|
80857
|
+
// class constructors might make early use of eg. constants from interfaces
|
|
80858
|
+
// sub classes will import() super classes and trigger a class constructor of the super
|
|
80859
|
+
hasClassConstructor(reg, clas) {
|
|
80860
|
+
if (clas.getDefinition()?.getMethodDefinitions().getByName("CLASS_CONSTRUCTOR") !== undefined) {
|
|
80861
|
+
return true;
|
|
80862
|
+
}
|
|
80863
|
+
const sup = clas.getDefinition()?.getSuperClass();
|
|
80864
|
+
if (sup !== undefined) {
|
|
80865
|
+
const superClass = reg.getObject("CLAS", sup);
|
|
80866
|
+
if (superClass) {
|
|
80867
|
+
return this.hasClassConstructor(reg, superClass);
|
|
80868
|
+
}
|
|
80869
|
+
}
|
|
80870
|
+
return false;
|
|
80871
|
+
}
|
|
80872
|
+
}
|
|
80873
|
+
exports.Initialization = Initialization;
|
|
80874
|
+
//# sourceMappingURL=initialization.js.map
|
|
80875
|
+
|
|
80876
|
+
/***/ }),
|
|
80877
|
+
|
|
80748
80878
|
/***/ "./node_modules/@abaplint/transpiler/build/src/keywords.js":
|
|
80749
80879
|
/*!*****************************************************************!*\
|
|
80750
80880
|
!*** ./node_modules/@abaplint/transpiler/build/src/keywords.js ***!
|
|
@@ -88897,56 +89027,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
88897
89027
|
exports.UnitTest = void 0;
|
|
88898
89028
|
/* eslint-disable max-len */
|
|
88899
89029
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
89030
|
+
const initialization_1 = __webpack_require__(/*! ./initialization */ "./node_modules/@abaplint/transpiler/build/src/initialization.js");
|
|
88900
89031
|
class UnitTest {
|
|
88901
|
-
// todo, move this method somewhere else, its much more than just unit test relevant
|
|
88902
|
-
initializationScript(reg, dbSetup, extraSetup, useImport) {
|
|
88903
|
-
let ret = "";
|
|
88904
|
-
if (useImport === true) {
|
|
88905
|
-
ret = `/* eslint-disable import/newline-after-import */
|
|
88906
|
-
import "./_top.mjs";\n`;
|
|
88907
|
-
}
|
|
88908
|
-
else {
|
|
88909
|
-
ret = `/* eslint-disable import/newline-after-import */
|
|
88910
|
-
import runtime from "@abaplint/runtime";
|
|
88911
|
-
globalThis.abap = new runtime.ABAP();\n`;
|
|
88912
|
-
}
|
|
88913
|
-
ret += `${this.buildImports(reg, useImport)}
|
|
88914
|
-
|
|
88915
|
-
export async function initializeABAP() {\n`;
|
|
88916
|
-
ret += ` const sqlite = [];\n`;
|
|
88917
|
-
for (const i of dbSetup.schemas.sqlite) {
|
|
88918
|
-
ret += ` sqlite.push(\`${i}\`);\n`;
|
|
88919
|
-
}
|
|
88920
|
-
ret += ` const hdb = \`${dbSetup.schemas.hdb}\`;\n`;
|
|
88921
|
-
ret += ` const pg = [];\n`;
|
|
88922
|
-
for (const i of dbSetup.schemas.pg) {
|
|
88923
|
-
ret += ` pg.push(\`${i}\`);\n`;
|
|
88924
|
-
}
|
|
88925
|
-
ret += ` const snowflake = [];\n`;
|
|
88926
|
-
for (const i of dbSetup.schemas.snowflake) {
|
|
88927
|
-
ret += ` snowflake.push(\`${i}\`);\n`;
|
|
88928
|
-
}
|
|
88929
|
-
ret += ` const schemas = {sqlite, hdb, pg, snowflake};\n`;
|
|
88930
|
-
ret += `\n`;
|
|
88931
|
-
ret += ` const insert = [];\n`;
|
|
88932
|
-
for (const i of dbSetup.insert) {
|
|
88933
|
-
ret += ` insert.push(\`${i}\`);\n`;
|
|
88934
|
-
}
|
|
88935
|
-
ret += `\n`;
|
|
88936
|
-
if (extraSetup === undefined || extraSetup === "") {
|
|
88937
|
-
ret += `// no setup logic specified in config\n`;
|
|
88938
|
-
}
|
|
88939
|
-
else {
|
|
88940
|
-
ret += ` const {setup} = await import("${extraSetup}");\n` +
|
|
88941
|
-
` await setup(globalThis.abap, schemas, insert);\n`;
|
|
88942
|
-
}
|
|
88943
|
-
ret += `}`;
|
|
88944
|
-
return ret;
|
|
88945
|
-
}
|
|
88946
|
-
escapeNamespace(filename) {
|
|
88947
|
-
// ES modules are resolved and cached as URLs. This means that special characters must be percent-encoded, such as # with %23 and ? with %3F.
|
|
88948
|
-
return filename.replace(/\//g, "%23");
|
|
88949
|
-
}
|
|
88950
89032
|
unitTestScriptOpen(reg, _skip) {
|
|
88951
89033
|
let ret = `/* eslint-disable curly */
|
|
88952
89034
|
import fs from "fs";
|
|
@@ -88968,7 +89050,7 @@ async function run() {
|
|
|
88968
89050
|
}
|
|
88969
89051
|
const hasTestFile = obj.getFiles().some(f => { return f.getFilename().includes(".testclasses."); });
|
|
88970
89052
|
if (hasTestFile === true) {
|
|
88971
|
-
ret += ` await import("./${
|
|
89053
|
+
ret += ` await import("./${(0, initialization_1.escapeNamespaceFilename)(obj.getName().toLowerCase())}.${obj.getType().toLowerCase()}.testclasses.mjs");\n`;
|
|
88972
89054
|
}
|
|
88973
89055
|
for (const file of obj.getABAPFiles()) {
|
|
88974
89056
|
for (const def of file.getInfo().listClassDefinitions()) {
|
|
@@ -89087,35 +89169,20 @@ run().then(() => {
|
|
|
89087
89169
|
}
|
|
89088
89170
|
unitTestScript(reg, skip) {
|
|
89089
89171
|
let ret = `/* eslint-disable curly */
|
|
89090
|
-
import fs from "fs";
|
|
89091
|
-
import path from "path";
|
|
89092
|
-
import {fileURLToPath} from "url";
|
|
89093
89172
|
import {initializeABAP} from "./init.mjs";
|
|
89094
|
-
import runtime from "@abaplint/runtime";
|
|
89095
|
-
|
|
89096
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
89097
89173
|
|
|
89098
89174
|
async function run() {
|
|
89099
|
-
await initializeABAP()
|
|
89100
|
-
const unit = new runtime.UnitTestResult();
|
|
89101
|
-
let clas;
|
|
89102
|
-
let locl;
|
|
89103
|
-
let meth;
|
|
89104
|
-
try {\n`;
|
|
89175
|
+
await initializeABAP();\n`;
|
|
89105
89176
|
for (const st of this.getSortedTests(reg)) {
|
|
89106
89177
|
ret += `// --------------------------------------------\n`;
|
|
89107
|
-
ret += ` clas = unit.addObject("${st.obj.getName()}");\n`;
|
|
89108
89178
|
const lc = st.localClass.toLowerCase();
|
|
89109
89179
|
ret += ` {
|
|
89110
|
-
const {${lc}} = await import("./${
|
|
89111
|
-
locl = clas.addTestClass("${lc}");
|
|
89180
|
+
const {${lc}} = await import("./${(0, initialization_1.escapeNamespaceFilename)(st.obj.getName().toLowerCase())}.${st.obj.getType().toLowerCase()}.testclasses.mjs");
|
|
89112
89181
|
if (${lc}.class_setup) await ${lc}.class_setup();\n`;
|
|
89113
89182
|
for (const m of st.methods) {
|
|
89114
89183
|
const skipThis = (skip || []).some(a => a.object === st.obj.getName() && a.class === lc && a.method === m);
|
|
89115
89184
|
if (skipThis) {
|
|
89116
|
-
ret += `
|
|
89117
|
-
ret += ` meth = locl.addMethod("${m}");\n`;
|
|
89118
|
-
ret += ` meth.skip();\n`;
|
|
89185
|
+
ret += ` console.log('${st.obj.getName()}: running ${lc}->${m}, skipped');\n`;
|
|
89119
89186
|
continue;
|
|
89120
89187
|
}
|
|
89121
89188
|
const callSpecial = (name) => {
|
|
@@ -89128,24 +89195,14 @@ async function run() {
|
|
|
89128
89195
|
ret += ` {\n const test = await (new ${lc}()).constructor_();\n`;
|
|
89129
89196
|
ret += callSpecial("setup");
|
|
89130
89197
|
ret += ` console.log("${st.obj.getName()}: running ${lc}->${m}");\n`;
|
|
89131
|
-
ret += ` meth = locl.addMethod("${m}");\n`;
|
|
89132
89198
|
ret += ` await test.FRIENDS_ACCESS_INSTANCE.${m}();\n`;
|
|
89133
|
-
ret += ` meth.pass();\n`;
|
|
89134
89199
|
ret += callSpecial("teardown");
|
|
89135
89200
|
ret += ` }\n`;
|
|
89136
89201
|
}
|
|
89137
|
-
ret += `
|
|
89202
|
+
ret += ` if (${lc}.class_teardown) await ${lc}.class_teardown();\n`;
|
|
89138
89203
|
ret += ` }\n`;
|
|
89139
89204
|
}
|
|
89140
89205
|
ret += `// -------------------END-------------------
|
|
89141
|
-
fs.writeFileSync(__dirname + path.sep + "_output.xml", unit.xUnitXML());
|
|
89142
|
-
} catch (e) {
|
|
89143
|
-
if (meth) {
|
|
89144
|
-
meth.fail();
|
|
89145
|
-
}
|
|
89146
|
-
fs.writeFileSync(__dirname + path.sep + "_output.xml", unit.xUnitXML());
|
|
89147
|
-
throw e;
|
|
89148
|
-
}
|
|
89149
89206
|
}
|
|
89150
89207
|
|
|
89151
89208
|
run().then(() => {
|
|
@@ -89156,67 +89213,6 @@ run().then(() => {
|
|
|
89156
89213
|
});`;
|
|
89157
89214
|
return ret;
|
|
89158
89215
|
}
|
|
89159
|
-
buildImports(reg, useImport) {
|
|
89160
|
-
// note: ES modules are hoised, so use the dynamic import(), due to setting of globalThis.abap
|
|
89161
|
-
// some sorting required: eg. a class constructor using constant from interface
|
|
89162
|
-
const list = [];
|
|
89163
|
-
const late = [];
|
|
89164
|
-
const imp = (filename) => {
|
|
89165
|
-
if (useImport === true) {
|
|
89166
|
-
return `import "./${filename}.mjs";`;
|
|
89167
|
-
}
|
|
89168
|
-
else {
|
|
89169
|
-
return `await import("./${filename}.mjs");`;
|
|
89170
|
-
}
|
|
89171
|
-
};
|
|
89172
|
-
for (const obj of reg.getObjects()) {
|
|
89173
|
-
if (obj instanceof abaplint.Objects.Table
|
|
89174
|
-
|| obj instanceof abaplint.Objects.DataElement
|
|
89175
|
-
|| obj instanceof abaplint.Objects.LockObject
|
|
89176
|
-
|| obj instanceof abaplint.Objects.MessageClass
|
|
89177
|
-
|| obj instanceof abaplint.Objects.MIMEObject
|
|
89178
|
-
|| obj instanceof abaplint.Objects.Oauth2Profile
|
|
89179
|
-
|| obj instanceof abaplint.Objects.WebMIME
|
|
89180
|
-
|| obj instanceof abaplint.Objects.TypePool
|
|
89181
|
-
|| obj instanceof abaplint.Objects.TableType) {
|
|
89182
|
-
list.push(imp(`${this.escapeNamespace(obj.getName().toLowerCase())}.${obj.getType().toLowerCase()}`));
|
|
89183
|
-
}
|
|
89184
|
-
}
|
|
89185
|
-
for (const obj of reg.getObjects()) {
|
|
89186
|
-
if (obj instanceof abaplint.Objects.FunctionGroup) {
|
|
89187
|
-
list.push(imp(`${this.escapeNamespace(obj.getName().toLowerCase())}.fugr`));
|
|
89188
|
-
}
|
|
89189
|
-
else if (obj instanceof abaplint.Objects.Class) {
|
|
89190
|
-
if (obj.getName().toUpperCase() !== "CL_ABAP_CHAR_UTILITIES"
|
|
89191
|
-
&& this.hasClassConstructor(reg, obj)) {
|
|
89192
|
-
// this will not solve all problems with class constors 100%, but probably good enough
|
|
89193
|
-
late.push(imp(`${this.escapeNamespace(obj.getName().toLowerCase())}.${obj.getType().toLowerCase()}`));
|
|
89194
|
-
}
|
|
89195
|
-
else {
|
|
89196
|
-
list.push(imp(`${this.escapeNamespace(obj.getName().toLowerCase())}.${obj.getType().toLowerCase()}`));
|
|
89197
|
-
}
|
|
89198
|
-
}
|
|
89199
|
-
else if (obj instanceof abaplint.Objects.Interface) {
|
|
89200
|
-
list.push(imp(`${this.escapeNamespace(obj.getName().toLowerCase())}.${obj.getType().toLowerCase()}`));
|
|
89201
|
-
}
|
|
89202
|
-
}
|
|
89203
|
-
return [...list.sort(), ...late].join("\n");
|
|
89204
|
-
}
|
|
89205
|
-
// class constructors might make early use of eg. constants from interfaces
|
|
89206
|
-
// sub classes will import() super classes and trigger a class constructor of the super
|
|
89207
|
-
hasClassConstructor(reg, clas) {
|
|
89208
|
-
if (clas.getDefinition()?.getMethodDefinitions().getByName("CLASS_CONSTRUCTOR") !== undefined) {
|
|
89209
|
-
return true;
|
|
89210
|
-
}
|
|
89211
|
-
const sup = clas.getDefinition()?.getSuperClass();
|
|
89212
|
-
if (sup !== undefined) {
|
|
89213
|
-
const superClass = reg.getObject("CLAS", sup);
|
|
89214
|
-
if (superClass) {
|
|
89215
|
-
return this.hasClassConstructor(reg, superClass);
|
|
89216
|
-
}
|
|
89217
|
-
}
|
|
89218
|
-
return false;
|
|
89219
|
-
}
|
|
89220
89216
|
}
|
|
89221
89217
|
exports.UnitTest = UnitTest;
|
|
89222
89218
|
//# sourceMappingURL=unit_test.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.39",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@abaplint/core": "^2.113.108",
|
|
31
|
-
"@abaplint/transpiler": "^2.10.
|
|
31
|
+
"@abaplint/transpiler": "^2.10.39",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^22.14.0",
|
|
34
34
|
"@types/progress": "^2.0.7",
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"ts-json-schema-generator": "^2.4.0",
|
|
38
38
|
"typescript": "^5.8.3",
|
|
39
39
|
"webpack-cli": "^6.0.1",
|
|
40
|
-
"webpack": "^5.99.
|
|
40
|
+
"webpack": "^5.99.3"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/schema.json
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$ref": "#/definitions/ITranspilerConfig",
|
|
3
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
-
"definitions": {
|
|
5
|
-
"ITranspilerConfig": {
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"properties": {
|
|
8
|
-
"input_filter": {
|
|
9
|
-
"description": "list of regex, case insensitive, empty gives all files, positive list",
|
|
10
|
-
"items": {
|
|
11
|
-
"type": "string"
|
|
12
|
-
},
|
|
13
|
-
"type": "array"
|
|
14
|
-
},
|
|
15
|
-
"input_folder": {
|
|
16
|
-
"anyOf": [
|
|
17
|
-
{
|
|
18
|
-
"type": "string"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"items": {
|
|
22
|
-
"type": "string"
|
|
23
|
-
},
|
|
24
|
-
"type": "array"
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
"lib": {
|
|
29
|
-
"deprecated": true,
|
|
30
|
-
"description": "to be deprecated, \"lib\", use \"libs\" instead",
|
|
31
|
-
"type": "string"
|
|
32
|
-
},
|
|
33
|
-
"libs": {
|
|
34
|
-
"items": {
|
|
35
|
-
"additionalProperties": false,
|
|
36
|
-
"properties": {
|
|
37
|
-
"files": {
|
|
38
|
-
"anyOf": [
|
|
39
|
-
{
|
|
40
|
-
"type": "string"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"items": {
|
|
44
|
-
"type": "string"
|
|
45
|
-
},
|
|
46
|
-
"type": "array"
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
"folder": {
|
|
51
|
-
"type": "string"
|
|
52
|
-
},
|
|
53
|
-
"url": {
|
|
54
|
-
"type": "string"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"type": "object"
|
|
58
|
-
},
|
|
59
|
-
"type": "array"
|
|
60
|
-
},
|
|
61
|
-
"options": {
|
|
62
|
-
"$ref": "#/definitions/ITranspilerOptions"
|
|
63
|
-
},
|
|
64
|
-
"output_folder": {
|
|
65
|
-
"type": "string"
|
|
66
|
-
},
|
|
67
|
-
"write_source_map": {
|
|
68
|
-
"type": "boolean"
|
|
69
|
-
},
|
|
70
|
-
"write_unit_tests": {
|
|
71
|
-
"type": "boolean"
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
"required": [
|
|
75
|
-
"input_folder",
|
|
76
|
-
"output_folder",
|
|
77
|
-
"options"
|
|
78
|
-
],
|
|
79
|
-
"type": "object"
|
|
80
|
-
},
|
|
81
|
-
"ITranspilerOptions": {
|
|
82
|
-
"additionalProperties": false,
|
|
83
|
-
"properties": {
|
|
84
|
-
"addCommonJS": {
|
|
85
|
-
"description": "adds common js modules",
|
|
86
|
-
"type": "boolean"
|
|
87
|
-
},
|
|
88
|
-
"addFilenames": {
|
|
89
|
-
"description": "adds filenames as comments in the output js",
|
|
90
|
-
"type": "boolean"
|
|
91
|
-
},
|
|
92
|
-
"extraSetup": {
|
|
93
|
-
"description": "extra setup script to be executed during initialization",
|
|
94
|
-
"type": "string"
|
|
95
|
-
},
|
|
96
|
-
"ignoreSourceMap": {
|
|
97
|
-
"description": "ignore source map",
|
|
98
|
-
"type": "boolean"
|
|
99
|
-
},
|
|
100
|
-
"ignoreSyntaxCheck": {
|
|
101
|
-
"description": "ignore syntax check, used for internal testing",
|
|
102
|
-
"type": "boolean"
|
|
103
|
-
},
|
|
104
|
-
"keywords": {
|
|
105
|
-
"description": "list of keywords to rename, if not supplied default will be used",
|
|
106
|
-
"items": {
|
|
107
|
-
"type": "string"
|
|
108
|
-
},
|
|
109
|
-
"type": "array"
|
|
110
|
-
},
|
|
111
|
-
"skip": {
|
|
112
|
-
"$ref": "#/definitions/TestMethodList",
|
|
113
|
-
"description": "list of unit tests to skip"
|
|
114
|
-
},
|
|
115
|
-
"skipConstants": {
|
|
116
|
-
"description": "skip outputing constants, used for internal testing",
|
|
117
|
-
"type": "boolean"
|
|
118
|
-
},
|
|
119
|
-
"skipReposrc": {
|
|
120
|
-
"description": "dont insert into REPOSRC",
|
|
121
|
-
"type": "boolean"
|
|
122
|
-
},
|
|
123
|
-
"unknownTypes": {
|
|
124
|
-
"$ref": "#/definitions/UnknownTypesEnum",
|
|
125
|
-
"description": "sets behavior for unknown types, either fail at compile- or run-time"
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
"type": "object"
|
|
129
|
-
},
|
|
130
|
-
"TestMethodList": {
|
|
131
|
-
"items": {
|
|
132
|
-
"additionalProperties": false,
|
|
133
|
-
"properties": {
|
|
134
|
-
"class": {
|
|
135
|
-
"type": "string"
|
|
136
|
-
},
|
|
137
|
-
"method": {
|
|
138
|
-
"type": "string"
|
|
139
|
-
},
|
|
140
|
-
"object": {
|
|
141
|
-
"type": "string"
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
"required": [
|
|
145
|
-
"object",
|
|
146
|
-
"class",
|
|
147
|
-
"method"
|
|
148
|
-
],
|
|
149
|
-
"type": "object"
|
|
150
|
-
},
|
|
151
|
-
"type": "array"
|
|
152
|
-
},
|
|
153
|
-
"UnknownTypesEnum": {
|
|
154
|
-
"enum": [
|
|
155
|
-
"compileError",
|
|
156
|
-
"runtimeError"
|
|
157
|
-
],
|
|
158
|
-
"type": "string"
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|