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

@mashroom/mashroom

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mashroom/mashroom - npm Package Compare versions

Comparing version 1.3.2 to 1.4.0

4

dist/logging/context/default_request_context.js

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

var _ip_utils = require("@mashroom/mashroom-utils/lib/ip_utils");
var _default = req => {
const clientIP = req.headers['x-forwarded-for'] || req.connection && req.connection.remoteAddress;
const clientIP = (0, _ip_utils.getClientIP)(req);
const ua = (0, _user_agent_utils.determineUserAgent)(req);

@@ -14,0 +16,0 @@ return {

@@ -11,2 +11,3 @@ "use strict";

<head>
<meta http-equiv="refresh" content="5">
<title>Mashroom Administration</title>

@@ -182,7 +183,7 @@ <style type="text/css">

<ul>
<li class="menu-item ${req.path === '/mashroom/admin' ? 'active' : ''}"><a href="/mashroom/admin">Overview</a></li>
<li class="menu-item ${req.path === '/mashroom/admin/plugins' ? 'active' : ''}"><a href="/mashroom/admin/plugins">Plugins</a></li>
<li class="menu-item ${req.path === '/mashroom/admin/middleware' ? 'active' : ''}"><a href="/mashroom/admin/middleware">Middleware</a></li>
<li class="menu-item ${req.path === '/mashroom/admin/services' ? 'active' : ''}"><a href="/mashroom/admin/services">Services</a></li>
<li class="menu-item ${req.path === '/mashroom/admin/webapps' ? 'active' : ''}"><a href="/mashroom/admin/webapps">Webapps</a></li>
<li class="menu-item ${req.path === '/' ? 'active' : ''}"><a href="/mashroom/admin">Overview</a></li>
<li class="menu-item ${req.path === '/plugins' ? 'active' : ''}"><a href="/mashroom/admin/plugins">Plugins</a></li>
<li class="menu-item ${req.path === '/middleware' ? 'active' : ''}"><a href="/mashroom/admin/middleware">Middleware</a></li>
<li class="menu-item ${req.path === '/services' ? 'active' : ''}"><a href="/mashroom/admin/services">Services</a></li>
<li class="menu-item ${req.path === '/webapps' ? 'active' : ''}"><a href="/mashroom/admin/webapps">Webapps</a></li>
<li class="menu-item external"><a href="/mashroom/docs" target="_blank">Documentation</a></li>

@@ -189,0 +190,0 @@ </ul>

@@ -7,3 +7,3 @@ {

"license": "MIT",
"version": "1.3.2",
"version": "1.4.0",
"main": "dist",

@@ -15,3 +15,3 @@ "files": [

"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
},

@@ -22,16 +22,16 @@ "bin": {

"dependencies": {
"@mashroom/mashroom-utils": "1.3.2",
"@mashroom/mashroom-utils": "1.4.0",
"chokidar": "^3.3.1",
"express": "^4.17.1",
"fs-extra": "^8.1.0",
"log4js": "^5.3.0",
"minimist": "^1.2.0",
"strip-ansi": "^5.2.0"
"fs-extra": "^9.0.0",
"log4js": "^6.1.2",
"minimist": "^1.2.5",
"strip-ansi": "^6.0.0"
},
"devDependencies": {
"@babel/cli": "^7.8.3",
"@types/express": "^4.17.1",
"@types/node": "^10.17.13",
"@babel/cli": "^7.8.4",
"@types/express": "^4.17.3",
"@types/node": "^10.17.17",
"eslint": "^6.8.0",
"jest": "^24.9.0"
"jest": "^25.1.0"
},

@@ -38,0 +38,0 @@ "jest": {

### Mashroom Server
# Mashroom Server
[Mashroom Server](https://www.mashroom-server.com) is a *Node.js* based **Integration Platform for Microfrontends**.
[Mashroom Server](https://www.mashroom-server.com) is a *Node.js* based **Integration Platform for Microfrontends**.
This package contains the core of _Mashroom Server_. It contains core services for managing plugins and default plugin loaders
for *Express* middleware, *Express* webapps and shared code as _services_. It also provides a common logging infrastructure.
From a technical point of view this is s a plugin loader that scans npm packages (_package.json_) for plugin definitions and loads them at runtime.
Such a plugin could be an *Express* webapp or a *SPA* or more generally all kind of code it knows how to load,
From a technical point of view this is s a plugin loader that scans npm packages (_package.json_) for plugin definitions and loads them at runtime.
Such a plugin could be an *Express* webapp or a *SPA* or more generally all kind of code it knows how to load,
which is determined by the available plugin loaders. Plugin loaders itself are also just plugins so it is possible to extend the list of known plugin types.
#### Usage
## Usage
The easiest way to start is to clone one of the quickstart repositories:
The easiest way to start is to clone one of the quickstart repositories:
* [mashroom-quickstart](https://github.com/nonblocking/mashroom-quickstart)

@@ -21,5 +21,5 @@ * [mashroom-portal-quickstart](https://github.com/nonblocking/mashroom-portal-quickstart)

#### Services
## Services
##### MashroomPluginService
### MashroomPluginService

@@ -55,6 +55,6 @@ Accessible through _pluginContext.services.core.pluginService_

onUnloadOnce(pluginName: string, listener: () => void): void;
}
}
```
##### MashroomMiddlewareStackService
### MashroomMiddlewareStackService

@@ -83,8 +83,8 @@ Accessible through _pluginContext.services.core.middlewareStackService_

getStack(): Array<{ pluginName: string, order: number }>;
}
}
```
#### Plugin Types
## Plugin Types
##### plugin-loader
### plugin-loader

@@ -97,3 +97,3 @@ A _plugin-loader_ plugin adds support for a custom plugin type.

{
"mashroom": {
"mashroom": {
"plugins": [

@@ -122,3 +122,3 @@ {

import type {
MashroomPluginLoader, MashroomPlugin, MashroomPluginConfig, MashroomPluginContext,
MashroomPluginLoader, MashroomPlugin, MashroomPluginConfig, MashroomPluginContext,
MashroomPluginLoaderPluginBootstrapFunction

@@ -154,3 +154,3 @@ } from 'mashroom/type-definitions';

##### web-app
### web-app

@@ -201,5 +201,5 @@ Registers a *Express* webapp that will be available at a given path.

* _upgradeHandler_: Handle HTTP Upgrades (e.g. upgrade to WebSocket)
Example:
Example:
```js

@@ -217,3 +217,3 @@ const bootstrap: MashroomWebAppPluginBootstrapFunction = async () => {

##### api
### api

@@ -266,3 +266,3 @@ Registers a *Express* _Router_ (a REST API) and makes it available at a given path.

##### middleware
### middleware

@@ -309,3 +309,3 @@ Registers a *Express* middleware and adds it to the global middleware stack.

##### static
### static

@@ -334,3 +334,3 @@ Registers some static resources and exposes it at a given path (via *Express* static).

##### services
### services

@@ -337,0 +337,0 @@ Used to load arbitrary shared code that can be loaded via _pluginContext_.

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