@abaplint/transpiler-cli 2.0.33 → 2.0.34
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/build/bundle.js +1 -1
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -13579,7 +13579,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
13579
13579
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
13580
13580
|
|
|
13581
13581
|
"use strict";
|
|
13582
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Requires = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nclass Requires {\r\n constructor(reg) {\r\n this.reg = reg;\r\n }\r\n // todo, refactor this method\r\n find(obj, _node, filename) {\r\n var _a, _b, _c, _d, _e;\r\n const ret = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n const add = function (req) {\r\n if (req === undefined || req.filename === filename) {\r\n return;\r\n }\r\n // skip if already in the list\r\n for (const r of ret) {\r\n if (r.filename === req.filename && r.name === req.name) {\r\n return;\r\n }\r\n }\r\n ret.push(req);\r\n };\r\n if (obj.getType() === \"CLAS\") {\r\n // add the superclass\r\n const clas = obj;\r\n const sup = (_b = (_a = clas.getDefinition()) === null || _a === void 0 ? void 0 : _a.getSuperClass()) === null || _b === void 0 ? void 0 : _b.toLowerCase().replace(/\\//g, \"%23\");\r\n if (sup) {\r\n add({ filename: sup + \".clas.abap\", name: sup });\r\n }\r\n for (const f of clas.getSequencedFiles()) {\r\n if (filename.endsWith(\".testclasses.abap\")) {\r\n // add the global class, in case its inherited by a local testclass\r\n add({ filename: ((_c = clas.getMainABAPFile()) === null || _c === void 0 ? void 0 : _c.getFilename()) || \"\", name: obj.getName().toLowerCase() });\r\n }\r\n if (f.getFilename() === filename\r\n || f.getFilename().endsWith(\".clas.testclasses.abap\")\r\n || f.getFilename() === ((_d = clas.getMainABAPFile()) === null || _d === void 0 ? void 0 : _d.getFilename())) {\r\n continue;\r\n }\r\n let foo = f.getFilename();\r\n foo = foo.replace(\".clas.locals_imp.abap\", \".clas.locals.abap\");\r\n foo = foo.replace(\".clas.locals_def.abap\", \".clas.locals.abap\");\r\n let name = undefined;\r\n if (filename.endsWith(\".testclasses.abap\")) {\r\n name = f.getInfo().listClassDefinitions().map(c => c.name).join(\",\");\r\n }\r\n add({\r\n filename: foo,\r\n name: name,\r\n });\r\n }\r\n }\r\n // this finds all OO references\r\n /*\r\n for (const v of node.getData().references) {\r\n // todo, use the enum from abaplint, when its exported\r\n if (v.referenceType === \"ObjectOrientedReference\"\r\n && v.position.getFilename() === filename\r\n && v.resolved) {\r\n add({filename: v.resolved.getFilename(), name: v.resolved.getName().toLowerCase()});\r\n }\r\n }\r\n \r\n for (const c of node.getChildren()) {\r\n for (const f of this.find(obj, c, filename)) {\r\n add(f);\r\n }\r\n }\r\n */\r\n // always add CX_ROOT, it is used for CATCH, no catches in global interfaces\r\n // todo, it might be possible to remove this, as CATCH uses instanceof with dynamic registered classes\r\n if (obj.getType() !== \"INTF\") {\r\n const cx = this.reg.getObject(\"CLAS\", \"CX_ROOT\");\r\n if (cx && cx instanceof abaplint.ABAPObject) {\r\n const main = (_e = cx.getMainABAPFile()) === null || _e === void 0 ? void 0 : _e.getFilename();\r\n if (main) {\r\n add({\r\n filename: main,\r\n name: cx.getName().toLowerCase(),\r\n });\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.Requires = Requires;\r\n//# sourceMappingURL=requires.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/requires.js?");
|
|
13582
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Requires = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nclass Requires {\r\n constructor(reg) {\r\n this.reg = reg;\r\n }\r\n // todo, refactor this method\r\n find(obj, _node, filename) {\r\n var _a, _b, _c, _d, _e, _f;\r\n const ret = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n const add = function (req) {\r\n if (req === undefined || req.filename === filename) {\r\n return;\r\n }\r\n // skip if already in the list\r\n for (const r of ret) {\r\n if (r.filename === req.filename && r.name === req.name) {\r\n return;\r\n }\r\n }\r\n ret.push(req);\r\n };\r\n if (obj.getType() === \"CLAS\") {\r\n // add the superclass\r\n const clas = obj;\r\n const sup = (_b = (_a = clas.getDefinition()) === null || _a === void 0 ? void 0 : _a.getSuperClass()) === null || _b === void 0 ? void 0 : _b.toLowerCase().replace(/\\//g, \"%23\");\r\n if (sup) {\r\n add({ filename: sup + \".clas.abap\", name: sup });\r\n }\r\n for (const f of clas.getSequencedFiles()) {\r\n if (filename.endsWith(\".testclasses.abap\")) {\r\n // add the global class, in case its inherited by a local testclass\r\n add({ filename: ((_c = clas.getMainABAPFile()) === null || _c === void 0 ? void 0 : _c.getFilename()) || \"\", name: obj.getName().toLowerCase() });\r\n }\r\n if (f.getFilename() === filename\r\n || f.getFilename().endsWith(\".clas.testclasses.abap\")\r\n || f.getFilename() === ((_d = clas.getMainABAPFile()) === null || _d === void 0 ? void 0 : _d.getFilename())) {\r\n continue;\r\n }\r\n let foo = f.getFilename();\r\n foo = foo.replace(\".clas.locals_imp.abap\", \".clas.locals.abap\");\r\n foo = foo.replace(\".clas.locals_def.abap\", \".clas.locals.abap\");\r\n let name = undefined;\r\n if (filename.endsWith(\".testclasses.abap\")) {\r\n name = f.getInfo().listClassDefinitions().map(c => c.name).join(\",\");\r\n }\r\n add({\r\n filename: foo,\r\n name: name,\r\n });\r\n }\r\n }\r\n // this finds all OO references\r\n /*\r\n for (const v of node.getData().references) {\r\n // todo, use the enum from abaplint, when its exported\r\n if (v.referenceType === \"ObjectOrientedReference\"\r\n && v.position.getFilename() === filename\r\n && v.resolved) {\r\n add({filename: v.resolved.getFilename(), name: v.resolved.getName().toLowerCase()});\r\n }\r\n }\r\n \r\n for (const c of node.getChildren()) {\r\n for (const f of this.find(obj, c, filename)) {\r\n add(f);\r\n }\r\n }\r\n */\r\n // always add CX_ROOT, it is used for CATCH, no catches in global interfaces\r\n // todo, it might be possible to remove this, as CATCH uses instanceof with dynamic registered classes\r\n if (obj.getType() !== \"INTF\") {\r\n const cx = this.reg.getObject(\"CLAS\", \"CX_ROOT\");\r\n if (cx && cx instanceof abaplint.ABAPObject) {\r\n const main = (_e = cx.getMainABAPFile()) === null || _e === void 0 ? void 0 : _e.getFilename();\r\n if (main) {\r\n add({\r\n filename: main,\r\n name: cx.getName().toLowerCase(),\r\n });\r\n }\r\n }\r\n // include global super classes for local class definitions\r\n for (const f of obj.getSequencedFiles()) {\r\n for (const c of f.getInfo().listClassDefinitions()) {\r\n if (c.superClassName === undefined) {\r\n continue;\r\n }\r\n const found = this.reg.getObject(\"CLAS\", c.superClassName);\r\n if (found && found instanceof abaplint.ABAPObject) {\r\n const main = (_f = found.getMainABAPFile()) === null || _f === void 0 ? void 0 : _f.getFilename();\r\n if (main) {\r\n add({\r\n filename: main,\r\n name: found.getName().toLowerCase(),\r\n });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.Requires = Requires;\r\n//# sourceMappingURL=requires.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/requires.js?");
|
|
13583
13583
|
|
|
13584
13584
|
/***/ }),
|
|
13585
13585
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.34",
|
|
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.0.
|
|
28
|
+
"@abaplint/transpiler": "^2.0.34",
|
|
29
29
|
"@types/glob": "^7.2.0",
|
|
30
30
|
"glob": "=7.2.0",
|
|
31
31
|
"@types/progress": "^2.0.5",
|