@sap-ux/edmx-parser
Advanced tools
Comparing version 0.5.3 to 0.5.4
# @sap-ux/edmx-parser | ||
## 0.5.4 | ||
### Patch Changes | ||
- 412c6a8: fix: embedded annotation should not be taken to top level | ||
## 0.5.3 | ||
@@ -4,0 +10,0 @@ |
@@ -429,9 +429,10 @@ "use strict"; | ||
const recordAnnotations = parseAnnotations((0, utils_1.ensureArray)(record.Annotation), currentTarget, annotationsLists); | ||
if (recordAnnotations && recordAnnotations.length > 0) { | ||
annotationsLists.push(createAnnotationList(currentTarget, recordAnnotations)); | ||
} | ||
return { | ||
const outRecord = { | ||
type: record._attributes ? unalias(record._attributes.Type) : undefined, | ||
propertyValues: parsePropertyValues((0, utils_1.ensureArray)(record.PropertyValue), currentTarget, annotationsLists) | ||
}; | ||
if (recordAnnotations && recordAnnotations.length > 0) { | ||
outRecord.annotations = recordAnnotations; | ||
} | ||
return outRecord; | ||
} | ||
@@ -684,3 +685,3 @@ /** | ||
if (annotationAnnotations && annotationAnnotations.length > 0) { | ||
annotationsLists.push(createAnnotationList(currentAnnotationTarget, annotationAnnotations)); | ||
outAnnotation.annotations = annotationAnnotations; | ||
} | ||
@@ -733,3 +734,4 @@ } | ||
let entityContainer = { | ||
_type: 'EntityContainer' | ||
_type: 'EntityContainer', | ||
fullyQualifiedName: '' | ||
}; | ||
@@ -736,0 +738,0 @@ let actions = []; |
@@ -57,3 +57,4 @@ "use strict"; | ||
this._entityContainer = { | ||
_type: 'EntityContainer' | ||
_type: 'EntityContainer', | ||
fullyQualifiedName: '' | ||
}; | ||
@@ -60,0 +61,0 @@ this._entityTypes = []; |
{ | ||
"name": "@sap-ux/edmx-parser", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"description": "SAP Fiori OData - EDMX File parser", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/SAP/open-ux-odata.git", | ||
"directory": "packages/edmx-parser" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/SAP/open-ux-odata/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aedmx-parser" | ||
}, | ||
"main": "dist/index.js", | ||
@@ -12,3 +20,3 @@ "typings": "dist/index.d.ts", | ||
"devDependencies": { | ||
"@sap-ux/vocabularies-types": "0.5.3" | ||
"@sap-ux/vocabularies-types": "0.5.4" | ||
}, | ||
@@ -15,0 +23,0 @@ "scripts": { |
@@ -609,9 +609,10 @@ // eslint-disable-next-line @typescript-eslint/triple-slash-reference | ||
const recordAnnotations = parseAnnotations(ensureArray(record.Annotation), currentTarget, annotationsLists); | ||
if (recordAnnotations && recordAnnotations.length > 0) { | ||
annotationsLists.push(createAnnotationList(currentTarget, recordAnnotations)); | ||
} | ||
return { | ||
const outRecord: AnnotationRecord = { | ||
type: record._attributes ? unalias(record._attributes.Type) : undefined, | ||
propertyValues: parsePropertyValues(ensureArray(record.PropertyValue), currentTarget, annotationsLists) | ||
}; | ||
if (recordAnnotations && recordAnnotations.length > 0) { | ||
outRecord.annotations = recordAnnotations; | ||
} | ||
return outRecord; | ||
} | ||
@@ -911,3 +912,3 @@ | ||
if (annotationAnnotations && annotationAnnotations.length > 0) { | ||
annotationsLists.push(createAnnotationList(currentAnnotationTarget, annotationAnnotations)); | ||
outAnnotation.annotations = annotationAnnotations; | ||
} | ||
@@ -979,3 +980,4 @@ } | ||
let entityContainer: RawEntityContainer = { | ||
_type: 'EntityContainer' | ||
_type: 'EntityContainer', | ||
fullyQualifiedName: '' | ||
}; | ||
@@ -1006,3 +1008,3 @@ let actions: RawAction[] = []; | ||
entitySets, | ||
entityContainer.fullyQualifiedName as string | ||
entityContainer.fullyQualifiedName | ||
) | ||
@@ -1009,0 +1011,0 @@ ); |
@@ -99,3 +99,4 @@ /** | ||
_entityContainer: RawEntityContainer = { | ||
_type: 'EntityContainer' | ||
_type: 'EntityContainer', | ||
fullyQualifiedName: '' | ||
}; | ||
@@ -102,0 +103,0 @@ _entityTypes: RawEntityType[] = []; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
233941
4321
1
0