@abaplint/core 2.91.35 → 2.91.38

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.
@@ -150,6 +150,15 @@ declare class AnyType extends AbstractType {
150
150
  toCDS(): string;
151
151
  }
152
152
 
153
+ declare class APIReleaseState extends AbstractObject {
154
+ getType(): string;
155
+ getAllowedNaming(): {
156
+ maxLength: number;
157
+ allowNamespace: boolean;
158
+ };
159
+ getDescription(): string | undefined;
160
+ }
161
+
153
162
  declare class Append implements IStatement {
154
163
  getMatcher(): IStatementRunnable;
155
164
  }
@@ -615,6 +624,10 @@ declare class CDSDefineAbstract extends Expression {
615
624
  getRunnable(): IStatementRunnable;
616
625
  }
617
626
 
627
+ declare class CDSDefineProjection extends Expression {
628
+ getRunnable(): IStatementRunnable;
629
+ }
630
+
618
631
  declare class CDSDefineView extends Expression {
619
632
  getRunnable(): IStatementRunnable;
620
633
  }
@@ -2014,6 +2027,7 @@ declare namespace ExpressionsCDS {
2014
2027
  CDSComposition,
2015
2028
  CDSCondition,
2016
2029
  CDSDefineAbstract,
2030
+ CDSDefineProjection,
2017
2031
  CDSDefineView,
2018
2032
  CDSElement,
2019
2033
  CDSFunction,
@@ -3953,6 +3967,7 @@ declare class ObjectReferenceType extends AbstractType {
3953
3967
  declare namespace Objects {
3954
3968
  export {
3955
3969
  ActivationVariant,
3970
+ APIReleaseState,
3956
3971
  AssignmentServiceToAuthorizationGroup,
3957
3972
  AuthorizationCheckField,
3958
3973
  AuthorizationGroup,
@@ -26,7 +26,9 @@ class MethodCallParam {
26
26
  }
27
27
  }
28
28
  }
29
- else if (child instanceof nodes_1.ExpressionNode && child.get() instanceof Expressions.Source) {
29
+ else if (child instanceof nodes_1.ExpressionNode
30
+ && (child.get() instanceof Expressions.Source
31
+ || child.get() instanceof Expressions.ConstantString)) {
30
32
  if (!(method instanceof basic_1.VoidType) && method.getParameters().getImporting().length === 0) {
31
33
  throw new Error("Method \"" + method.getName() + "\" has no importing parameters");
32
34
  }
@@ -46,7 +48,10 @@ class MethodCallParam {
46
48
  else {
47
49
  targetType = method;
48
50
  }
49
- const sourceType = new source_1.Source().runSyntax(child, scope, filename, targetType);
51
+ let sourceType = new basic_1.StringType();
52
+ if (child.get() instanceof Expressions.Source) {
53
+ sourceType = new source_1.Source().runSyntax(child, scope, filename, targetType);
54
+ }
50
55
  if (sourceType === undefined) {
51
56
  throw new Error("No source type determined, method source");
52
57
  }
@@ -123,6 +123,9 @@ class CDSLexer {
123
123
  case ")":
124
124
  case "[":
125
125
  case "]":
126
+ case "=":
127
+ case "<":
128
+ case ">":
126
129
  case "+":
127
130
  case "-":
128
131
  case "*":
@@ -18,6 +18,9 @@ class CDSParser {
18
18
  if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
19
19
  res = combi_1.Combi.run(new Expressions.CDSDefineAbstract(), tokens, version_1.defaultVersion);
20
20
  }
21
+ if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
22
+ res = combi_1.Combi.run(new Expressions.CDSDefineProjection(), tokens, version_1.defaultVersion);
23
+ }
21
24
  if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
22
25
  return undefined;
23
26
  }
@@ -5,7 +5,8 @@ const _1 = require(".");
5
5
  const combi_1 = require("../../abap/2_statements/combi");
6
6
  class CDSAggregate extends combi_1.Expression {
7
7
  getRunnable() {
8
- const value = (0, combi_1.alt)(_1.CDSName, _1.CDSCast, _1.CDSCase);
8
+ const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
9
+ const value = (0, combi_1.alt)(name, _1.CDSCast, _1.CDSCase);
9
10
  return (0, combi_1.seq)((0, combi_1.alt)("MAX", "MIN", "SUM", "AVG", "COUNT"), "(", (0, combi_1.opt)("DISTINCT"), value, ")");
10
11
  }
11
12
  }
@@ -7,7 +7,7 @@ class CDSCase extends combi_1.Expression {
7
7
  getRunnable() {
8
8
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
9
9
  const value = (0, combi_1.alt)(name, _1.CDSString, _1.CDSFunction, CDSCase, _1.CDSCast, _1.CDSArithmetics);
10
- const simple = (0, combi_1.seq)("CASE", name, (0, combi_1.plus)((0, combi_1.seq)("WHEN", value, "THEN", value)), "ELSE", value, "END");
10
+ const simple = (0, combi_1.seq)("CASE", (0, combi_1.alt)(name, _1.CDSFunction), (0, combi_1.plus)((0, combi_1.seq)("WHEN", value, "THEN", value)), "ELSE", value, "END");
11
11
  const complex = (0, combi_1.seq)("CASE", (0, combi_1.plus)((0, combi_1.seq)("WHEN", _1.CDSCondition, "THEN", value)), (0, combi_1.opt)((0, combi_1.seq)("ELSE", value)), "END");
12
12
  return (0, combi_1.alt)(simple, complex);
13
13
  }
@@ -6,7 +6,7 @@ const combi_1 = require("../../abap/2_statements/combi");
6
6
  class CDSCondition extends combi_1.Expression {
7
7
  getRunnable() {
8
8
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", (0, combi_1.alt)(_1.CDSName, _1.CDSString))));
9
- const eq = (0, combi_1.seq)(name, (0, combi_1.alt)("=", "!=", "<>", "<", ">", ">=", "<=", "LIKE", "NOT LIKE"), (0, combi_1.alt)(name, _1.CDSFunction, _1.CDSString));
9
+ const eq = (0, combi_1.seq)(name, (0, combi_1.alt)("=", (0, combi_1.seq)("!", "="), (0, combi_1.seq)("<", ">"), "<", ">", (0, combi_1.seq)(">", "="), (0, combi_1.seq)("<", "="), "LIKE", "NOT LIKE"), (0, combi_1.alt)(name, _1.CDSFunction, _1.CDSString));
10
10
  const isInitial = (0, combi_1.seq)(name, "IS INITIAL");
11
11
  const isNotInitial = (0, combi_1.seq)(name, "IS NOT INITIAL");
12
12
  const isNull = (0, combi_1.seq)(name, "IS NULL");
@@ -6,7 +6,7 @@ const combi_1 = require("../../abap/2_statements/combi");
6
6
  const cds_name_1 = require("./cds_name");
7
7
  class CDSDefineAbstract extends combi_1.Expression {
8
8
  getRunnable() {
9
- const field = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("KEY"), cds_name_1.CDSName, ":", cds_name_1.CDSName, ";");
9
+ const field = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)((0, combi_1.str)("KEY")), cds_name_1.CDSName, ":", _1.CDSType, ";");
10
10
  return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("DEFINE ABSTRACT ENTITY"), cds_name_1.CDSName, (0, combi_1.str)("{"), (0, combi_1.plus)(field), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
11
11
  }
12
12
  }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CDSDefineProjection = void 0;
4
+ const _1 = require(".");
5
+ const __1 = require("../..");
6
+ const combi_1 = require("../../abap/2_statements/combi");
7
+ class CDSDefineProjection extends combi_1.Expression {
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, "PROVIDER CONTRACT", _1.CDSName, "AS PROJECTION ON", _1.CDSName, (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
+ }
11
+ }
12
+ exports.CDSDefineProjection = CDSDefineProjection;
13
+ //# sourceMappingURL=cds_define_projection.js.map
@@ -29,6 +29,7 @@ __exportStar(require("./cds_cast"), exports);
29
29
  __exportStar(require("./cds_composition"), exports);
30
30
  __exportStar(require("./cds_condition"), exports);
31
31
  __exportStar(require("./cds_define_abstract"), exports);
32
+ __exportStar(require("./cds_define_projection"), exports);
32
33
  __exportStar(require("./cds_define_view"), exports);
33
34
  __exportStar(require("./cds_element"), exports);
34
35
  __exportStar(require("./cds_function"), exports);
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.APIReleaseState = void 0;
4
+ const _abstract_object_1 = require("./_abstract_object");
5
+ class APIReleaseState extends _abstract_object_1.AbstractObject {
6
+ getType() {
7
+ return "APIS";
8
+ }
9
+ getAllowedNaming() {
10
+ return {
11
+ maxLength: 200,
12
+ allowNamespace: true,
13
+ };
14
+ }
15
+ getDescription() {
16
+ // todo
17
+ return undefined;
18
+ }
19
+ }
20
+ exports.APIReleaseState = APIReleaseState;
21
+ //# sourceMappingURL=api_release_state.js.map
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./activation_variant"), exports);
18
+ __exportStar(require("./api_release_state"), exports);
18
19
  __exportStar(require("./assignment_service_to_authorization_group"), exports);
19
20
  __exportStar(require("./authorization_check_field"), exports);
20
21
  __exportStar(require("./authorization_group"), exports);
@@ -68,7 +68,7 @@ class Registry {
68
68
  }
69
69
  static abaplintVersion() {
70
70
  // magic, see build script "version.sh"
71
- return "2.91.35";
71
+ return "2.91.38";
72
72
  }
73
73
  getDDICReferences() {
74
74
  return this.references;
@@ -36,7 +36,7 @@ CALL FUNCTION 'ZRFC'
36
36
  };
37
37
  }
38
38
  getMessage() {
39
- return "RFC error handling: At least one unhandled exception from SYSTEM_FAILURE, COMMUNICATION_FAILURE, RESOURCE_FAILURE.";
39
+ return "RFC error handling: At least one unhandled exception from SYSTEM_FAILURE, COMMUNICATION_FAILURE, RESOURCE_FAILURE";
40
40
  }
41
41
  getConfig() {
42
42
  return this.conf;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.91.35",
3
+ "version": "2.91.38",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -45,10 +45,10 @@
45
45
  },
46
46
  "homepage": "https://abaplint.org",
47
47
  "devDependencies": {
48
- "@microsoft/api-extractor": "^7.29.3",
48
+ "@microsoft/api-extractor": "^7.29.5",
49
49
  "@types/chai": "^4.3.3",
50
50
  "@types/mocha": "^9.1.1",
51
- "@types/node": "^18.7.11",
51
+ "@types/node": "^18.7.12",
52
52
  "chai": "^4.3.6",
53
53
  "eslint": "^8.22.0",
54
54
  "mocha": "^10.0.0",