@sap/cds-compiler 4.0.2 → 4.2.2
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/CHANGELOG.md +200 -5
- package/bin/cdsc.js +18 -15
- package/doc/CHANGELOG_BETA.md +16 -0
- package/doc/CHANGELOG_DEPRECATED.md +15 -0
- package/lib/api/main.js +33 -13
- package/lib/api/options.js +2 -2
- package/lib/api/validate.js +25 -25
- package/lib/base/location.js +6 -7
- package/lib/base/message-registry.js +123 -42
- package/lib/base/messages.js +18 -10
- package/lib/base/model.js +43 -10
- package/lib/checks/defaultValues.js +6 -6
- package/lib/checks/elements.js +11 -10
- package/lib/checks/foreignKeys.js +0 -5
- package/lib/checks/manyNavigations.js +33 -0
- package/lib/checks/onConditions.js +22 -14
- package/lib/checks/queryNoDbArtifacts.js +132 -73
- package/lib/checks/selectItems.js +4 -55
- package/lib/checks/sql-snippets.js +15 -4
- package/lib/checks/types.js +3 -3
- package/lib/checks/utils.js +4 -3
- package/lib/checks/validator.js +3 -1
- package/lib/compiler/.eslintrc.json +2 -1
- package/lib/compiler/assert-consistency.js +71 -40
- package/lib/compiler/base.js +7 -2
- package/lib/compiler/builtins.js +40 -41
- package/lib/compiler/checks.js +415 -367
- package/lib/compiler/classes.js +62 -0
- package/lib/compiler/cycle-detector.js +9 -9
- package/lib/compiler/define.js +124 -90
- package/lib/compiler/extend.js +115 -88
- package/lib/compiler/finalize-parse-cdl.js +26 -25
- package/lib/compiler/generate.js +57 -49
- package/lib/compiler/index.js +56 -56
- package/lib/compiler/kick-start.js +10 -7
- package/lib/compiler/moduleLayers.js +1 -1
- package/lib/compiler/populate.js +180 -144
- package/lib/compiler/propagator.js +10 -9
- package/lib/compiler/resolve.js +321 -246
- package/lib/compiler/shared.js +812 -433
- package/lib/compiler/tweak-assocs.js +114 -50
- package/lib/compiler/utils.js +241 -46
- package/lib/edm/.eslintrc.json +40 -1
- package/lib/edm/annotations/genericTranslation.js +721 -707
- package/lib/edm/annotations/preprocessAnnotations.js +88 -77
- package/lib/edm/csn2edm.js +389 -378
- package/lib/edm/edm.js +679 -770
- package/lib/edm/edmAnnoPreprocessor.js +132 -146
- package/lib/edm/edmInboundChecks.js +29 -27
- package/lib/edm/edmPreprocessor.js +689 -648
- package/lib/edm/edmUtils.js +279 -300
- package/lib/gen/Dictionary.json +34 -10
- package/lib/gen/language.checksum +1 -1
- package/lib/gen/language.interp +1 -1
- package/lib/gen/languageParser.js +2857 -2856
- package/lib/json/from-csn.js +77 -51
- package/lib/json/to-csn.js +15 -15
- package/lib/language/antlrParser.js +2 -1
- package/lib/language/genericAntlrParser.js +52 -43
- package/lib/language/language.g4 +61 -64
- package/lib/language/multiLineStringParser.js +2 -0
- package/lib/main.d.ts +65 -0
- package/lib/model/csnRefs.js +37 -19
- package/lib/model/csnUtils.js +51 -18
- package/lib/model/revealInternalProperties.js +30 -22
- package/lib/modelCompare/compare.js +149 -41
- package/lib/modelCompare/utils/filter.js +55 -25
- package/lib/optionProcessor.js +21 -9
- package/lib/render/manageConstraints.js +20 -17
- package/lib/render/toCdl.js +63 -23
- package/lib/render/toHdbcds.js +2 -2
- package/lib/render/toRename.js +4 -9
- package/lib/render/toSql.js +82 -35
- package/lib/render/utils/common.js +11 -9
- package/lib/render/utils/unique.js +52 -0
- package/lib/transform/db/applyTransformations.js +62 -21
- package/lib/transform/db/assertUnique.js +7 -8
- package/lib/transform/db/associations.js +2 -2
- package/lib/transform/db/cdsPersistence.js +9 -9
- package/lib/transform/db/constraints.js +47 -17
- package/lib/transform/db/expansion.js +138 -68
- package/lib/transform/db/flattening.js +98 -30
- package/lib/transform/db/rewriteCalculatedElements.js +20 -14
- package/lib/transform/db/temporal.js +1 -1
- package/lib/transform/db/transformExists.js +8 -7
- package/lib/transform/db/views.js +73 -33
- package/lib/transform/draft/db.js +11 -9
- package/lib/transform/draft/odata.js +1 -1
- package/lib/transform/{forOdataNew.js → forOdata.js} +10 -7
- package/lib/transform/forRelationalDB.js +148 -136
- package/lib/transform/localized.js +92 -54
- package/lib/transform/odata/toFinalBaseType.js +3 -3
- package/lib/transform/{transformUtilsNew.js → transformUtils.js} +13 -111
- package/lib/transform/translateAssocsToJoins.js +14 -28
- package/lib/utils/file.js +7 -7
- package/lib/utils/moduleResolve.js +210 -121
- package/lib/utils/objectUtils.js +1 -1
- package/package.json +5 -5
- package/share/messages/check-proper-type-of.md +1 -1
- package/share/messages/{check-proper-type.md → def-missing-type.md} +3 -5
- package/share/messages/message-explanations.json +1 -1
package/lib/gen/Dictionary.json
CHANGED
|
@@ -787,8 +787,7 @@
|
|
|
787
787
|
]
|
|
788
788
|
},
|
|
789
789
|
"Common.ValueListRelevantQualifiers": {
|
|
790
|
-
"Type": "Collection(Core.SimpleIdentifier)"
|
|
791
|
-
"$experimental": true
|
|
790
|
+
"Type": "Collection(Core.SimpleIdentifier)"
|
|
792
791
|
},
|
|
793
792
|
"Common.ValueListWithFixedValues": {
|
|
794
793
|
"Type": "Core.Tag",
|
|
@@ -802,8 +801,7 @@
|
|
|
802
801
|
"AppliesTo": [
|
|
803
802
|
"Property",
|
|
804
803
|
"Parameter"
|
|
805
|
-
]
|
|
806
|
-
"$experimental": true
|
|
804
|
+
]
|
|
807
805
|
},
|
|
808
806
|
"Common.ValueListReferences": {
|
|
809
807
|
"Type": "Collection(Edm.String)",
|
|
@@ -1461,6 +1459,10 @@
|
|
|
1461
1459
|
"Record"
|
|
1462
1460
|
]
|
|
1463
1461
|
},
|
|
1462
|
+
"HTML5.LinkTarget": {
|
|
1463
|
+
"Type": "HTML5.LinkTargetType",
|
|
1464
|
+
"$experimental": true
|
|
1465
|
+
},
|
|
1464
1466
|
"JSON.Schema": {
|
|
1465
1467
|
"Type": "JSON.JSON",
|
|
1466
1468
|
"AppliesTo": [
|
|
@@ -1561,15 +1563,13 @@
|
|
|
1561
1563
|
"Type": "Edm.String",
|
|
1562
1564
|
"AppliesTo": [
|
|
1563
1565
|
"EntitySet"
|
|
1564
|
-
]
|
|
1565
|
-
"$experimental": true
|
|
1566
|
+
]
|
|
1566
1567
|
},
|
|
1567
1568
|
"PersonalData.DataSubjectRoleDescription": {
|
|
1568
1569
|
"Type": "Edm.String",
|
|
1569
1570
|
"AppliesTo": [
|
|
1570
1571
|
"EntitySet"
|
|
1571
|
-
]
|
|
1572
|
-
"$experimental": true
|
|
1572
|
+
]
|
|
1573
1573
|
},
|
|
1574
1574
|
"PersonalData.FieldSemantics": {
|
|
1575
1575
|
"Type": "PersonalData.FieldSemanticsType",
|
|
@@ -1834,8 +1834,7 @@
|
|
|
1834
1834
|
"Type": "Edm.String",
|
|
1835
1835
|
"AppliesTo": [
|
|
1836
1836
|
"Property"
|
|
1837
|
-
]
|
|
1838
|
-
"$experimental": true
|
|
1837
|
+
]
|
|
1839
1838
|
},
|
|
1840
1839
|
"UI.TextArrangement": {
|
|
1841
1840
|
"Type": "UI.TextArrangementType",
|
|
@@ -3435,6 +3434,31 @@
|
|
|
3435
3434
|
"width": "Edm.String"
|
|
3436
3435
|
}
|
|
3437
3436
|
},
|
|
3437
|
+
"HTML5.LinkTargetType": {
|
|
3438
|
+
"$kind": "TypeDefinition",
|
|
3439
|
+
"UnderlyingType": "Edm.String",
|
|
3440
|
+
"$Allowed": {
|
|
3441
|
+
"Values": {
|
|
3442
|
+
"_self": {
|
|
3443
|
+
"Value": "_self",
|
|
3444
|
+
"Type": "String"
|
|
3445
|
+
},
|
|
3446
|
+
"_blank": {
|
|
3447
|
+
"Value": "_blank",
|
|
3448
|
+
"Type": "String"
|
|
3449
|
+
},
|
|
3450
|
+
"_parent": {
|
|
3451
|
+
"Value": "_parent",
|
|
3452
|
+
"Type": "String"
|
|
3453
|
+
},
|
|
3454
|
+
"_top": {
|
|
3455
|
+
"Value": "_top",
|
|
3456
|
+
"Type": "String"
|
|
3457
|
+
}
|
|
3458
|
+
},
|
|
3459
|
+
"Symbols": {}
|
|
3460
|
+
}
|
|
3461
|
+
},
|
|
3438
3462
|
"JSON.JSON": {
|
|
3439
3463
|
"$kind": "TypeDefinition",
|
|
3440
3464
|
"UnderlyingType": "Edm.Stream"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
0c76b976c907bebf1f1913d063dca4bf
|