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
210
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.18 to 1.1.19

25

dist/data/entitySets/stickyEntitySet.js

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

async executeAction(actionDefinition, actionData, odataRequest, keys) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
const currentMockData = this.getMockData(odataRequest.tenantId);

@@ -85,20 +85,7 @@ keys = this.prepareKeys(keys);

// New
const newObject = Object.assign({}, actionData);
const nonNullableProperties = (_j = actionDefinition.returnEntityType) === null || _j === void 0 ? void 0 : _j.entityProperties.filter((prop) => prop.nullable === false);
nonNullableProperties === null || nonNullableProperties === void 0 ? void 0 : nonNullableProperties.forEach((nonNullableProperty) => {
if (newObject[nonNullableProperty.name] === undefined) {
switch (nonNullableProperty.type) {
case 'Edm.String':
case 'Edm.Guid':
newObject[nonNullableProperty.name] = (nonNullableProperty === null || nonNullableProperty === void 0 ? void 0 : nonNullableProperty.defaultValue) || '';
break;
default:
newObject[nonNullableProperty.name] = nonNullableProperty === null || nonNullableProperty === void 0 ? void 0 : nonNullableProperty.defaultValue;
break;
}
}
});
let newObject = currentMockData.getEmptyObject(odataRequest);
newObject = Object.assign(newObject, actionData);
this.setSessionObject(odataRequest.tenantId, newObject);
newObject.__transient = true;
odataRequest.setContext(`../$metadata#${(_k = this.entitySetDefinition) === null || _k === void 0 ? void 0 : _k.name}()/$entity`);
odataRequest.setContext(`../$metadata#${(_j = this.entitySetDefinition) === null || _j === void 0 ? void 0 : _j.name}()/$entity`);
this.addSessionToken(odataRequest);

@@ -109,3 +96,3 @@ this.resetSessionTimeout(odataRequest.tenantId);

}
case (_l = this.discardAction) === null || _l === void 0 ? void 0 : _l.fullyQualifiedName:
case (_k = this.discardAction) === null || _k === void 0 ? void 0 : _k.fullyQualifiedName:
// Discard

@@ -115,3 +102,3 @@ this.setSessionObject(odataRequest.tenantId, null);

break;
case `${(_q = (_p = (_o = (_m = this.entitySetDefinition) === null || _m === void 0 ? void 0 : _m.annotations) === null || _o === void 0 ? void 0 : _o.Session) === null || _p === void 0 ? void 0 : _p.StickySessionSupported) === null || _q === void 0 ? void 0 : _q.SaveAction}(${actionDefinition.sourceType})`: {
case `${(_p = (_o = (_m = (_l = this.entitySetDefinition) === null || _l === void 0 ? void 0 : _l.annotations) === null || _m === void 0 ? void 0 : _m.Session) === null || _o === void 0 ? void 0 : _o.StickySessionSupported) === null || _p === void 0 ? void 0 : _p.SaveAction}(${actionDefinition.sourceType})`: {
const newData = this.getSessionObject(odataRequest.tenantId);

@@ -118,0 +105,0 @@ if (newData.__keys) {

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

const retrievedData = await this.dataAccess.getData(this);
if (retrievedData === undefined) {
if (retrievedData === undefined || retrievedData === null) {
this.statusCode = 404;

@@ -266,0 +266,0 @@ this.setResponseData('');

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

@@ -5,0 +5,0 @@ "repository": {

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