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

@ind-rcg/generator

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ind-rcg/generator - npm Package Compare versions

Comparing version 248.1006.0 to 250.1012.0

validator/xmlSchema/latest/ProcessFlow.xsd

38

core.js

@@ -423,21 +423,23 @@ /*

const addImageFileTypeToContent = (content, insideACockpitList) => {
if (content.tag === "CockpitList") {
insideACockpitList = true;
if (!_.isNil(content)) {
if (content.tag === "CockpitList") {
insideACockpitList = true;
}
if (!_.isNil(content.Bindings)) {
_.forEach(content.Bindings, function (binding) {
if (binding.type === "Image" && binding.tag === "Resource") {
binding.imageType = imageTypeMap[binding.id];
}
if (binding.type === "Image" && insideACockpitList) {
binding.imageType = ".svg";
}
});
}
if (insideACockpitList && !_.isNil(content.Items)) {
addImageFileTypeToContent(content.Items, insideACockpitList);
}
if (!_.isNil(content.content)) {
_.forEach(content.content, elem => addImageFileTypeToContent(elem, insideACockpitList));
}
}
if (!_.isNil(content.Bindings)) {
_.forEach(content.Bindings, function (binding) {
if (binding.type === "Image" && binding.tag === "Resource") {
binding.imageType = imageTypeMap[binding.id];
}
if (binding.type === "Image" && insideACockpitList) {
binding.imageType = ".svg";
}
});
}
if (insideACockpitList && !_.isNil(content.Items)) {
addImageFileTypeToContent(content.Items, insideACockpitList);
}
if (!_.isNil(content.content)) {
_.forEach(content.content, elem => addImageFileTypeToContent(elem, insideACockpitList));
}
};

@@ -444,0 +446,0 @@

@@ -38,2 +38,3 @@ /*

let MODELER_MODE = require('./globals').MODELER_MODE;
const {XSD_VERSION} = require('./globals');

@@ -67,3 +68,4 @@ const targetLocations = {

optimiseDataSourceCode: false,
refreshLocale: false
refreshLocale: false,
xsdv: XSD_VERSION.LEGACY
};

@@ -203,3 +205,3 @@

validatorIntegration = cp.fork('validatorIntegrationIntoGenerator.js', ['--from=' + settings.from,
'--to=' + settings.to , "--devMode="+devModeOriginalInput, '--sfDS='+sfDSOriginalInput, '--modelerMode='+settings.modelerMode, '--logs='+settings.logs],
'--to=' + settings.to , "--devMode="+devModeOriginalInput, '--sfDS='+sfDSOriginalInput, '--modelerMode='+settings.modelerMode, '--logs='+settings.logs, '--xsdv='+settings.xsdv],
{cwd: __dirname, execArgv: execArgv});

@@ -206,0 +208,0 @@

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

module.exports.XSD_VERSION = {
LEGACY: "legacy", // DEFAULT
LATEST : "latest"
};
module.exports.LOG_LEVEL = {

@@ -10,0 +15,0 @@ TRACE: 4,

@@ -22,2 +22,6 @@ "use strict";

const migrateXmlnsToXsd = require("./xmlMigrator/migrateXmlnsToXsd");
const migrateProcess = require("./xmlMigrator/migrateProcess");
const migrateUserInterface = require("./xmlMigrator/migrateUserInterface");
const utils = require("./utils");

@@ -52,3 +56,3 @@ const path = require("path");

let migrations = [migrateBusinessLogicToJS, migrateXmlnsToXsd];
let migrations = [migrateBusinessLogicToJS, migrateXmlnsToXsd, migrateProcess, migrateUserInterface];
settings.from = path.isAbsolute(settings.from)? settings.from : path.resolve(settings.from);

@@ -55,0 +59,0 @@ let contracts = listFilesRecursively(settings.from).filter(isXmlFile);

{
"name": "@ind-rcg/generator",
"version": "248.1006.0",
"version": "250.1012.0",
"author": "Salesforce",

@@ -43,26 +43,23 @@ "license": "BSD-3-Clause",

"dependencies": {
"@ind-rcg/plugins-printengine": "248.1004.0",
"bilby": "0.0.2",
"comment-parser": "1.3.1",
"@ind-rcg/plugins-printengine": "250.1004.0",
"comment-parser": "1.4.1",
"crypto-js": "4.2.0",
"escodegen": "2.0.0",
"escodegen": "2.1.0",
"esprima": "4.0.1",
"fs-extra": "10.0.0",
"less": "4.1.3",
"libxmljs": "0.19.10",
"fs-extra": "11.2.0",
"libxmljs": "1.0.11",
"lodash": "4.17.21",
"xml2js": "0.5.0",
"zip": "1.2.0",
"prettify-xml": "1.2.0"
"prettify-xml": "1.2.0",
"xml2js": "0.6.2",
"zip": "1.2.0"
},
"devDependencies": {
"chai": "4.3.4",
"eslint": "8.40.0",
"mocha": "10.1.0",
"mocha-junit-reporter": "2.1.1",
"chai": "4.4.1",
"eslint": "8.56.0",
"mocha": "10.3.0",
"mocha-junit-reporter": "2.2.1",
"nyc": "15.1.0",
"rewire": "5.0.0",
"simple-mock": "0.8.0",
"time-grunt": "2.0.0"
"rewire": "7.0.0",
"simple-mock": "0.8.0"
}
}

@@ -42,3 +42,3 @@ "use strict";

try {
return libxml.parseXmlString(fs.readFileSync(contractPath, 'utf8'));
return libxml.parseXml(fs.readFileSync(contractPath, 'utf8'));
}

@@ -74,3 +74,3 @@ catch{

let key = getMappingKey(translationSection);
let id = translationSection.attr("id")?.value();
let id = translationSection.getAttribute("id")?.value();
if (id){

@@ -86,3 +86,3 @@ return `${translationTypesXpathMap.get(key)}[@id="${id}"]`;

updateStatusRefFn(statusObjectRef, "INFO", "INFO", `Adding the translation section: ${targetTranslationSectionXPath}`);
let idValue = translationSection.attr('id')?.value();
let idValue = translationSection.getAttribute('id')?.value();
targetLocale.get(targetTranslationSectionXPath.substring(0, targetTranslationSectionXPath.lastIndexOf('/')))

@@ -96,3 +96,3 @@ .node(translationSection.name()).attr({id: idValue});

let key = getMappingKey(translationSection);
let id = translationSection.attr("id")?.value();
let id = translationSection.getAttribute("id")?.value();
if (id) {

@@ -112,3 +112,3 @@ return `${translationTypesXpathMap.get(key)}[@id="${id}"]/Label`;

pathToUpdate.includes("AdvancedSearch"))) {
textValue = defaultLocaleData?.get(labelXPathInLocale).attr('text').value() || textValue;
textValue = defaultLocaleData?.get(labelXPathInLocale).getAttribute('text').value() || textValue;
}

@@ -119,7 +119,7 @@ return textValue;

function ensureLabelExists(label, translationSectionXPathInLocale, targetLocale) {
let labelId = label.attr('id').value();
let labelId = label.getAttribute('id').value();
let labelXPathInLocale = getLabelXPathInLocale(translationSectionXPathInLocale, labelId);
if (!targetLocale.get(labelXPathInLocale)) {
updateStatusRefFn(statusObjectRef, "INFO", "INFO", `Adding the label: ${labelXPathInLocale}`);
let textValue = getTextValue(label.attr('text').value(), translationSectionXPathInLocale, labelXPathInLocale);
let textValue = getTextValue(label.getAttribute('text').value(), translationSectionXPathInLocale, labelXPathInLocale);

@@ -126,0 +126,0 @@ targetLocale.get(translationSectionXPathInLocale).node('Label').attr({

@@ -229,2 +229,6 @@ /*

if(_.isNil(object)){
//Object is null hence no need to process further
return;
}
if (object.tag === "GroupedList" || object.tag === "MultiSelectionGroupedList" || object.tag === "BreadCrumbControl" || object.tag === "MultiSelectionBreadCrumbControl"){

@@ -231,0 +235,0 @@ let dynamicGroupBinding = _.find(object.Bindings, {target: "DynamicallyGroupBy"});

@@ -21,2 +21,3 @@ /*

const path = require('path');
const {XSD_VERSION} = require('./globals');

@@ -27,3 +28,5 @@ /******************************************************************************

let args = process.argv.slice(2);
let settings = {};
let settings = {
xsdv: XSD_VERSION.LEGACY
};

@@ -55,2 +58,7 @@ process.send = process.send || function () {};

// fix xsd version for upcoming xsd validations
if (_.isNil(settings.xsdv) || settings.xsdv !== XSD_VERSION.LATEST) {
settings.xsdv = XSD_VERSION.LEGACY;
}
let validationStartTime = new Date();

@@ -119,2 +127,3 @@ /******************************************************************************

console.log("Backend : " + settings.backendSystem);
console.log("XSD Version : " + settings.xsdv);
console.log("Contracts in handover file: " + settings.contracts.length);

@@ -125,3 +134,3 @@

******************************************************************************/
let validator = new contractValidator.Validator();
let validator = new contractValidator.Validator(settings.xsdv);

@@ -128,0 +137,0 @@ let buildDependenciesPromise = Promise.resolve(0);

