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
0
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.4.12 to 1.4.13

28

dist/middleware.js

@@ -48,9 +48,9 @@ "use strict";

/**
* Encore single quote as string element so that they cna be matched as well.
* Encode single quotes and asterisks in the string.
*
* @param str
* @param str the string to encode
* @returns the encoded string
*/
function encode(str) {
return str.replace(/'/g, '%27');
return str.replaceAll("'", '%27').replaceAll('*', '%2A');
}

@@ -142,4 +142,11 @@ async function loadMetadata(service, metadataProcessor) {

const subRouter = new router_1.default();
subRouter.use(`${mockService.urlPath}`, oDataHandlerInstance);
subRouter.use(`${encode(mockService.urlPath)}`, oDataHandlerInstance);
try {
subRouter.use(mockService.urlPath, oDataHandlerInstance);
}
catch {
// Can happen if the URL contains asterisks. As the encoded path is registered below, this might not
// be a problem since clients usually call the encoded path.
log.error(`Could not register service path: ${mockService.urlPath}`);
}
subRouter.use(encode(mockService.urlPath), oDataHandlerInstance);
app.use(/^\/tenant-(\d{1,3})/, subRouter);

@@ -151,4 +158,11 @@ }

}
app.use(`${mockService.urlPath}`, oDataHandlerInstance);
app.use(`${encode(mockService.urlPath)}`, oDataHandlerInstance);
try {
app.use(mockService.urlPath, oDataHandlerInstance);
}
catch {
// Can happen if the URL contains asterisks. As the encoded path is registered below, this might not
// be a problem since clients usually call the encoded path.
log.error(`Could not register path: ${mockService.urlPath}`);
}
app.use(encode(mockService.urlPath), oDataHandlerInstance);
}

@@ -155,0 +169,0 @@ catch (e) {

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

@@ -28,4 +28,4 @@ "repository": {

"router": "2.0.0",
"@sap-ux/annotation-converter": "0.10.0",
"@sap-ux/edmx-parser": "0.9.0"
"@sap-ux/edmx-parser": "0.9.0",
"@sap-ux/annotation-converter": "0.10.0"
},

@@ -32,0 +32,0 @@ "devDependencies": {

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