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

@sap-ux/fe-mockserver-core

Package Overview
Dependencies
Maintainers
3
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-ux/fe-mockserver-core - npm Package Compare versions

Comparing version 1.1.85 to 1.1.86

18

dist/data/dataAccess.js

@@ -46,6 +46,10 @@ "use strict";

this.metadata.getEntitySets().forEach((entitySet) => {
this.getMockEntitySet(entitySet.name, this.generateMockData);
this.getMockEntitySet(entitySet.name, this.generateMockData).catch((error) => {
this.log.info(`Error while loading mockdata for entityset ${entitySet.name}: ${error}`);
});
});
this.metadata.getSingletons().forEach((entitySet) => {
this.getMockEntitySet(entitySet.name, this.generateMockData);
this.getMockEntitySet(entitySet.name, this.generateMockData).catch((error) => {
this.log.info(`Error while loading mockdata for singleton ${entitySet.name}: ${error}`);
});
});

@@ -73,7 +77,7 @@ }

this.log.info(`Creating draft entity for ${entitySet === null || entitySet === void 0 ? void 0 : entitySet.name}`);
mockEntitySet = new draftEntitySet_1.DraftMockEntitySet(this.mockDataRootFolder, entitySet || entityType, this, generateMockData);
mockEntitySet = new draftEntitySet_1.DraftMockEntitySet(this.mockDataRootFolder, entitySet, this, generateMockData);
}
else if (entitySet && this.metadata.isStickyEntity(entitySet)) {
this.log.info(`Creating sticky entity for ${entitySet === null || entitySet === void 0 ? void 0 : entitySet.name}`);
mockEntitySet = new stickyEntitySet_1.StickyMockEntitySet(this.mockDataRootFolder, entitySet || entityType, this, generateMockData);
mockEntitySet = new stickyEntitySet_1.StickyMockEntitySet(this.mockDataRootFolder, entitySet, this, generateMockData);
this.stickyEntitySets.push(mockEntitySet);

@@ -209,3 +213,3 @@ }

});
if (backNav && backNav.referentialConstraint && backNav.referentialConstraint.length > 0) {
if ((backNav === null || backNav === void 0 ? void 0 : backNav.referentialConstraint) && backNav.referentialConstraint.length > 0) {
backNav.referentialConstraint.forEach((refConstr) => {

@@ -418,4 +422,3 @@ if (originalData[refConstr.targetProperty] !== undefined) {

(Object.keys(currentKeys).length === 1 && currentKeys.hasOwnProperty('IsActiveEntity'));
if (navPropDetail &&
navPropDetail.referentialConstraint.length == 0 &&
if (navPropDetail.referentialConstraint.length == 0 &&
innerData.hasOwnProperty(queryPathPart.path) &&

@@ -753,3 +756,2 @@ (this.metadata.getVersion() === '2.0' || hasOnlyDraftKeyOrNoKeys)) {

}, this);
//await parentRequest.handleRequest();
data = await this.getData(parentRequest, true);

@@ -756,0 +758,0 @@ }

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

const { navPropEntity, subKeys } = await this.getNavigationPropertyDetails(navPropName, draftData, tenantId);
if (navPropEntity && navPropEntity.draftActivate) {
if (navPropEntity === null || navPropEntity === void 0 ? void 0 : navPropEntity.draftActivate) {
await navPropEntity.draftActivate(subKeys, tenantId, odataRequest);

@@ -157,3 +157,3 @@ }

const keys = this.getKeys(data);
super.performDELETE(keys, tenantId, odataRequest);
await super.performDELETE(keys, tenantId, odataRequest);
for (const navPropName in this.entitySetDefinition.navigationPropertyBinding) {

@@ -164,3 +164,3 @@ if (((_b = (_a = this.entitySetDefinition.navigationPropertyBinding[navPropName].annotations) === null || _a === void 0 ? void 0 : _a.Common) === null || _b === void 0 ? void 0 : _b.DraftNode) &&

const { navPropEntity, subKeys } = await this.getNavigationPropertyDetails(navPropName, data, tenantId);
if (navPropEntity && navPropEntity.draftDiscard) {
if (navPropEntity === null || navPropEntity === void 0 ? void 0 : navPropEntity.draftDiscard) {
await navPropEntity.draftDiscard(subKeys, tenantId, odataRequest);

@@ -238,5 +238,3 @@ }

const parentEntity = await this.dataAccess.getDraftRoot(keyValues, tenantId, this.entitySetDefinition);
if (parentEntity &&
parentEntity.DraftAdministrativeData !== null &&
parentEntity.DraftAdministrativeData !== undefined) {
if ((parentEntity === null || parentEntity === void 0 ? void 0 : parentEntity.DraftAdministrativeData) !== null && (parentEntity === null || parentEntity === void 0 ? void 0 : parentEntity.DraftAdministrativeData) !== undefined) {
parentEntity.DraftAdministrativeData.LastChangeDateTime = (0, common_1._getDateTimeOffset)(this.isV4());

@@ -247,3 +245,3 @@ }

const myDataToUpdate = this.performGET(keyValues, false, tenantId, odataRequest, true);
if (myDataToUpdate && myDataToUpdate.DraftAdministrativeData) {
if (myDataToUpdate === null || myDataToUpdate === void 0 ? void 0 : myDataToUpdate.DraftAdministrativeData) {
myDataToUpdate.DraftAdministrativeData.LastChangeDateTime = (0, common_1._getDateTimeOffset)(this.isV4());

@@ -258,5 +256,3 @@ }

const parentEntity = await this.dataAccess.getDraftRoot(keyValues, tenantId, this.entitySetDefinition);
if (parentEntity &&
parentEntity.DraftAdministrativeData !== null &&
parentEntity.DraftAdministrativeData !== undefined) {
if ((parentEntity === null || parentEntity === void 0 ? void 0 : parentEntity.DraftAdministrativeData) !== null && (parentEntity === null || parentEntity === void 0 ? void 0 : parentEntity.DraftAdministrativeData) !== undefined) {
parentEntity.DraftAdministrativeData.LastChangeDateTime = (0, common_1._getDateTimeOffset)(this.isV4());

@@ -293,5 +289,3 @@ }

const parentEntity = await this.dataAccess.getDraftRoot(keyValues, tenantId, this.entitySetDefinition);
if (parentEntity &&
parentEntity.DraftAdministrativeData !== null &&
parentEntity.DraftAdministrativeData !== undefined) {
if ((parentEntity === null || parentEntity === void 0 ? void 0 : parentEntity.DraftAdministrativeData) !== null && (parentEntity === null || parentEntity === void 0 ? void 0 : parentEntity.DraftAdministrativeData) !== undefined) {
parentEntity.DraftAdministrativeData.LastChangeDateTime = (0, common_1._getDateTimeOffset)(this.isV4());

@@ -308,3 +302,3 @@ }

const activeEquivalent = this.performGET(activeKeys, false, tenantId, odataRequest, true);
if (activeEquivalent && activeEquivalent.HasDraftEntity) {
if (activeEquivalent === null || activeEquivalent === void 0 ? void 0 : activeEquivalent.HasDraftEntity) {
activeEquivalent.HasDraftEntity = false;

@@ -311,0 +305,0 @@ }

{
"name": "@sap-ux/fe-mockserver-core",
"version": "1.1.85",
"version": "1.1.86",
"description": "SAP Fiori OData - Fiori elements mock server core",

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

"dependencies": {
"@sap-ux/annotation-converter": "0.6.11",
"@sap-ux/annotation-converter": "0.6.12",
"@sap-ux/edmx-parser": "0.5.14",

@@ -32,3 +32,3 @@ "@ui5/logger": "2.0.1",

"devDependencies": {
"@sap-ux/vocabularies-types": "0.7.4",
"@sap-ux/vocabularies-types": "0.7.5",
"@sap-ux/fe-mockserver-plugin-cds": "1.0.4",

@@ -35,0 +35,0 @@ "@types/body-parser": "1.19.2",

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

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