@@ -16,3 +16,3 @@ /*

let boXml = boMetaInformation.xml;
let boName = boXml.root().attr("name").value();
let boName = boXml.root().getAttribute("name").value();
let dsMetaInformation = null;

@@ -58,7 +58,7 @@ let dsXml = null;

datasourceRootNodeTag = datasourceRootNode.name();
if(!_.isNil(datasourceRootNode.attr('name'))) {
datasourceRootNodeNameAttribute = datasourceRootNode.attr('name').value();
if(!_.isNil(datasourceRootNode.getAttribute('name'))) {
datasourceRootNodeNameAttribute = datasourceRootNode.getAttribute('name').value();
}
if(!_.isNil(datasourceRootNode.attr('external'))) {
let externalDefinition = datasourceRootNode.attr('external').value().toLowerCase();
if(!_.isNil(datasourceRootNode.getAttribute('external'))) {
let externalDefinition = datasourceRootNode.getAttribute('external').value().toLowerCase();
externalDatasource = externalDefinition === "true";

@@ -105,3 +105,3 @@ }

_.forEach(dataSourceAttributeArray, (value/*, key*/)=> {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if(!_.isNil(tmp)){

@@ -112,3 +112,3 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

_.forEach(derivedAttributeArray, (value/*, key*/)=> {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if(!_.isNil(tmp)){

@@ -119,4 +119,4 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

_.forEach(dateTimeAttributeArray, (value/*, key*/)=> {
let dateName = value.attr('dateName');
let timeName = value.attr('timeName');
let dateName = value.getAttribute('dateName');
let timeName = value.getAttribute('timeName');
if(!_.isNil(dateName)){

@@ -130,3 +130,3 @@ dataSourceAttributeNameMap[dateName.value()] = dateName.value();

_.forEach(dataSourcePivotAttributeArray, (value/*, key*/)=> {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if(!_.isNil(tmp)){

@@ -137,3 +137,3 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

_.forEach(dataSourcePivotConstantArray, (value/*, key*/)=> {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if(!_.isNil(tmp)){

@@ -144,3 +144,3 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

_.forEach(dataSourcePivotDerivedAttributeArray, (value/*, key*/)=> {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if(!_.isNil(tmp)){

@@ -154,4 +154,4 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

//dataSourceProperty
let tmp = value.attr('dataSourceProperty');
let storable = value.attr('storable');
let tmp = value.getAttribute('dataSourceProperty');
let storable = value.getAttribute('storable');
if(!_.isNil(storable)){

@@ -158,0 +158,0 @@ if(storable.value().toLowerCase() === "false") {

@@ -19,9 +19,9 @@ /*

let columnNames = _.reduce(allColumns, (columnNamesArray, column, /*key*/) => {
let columnName = column.attr("name");
let columnName = column.getAttribute("name");
if (!_.isNil(columnName)) {
columnNamesArray.push(column.attr("name").value());
columnNamesArray.push(column.getAttribute("name").value());
}
return columnNamesArray;
}, []);
result[tableXML.root().attr("name").value()] = columnNames;
result[tableXML.root().getAttribute("name").value()] = columnNames;
return result;

@@ -34,3 +34,3 @@ }, {});

let filteredAttributes = _.filter(allAttributes, (attribute) => {
if (!_.isNil(attribute.attr("table")) && _.endsWith(attribute.attr("table").value(), "_T")){
if (!_.isNil(attribute.getAttribute("table")) && _.endsWith(attribute.getAttribute("table").value(), "_T")){
return true;

@@ -41,4 +41,4 @@ }

_.forEach(filteredAttributes, (attribute) => {
let tableName = attribute.attr("table").value();
let colName = attribute.attr("column").value();
let tableName = attribute.getAttribute("table").value();
let colName = attribute.getAttribute("column").value();
let availableColumns = tableLookup[tableName];

@@ -45,0 +45,0 @@ if (_.isNil(availableColumns) || availableColumns.indexOf(colName) === -1){

@@ -18,4 +18,4 @@ /*

let externalFileRootNodeNameAttribute = null;
if(!_.isNil(externalFileRootNode.attr('name'))) {
externalFileRootNodeNameAttribute = externalFileRootNode.attr('name').value();
if(!_.isNil(externalFileRootNode.getAttribute('name'))) {
externalFileRootNodeNameAttribute = externalFileRootNode.getAttribute('name').value();
let externalFiles = _.filter(parsedContractsCache, {contractType:"externalfile"});

@@ -26,4 +26,4 @@ let filesWithName = _.filter(externalFiles, item => {

let otherExternalFileRootNodeNameAttribute = null;
if(!_.isNil(otherExternalFileRootNode.attr('name'))) {
otherExternalFileRootNodeNameAttribute = otherExternalFileRootNode.attr('name').value();
if(!_.isNil(otherExternalFileRootNode.getAttribute('name'))) {
otherExternalFileRootNodeNameAttribute = otherExternalFileRootNode.getAttribute('name').value();
}

@@ -30,0 +30,0 @@ return otherExternalFileRootNodeNameAttribute === externalFileRootNodeNameAttribute;

@@ -15,3 +15,3 @@ /*

let loMetaInformation = parsedContractsCache[contractPath];
let loName = loMetaInformation.xml.root().attr("name").value();
let loName = loMetaInformation.xml.root().getAttribute("name").value();

@@ -51,7 +51,7 @@ let dsMetaInformation = null;

datasourceRootNodeTag = datasourceRootNode.name();
if(!_.isNil(datasourceRootNode.attr('name'))) {
datasourceRootNodeNameAttribute = datasourceRootNode.attr('name').value();
if(!_.isNil(datasourceRootNode.getAttribute('name'))) {
datasourceRootNodeNameAttribute = datasourceRootNode.getAttribute('name').value();
}
if(!_.isNil(datasourceRootNode.attr('external'))) {
let externalDefinition = datasourceRootNode.attr('external').value().toLowerCase();
if(!_.isNil(datasourceRootNode.getAttribute('external'))) {
let externalDefinition = datasourceRootNode.getAttribute('external').value().toLowerCase();
externalDatasource = externalDefinition === "true";

@@ -103,3 +103,3 @@ }

_.forEach(dataSourceAttributeArray, (value/*, key*/)=> {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if(!_.isNil(tmp)){

@@ -110,3 +110,3 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

_.forEach(derivedAttributeArray, (value/*, key*/)=> {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if(!_.isNil(tmp)){

@@ -117,4 +117,4 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

_.forEach(dateTimeAttributeArray, (value/*, key*/)=> {
let dateName = value.attr('dateName');
let timeName = value.attr('timeName');
let dateName = value.getAttribute('dateName');
let timeName = value.getAttribute('timeName');
if(!_.isNil(dateName)){

@@ -128,3 +128,3 @@ dataSourceAttributeNameMap[dateName.value()] = dateName.value();

_.forEach(dataSourcePivotAttributeArray, (value/*, key*/)=> {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if(!_.isNil(tmp)){

@@ -135,3 +135,3 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

_.forEach(dataSourcePivotConstantArray, (value/*, key*/)=> {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if(!_.isNil(tmp)){

@@ -142,3 +142,3 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

_.forEach(dataSourcePivotDerivedAttributeArray, (value/*, key*/)=> {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if(!_.isNil(tmp)){

@@ -152,4 +152,4 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

//dataSourceProperty
let tmp = value.attr('dataSourceProperty');
let storable = value.attr('storable');
let tmp = value.getAttribute('dataSourceProperty');
let storable = value.getAttribute('storable');
if(!_.isNil(storable)){

@@ -156,0 +156,0 @@ if(storable.value().toLowerCase() === "false") {

@@ -16,3 +16,3 @@ /*

let luXml = luMetaInformation.xml;
let luName = luXml.root().attr("name").value();
let luName = luXml.root().getAttribute("name").value();
let dsMetaInformation = null;

@@ -58,7 +58,7 @@ let businessLogicMethodNames = [];

datasourceRootNodeTag = datasourceRootNode.name();
if (!_.isNil(datasourceRootNode.attr('name'))) {
datasourceRootNodeNameAttribute = datasourceRootNode.attr('name').value();
if (!_.isNil(datasourceRootNode.getAttribute('name'))) {
datasourceRootNodeNameAttribute = datasourceRootNode.getAttribute('name').value();
}
if (!_.isNil(datasourceRootNode.attr('external'))) {
let externalDefinition = datasourceRootNode.attr('external').value().toLowerCase();
if (!_.isNil(datasourceRootNode.getAttribute('external'))) {
let externalDefinition = datasourceRootNode.getAttribute('external').value().toLowerCase();
externalDatasource = externalDefinition === "true";

@@ -116,3 +116,3 @@ }

_.forEach(dataSourceAttributeArray, (value/*, key*/) => {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if (!_.isNil(tmp)) {

@@ -123,3 +123,3 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

_.forEach(derivedAttributeArray, (value/*, key*/) => {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if (!_.isNil(tmp)) {

@@ -130,4 +130,4 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

_.forEach(dateTimeAttributeArray, (value/*, key*/) => {
let dateName = value.attr('dateName');
let timeName = value.attr('timeName');
let dateName = value.getAttribute('dateName');
let timeName = value.getAttribute('timeName');
if (!_.isNil(dateName)) {

@@ -141,3 +141,3 @@ dataSourceAttributeNameMap[dateName.value()] = dateName.value();

_.forEach(dataSourcePivotAttributeArray, (value/*, key*/) => {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if (!_.isNil(tmp)) {

@@ -148,3 +148,3 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

_.forEach(dataSourcePivotConstantArray, (value/*, key*/) => {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if (!_.isNil(tmp)) {

@@ -155,3 +155,3 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

_.forEach(dataSourcePivotDerivedAttributeArray, (value/*, key*/) => {
let tmp = value.attr('name');
let tmp = value.getAttribute('name');
if (!_.isNil(tmp)) {

@@ -165,4 +165,4 @@ dataSourceAttributeNameMap[tmp.value()] = tmp.value();

//dataSourceProperty
let tmp = value.attr('dataSourceProperty');
let storable = value.attr('storable');
let tmp = value.getAttribute('dataSourceProperty');
let storable = value.getAttribute('storable');
if (!_.isNil(storable)) {

@@ -169,0 +169,0 @@ if (storable.value().toLowerCase() === "false") {

@@ -16,3 +16,3 @@ /*

let tableXML = tableMetaInformation.xml;
let tableName = tableXML.root().attr(NAME_TAG).value();
let tableName = tableXML.root().getAttribute(NAME_TAG).value();
const allColumns = tableXML.find(".//columns/column");

@@ -19,0 +19,0 @@

@@ -16,3 +16,3 @@ /*

let listToPropIdsMap = _.reduce(listsInInterface, (listToPropIds, list) => {
let listIdAttr = list.attr("id");
let listIdAttr = list.getAttribute("id");
if (!_.isNil(listIdAttr)) {

@@ -23,3 +23,3 @@ let listId = listIdAttr.value();

let propNames = _.reduce(allListProps, (result, listProp) => {
let idAttr = listProp.attr("id");
let idAttr = listProp.getAttribute("id");
if (!_.isNil(idAttr)) {

@@ -36,3 +36,3 @@ result.push(idAttr.value());

let uiPluginName = uiPluginXml.root().attr("name").value();
let uiPluginName = uiPluginXml.root().getAttribute("name").value();
pluginNameToList[uiPluginName] = listToPropIdsMap;

@@ -49,3 +49,3 @@ return pluginNameToList;

let propNames = _.reduce(allXmlTags, (pluginNames, xmlTag) => {
let attrTag = xmlTag.attr(attribute);
let attrTag = xmlTag.getAttribute(attribute);
if (!_.isNil(attrTag)) {

@@ -57,3 +57,3 @@ pluginNames.push(attrTag.value());

result[uiPluginXml.root().attr("name").value()] = propNames;
result[uiPluginXml.root().getAttribute("name").value()] = propNames;
return result;

@@ -75,3 +75,3 @@ }, {});

_.forEach(uiPlugins, uiPlugin => {
let uiPluginNameAttr = uiPlugin.attr("uiPlugin");
let uiPluginNameAttr = uiPlugin.getAttribute("uiPlugin");

@@ -93,3 +93,3 @@ if (!_.isNil(uiPluginNameAttr)) {

_.forEach(bindings, binding => {
let bindingTargetAttr = binding.attr("target");
let bindingTargetAttr = binding.getAttribute("target");

@@ -106,3 +106,3 @@ if (!_.isNil(bindingTargetAttr) && availableProps.indexOf(bindingTargetAttr.value()) === -1) {

_.forEach(allLists, list => {
let listTargetAttr = list.attr("target");
let listTargetAttr = list.getAttribute("target");

@@ -123,3 +123,3 @@ if (!_.isNil(listTargetAttr)) {

_.forEach(allListProps, listProp => {
let bindingTargetAttr = listProp.attr("target");
let bindingTargetAttr = listProp.getAttribute("target");

@@ -139,3 +139,3 @@ if (!_.isNil(bindingTargetAttr) && !availablePropIdsForList.includes(bindingTargetAttr.value())) {

_.forEach(customPluginEvents, event => {
let pluginNameAttr = event.attr("name");
let pluginNameAttr = event.getAttribute("name");

@@ -142,0 +142,0 @@ if (!_.isNil(pluginNameAttr) && availableEventNames.indexOf(pluginNameAttr.value()) === -1) {

@@ -17,3 +17,3 @@ /*

let nameAttribute = libraryXML.root().attr('name');
let nameAttribute = libraryXML.root().getAttribute('name');
if (!_.isNil(nameAttribute)) {

@@ -27,3 +27,3 @@ libraryLookup.push(nameAttribute.value());

_.forEach(allLibraries, library => {
let nameAttribute = library.attr('name');
let nameAttribute = library.getAttribute('name');
if (!_.isNil(nameAttribute)) {

@@ -30,0 +30,0 @@ let libraryName = nameAttribute.value();

@@ -21,3 +21,3 @@ /*

if(!_.isNil(datasourceTag)) {
let nameAttribute = datasourceTag.attr('name');
let nameAttribute = datasourceTag.getAttribute('name');
if (!_.isNil(nameAttribute)) {

@@ -24,0 +24,0 @@ let datasourceDependency = nameToContractPath[nameAttribute.value()];

@@ -16,3 +16,3 @@ /*

_.forEach(referencedTables, (tableXML) => {
let nameAttribute = tableXML.attr('name');
let nameAttribute = tableXML.getAttribute('name');
// Only temporary tables are relevant

@@ -19,0 +19,0 @@ if (!_.isNil(nameAttribute) && _.endsWith(nameAttribute.value(), "_T")) {

@@ -20,3 +20,3 @@ /*

if(!_.isNil(datasourceTag)) {
let nameAttribute = datasourceTag.attr('name');
let nameAttribute = datasourceTag.getAttribute('name');
if (!_.isNil(nameAttribute)) {

@@ -31,3 +31,3 @@ let datasourceDependency = nameToContractPath[nameAttribute.value()];

if(!_.isNil(itemTag)) {
let classAttribute = itemTag.attr('objectClass');
let classAttribute = itemTag.getAttribute('objectClass');
if (!_.isNil(classAttribute)) {

@@ -34,0 +34,0 @@ let itemDependency = nameToContractPath[classAttribute.value()];

@@ -21,3 +21,3 @@ /*

if (!_.isNil(datasourceTag)) {
let nameAttribute = datasourceTag.attr('name');
let nameAttribute = datasourceTag.getAttribute('name');
if (!_.isNil(nameAttribute)) {

@@ -24,0 +24,0 @@ let datasourceDependency = nameToContractPath[nameAttribute.value()];

@@ -35,3 +35,3 @@ /*

let viewActions = _.filter(allActions, (action) => {
return !_.isNil(action.attr("actionType")) && action.attr("actionType").value().toUpperCase() === "VIEW";
return !_.isNil(action.getAttribute("actionType")) && action.getAttribute("actionType").value().toUpperCase() === "VIEW";
});

@@ -60,12 +60,12 @@ _.forEach(viewActions, (viewAction) => {

let prevNextGroupedLists = _.filter(finalArray, (list) => {
return !_.isNil(list.attr("showPreviousNextEnter")) && list.attr("showPreviousNextEnter").value() === "true";
return !_.isNil(list.getAttribute("showPreviousNextEnter")) && list.getAttribute("showPreviousNextEnter").value() === "true";
});
let googleMapsBindingsList = _.filter(googleMapsBindings, (list) => {
return !_.isNil(list.attr("target")) && list.attr("target").value() === "AdditionalDatasource";
return !_.isNil(list.getAttribute("target")) && list.getAttribute("target").value() === "AdditionalDatasource";
});
_.forEach(listArray, (list) => {
let dataSource = list.attr("dataSource") ? list.attr("dataSource").value().replace('ProcessContext::', '').replace('.items[]', '').replace('.Items[]','') : null;
let dataSource = list.getAttribute("dataSource") ? list.getAttribute("dataSource").value().replace('ProcessContext::', '').replace('.items[]', '').replace('.Items[]','') : null;
let bindings = list.find(".//Bindings/Binding").filter(function(binding /*, idx */){
return binding.attr('badgeText');
return binding.getAttribute('badgeText');
});

@@ -76,8 +76,8 @@ if (!dataSource) {

let badgeTextDeclarations = _.filter(declarations, (dec) => {
return !_.isNil(dec.attr("name")) && dec.attr("name").value() === dataSource;
return !_.isNil(dec.getAttribute("name")) && dec.getAttribute("name").value() === dataSource;
});
let loContractName = !_.isNil(badgeTextDeclarations[0]) && badgeTextDeclarations[0].attr("type") ? badgeTextDeclarations[0].attr("type").value() : null;
let loContractName = !_.isNil(badgeTextDeclarations[0]) && badgeTextDeclarations[0].getAttribute("type") ? badgeTextDeclarations[0].getAttribute("type").value() : null;
_.forEach(bindings, (binding) => {
let badgeTextProperty = binding.attr("badgeText") ? binding.attr("badgeText").value().substring(1) : null;
let badgeTextProperty = binding.getAttribute("badgeText") ? binding.getAttribute("badgeText").value().substring(1) : null;

@@ -92,3 +92,3 @@ if (!badgeTextProperty) {

let liList = !_.isNil(loContractXML) ? loContractXML.find("//Item") : [];
let liContractName = (liList.length > 0 && liList[0].attr("objectClass")) ? liList[0].attr("objectClass").value() : null;
let liContractName = (liList.length > 0 && liList[0].getAttribute("objectClass")) ? liList[0].getAttribute("objectClass").value() : null;
if (liContractName) {

@@ -99,3 +99,3 @@ let liContract = parsedContractsCache[nameToContractPath[liContractName]];

let simpleProperty = _.filter(liPropertyList, (property) => {
return !_.isNil(property.attr("name")) && property.attr("name").value() === badgeTextProperty;
return !_.isNil(property.getAttribute("name")) && property.getAttribute("name").value() === badgeTextProperty;
});

@@ -105,3 +105,3 @@ if (simpleProperty.length > 0) {

} else {
processDependencies.push({ isMissing: { badgeText: nameToContractPath[uiDescriptionName],value:binding.attr("badgeText").value()} });
processDependencies.push({ isMissing: { badgeText: nameToContractPath[uiDescriptionName],value:binding.getAttribute("badgeText").value()} });
}

@@ -114,8 +114,8 @@ }

_.forEach(googleMapsBindingsList, (list) => {
let dataSource = list.attr("dataSource") ? list.attr("dataSource").value().replace('ProcessContext::', '').replace('.items[]', '') : null;
let dataSource = list.getAttribute("dataSource") ? list.getAttribute("dataSource").value().replace('ProcessContext::', '').replace('.items[]', '') : null;
let additionalWayPointsBinidingList = _.filter(list.find("./Binding"), (lst) => {
return !_.isNil(lst.attr("target")) && lst.attr("target").value() === "VisibilityField";
return !_.isNil(lst.getAttribute("target")) && lst.getAttribute("target").value() === "VisibilityField";
});
let visibilityProperty = !_.isNil(additionalWayPointsBinidingList) && additionalWayPointsBinidingList.length > 0 ?
additionalWayPointsBinidingList[0].attr("binding").value().substr(1) : null;
additionalWayPointsBinidingList[0].getAttribute("binding").value().substr(1) : null;
if (!visibilityProperty || !dataSource) {

@@ -125,5 +125,5 @@ return;

let visibilityDeclarations = _.filter(declarations, (dec) => {
return !_.isNil(dec.attr("name")) && dec.attr("name").value() === dataSource;
return !_.isNil(dec.getAttribute("name")) && dec.getAttribute("name").value() === dataSource;
});
let loContractName = !_.isNil(visibilityDeclarations[0]) && visibilityDeclarations[0].attr("type") ? visibilityDeclarations[0].attr("type").value() : null;
let loContractName = !_.isNil(visibilityDeclarations[0]) && visibilityDeclarations[0].getAttribute("type") ? visibilityDeclarations[0].getAttribute("type").value() : null;
if(loContractName)

@@ -134,3 +134,3 @@ {

let liList = !_.isNil(loContractXML) ? loContractXML.find("//Item") : [];
let liContractName = (liList.length > 0 && liList[0].attr("objectClass")) ? liList[0].attr("objectClass").value() : null;
let liContractName = (liList.length > 0 && liList[0].getAttribute("objectClass")) ? liList[0].getAttribute("objectClass").value() : null;
if (liContractName) {

@@ -141,3 +141,3 @@ let liContract = parsedContractsCache[nameToContractPath[liContractName]];

let visibleProperty = _.filter(liPropertyList, (property) => {
return !_.isNil(property.attr("name")) && property.attr("name").value() === visibilityProperty;
return !_.isNil(property.getAttribute("name")) && property.getAttribute("name").value() === visibilityProperty;
});

@@ -154,4 +154,4 @@ if (visibleProperty.length > 0) {

_.forEach(googleMaps, (list) => {
let dataSource = list.attr("dataSource") ? list.attr("dataSource").value().replace('ProcessContext::', '').replace('.items[]', '') : null;
let visibilityProperty = list.attr("visibilityField") ? list.attr("visibilityField").value() : null;
let dataSource = list.getAttribute("dataSource") ? list.getAttribute("dataSource").value().replace('ProcessContext::', '').replace('.items[]', '') : null;
let visibilityProperty = list.getAttribute("visibilityField") ? list.getAttribute("visibilityField").value() : null;
if (!visibilityProperty || !dataSource) {

@@ -161,6 +161,6 @@ return;

let visibilityDeclarations = _.filter(declarations, (dec) => {
return !_.isNil(dec.attr("name")) && dec.attr("name").value() === dataSource;
return !_.isNil(dec.getAttribute("name")) && dec.getAttribute("name").value() === dataSource;
});
let loContractName = !_.isNil(visibilityDeclarations[0]) && visibilityDeclarations[0].attr("type") ? visibilityDeclarations[0].attr("type").value() : null;
let loContractName = !_.isNil(visibilityDeclarations[0]) && visibilityDeclarations[0].getAttribute("type") ? visibilityDeclarations[0].getAttribute("type").value() : null;
if(loContractName)

@@ -171,3 +171,3 @@ {

let liList = !_.isNil(loContractXML) ? loContractXML.find("//Item") : [];
let liContractName = (liList.length > 0 && liList[0].attr("objectClass")) ? liList[0].attr("objectClass").value() : null;
let liContractName = (liList.length > 0 && liList[0].getAttribute("objectClass")) ? liList[0].getAttribute("objectClass").value() : null;
if (liContractName) {

@@ -178,3 +178,3 @@ let liContract = parsedContractsCache[nameToContractPath[liContractName]];

let visibleProperty = _.filter(liPropertyList, (property) => {
return !_.isNil(property.attr("name")) && property.attr("name").value() === visibilityProperty;
return !_.isNil(property.getAttribute("name")) && property.getAttribute("name").value() === visibilityProperty;
});

@@ -191,3 +191,3 @@ if (visibleProperty.length > 0) {

_.forEach(advanceSearchControl, (list) => {
let dataSource = list.attr("dataSource") ? list.attr("dataSource").value().replace('ProcessContext::', '').replace('.items[]', '') : null;
let dataSource = list.getAttribute("dataSource") ? list.getAttribute("dataSource").value().replace('ProcessContext::', '').replace('.items[]', '') : null;
if (!dataSource) {

@@ -197,6 +197,6 @@ return;

let asoDeclarations = _.filter(declarations, (dec) => {
return !_.isNil(dec.attr("name")) && dec.attr("name").value() === dataSource;
return !_.isNil(dec.getAttribute("name")) && dec.getAttribute("name").value() === dataSource;
});
let loContractName = !_.isNil(asoDeclarations[0]) && asoDeclarations[0].attr("type") ? asoDeclarations[0].attr("type").value() : null;
let loContractName = !_.isNil(asoDeclarations[0]) && asoDeclarations[0].getAttribute("type") ? asoDeclarations[0].getAttribute("type").value() : null;
if(loContractName)

@@ -218,4 +218,4 @@ {

_.forEach(prevNextGroupedLists, (list) => {
let dataSource = list.attr("dataSource") ? list.attr("dataSource").value().replace('ProcessContext::', '') : null;
let numberFieldDefaultProperty = list.attr("numberpadDefaultField") ? list.attr("numberpadDefaultField").value() : null;
let dataSource = list.getAttribute("dataSource") ? list.getAttribute("dataSource").value().replace('ProcessContext::', '') : null;
let numberFieldDefaultProperty = list.getAttribute("numberpadDefaultField") ? list.getAttribute("numberpadDefaultField").value() : null;
if (!numberFieldDefaultProperty || !dataSource) {

@@ -225,7 +225,7 @@ return;

let prevNextDeclarations = _.filter(declarations, (dec) => {
return !_.isNil(dec.attr("name")) && dec.attr("name").value() === dataSource;
return !_.isNil(dec.getAttribute("name")) && dec.getAttribute("name").value() === dataSource;
});
let loContractName = !_.isNil(prevNextDeclarations[0]) && prevNextDeclarations[0].attr("type") ? prevNextDeclarations[0].attr("type").value() : null;
let loContractName = !_.isNil(prevNextDeclarations[0]) && prevNextDeclarations[0].getAttribute("type") ? prevNextDeclarations[0].getAttribute("type").value() : null;
if (loContractName) {

@@ -235,3 +235,3 @@ let loContract = parsedContractsCache[nameToContractPath[loContractName]];

let liList = !_.isNil(loContractXML) ? loContractXML.find("//Item") : [];
let liContractName = (liList.length > 0 && liList[0].attr("objectClass")) ? liList[0].attr("objectClass").value() : null;
let liContractName = (liList.length > 0 && liList[0].getAttribute("objectClass")) ? liList[0].getAttribute("objectClass").value() : null;
if (liContractName) {

@@ -242,3 +242,3 @@ let liContract = parsedContractsCache[nameToContractPath[liContractName]];

let defaultProperty = _.filter(liPropertyList, (property) => {
return !_.isNil(property.attr("name")) && property.attr("name").value() === numberFieldDefaultProperty;
return !_.isNil(property.getAttribute("name")) && property.getAttribute("name").value() === numberFieldDefaultProperty;
});

@@ -257,3 +257,3 @@ if (defaultProperty.length > 0) {

_.forEach(dropdownControls, (dropdown) => {
let dataSource = dropdown.attr("dataSource") ? dropdown.attr("dataSource").value().replace('ProcessContext::', '').replace('.items[]', '').replace('.Items[]', '') : null;
let dataSource = dropdown.getAttribute("dataSource") ? dropdown.getAttribute("dataSource").value().replace('ProcessContext::', '').replace('.items[]', '').replace('.Items[]', '') : null;
if (!dataSource) {

@@ -265,5 +265,5 @@ return;

let Declarations = _.filter(declarations.concat(parameters), (dec) => {
return !_.isNil(dec.attr("name")) && dec.attr("name").value() === dataSource;
return !_.isNil(dec.getAttribute("name")) && dec.getAttribute("name").value() === dataSource;
});
let objectContractName = !_.isNil(Declarations[0]) && Declarations[0].attr("type") ? Declarations[0].attr("type").value() : null;
let objectContractName = !_.isNil(Declarations[0]) && Declarations[0].getAttribute("type") ? Declarations[0].getAttribute("type").value() : null;
while(dataSourceParts.length > 0 && !_.isNil(objectContractName)){

@@ -276,3 +276,3 @@ let nextPart = dataSourceParts.shift();

let property = propertyArray[0];
objectContractName = !_.isNil(property) && !_.isNil(property.attr("objectClass")) ? property.attr("objectClass").value() : null;
objectContractName = !_.isNil(property) && !_.isNil(property.getAttribute("objectClass")) ? property.getAttribute("objectClass").value() : null;
}else{

@@ -288,3 +288,3 @@ objectContractName = null;

let lo = los[0];
if(_.isNil(lo.attr("paging")) || lo.attr("paging").value() !== "false"){
if(_.isNil(lo.getAttribute("paging")) || lo.getAttribute("paging").value() !== "false"){
processDependencies.push({

@@ -325,3 +325,3 @@ isMissing: {

_.forEach(_.concat(loadActions, createActions), (action) =>{
let type = action.attr('type');
let type = action.getAttribute('type');
if (!_.isNil(type)) {

@@ -343,6 +343,6 @@ let typeValue = type.value();

if (processAction.name()==='WizardProcess') {
type = processAction.attr('name');
type = processAction.getAttribute('name');
}
else {
type = processAction.attr('process');
type = processAction.getAttribute('process');
}

@@ -375,3 +375,3 @@

_.forEach(tags, (tag) => {
let type = tag.attr('type');
let type = tag.getAttribute('type');
if (!_.isNil(type)) {

@@ -378,0 +378,0 @@ let typeValue = type.value();

@@ -18,3 +18,3 @@ /*

_.forEach(referencedUiPlugins, uiPlugin => {
let pluginName = uiPlugin.attr('uiPlugin');
let pluginName = uiPlugin.getAttribute('uiPlugin');
if (!_.isNil(pluginName)) {

@@ -21,0 +21,0 @@ let uiPluginV2Dependency = nameToContractPath[pluginName.value()];

@@ -16,3 +16,3 @@ /*

_.forEach(referencedLibraries, library => {
let nameAttribute = library.attr('name');
let nameAttribute = library.getAttribute('name');
if (!_.isNil(nameAttribute)) {

@@ -19,0 +19,0 @@ let datasourceDependency = nameToContractPath[nameAttribute.value()];

@@ -106,3 +106,3 @@ /*

const nameAttr = xml.root()?.attr(NAME_TAG);
const nameAttr = xml.root()?.getAttribute(NAME_TAG);
checkNameAttr(nameAttr?.value(), nameAttr?.line(), validationResult, category);

@@ -109,0 +109,0 @@

@@ -118,3 +118,3 @@ /*

paramTags[0] && paramTags[0].source[0].number + 1,
SEVERITY.WARN
SEVERITY.ERROR
)

@@ -121,0 +121,0 @@ );

@@ -318,3 +318,3 @@ /*

const validationResults = [];
const coreFileName = `${root?.attr("businessObjectClass")?.value()}.${_.upperFirst(root?.attr("methodName")?.value())}.xml`;
const coreFileName = `${root?.getAttribute("businessObjectClass")?.value()}.${_.upperFirst(root?.getAttribute("methodName")?.value())}.xml`;
if (fileName !== coreFileName) {

@@ -359,3 +359,3 @@ validationResults.push(validatorUtil.buildValidationMessage(3112633,

let isAsync = false;
let async = root.attr('asynchronous');
let async = root.getAttribute('asynchronous');
if(!_.isNil(async))

@@ -362,0 +362,0 @@ {

@@ -27,4 +27,4 @@ /*

let eventName, eventHandler;
if(!_.isNil(cNode.attr('name'))) {
eventName = cNode.attr('name').value();
if(!_.isNil(cNode.getAttribute('name'))) {
eventName = cNode.getAttribute('name').value();

@@ -36,4 +36,4 @@ if (!(eventName === 'listItemChanged' || eventName === 'listItemChangedBatch')) {

}
if(!_.isNil(cNode.attr('eventHandler'))) {
eventHandler = cNode.attr('eventHandler').value();
if(!_.isNil(cNode.getAttribute('eventHandler'))) {
eventHandler = cNode.getAttribute('eventHandler').value();

@@ -70,4 +70,4 @@ if(!methodsArray || _.indexOf(methodsArray, eventHandler) === -1){

function checkSimplePropertie(node, validationResults){
if(!_.isNil(node.attr('type'))) {
let type = node.attr('type').value();
if(!_.isNil(node.getAttribute('type'))) {
let type = node.getAttribute('type').value();

@@ -81,4 +81,4 @@ if(_.startsWith(type, "__")){

function checkIllegalBlobTable(node, validationResults){
if(!_.isNil(node.attr('type'))) {
let blobTable = node.attr('blobTable');
if(!_.isNil(node.getAttribute('type'))) {
let blobTable = node.getAttribute('blobTable');

@@ -156,3 +156,3 @@ if(!_.isNil(blobTable) && _.endsWith(blobTable.value(), "_T")){

const nameAttr = xml.root()?.attr(NAME_TAG);
const nameAttr = xml.root()?.getAttribute(NAME_TAG);
checkNameAttr(nameAttr?.value(), nameAttr?.line(), validationResult, category);

@@ -162,3 +162,3 @@

let methodsArray = _.map(methodsNodes, function(element /* , idx */) {
return element.attr("name").value();
return element.getAttribute("name").value();
});

@@ -165,0 +165,0 @@ traverseAndValidateNodes(xml.root(), validationResult, methodsArray);

@@ -23,4 +23,4 @@ /*

_.forEach(elements, function(node){
if(!_.isNil(node.attr(attributeName1)) && node.attr(attributeName1).value() === value1
&& !_.isNil(node.attr(attributeName2)) && node.attr(attributeName2).value() === value2){
if(!_.isNil(node.getAttribute(attributeName1)) && node.getAttribute(attributeName1).value() === value1
&& !_.isNil(node.getAttribute(attributeName2)) && node.getAttribute(attributeName2).value() === value2){
lineNo = node.line();

@@ -32,3 +32,3 @@ return false;

_.forEach(elements, function(node){
if(!_.isNil(node.attr(attributeName1)) && node.attr(attributeName1).value() === value1){
if(!_.isNil(node.getAttribute(attributeName1)) && node.getAttribute(attributeName1).value() === value1){
lineNo = node.line();

@@ -46,4 +46,4 @@ return false;

function dataSource_ValidateAttachmentsSF(datasourceElement, validationResults) {
if(datasourceElement.attr("editableEntity").value() === "SF_File"){
let dsIsReadOnly = !_.isNil(datasourceElement.attr("readOnly")) && datasourceElement.attr("readOnly").value().toLowerCase() === "true" ? true : false;
if(datasourceElement.getAttribute("editableEntity").value() === "SF_File"){
let dsIsReadOnly = !_.isNil(datasourceElement.getAttribute("readOnly")) && datasourceElement.getAttribute("readOnly").value().toLowerCase() === "true" ? true : false;

@@ -59,4 +59,4 @@ //SF_File validations are not applicable if a data source is read only

if (!_.isNil(datasourceElement.attr("linkedEntityAttributeName"))) {
linkedEntityAttributeName = datasourceElement.attr("linkedEntityAttributeName").value();
if (!_.isNil(datasourceElement.getAttribute("linkedEntityAttributeName"))) {
linkedEntityAttributeName = datasourceElement.getAttribute("linkedEntityAttributeName").value();
} else {

@@ -147,3 +147,3 @@ validationResults.push(validatorUtil.buildValidationMessage(34,

function dataSource_ValidateExternalDS(datasourceElement, validationResults) {
let parameterized = !_.isNil(datasourceElement.attr("schemaVersion")) && datasourceElement.attr("schemaVersion").value() === "2.0";
let parameterized = !_.isNil(datasourceElement.getAttribute("schemaVersion")) && datasourceElement.getAttribute("schemaVersion").value() === "2.0";

@@ -218,6 +218,6 @@ let databaseNodes = datasourceElement.find("./Database");

let checkString = value.toString();
let paramName = "#" + value.attr("name").value().toString() + "#";
let paramName = "#" + value.getAttribute("name").value().toString() + "#";
if(fwMakros.includes(paramName.toLowerCase())){
validationResults.push(validatorUtil.buildValidationMessage(166,
"Not supported parameter name '" + value.attr("name").value().toString() + "' found in Parameter " + checkString,
"Not supported parameter name '" + value.getAttribute("name").value().toString() + "' found in Parameter " + checkString,
value.line(), SEVERITY.ERROR));

@@ -227,3 +227,3 @@ }

if(!_.isNil(datasourceElement.attr("schemaVersion")) && datasourceElement.attr("schemaVersion").value() === "2.0"){
if(!_.isNil(datasourceElement.getAttribute("schemaVersion")) && datasourceElement.getAttribute("schemaVersion").value() === "2.0"){
let dataSourceString = datasourceElement.toString();

@@ -234,5 +234,5 @@ let makros = _.uniq(_.pullAllWith(dataSourceString.match(/#[\w_]+#/g), fwMakros, function(s1, s2){return s1.toLowerCase() === s2.toLowerCase();}));

_.forEach(parameters, function(param){
paramMakros.push("#" + param.attr("name").value() + "#");
if(_.isNil(param.attr("treatAs")) || param.attr("treatAs").value() !== "sqlSnippet" ){
if(_.isNil(param.attr("type"))){
paramMakros.push("#" + param.getAttribute("name").value() + "#");
if(_.isNil(param.getAttribute("treatAs")) || param.getAttribute("treatAs").value() !== "sqlSnippet" ){
if(_.isNil(param.getAttribute("type"))){
validationResults.push(validatorUtil.buildValidationMessage(50,

@@ -242,3 +242,3 @@ "Attribute 'type' is missing for parameter " + param.toString(),

}else{
if(!paramTypes.includes(param.attr("type").value())){
if(!paramTypes.includes(param.getAttribute("type").value())){
validationResults.push(validatorUtil.buildValidationMessage(51,

@@ -266,3 +266,3 @@ "Not supported value of attribute 'type' in parameter " + param.toString(),

function dataSource_lowercaseS_Validate(datasourceElement, validationResults){
if(_.isNil(datasourceElement.attr("external"))){
if(_.isNil(datasourceElement.getAttribute("external"))){
validationResults.push(validatorUtil.buildValidationMessage(3112527,

@@ -275,4 +275,4 @@ "This datasource is missing the 'external' attribute. If this attribute is missing some features might not work.",

function dataSource_Validate(datasourceElement, validationResults) {
if(!_.isNil(datasourceElement.attr("external")) && datasourceElement.attr("external").value().toLowerCase() === "false"){
if(!_.isNil(datasourceElement.attr("backendSystem")) && datasourceElement.attr("backendSystem").value() === "sf"){
if(!_.isNil(datasourceElement.getAttribute("external")) && datasourceElement.getAttribute("external").value().toLowerCase() === "false"){
if(!_.isNil(datasourceElement.getAttribute("backendSystem")) && datasourceElement.getAttribute("backendSystem").value() === "sf"){
dataSource_ValidateAttachmentsSF(datasourceElement, validationResults);

@@ -282,3 +282,3 @@ }

}else{
if(_.isNil(datasourceElement.attr("external"))){
if(_.isNil(datasourceElement.getAttribute("external"))){
validationResults.push(validatorUtil.buildValidationMessage(3112528,

@@ -293,3 +293,3 @@ "This datasource is missing the 'external' attribute. If this attribute is missing some features might not work.",

function dataSource_Validate_ObjectClass(datasourceElement, validationResults) {
if(_.isNil(datasourceElement.attr("businessObjectClass")) && _.isNil(datasourceElement.attr("objectClass"))){
if(_.isNil(datasourceElement.getAttribute("businessObjectClass")) && _.isNil(datasourceElement.getAttribute("objectClass"))){
validationResults.push(validatorUtil.buildValidationMessage(97,

@@ -303,3 +303,3 @@ "Attribute 'businessObjectClass' is missing",

let topLevelNodeTags = datasourceElement.find("./" + nodeName);
let configurations = _.map(topLevelNodeTags, node => ({config: _.isNil(node.attr("applicableTo")) ? "default" : node.attr("applicableTo").value(), node: node}));
let configurations = _.map(topLevelNodeTags, node => ({config: _.isNil(node.getAttribute("applicableTo")) ? "default" : node.getAttribute("applicableTo").value(), node: node}));
let groupedConfigurations = _.groupBy(configurations, "config");

@@ -306,0 +306,0 @@ let isClassicDefined = _.has(groupedConfigurations, "classic");

@@ -17,3 +17,3 @@ /*

function domain_Validate(domainElement, validationResults) {
if(_.isNil(domainElement.attr("length")) || domainElement.attr("length").value() === ""){
if(_.isNil(domainElement.getAttribute("length")) || domainElement.getAttribute("length").value() === ""){
validationResults.push(validatorUtil.buildValidationMessage(98,

@@ -23,3 +23,3 @@ "Input validation can not be performed for types which do not define a length.",

}
if(_.isNil(domainElement.attr("baseType")) || domainElement.attr("baseType").value() === ""){
if(_.isNil(domainElement.getAttribute("baseType")) || domainElement.getAttribute("baseType").value() === ""){
validationResults.push(validatorUtil.buildValidationMessage(160,

@@ -29,3 +29,3 @@ "Input validation can not be performed for types which do not define a baseType.",

}
if(_.isNil(domainElement.attr("name")) || domainElement.attr("name").value() === "" || _.startsWith(domainElement.attr("name").value(), "__")){
if(_.isNil(domainElement.getAttribute("name")) || domainElement.getAttribute("name").value() === "" || _.startsWith(domainElement.getAttribute("name").value(), "__")){
validationResults.push(validatorUtil.buildValidationMessage(3112529,

@@ -41,3 +41,3 @@ "Invalid domain name.",

if(cNode.name() === "Default") {
if(_.isNil(cNode.attr("value")) && _.isNil(cNode.attr("nullable"))) {
if(_.isNil(cNode.getAttribute("value")) && _.isNil(cNode.getAttribute("nullable"))) {
validationResults.push(validatorUtil.buildValidationMessage(167,

@@ -44,0 +44,0 @@ "Default tag should contain either value or nullable attribute.",

@@ -57,2 +57,12 @@ /*

if(/^(My)?PrintFont_\w+$/i.test(externalFileName)){
const printFontFileFound = _.some(files, file => file.fileType === "js" && file.fileName.toLowerCase() === "printfont" );
if(files.length > 1 || !printFontFileFound || ! licenseFileFound){
validationResults.push(validatorUtil.buildValidationMessage(3112694,
"PrintFont library '" + externalFileName + "' can only contain two files (PrintFont.js and LICENSE.txt).",
validatorUtil.UNKNOWN_LINE_NUMBER, SEVERITY.ERROR)
);
}
}
if(files.length !== _.uniqBy(files, item => (/^.*[.-]min$/i.test(item.fileName) ? item.fileName.slice(0,-4) : item.fileName) + item.fileType).length){

@@ -117,3 +127,3 @@ validationResults.push(validatorUtil.buildValidationMessage(56,

const nameAttr = xml.root()?.attr(NAME_TAG);
const nameAttr = xml.root()?.getAttribute(NAME_TAG);
checkNameAttr(nameAttr?.value(), nameAttr?.line(), validationResults, category);

@@ -120,0 +130,0 @@

@@ -140,3 +140,3 @@ /*

const idAttr = xml.root()?.attr('id');
const idAttr = xml.root()?.getAttribute('id');
checkIdAttr(idAttr?.value(), idAttr?.line(), validationResult, category);

@@ -143,0 +143,0 @@

@@ -16,4 +16,4 @@ /*

function checkSimpleProperty(node, validationResults){
if(!_.isNil(node.attr('type'))) {
let type = node.attr('type').value();
if(!_.isNil(node.getAttribute('type'))) {
let type = node.getAttribute('type').value();

@@ -27,4 +27,4 @@ if(_.startsWith(type, "__")){

function checkIllegalBlobTable(node, validationResults){
if(!_.isNil(node.attr('type'))) {
let blobTable = node.attr('blobTable');
if(!_.isNil(node.getAttribute('type'))) {
let blobTable = node.getAttribute('blobTable');

@@ -99,3 +99,3 @@ if(!_.isNil(blobTable) && _.endsWith(blobTable.value(), "_T")){

const nameAttr = xml.root()?.attr(NAME_TAG);
const nameAttr = xml.root()?.getAttribute(NAME_TAG);
checkNameAttr(nameAttr?.value(), nameAttr?.line(), validationResult, category);

@@ -102,0 +102,0 @@

@@ -30,3 +30,3 @@ /*

if(cNode.name() === "AdvancedSearchAttribute" &&
!_.isNil(cNode.attr("type")) && cNode.attr("type").value().toUpperCase() === "DISTANCE") {
!_.isNil(cNode.getAttribute("type")) && cNode.getAttribute("type").value().toUpperCase() === "DISTANCE") {
numDistanceNodes ++;

@@ -41,5 +41,5 @@ }

function validateAdvancedSearchAttribute(node, result) {
if(!_.isNil(node.attr("type")) && node.attr("type").value().toUpperCase() === "DISTANCE"){
let latAttrValue = !_.isNil(node.attr("latitudeProperty")) ? node.attr("latitudeProperty").value() : null;
let lngAttrValue = !_.isNil(node.attr("longitudeProperty")) ? node.attr("longitudeProperty").value() : null;
if(!_.isNil(node.getAttribute("type")) && node.getAttribute("type").value().toUpperCase() === "DISTANCE"){
let latAttrValue = !_.isNil(node.getAttribute("latitudeProperty")) ? node.getAttribute("latitudeProperty").value() : null;
let lngAttrValue = !_.isNil(node.getAttribute("longitudeProperty")) ? node.getAttribute("longitudeProperty").value() : null;
if (_.isEmpty(latAttrValue) || _.isEmpty(lngAttrValue)) {

@@ -52,3 +52,3 @@ result.push(validatorUtil.buildValidationMessage(199,

if (_.isNil(node.attr("type"))){
if (_.isNil(node.getAttribute("type"))){
result.push(validatorUtil.buildValidationMessage(6988,

@@ -58,3 +58,3 @@ "Type is mandatory for AdvancedSearchAttribute.",

} else {
let type = node.attr("type").value();
let type = node.getAttribute("type").value();
let acceptedTypes = ["boolean", "date", "distance", "lookup", "number", "selection", "text", "time"];

@@ -67,3 +67,3 @@ if (acceptedTypes.indexOf(type.toLowerCase()) === -1){

if (type.toLowerCase() === "distance") {
if (!_.isNil(node.attr("defaultOperator"))) {
if (!_.isNil(node.getAttribute("defaultOperator"))) {
result.push(validatorUtil.buildValidationMessage(6999,

@@ -145,3 +145,3 @@ "Invalid attribute defaultOperator found for AdvancedSearchAttribute Distance.",

const nameAttr = xml.root()?.attr(NAME_TAG);
const nameAttr = xml.root()?.getAttribute(NAME_TAG);
checkNameAttr(nameAttr?.value(), nameAttr?.line(), validationResult, category);

@@ -148,0 +148,0 @@

@@ -27,4 +27,4 @@ /*

const root = xml.find("/Locale")[0];
const language = root.attr("language") && root.attr("language").value().toLowerCase() || '';
const languageCode = root.attr("languageCode") && root.attr("languageCode").value().toLowerCase() || '';
const language = root.getAttribute("language") && root.getAttribute("language").value().toLowerCase() || '';
const languageCode = root.getAttribute("languageCode") && root.getAttribute("languageCode").value().toLowerCase() || '';
const locale = `${language}_${languageCode}`;

@@ -31,0 +31,0 @@ // In case the locale code were already stored we include a validation error

@@ -17,4 +17,4 @@ /*

function checkSimpleProperty(node, validationResults) {
if (!_.isNil(node.attr('type'))) {
let type = node.attr('type').value();
if (!_.isNil(node.getAttribute('type'))) {
let type = node.getAttribute('type').value();

@@ -28,5 +28,5 @@ if (_.startsWith(type, "__")) {

function checkBlobTable(node, validationResults) {
if (!_.isNil(node.attr('type'))) {
let blobTable = node.attr('blobTable');
let blobPKeyField = node.attr('blobPKeyField');
if (!_.isNil(node.getAttribute('type'))) {
let blobTable = node.getAttribute('blobTable');
let blobPKeyField = node.getAttribute('blobPKeyField');

@@ -126,3 +126,3 @@ if((!_.isNil(blobTable) && _.isNil(blobPKeyField)) || (_.isNil(blobTable) && !_.isNil(blobPKeyField))) {

const nameAttr = xml.root()?.attr(NAME_TAG);
const nameAttr = xml.root()?.getAttribute(NAME_TAG);
checkNameAttr(nameAttr?.value(), nameAttr?.line(), validationResult, category);

@@ -132,3 +132,3 @@

const methodsArray = _.map(methodsNodes, function (element) {
return element.attr(NAME_TAG).value();
return element.getAttribute(NAME_TAG).value();
});

@@ -135,0 +135,0 @@

@@ -74,3 +74,3 @@ /*

const nameAttr = xml.root()?.attr(NAME_TAG);
const nameAttr = xml.root()?.getAttribute(NAME_TAG);
checkNameAttr(nameAttr?.value(), nameAttr?.line(), validationResult, category);

@@ -77,0 +77,0 @@ checkModifiedCoreContract(validationResult, category);

@@ -13,3 +13,3 @@ /*

let validatorUtil = require('../validatorUtil');
const { SEVERITY, PROCESS_FLOW, FILE_NAME, CONTRACT_CATEGORY, CUSTOM_CONTRACT_INDICATOR, NAME_TAG} = require("../../globals");
const { SEVERITY, PROCESS_FLOW, FILE_NAME, CONTRACT_CATEGORY, CUSTOM_CONTRACT_INDICATOR, NAME_TAG, XSD_VERSION} = require("../../globals");

@@ -27,3 +27,3 @@

_.forEach(listOfEntryA, function(currentEntryAction/*, key*/){
let actionNameElem = currentEntryAction.attr('name');
let actionNameElem = currentEntryAction.getAttribute('name');
if(!_.isNil(actionNameElem))

@@ -41,3 +41,3 @@ {

_.forEach(ListOfActions, function(currentAction){
let actionNameElem = currentAction.attr('name');
let actionNameElem = currentAction.getAttribute('name');
if(!_.isNil(actionNameElem))

@@ -55,3 +55,3 @@ {

_.forEach(ListOfMDActions, function(currentAction){
let actionNameElem = currentAction.attr('name');
let actionNameElem = currentAction.getAttribute('name');
if(!_.isNil(actionNameElem))

@@ -82,3 +82,3 @@ {

if(!_.isNil(node)){
let nextActionAttribute = node.attr(attrName);
let nextActionAttribute = node.getAttribute(attrName);
if(!_.isNil(nextActionAttribute)) {

@@ -126,3 +126,3 @@ let nextActionName = nextActionAttribute.value();

//Action Type speficic validations
let actionType = current.attr('actionType').value().toUpperCase();
let actionType = current.getAttribute('actionType').value().toUpperCase();
let elements;

@@ -185,3 +185,3 @@ switch (actionType) {

_.forEach(childNodes, function(node/*, key*/){
let actionAttribute = node.attr('action');
let actionAttribute = node.getAttribute('action');
if(!_.isNil(actionAttribute)){

@@ -191,3 +191,3 @@ let actionName = actionAttribute.value();

let currentActionName = "undefined";
let an =current.attr('name');
let an =current.getAttribute('name');
if(!_.isNil(an)){

@@ -215,3 +215,3 @@ currentActionName = an.value();

if(!_.isNil(tto)){
let nextActionAttribute = tto.attr('action');
let nextActionAttribute = tto.getAttribute('action');
if(!_.isNil(nextActionAttribute)) {

@@ -221,3 +221,3 @@ let nextActionName = nextActionAttribute.value();

let currentActionName = "undefined";
let an =current.attr('name');
let an =current.getAttribute('name');
if(!_.isNil(an)){

@@ -239,6 +239,6 @@ currentActionName = an.value();

let decisionActions = xml.find("/Process/Body/Actions/Action[@actionType='DECISION']");
let processName = xml.find("/Process")[0].attr("name").value();
let processName = xml.find("/Process")[0].getAttribute("name").value();
_.forEach(decisionActions, function(current/*, key*/) {
let actionName = current.attr("name").value();
let actionName = current.getAttribute("name").value();
let caseElse = current.find("CaseElse");

@@ -326,3 +326,3 @@ let caseEmpty = current.find("CaseEmpty");

_.forEach(entryActions, function (current){
let actiontype = current.attr("actionType").value().toUpperCase();
let actiontype = current.getAttribute("actionType").value().toUpperCase();
if (!entryActionTypes.includes(actiontype)) {

@@ -336,3 +336,3 @@ validationResults.push(validatorUtil.buildValidationMessage(3112601,

_.forEach(bodyActions, function (current){
let actiontype = current.attr("actionType").value().toUpperCase();
let actiontype = current.getAttribute("actionType").value().toUpperCase();
if (!bodyActionTypes.includes(actiontype)) {

@@ -352,3 +352,3 @@ validationResults.push(validatorUtil.buildValidationMessage(3112602,

_.forEach(possibleAttributes, (attribute) => {
if (!_.isNil(tag.attr(attribute))){
if (!_.isNil(tag.getAttribute(attribute))){
attributes.push(attribute);

@@ -372,4 +372,4 @@ }

if (!_.isNil(action.attr("actionType"))) {
actionType = action.attr("actionType").value().toUpperCase();
if (!_.isNil(action.getAttribute("actionType"))) {
actionType = action.getAttribute("actionType").value().toUpperCase();
}

@@ -457,3 +457,3 @@ switch (actionType){

******************************************************************************/
module.exports.validateAsync = (content, xml, fileName, backend, contractPath, category) => {
module.exports.validateAsync = (content, xml, fileName, backend, contractPath, category, xsdv) => {
return new Promise(function (resolve/*, reject*/) {

@@ -463,3 +463,3 @@ let validationResult = [];

const nameAttr = xml.root()?.attr(NAME_TAG);
const nameAttr = xml.root()?.getAttribute(NAME_TAG);
checkNameAttr(nameAttr?.value(), nameAttr?.line(), validationResult, category);

@@ -480,5 +480,7 @@

tmpValidationResult = checkActionTypes(xml);
validationResult.push.apply(validationResult, tmpValidationResult);
if (xsdv === XSD_VERSION.LEGACY) {
tmpValidationResult = checkActionTypes(xml);
validationResult.push.apply(validationResult, tmpValidationResult);
}
tmpValidationResult = checkUniqueActionNames(xml);

@@ -485,0 +487,0 @@ validationResult.push.apply(validationResult, tmpValidationResult);

@@ -42,3 +42,3 @@ /*

let indexColumnNames = _.reduce(allIndexColumns, (result, col) => {
let name = col.attr(NAME_TAG);
let name = col.getAttribute(NAME_TAG);
if (!_.isNil(name)) {

@@ -52,3 +52,3 @@ result.push(name.value().toLowerCase());

validationResult.push(ValidatorUtil.buildValidationMessage(3112603,
`Index ${index.attr("name").value()} uses an invalid column name: ${idxColName}. Use a valid column name.`,
`Index ${index.getAttribute("name").value()} uses an invalid column name: ${idxColName}. Use a valid column name.`,
index.line(), SEVERITY.ERROR));

@@ -100,4 +100,4 @@ }

let columnsToCheck = _.reduce(allColumns, (result, columnInfo) => {
let nameAttr = columnInfo.attr(NAME_TAG);
let typeAttr = columnInfo.attr(DOMAIN_TAG);
let nameAttr = columnInfo.getAttribute(NAME_TAG);
let typeAttr = columnInfo.getAttribute(DOMAIN_TAG);
let name;

@@ -122,3 +122,3 @@ let type;

validationResult.push(ValidatorUtil.buildValidationMessage(172,
`The mandatory column definitions for ${xml.root().attr(NAME_TAG).value()} are missing. The column definitions for ${JSON.stringify(mandatoryColumns)} are required.`,
`The mandatory column definitions for ${xml.root().getAttribute(NAME_TAG).value()} are missing. The column definitions for ${JSON.stringify(mandatoryColumns)} are required.`,
ValidatorUtil.UNKNOWN_LINE_NUMBER, SEVERITY.WARN));

@@ -149,3 +149,3 @@ }

const nameAttr = xml.root()?.attr(NAME_TAG);
const nameAttr = xml.root()?.getAttribute(NAME_TAG);
checkNameAttr(nameAttr?.value(), nameAttr?.line(), validationResult, category);

@@ -152,0 +152,0 @@

@@ -34,3 +34,3 @@ /*

_.forEach(allLists, list => {
let idAttr = list.attr("id");
let idAttr = list.getAttribute("id");
let listId = "";

@@ -87,3 +87,3 @@

let definedEventNames = _.reduce(allEvents, (result, event) => {
let nameAttr = event.attr("name");
let nameAttr = event.getAttribute("name");
if (!_.isNil(nameAttr)) {

@@ -144,3 +144,3 @@ result.push(nameAttr.value());

let definedLabelIds = _.reduce(allLabels, (result, label) => {
let idAttr = label.attr("id");
let idAttr = label.getAttribute("id");
if (!_.isNil(idAttr)) {

@@ -270,3 +270,3 @@ result.push(idAttr.value());

const nameAttr = xml.root()?.attr(NAME_TAG);
const nameAttr = xml.root()?.getAttribute(NAME_TAG);
checkNameAttr(nameAttr?.value(), nameAttr?.line(), validationResult, category);

@@ -273,0 +273,0 @@

@@ -50,3 +50,3 @@ /*

const nameAttr = xml.root()?.attr(NAME_TAG);
const nameAttr = xml.root()?.getAttribute(NAME_TAG);
checkNameAttr(nameAttr?.value(), nameAttr?.line(), validationResult, category);

@@ -53,0 +53,0 @@

@@ -15,3 +15,3 @@ /*

let path = require('path');
const { BUSINESS_LOGIC_JS, DOMAIN_REPOSITORY, NEW_BL_LOGIC_FILE_ENDING, NAME_TAG, IMAGE, ID_TAG, DATASOURCE} = require("../globals");
const { BUSINESS_LOGIC_JS, DOMAIN_REPOSITORY, NEW_BL_LOGIC_FILE_ENDING, NAME_TAG, IMAGE, ID_TAG, DATASOURCE, XSD_VERSION} = require("../globals");
const validatorUtil = require("./validatorUtil");

@@ -32,3 +32,4 @@ const jsDocHelper = require('../jsDocHelper');

function ValidatorBase() {
function ValidatorBase(xsdvp) {
// global is the global labels locale contract, object means an OER mapping, plugin means an engine side plugin e.g. complex pricing

@@ -61,2 +62,10 @@ let xsdMapping = {

// determine xsd version
this.xsdVersion = (!_.isNil(xsdvp) && xsdvp === XSD_VERSION.LATEST) ? XSD_VERSION.LATEST : XSD_VERSION.LEGACY;
// override xsd mapping based on xsd version
if (this.xsdVersion === XSD_VERSION.LATEST) {
xsdMapping["process"] = "latest/ProcessFlow.xsd";
xsdMapping["uidescription"] = "latest/uidescription.xsd";
}
// mapping of contract type -> code based validator to execute

@@ -149,3 +158,5 @@ let codeBasedValidatorMapping = {

let xml = libxml.parseXmlString(content);
// libxml.parseXml file size limit increased to support custom printfonts greater than 10 MB
// parser option {flags: [524288]} has the same effect as {huge: true}, allowing for larger xml files to be processed (see https://github.com/libxmljs/libxmljs/issues/647)
let xml = libxml.parseXml(content, {flags: [524288]});
return xml;

@@ -235,9 +246,9 @@

let validateCodeBasedAsync = (content, xml, type, backend, fileName, contractPath, category) => {
let validateCodeBasedAsync = (content, xml, type, backend, fileName, contractPath, category, xsdv) => {
return new Promise(function (resolve, reject) {
let codeBasedValidators = codeBasedValidatorMapping[type];
let codeBasedValidators = codeBasedValidatorMapping[type];
if (!_.isNil(codeBasedValidators)) {
let validatePromises = [];
codeBasedValidators.map(val => {
validatePromises.push(val.validateAsync(content, xml, fileName, backend, contractPath, category));
validatePromises.push(val.validateAsync(content, xml, fileName, backend, contractPath, category, xsdv));
});

@@ -322,3 +333,3 @@

case "listitem":
contractName = rootNode.attr("name").value();
contractName = rootNode.getAttribute("name").value();
break;

@@ -334,3 +345,3 @@ case "businesslogic": {

case "temptable":
contractName = rootNode.attr("name").value();
contractName = rootNode.getAttribute("name").value();
break;

@@ -340,3 +351,3 @@ case "uidescription":

case "externalfile": {
let nameAttribute = rootNode.attr("name");
let nameAttribute = rootNode.getAttribute("name");
if (!_.isNil(nameAttribute)) {

@@ -571,3 +582,3 @@ contractName = nameAttribute.value();

* @param {{result: String[]}} error error object containing contractPath and result array to which errors can be added
* @returns {Object} object with the validation parameters { xml, type, tmpResult, content, category }
* @returns {Object} object with the validation parameters { xml, type, tmpResult, content, category, xsdv }
*/

@@ -603,3 +614,3 @@ this.getValidationParams = (contractPath, useCachedContract, manifest, fromPath, error) => {

const category = this.categorizeContract(contractPath, content, manifest?.[fingerprintsKeyName], fromPath);
return { xml, type, tmpResult, content, category };
return { xml, type, tmpResult, content, category, xsdv: this.xsdVersion };
};

@@ -632,3 +643,3 @@

const nameTag = type === IMAGE.FILETYPE ? ID_TAG : NAME_TAG;
const contractNameAttr = xml?.root()?.attr(nameTag);
const contractNameAttr = xml?.root()?.getAttribute(nameTag);
contractName = contractNameAttr?.value();

@@ -658,5 +669,5 @@ line = contractNameAttr?.line();

const executeCodeBasedValidation = (validationParams) => {
const { result, content, xml, type, category } = validationParams;
const { result, content, xml, type, category, xsdv } = validationParams;
return new Promise((resolve, reject) => {
validateCodeBasedAsync(content, xml, type, backendSystem, fileName, contractPath, category).then((codeBasedValidationResult => {
validateCodeBasedAsync(content, xml, type, backendSystem, fileName, contractPath, category, xsdv).then((codeBasedValidationResult => {
// code based validation result is also a list.

@@ -684,3 +695,3 @@ result.push.apply(result, codeBasedValidationResult);

// Get the needed parameters to execute the validation
const { xml, type, tmpResult, content, category } = this.getValidationParams(contractPath, validateCrossContract, manifest, fromPath, error);
const { xml, type, tmpResult, content, category, xsdv } = this.getValidationParams(contractPath, validateCrossContract, manifest, fromPath, error);

@@ -697,7 +708,7 @@ this.validateDuplicateName(xml, type, content, contractPath, contractNameTypePathMap, error);

} else if (type === BUSINESS_LOGIC_JS.FILETYPE) {
return executeCodeBasedValidation({ result: [], content, xml, type, category });
return executeCodeBasedValidation({ result: [], content, xml, type, category, xsdv });
} else {
return validateSchemaAsync(xml, type).then((result) => {
// schemaValidationResult is either an empty list or has already first validation elements in the list.
return executeCodeBasedValidation({ result, content, xml, type, category });
return executeCodeBasedValidation({ result, content, xml, type, category, xsdv });
});

@@ -704,0 +715,0 @@ }

@@ -191,6 +191,6 @@ /*

_.forEach(nodeArray, node => {
if (_.isNil(node.attr("applicableTo"))) {
if (_.isNil(node.getAttribute("applicableTo"))) {
selectedNode = node;
} else {
if (node.attr("applicableTo").value() === configuration) {
if (node.getAttribute("applicableTo").value() === configuration) {
selectedNode = node;

@@ -254,3 +254,3 @@ return false;

let attrValues = _.reduce(xmlTags, (result, xmlTag) => {
let attrTag = xmlTag.attr(attribute);
let attrTag = xmlTag.getAttribute(attribute);
let lineNumber = xmlTag.line();

@@ -329,3 +329,3 @@ if (!_.isNil(attrTag)) {

tagAttributes = _.reduce(xmlTags, (result, xmlTag) => {
let tagAttribute = xmlTag.attr(attributeName);
let tagAttribute = xmlTag.getAttribute(attributeName);
if (!_.isNil(tagAttribute)) {

@@ -353,3 +353,3 @@ result.push({

tagAttributeValues = _.reduce(xmlTags, (result, xmlTag) => {
let tagAttribute = xmlTag.attr(attributeName);
let tagAttribute = xmlTag.getAttribute(attributeName);
if (!_.isNil(tagAttribute)) {

@@ -440,3 +440,3 @@ const value = toLowerCase ? tagAttribute.value().toLowerCase() : tagAttribute.value();

if(!_.isNil(contractXML) && !_.isNil(objectType) && !_.isNil(methodName) && !_.isNil(contractXML.get(objectType))) {
return this.concatenateTwoStringWithDot(contractXML.get(objectType).attr('name').value(), methodName);
return this.concatenateTwoStringWithDot(contractXML.get(objectType).getAttribute('name').value(), methodName);
}

@@ -446,4 +446,4 @@ };

this.getBLFileName = function (xmlRootNode) {
const businessObjectAttr = xmlRootNode.attr("businessObjectClass");
const methodNameAttr = xmlRootNode.attr("methodName");
const businessObjectAttr = xmlRootNode.getAttribute("businessObjectClass");
const methodNameAttr = xmlRootNode.getAttribute("methodName");

@@ -504,3 +504,3 @@ if (!_.isNil(businessObjectAttr) && !_.isNil(methodNameAttr)) {

let contractName = contractMetaInformation.xml.root().attr(NAME_TAG).value();
let contractName = contractMetaInformation.xml.root().getAttribute(NAME_TAG).value();
let contractType = contractMetaInformation.contractType;

@@ -540,3 +540,3 @@

let contractName = contractMetaInformation.xml.root().attr(NAME_TAG).value();
let contractName = contractMetaInformation.xml.root().getAttribute(NAME_TAG).value();
let contractType = contractMetaInformation.contractType;

@@ -564,3 +564,3 @@

const simplePropertyType = _.toLower(simplePropertyData.value);
const simplePropertyName = simplePropertyData.tag.attr(NAME_TAG).value();
const simplePropertyName = simplePropertyData.tag.getAttribute(NAME_TAG).value();

@@ -606,3 +606,3 @@ if (!allBaseTypes.includes(simplePropertyType)) {

// v2 DataSource external
let contractNameAttribute = rootNode?.attr("name");
let contractNameAttribute = rootNode?.getAttribute("name");
if (_.isNil(contractNameAttribute)) {

@@ -613,3 +613,3 @@ // datasources exist in 3 different flavours:

// external datasources
contractNameAttribute = rootNode?.attr("objectClass");
contractNameAttribute = rootNode?.getAttribute("objectClass");
if (!_.isNil(contractNameAttribute)) {

@@ -616,0 +616,0 @@ contractName = "Ds" + contractNameAttribute.value();

@@ -22,2 +22,3 @@ /*

const RESULT_FILE_NAME = "generatorValidationResult.json";
const {XSD_VERSION} = require('./globals');

@@ -28,3 +29,5 @@ /******************************************************************************

let args = process.argv.slice(2);
let settings = {};
let settings = {
xsdv: XSD_VERSION.LEGACY
};

@@ -133,3 +136,3 @@ process.send = process.send || function () {};

"--to=" + settings.to, "--handoverFile="+handoverJsonPath,
"--resultFile="+resultJsonPath, "--logs="+settings.logs], {"cwd": currentWorkingDir, "execArgv": execArgv});
"--resultFile="+resultJsonPath, "--logs="+settings.logs, '--xsdv='+settings.xsdv], {"cwd": currentWorkingDir, "execArgv": execArgv});
validatorProcess.on("exit", (code, signal) => {

@@ -136,0 +139,0 @@ console.log("Validation process ended with code: " + code + " and was ended by signal: " + signal);

Sorry, the diff of this file is too big to display

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