Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sap-ux/annotation-converter

Package Overview
Dependencies
Maintainers
3
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-ux/annotation-converter - npm Package Compare versions

Comparing version 0.6.4 to 0.6.5

6

CHANGELOG.md
# @sap-ux/annotation-converter
## 0.6.5
### Patch Changes
- 217e517: The vocabulary types now provide a complete set of vocabulary references in constant `VocabularyReferences`
## 0.6.4

@@ -4,0 +10,0 @@

11

dist/converter.js

@@ -5,2 +5,3 @@ "use strict";

const utils_1 = require("./utils");
const VocabularyReferences_1 = require("@sap-ux/vocabularies-types/vocabularies/VocabularyReferences");
/**

@@ -1097,6 +1098,2 @@ * Symbol to extend an annotation with the reference to its target.

function convert(rawMetadata) {
// fall back on the default references if the caller does not specify any
if (rawMetadata.references.length === 0) {
rawMetadata.references = utils_1.defaultReferences;
}
// Converter Output

@@ -1107,5 +1104,9 @@ const convertedOutput = {

annotations: rawMetadata.schema.annotations,
references: utils_1.defaultReferences.concat(rawMetadata.references),
references: VocabularyReferences_1.VocabularyReferences.concat(rawMetadata.references),
diagnostics: []
};
// fall back on the default references if the caller does not specify any
if (rawMetadata.references.length === 0) {
rawMetadata.references = VocabularyReferences_1.VocabularyReferences;
}
// Converter

@@ -1112,0 +1113,0 @@ const converter = new Converter(rawMetadata, convertedOutput);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addGetByValue = exports.createIndexedFind = exports.lazy = exports.Decimal = exports.isComplexTypeDefinition = exports.TermToTypes = exports.EnumIsFlag = exports.unalias = exports.alias = exports.substringBeforeLast = exports.substringBeforeFirst = exports.splitAtLast = exports.splitAtFirst = exports.defaultReferences = void 0;
exports.defaultReferences = [
{ alias: 'Capabilities', namespace: 'Org.OData.Capabilities.V1', uri: '' },
{ alias: 'Aggregation', namespace: 'Org.OData.Aggregation.V1', uri: '' },
{ alias: 'Validation', namespace: 'Org.OData.Validation.V1', uri: '' },
{ namespace: 'Org.OData.Core.V1', alias: 'Core', uri: '' },
{ namespace: 'Org.OData.Measures.V1', alias: 'Measures', uri: '' },
{ namespace: 'com.sap.vocabularies.Common.v1', alias: 'Common', uri: '' },
{ namespace: 'com.sap.vocabularies.UI.v1', alias: 'UI', uri: '' },
{ namespace: 'com.sap.vocabularies.Session.v1', alias: 'Session', uri: '' },
{ namespace: 'com.sap.vocabularies.Analytics.v1', alias: 'Analytics', uri: '' },
{ namespace: 'com.sap.vocabularies.CodeList.v1', alias: 'CodeList', uri: '' },
{ namespace: 'com.sap.vocabularies.PersonalData.v1', alias: 'PersonalData', uri: '' },
{ namespace: 'com.sap.vocabularies.Communication.v1', alias: 'Communication', uri: '' },
{ namespace: 'com.sap.vocabularies.HTML5.v1', alias: 'HTML5', uri: '' }
];
const VocabularyReferences_1 = require("@sap-ux/vocabularies-types/vocabularies/VocabularyReferences");
exports.defaultReferences = VocabularyReferences_1.VocabularyReferences;
function splitAt(string, index) {

@@ -20,0 +7,0 @@ return index < 0 ? [string, ''] : [string.substring(0, index), string.substring(index + 1)];

{
"name": "@sap-ux/annotation-converter",
"version": "0.6.4",
"version": "0.6.5",
"description": "SAP Fiori OData - Annotation converter",

@@ -17,3 +17,3 @@ "repository": {

"devDependencies": {
"@sap-ux/vocabularies-types": "0.7.2",
"@sap-ux/vocabularies-types": "0.7.3",
"@sap-ux/edmx-parser": "0.5.13"

@@ -20,0 +20,0 @@ },

@@ -45,3 +45,2 @@ import type {

Decimal,
defaultReferences,
EnumIsFlag,

@@ -56,2 +55,3 @@ lazy,

} from './utils';
import { VocabularyReferences } from '@sap-ux/vocabularies-types/vocabularies/VocabularyReferences';

@@ -1561,7 +1561,2 @@ /**

export function convert(rawMetadata: RawMetadata): ConvertedMetadata {
// fall back on the default references if the caller does not specify any
if (rawMetadata.references.length === 0) {
rawMetadata.references = defaultReferences;
}
// Converter Output

@@ -1572,6 +1567,11 @@ const convertedOutput: ConvertedMetadata = {

annotations: rawMetadata.schema.annotations,
references: defaultReferences.concat(rawMetadata.references),
references: VocabularyReferences.concat(rawMetadata.references),
diagnostics: []
} as any;
// fall back on the default references if the caller does not specify any
if (rawMetadata.references.length === 0) {
rawMetadata.references = VocabularyReferences;
}
// Converter

@@ -1578,0 +1578,0 @@ const converter = new Converter(rawMetadata, convertedOutput);

import type { Index, ComplexType, Reference, TypeDefinition, ArrayWithIndex } from '@sap-ux/vocabularies-types';
import { VocabularyReferences } from '@sap-ux/vocabularies-types/vocabularies/VocabularyReferences';
export const defaultReferences: ReferencesWithMap = [
{ alias: 'Capabilities', namespace: 'Org.OData.Capabilities.V1', uri: '' },
{ alias: 'Aggregation', namespace: 'Org.OData.Aggregation.V1', uri: '' },
{ alias: 'Validation', namespace: 'Org.OData.Validation.V1', uri: '' },
{ namespace: 'Org.OData.Core.V1', alias: 'Core', uri: '' },
{ namespace: 'Org.OData.Measures.V1', alias: 'Measures', uri: '' },
{ namespace: 'com.sap.vocabularies.Common.v1', alias: 'Common', uri: '' },
{ namespace: 'com.sap.vocabularies.UI.v1', alias: 'UI', uri: '' },
{ namespace: 'com.sap.vocabularies.Session.v1', alias: 'Session', uri: '' },
{ namespace: 'com.sap.vocabularies.Analytics.v1', alias: 'Analytics', uri: '' },
{ namespace: 'com.sap.vocabularies.CodeList.v1', alias: 'CodeList', uri: '' },
{ namespace: 'com.sap.vocabularies.PersonalData.v1', alias: 'PersonalData', uri: '' },
{ namespace: 'com.sap.vocabularies.Communication.v1', alias: 'Communication', uri: '' },
{ namespace: 'com.sap.vocabularies.HTML5.v1', alias: 'HTML5', uri: '' }
];
export const defaultReferences: ReferencesWithMap = VocabularyReferences;

@@ -19,0 +6,0 @@ export type ReferencesWithMap = Reference[] & {

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc