@abaplint/core 2.95.18 → 2.95.20
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/abaplint.d.ts +21 -0
- package/build/src/cds/expressions/cds_define_projection.js +1 -1
- package/build/src/cds/expressions/cds_element.js +1 -1
- package/build/src/cds/expressions/cds_provider_contract.js +11 -0
- package/build/src/cds/expressions/index.js +1 -0
- package/build/src/objects/mime_object.js +41 -1
- package/build/src/objects/web_mime.js +30 -1
- package/build/src/registry.js +1 -1
- package/package.json +2 -2
package/build/abaplint.d.ts
CHANGED
|
@@ -735,6 +735,10 @@ export declare class CDSParser {
|
|
|
735
735
|
parse(file: IFile | undefined): ExpressionNode | undefined;
|
|
736
736
|
}
|
|
737
737
|
|
|
738
|
+
declare class CDSProviderContract extends Expression {
|
|
739
|
+
getRunnable(): IStatementRunnable;
|
|
740
|
+
}
|
|
741
|
+
|
|
738
742
|
declare class CDSRelation extends Expression {
|
|
739
743
|
getRunnable(): IStatementRunnable;
|
|
740
744
|
}
|
|
@@ -2134,6 +2138,7 @@ declare namespace ExpressionsCDS {
|
|
|
2134
2138
|
CDSElement,
|
|
2135
2139
|
CDSFunction,
|
|
2136
2140
|
CDSGroupBy,
|
|
2141
|
+
CDSProviderContract,
|
|
2137
2142
|
CDSInteger,
|
|
2138
2143
|
CDSJoin,
|
|
2139
2144
|
CDSName,
|
|
@@ -3987,12 +3992,21 @@ declare class MethodSource extends Expression {
|
|
|
3987
3992
|
}
|
|
3988
3993
|
|
|
3989
3994
|
declare class MIMEObject extends AbstractObject {
|
|
3995
|
+
private parsedXML;
|
|
3990
3996
|
getType(): string;
|
|
3997
|
+
getURL(): string | undefined;
|
|
3998
|
+
getClass(): string | undefined;
|
|
3991
3999
|
getAllowedNaming(): {
|
|
3992
4000
|
maxLength: number;
|
|
3993
4001
|
allowNamespace: boolean;
|
|
3994
4002
|
};
|
|
4003
|
+
getDataFile(): IFile | undefined;
|
|
4004
|
+
setDirty(): void;
|
|
3995
4005
|
getDescription(): string | undefined;
|
|
4006
|
+
parse(): {
|
|
4007
|
+
updated: boolean;
|
|
4008
|
+
runtime: number;
|
|
4009
|
+
};
|
|
3996
4010
|
}
|
|
3997
4011
|
|
|
3998
4012
|
declare class Modif extends Expression {
|
|
@@ -6495,9 +6509,16 @@ declare class WebDynproComponentConfiguration extends AbstractObject {
|
|
|
6495
6509
|
}
|
|
6496
6510
|
|
|
6497
6511
|
declare class WebMIME extends AbstractObject {
|
|
6512
|
+
private parsedXML;
|
|
6498
6513
|
getType(): string;
|
|
6499
6514
|
getAllowedNaming(): IAllowedNaming;
|
|
6500
6515
|
getDescription(): string | undefined;
|
|
6516
|
+
setDirty(): void;
|
|
6517
|
+
getDataFile(): IFile | undefined;
|
|
6518
|
+
parse(): {
|
|
6519
|
+
updated: boolean;
|
|
6520
|
+
runtime: number;
|
|
6521
|
+
};
|
|
6501
6522
|
}
|
|
6502
6523
|
|
|
6503
6524
|
declare class When implements IStructure {
|
|
@@ -6,7 +6,7 @@ const __1 = require("../..");
|
|
|
6
6
|
const combi_1 = require("../../abap/2_statements/combi");
|
|
7
7
|
class CDSDefineProjection extends combi_1.Expression {
|
|
8
8
|
getRunnable() {
|
|
9
|
-
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), "VIEW", (0, combi_1.ver)(__1.Version.v755, (0, combi_1.opt)("ENTITY")), _1.CDSName, (0, combi_1.opt)(
|
|
9
|
+
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), "VIEW", (0, combi_1.ver)(__1.Version.v755, (0, combi_1.opt)("ENTITY")), _1.CDSName, (0, combi_1.opt)(_1.CDSProviderContract), "AS PROJECTION ON", _1.CDSName, (0, combi_1.opt)(_1.CDSAs), (0, combi_1.str)("{"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.CDSDefineProjection = CDSDefineProjection;
|
|
@@ -7,7 +7,7 @@ const cds_as_1 = require("./cds_as");
|
|
|
7
7
|
const cds_cast_1 = require("./cds_cast");
|
|
8
8
|
class CDSElement extends combi_1.Expression {
|
|
9
9
|
getRunnable() {
|
|
10
|
-
return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSFunction, _1.CDSArithmetics, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParameters), (0, combi_1.star)((0, combi_1.seq)(".", _1.CDSName, (0, combi_1.opt)(_1.CDSParameters)))), (0, combi_1.regex)(/^\d+$/)), (0, combi_1.opt)(cds_as_1.CDSAs));
|
|
10
|
+
return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSFunction, _1.CDSArithmetics, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)(_1.CDSName, ": REDIRECTED TO", (0, combi_1.opt)("PARENT"), _1.CDSName), (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParameters), (0, combi_1.star)((0, combi_1.seq)(".", _1.CDSName, (0, combi_1.opt)(_1.CDSParameters)))), (0, combi_1.regex)(/^\d+$/)), (0, combi_1.opt)(cds_as_1.CDSAs));
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
exports.CDSElement = CDSElement;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSProviderContract = void 0;
|
|
4
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
5
|
+
class CDSProviderContract extends combi_1.Expression {
|
|
6
|
+
getRunnable() {
|
|
7
|
+
return (0, combi_1.seq)("PROVIDER CONTRACT", (0, combi_1.alt)("TRANSACTIONAL_QUERY", "TRANSACTIONAL_INTERFACE", "ANALYTICAL_QUERY"));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.CDSProviderContract = CDSProviderContract;
|
|
11
|
+
//# sourceMappingURL=cds_provider_contract.js.map
|
|
@@ -35,6 +35,7 @@ __exportStar(require("./cds_define_view"), exports);
|
|
|
35
35
|
__exportStar(require("./cds_element"), exports);
|
|
36
36
|
__exportStar(require("./cds_function"), exports);
|
|
37
37
|
__exportStar(require("./cds_group_by"), exports);
|
|
38
|
+
__exportStar(require("./cds_provider_contract"), exports);
|
|
38
39
|
__exportStar(require("./cds_integer"), exports);
|
|
39
40
|
__exportStar(require("./cds_join"), exports);
|
|
40
41
|
__exportStar(require("./cds_name"), exports);
|
|
@@ -6,16 +6,56 @@ class MIMEObject extends _abstract_object_1.AbstractObject {
|
|
|
6
6
|
getType() {
|
|
7
7
|
return "SMIM";
|
|
8
8
|
}
|
|
9
|
+
getURL() {
|
|
10
|
+
var _a;
|
|
11
|
+
this.parse();
|
|
12
|
+
return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.URL;
|
|
13
|
+
}
|
|
14
|
+
getClass() {
|
|
15
|
+
var _a;
|
|
16
|
+
this.parse();
|
|
17
|
+
return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.CLASS;
|
|
18
|
+
}
|
|
9
19
|
getAllowedNaming() {
|
|
10
20
|
return {
|
|
11
21
|
maxLength: 32,
|
|
12
22
|
allowNamespace: false,
|
|
13
23
|
};
|
|
14
24
|
}
|
|
25
|
+
getDataFile() {
|
|
26
|
+
const main = this.getXMLFile();
|
|
27
|
+
for (const f of this.getFiles()) {
|
|
28
|
+
if (f.getFilename() !== (main === null || main === void 0 ? void 0 : main.getFilename())) {
|
|
29
|
+
return f;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
setDirty() {
|
|
35
|
+
this.parsedXML = undefined;
|
|
36
|
+
super.setDirty();
|
|
37
|
+
}
|
|
15
38
|
getDescription() {
|
|
16
|
-
//
|
|
39
|
+
// this object type does not have a description
|
|
17
40
|
return undefined;
|
|
18
41
|
}
|
|
42
|
+
parse() {
|
|
43
|
+
if (this.parsedXML) {
|
|
44
|
+
return { updated: false, runtime: 0 };
|
|
45
|
+
}
|
|
46
|
+
const start = Date.now();
|
|
47
|
+
this.parsedXML = {};
|
|
48
|
+
const parsed = super.parseRaw2();
|
|
49
|
+
if (parsed === undefined
|
|
50
|
+
|| parsed.abapGit === undefined
|
|
51
|
+
|| parsed.abapGit["asx:abap"]["asx:values"] === undefined) {
|
|
52
|
+
return { updated: false, runtime: 0 };
|
|
53
|
+
}
|
|
54
|
+
this.parsedXML.URL = parsed.abapGit["asx:abap"]["asx:values"].URL;
|
|
55
|
+
this.parsedXML.CLASS = parsed.abapGit["asx:abap"]["asx:values"].CLASS;
|
|
56
|
+
const end = Date.now();
|
|
57
|
+
return { updated: true, runtime: end - start };
|
|
58
|
+
}
|
|
19
59
|
}
|
|
20
60
|
exports.MIMEObject = MIMEObject;
|
|
21
61
|
//# sourceMappingURL=mime_object.js.map
|
|
@@ -14,9 +14,38 @@ class WebMIME extends _abstract_object_1.AbstractObject {
|
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
getDescription() {
|
|
17
|
-
|
|
17
|
+
var _a;
|
|
18
|
+
this.parse();
|
|
19
|
+
return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;
|
|
20
|
+
}
|
|
21
|
+
setDirty() {
|
|
22
|
+
this.parsedXML = undefined;
|
|
23
|
+
super.setDirty();
|
|
24
|
+
}
|
|
25
|
+
getDataFile() {
|
|
26
|
+
for (const f of this.getFiles()) {
|
|
27
|
+
if (f.getFilename().includes(".data.")) {
|
|
28
|
+
return f;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
18
31
|
return undefined;
|
|
19
32
|
}
|
|
33
|
+
parse() {
|
|
34
|
+
if (this.parsedXML) {
|
|
35
|
+
return { updated: false, runtime: 0 };
|
|
36
|
+
}
|
|
37
|
+
const start = Date.now();
|
|
38
|
+
this.parsedXML = {};
|
|
39
|
+
const parsed = super.parseRaw2();
|
|
40
|
+
if (parsed === undefined
|
|
41
|
+
|| parsed.abapGit === undefined
|
|
42
|
+
|| parsed.abapGit["asx:abap"]["asx:values"] === undefined) {
|
|
43
|
+
return { updated: false, runtime: 0 };
|
|
44
|
+
}
|
|
45
|
+
this.parsedXML.description = parsed.abapGit["asx:abap"]["asx:values"].TEXT;
|
|
46
|
+
const end = Date.now();
|
|
47
|
+
return { updated: true, runtime: end - start };
|
|
48
|
+
}
|
|
20
49
|
}
|
|
21
50
|
exports.WebMIME = WebMIME;
|
|
22
51
|
//# sourceMappingURL=web_mime.js.map
|
package/build/src/registry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.95.
|
|
3
|
+
"version": "2.95.20",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"chai": "^4.3.7",
|
|
55
55
|
"eslint": "^8.34.0",
|
|
56
56
|
"mocha": "^10.2.0",
|
|
57
|
-
"c8": "^7.
|
|
57
|
+
"c8": "^7.13.0",
|
|
58
58
|
"source-map-support": "^0.5.21",
|
|
59
59
|
"ts-json-schema-generator": "^1.2.0",
|
|
60
60
|
"typescript": "^4.9.5"
|