New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@men-mvc/foundation

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@men-mvc/foundation - npm Package Compare versions

Comparing version 0.98.0 to 0.99.0

5

lib/types/baseApplication.d.ts

@@ -1,2 +0,2 @@

import { Express } from 'express';
import { Express, Request } from 'express';
import EventEmitter from 'events';

@@ -8,3 +8,6 @@ export declare abstract class BaseApplication {

private static instance;
private currentRequest;
static init: <T extends BaseApplication>(application: T) => T;
setCurrentRequest: (currentRequest: Request) => void;
getCurrentRequest: () => Request;
static getInstance: () => BaseApplication;

@@ -11,0 +14,0 @@ setUp: () => Promise<void>;

@@ -13,2 +13,12 @@ "use strict";

this.app = app;
this.currentRequest = null;
this.setCurrentRequest = (currentRequest) => {
this.currentRequest = currentRequest;
};
this.getCurrentRequest = () => {
if (!this.currentRequest) {
throw new Error(`Request has not been initialised.`);
}
return this.currentRequest;
};
this.setUp = async () => {

@@ -15,0 +25,0 @@ this.initialiseEventEmitter();

2

lib/utilities/app.js

@@ -72,5 +72,5 @@ "use strict";

}
const req = types_1.BaseApplication.getInstance().app.request;
const req = types_1.BaseApplication.getInstance().getCurrentRequest();
return req.protocol + '://' + req.get('host');
};
exports.getAppBaseUrl = getAppBaseUrl;
{
"name": "@men-mvc/foundation",
"version": "0.98.0",
"version": "0.99.0",
"description": "Package that includes shared variables, types and utility functions for MEN MVC framework.",

@@ -30,3 +30,3 @@ "private": false,

"dependencies": {
"@men-mvc/config": "^0.98.0",
"@men-mvc/config": "^0.99.0",
"express": "^4.18.2",

@@ -53,3 +53,3 @@ "joi": "^17.9.1",

"license": "MIT",
"gitHead": "87993572bbfaceddaf50cd3f1b8e9adc68b51da5"
"gitHead": "a452a43cfc2d3dd67ea8d05171f972eddd1403af"
}
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