@sap-ux/annotation-converter
Advanced tools
Comparing version 0.5.9 to 0.5.10
# @sap-ux/annotation-converter | ||
## 0.5.10 | ||
### Patch Changes | ||
- 0f7acf2: Improve type definition to be more consistent with the output | ||
## 0.5.9 | ||
@@ -4,0 +10,0 @@ |
@@ -860,3 +860,13 @@ "use strict"; | ||
function createGlobalResolve(convertedOutput, objectMap) { | ||
return function resolvePath(sPath) { | ||
return function resolvePath(sPath, resolveDirectly = false) { | ||
if (resolveDirectly) { | ||
const targetResolution = _resolveTarget(objectMap, convertedOutput, '/' + sPath, false, true); | ||
if (targetResolution.target) { | ||
targetResolution.visitedObjects.push(targetResolution.target); | ||
} | ||
return { | ||
target: targetResolution.target, | ||
objectPath: targetResolution.visitedObjects | ||
}; | ||
} | ||
const aPathSplit = sPath.split('/'); | ||
@@ -863,0 +873,0 @@ if (aPathSplit.shift() !== '') { |
{ | ||
"name": "@sap-ux/annotation-converter", | ||
"version": "0.5.9", | ||
"version": "0.5.10", | ||
"description": "SAP Fiori OData - Annotation converter", | ||
@@ -17,3 +17,3 @@ "repository": { | ||
"devDependencies": { | ||
"@sap-ux/vocabularies-types": "0.5.6", | ||
"@sap-ux/vocabularies-types": "0.6.0", | ||
"@sap-ux/edmx-parser": "0.5.5" | ||
@@ -20,0 +20,0 @@ }, |
@@ -1066,3 +1066,16 @@ import type { | ||
function createGlobalResolve(convertedOutput: ConvertedMetadata, objectMap: Record<string, any>) { | ||
return function resolvePath<T extends ServiceObjectAndAnnotation>(sPath: string): ResolutionTarget<T> { | ||
return function resolvePath<T extends ServiceObjectAndAnnotation>( | ||
sPath: string, | ||
resolveDirectly: boolean = false | ||
): ResolutionTarget<T> { | ||
if (resolveDirectly) { | ||
const targetResolution: any = _resolveTarget(objectMap, convertedOutput, '/' + sPath, false, true); | ||
if (targetResolution.target) { | ||
targetResolution.visitedObjects.push(targetResolution.target); | ||
} | ||
return { | ||
target: targetResolution.target, | ||
objectPath: targetResolution.visitedObjects | ||
}; | ||
} | ||
const aPathSplit = sPath.split('/'); | ||
@@ -1069,0 +1082,0 @@ if (aPathSplit.shift() !== '') { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
273147
4094