@sap/cds-compiler 4.9.6 → 5.1.0
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 +92 -0
- package/bin/cds_remove_invalid_whitespace.js +2 -1
- package/bin/cdsc.js +49 -19
- package/bin/cdshi.js +3 -1
- package/doc/CHANGELOG_BETA.md +7 -0
- package/lib/api/main.js +16 -19
- package/lib/api/options.js +5 -14
- package/lib/api/trace.js +0 -1
- package/lib/base/builtins.js +1 -0
- package/lib/base/location.js +4 -1
- package/lib/base/message-registry.js +43 -29
- package/lib/base/messages.js +23 -26
- package/lib/base/meta.js +10 -0
- package/lib/base/model.js +0 -2
- package/lib/base/node-helpers.js +0 -1
- package/lib/base/optionProcessorHelper.js +11 -0
- package/lib/checks/dbFeatureFlags.js +5 -0
- package/lib/checks/enricher.js +1 -5
- package/lib/checks/structuredAnnoExpressions.js +30 -0
- package/lib/checks/validator.js +8 -0
- package/lib/compiler/assert-consistency.js +5 -1
- package/lib/compiler/base.js +1 -1
- package/lib/compiler/builtins.js +18 -2
- package/lib/compiler/checks.js +2 -5
- package/lib/compiler/define.js +8 -8
- package/lib/compiler/extend.js +108 -37
- package/lib/compiler/generate.js +1 -1
- package/lib/compiler/index.js +27 -10
- package/lib/compiler/lsp-api.js +501 -2
- package/lib/compiler/populate.js +60 -13
- package/lib/compiler/propagator.js +10 -8
- package/lib/compiler/resolve.js +117 -94
- package/lib/compiler/shared.js +114 -32
- package/lib/compiler/tweak-assocs.js +31 -21
- package/lib/compiler/utils.js +2 -1
- package/lib/compiler/xsn-model.js +4 -0
- package/lib/edm/annotations/genericTranslation.js +69 -35
- package/lib/edm/csn2edm.js +16 -4
- package/lib/edm/edm.js +10 -3
- package/lib/edm/edmAnnoPreprocessor.js +1 -2
- package/lib/edm/edmPreprocessor.js +8 -10
- package/lib/gen/Dictionary.json +66 -2
- package/lib/gen/language.checksum +1 -1
- package/lib/gen/language.interp +2 -1
- package/lib/gen/languageParser.js +4995 -4817
- package/lib/json/csnVersion.js +1 -1
- package/lib/json/from-csn.js +4 -7
- package/lib/json/to-csn.js +25 -12
- package/lib/language/antlrParser.js +2 -2
- package/lib/language/errorStrategy.js +0 -1
- package/lib/language/genericAntlrParser.js +35 -12
- package/lib/language/multiLineStringParser.js +3 -2
- package/lib/language/textUtils.js +1 -0
- package/lib/main.d.ts +28 -9
- package/lib/main.js +9 -9
- package/lib/model/cloneCsn.js +1 -0
- package/lib/model/csnRefs.js +22 -5
- package/lib/model/csnUtils.js +0 -14
- package/lib/model/revealInternalProperties.js +1 -2
- package/lib/modelCompare/compare.js +13 -11
- package/lib/optionProcessor.js +30 -9
- package/lib/render/manageConstraints.js +1 -1
- package/lib/render/toCdl.js +44 -14
- package/lib/render/toHdbcds.js +1 -2
- package/lib/render/toSql.js +45 -8
- package/lib/render/utils/common.js +12 -9
- package/lib/render/utils/stringEscapes.js +1 -0
- package/lib/transform/db/applyTransformations.js +13 -8
- package/lib/transform/db/associations.js +62 -54
- package/lib/transform/db/backlinks.js +20 -5
- package/lib/transform/db/expansion.js +1 -6
- package/lib/transform/db/flattening.js +86 -109
- package/lib/transform/db/killAnnotations.js +3 -0
- package/lib/transform/db/processSqlServices.js +63 -0
- package/lib/transform/db/temporal.js +3 -4
- package/lib/transform/db/views.js +0 -1
- package/lib/transform/draft/odata.js +56 -3
- package/lib/transform/effective/annotations.js +3 -2
- package/lib/transform/effective/flattening.js +135 -0
- package/lib/transform/effective/main.js +6 -4
- package/lib/transform/effective/types.js +13 -9
- package/lib/transform/forOdata.js +0 -2
- package/lib/transform/forRelationalDB.js +9 -19
- package/lib/transform/localized.js +7 -8
- package/lib/transform/odata/flattening.js +39 -31
- package/lib/transform/odata/typesExposure.js +5 -17
- package/lib/transform/transformUtils.js +1 -1
- package/lib/transform/translateAssocsToJoins.js +0 -1
- package/lib/utils/file.js +87 -8
- package/lib/utils/moduleResolve.js +59 -8
- package/lib/utils/term.js +3 -2
- package/package.json +7 -3
- package/share/messages/message-explanations.json +2 -0
- package/share/messages/type-unexpected-foreign-keys.md +52 -0
- package/share/messages/type-unexpected-on-condition.md +52 -0
package/lib/gen/Dictionary.json
CHANGED
|
@@ -1508,6 +1508,13 @@
|
|
|
1508
1508
|
"Type": "HTML5.LinkTargetType",
|
|
1509
1509
|
"$experimental": true
|
|
1510
1510
|
},
|
|
1511
|
+
"HTML5.RowSpanForDuplicateValues": {
|
|
1512
|
+
"Type": "Core.Tag",
|
|
1513
|
+
"AppliesTo": [
|
|
1514
|
+
"Record"
|
|
1515
|
+
],
|
|
1516
|
+
"$experimental": true
|
|
1517
|
+
},
|
|
1511
1518
|
"JSON.Schema": {
|
|
1512
1519
|
"Type": "JSON.JSON",
|
|
1513
1520
|
"AppliesTo": [
|
|
@@ -1885,9 +1892,18 @@
|
|
|
1885
1892
|
"UI.Placeholder": {
|
|
1886
1893
|
"Type": "Edm.String",
|
|
1887
1894
|
"AppliesTo": [
|
|
1888
|
-
"Property"
|
|
1895
|
+
"Property",
|
|
1896
|
+
"Parameter"
|
|
1889
1897
|
]
|
|
1890
1898
|
},
|
|
1899
|
+
"UI.InputMask": {
|
|
1900
|
+
"Type": "UI.InputMaskType",
|
|
1901
|
+
"AppliesTo": [
|
|
1902
|
+
"Property",
|
|
1903
|
+
"Parameter"
|
|
1904
|
+
],
|
|
1905
|
+
"$experimental": true
|
|
1906
|
+
},
|
|
1891
1907
|
"UI.TextArrangement": {
|
|
1892
1908
|
"Type": "UI.TextArrangementType",
|
|
1893
1909
|
"AppliesTo": [
|
|
@@ -1925,6 +1941,16 @@
|
|
|
1925
1941
|
],
|
|
1926
1942
|
"$experimental": true
|
|
1927
1943
|
},
|
|
1944
|
+
"UI.IsAIOperation": {
|
|
1945
|
+
"Type": "Core.Tag",
|
|
1946
|
+
"AppliesTo": [
|
|
1947
|
+
"Action",
|
|
1948
|
+
"Function",
|
|
1949
|
+
"ActionImport",
|
|
1950
|
+
"FunctionImport"
|
|
1951
|
+
],
|
|
1952
|
+
"$experimental": true
|
|
1953
|
+
},
|
|
1928
1954
|
"UI.CreateHidden": {
|
|
1929
1955
|
"Type": "Core.Tag",
|
|
1930
1956
|
"AppliesTo": [
|
|
@@ -2010,6 +2036,13 @@
|
|
|
2010
2036
|
"Parameter"
|
|
2011
2037
|
]
|
|
2012
2038
|
},
|
|
2039
|
+
"UI.Recommendations": {
|
|
2040
|
+
"Type": "Edm.ComplexType",
|
|
2041
|
+
"AppliesTo": [
|
|
2042
|
+
"EntityType"
|
|
2043
|
+
],
|
|
2044
|
+
"$experimental": true
|
|
2045
|
+
},
|
|
2013
2046
|
"UI.ExcludeFromNavigationContext": {
|
|
2014
2047
|
"Type": "Core.Tag",
|
|
2015
2048
|
"AppliesTo": [
|
|
@@ -3226,6 +3259,7 @@
|
|
|
3226
3259
|
"Properties": {
|
|
3227
3260
|
"Property": "Edm.PropertyPath",
|
|
3228
3261
|
"DynamicProperty": "Edm.AnnotationPath",
|
|
3262
|
+
"Expression": "Edm.PrimitiveType",
|
|
3229
3263
|
"Descending": "Edm.Boolean"
|
|
3230
3264
|
}
|
|
3231
3265
|
},
|
|
@@ -3823,7 +3857,8 @@
|
|
|
3823
3857
|
"ResultSizeDefault": "Edm.Int32",
|
|
3824
3858
|
"ResultSizeMaximum": "Edm.Int32",
|
|
3825
3859
|
"IANATimezoneFormat": "Edm.Boolean",
|
|
3826
|
-
"Treeview": "Edm.Boolean"
|
|
3860
|
+
"Treeview": "Edm.Boolean",
|
|
3861
|
+
"TextDirectionLayout": "Edm.Boolean"
|
|
3827
3862
|
}
|
|
3828
3863
|
},
|
|
3829
3864
|
"PersonalData.EntitySemanticsType": {
|
|
@@ -4220,6 +4255,7 @@
|
|
|
4220
4255
|
"IncludeGrandTotal": "Edm.Boolean",
|
|
4221
4256
|
"InitialExpansionLevel": "Edm.Int32",
|
|
4222
4257
|
"Visualizations": "Collection(Edm.AnnotationPath)",
|
|
4258
|
+
"RecursiveHierarchyQualifier": "Aggregation.HierarchyQualifier",
|
|
4223
4259
|
"RequestAtLeast": "Collection(Edm.PropertyPath)",
|
|
4224
4260
|
"SelectionFields": "Collection(Edm.PropertyPath)"
|
|
4225
4261
|
}
|
|
@@ -4274,6 +4310,23 @@
|
|
|
4274
4310
|
"High": "Edm.PrimitiveType"
|
|
4275
4311
|
}
|
|
4276
4312
|
},
|
|
4313
|
+
"UI.InputMaskType": {
|
|
4314
|
+
"$kind": "ComplexType",
|
|
4315
|
+
"Properties": {
|
|
4316
|
+
"Mask": "Edm.String",
|
|
4317
|
+
"PlaceholderSymbol": "Edm.String",
|
|
4318
|
+
"Rules": "Collection(UI.InputMaskRuleType)"
|
|
4319
|
+
},
|
|
4320
|
+
"$experimental": true
|
|
4321
|
+
},
|
|
4322
|
+
"UI.InputMaskRuleType": {
|
|
4323
|
+
"$kind": "ComplexType",
|
|
4324
|
+
"Properties": {
|
|
4325
|
+
"MaskSymbol": "Edm.String",
|
|
4326
|
+
"RegExp": "Edm.String"
|
|
4327
|
+
},
|
|
4328
|
+
"$experimental": true
|
|
4329
|
+
},
|
|
4277
4330
|
"UI.NoteType": {
|
|
4278
4331
|
"$kind": "ComplexType",
|
|
4279
4332
|
"Properties": {
|
|
@@ -4452,6 +4505,17 @@
|
|
|
4452
4505
|
"ValueListProperty": "Edm.String"
|
|
4453
4506
|
}
|
|
4454
4507
|
},
|
|
4508
|
+
"UI.PropertyRecommendationType": {
|
|
4509
|
+
"$kind": "ComplexType",
|
|
4510
|
+
"Abstract": "true",
|
|
4511
|
+
"Properties": {
|
|
4512
|
+
"RecommendedFieldValue": "Edm.PrimitiveType",
|
|
4513
|
+
"RecommendedFieldDescription": "Edm.String",
|
|
4514
|
+
"RecommendedFieldScoreValue": "Edm.Decimal",
|
|
4515
|
+
"RecommendedFieldIsSuggestion": "Edm.Boolean"
|
|
4516
|
+
},
|
|
4517
|
+
"$experimental": true
|
|
4518
|
+
},
|
|
4455
4519
|
"UI.VisualizationType": {
|
|
4456
4520
|
"$kind": "EnumType",
|
|
4457
4521
|
"Members": [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d2eab9ea0d46c406f6078d8a1125152e
|