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

@mashroom/mashroom

Package Overview
Dependencies
Maintainers
0
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mashroom/mashroom - npm Package Versions

1
10

2.0.3

Diff

Changelog

Source

2.0.3 (Mai 6, 2022)

  • Portal: Fixed Express.js view caching if multiple Themes are involved. If NODE_ENV = production it was possible that views from the wrong Theme were used.
jkofler
published 2.0.2 •

Changelog

Source

2.0.2 (Mai 2, 2022)

  • K8S Remote App Registry: The admin UI shows now the scanned namespaces
  • Portal: If an App on a page cannot be found (if it is not registered (yet)), an error message will be displayed now instead of just showing nothing. The old behaviour can be restored by setting the Mashroom Portal WebApp config property ignoreMissingAppsOnPages. On the client side you can check if an App is in error state because the plugin does not exist with
         clientServices.portalAppService.loadedPortalApps[0].errorPluginMissing;
    
  • Portal: Fixed SSR cache key to avoid possible collisions
  • Portal: Added possibility to turn of the SSR cache (even if @mashroom/mashroom-memory-cache is present)
  • OpenID Connect Security Provider: Removed the options httpRequestRejectUnauthorized and httpRequestRetry because they are no longer supported by openid-client
  • Vue Demo App: Upgrade to Vue3 and server-side rendering added
  • Sandbox: Show all Apps for the Administrator role, even if defaultRestrictViewToRoles is set
jkofler
published 2.0.1 •

Changelog

Source

2.0.1 (April 25, 2022)

  • VHost Path Mapper: Fixed root url handling
jkofler
published 2.0.0 •

Changelog

Source

2.0.0 (April 25, 2022)

  • Portal: Proxy paths starting with '/' are now accepted for Remote Apps (and considered to be on the server that hosts the App)
  • Portal: Fixed clientServices.stateService.setUrlStateProperty()
  • Storage: Added support for $not in filters
  • File Storage: Fixed invalid totalCount if limit was set
jkofler
published 2.0.0-alpha.4 •

Changelog

Source

2.0.0-alpha.4 (March 24, 2022)

  • Portal: The themes expose now CSS variables, which could be used in Microfrontends (Portal Apps)
  • Portal: The Portal tries now to resolve the origin App for all console errors sent to the server. The App name and version is appended to the message and added to the log context. See issue #93
  • OpenID Connect Security Provider: If token validation in the callback fails retry authentication instead of just responding with 403
  • LDAP Security Provider: Made username lookup in userToRoleMapping case-insensitive
  • Admin Toolbar: Fixed applying new appConfig after reload
  • Default Login: Improved the style and added another config property pageTitle for the title in the header (Default is the server name).
jkofler
published 2.0.0-alpha.3 •

Changelog

Source

2.0.0-alpha.3 (February 7, 2022)

  • Admin Toolbar: The Portal App selection shows now the i18n title instead of the App name and the i18n description
  • Portal: Plugins of type portal-app2 can now have an internationalized description that will be showed in the Admin Toolbar:
    {
        "plugins": [
            {
                 "name": "Unique Name For My App",
                 // ...
                "defaultConfig": {
                    "title": {
                       "en": "My App",
                       "de": "Meine App"
                    },
                    "description": {
                        "en": "A simple React SPA with cool features",
                        "de": "Ein einfacher React SPA mit tollen Features"
                    }
                    //...
               }
            }
        ]
    }
    
  • Portal Default Theme: Inlined critical CSS for performance reasons
  • Portal: Added the Express Request to the SSR bootstrap, so it can access the pluginContext (logger, services)
  • VHost Path Mapper: It is now possible to map multiple Portal sites to different base paths on the same virtual host
  • VHost Path Mapper: Fixed reverse mapping of the location header if a frontendBasePath exists
jkofler
published 2.0.0-alpha.2 •

Changelog

Source

2.0.0-alpha.2 (February 1, 2022)

  • Storage: Added a new method updateMany to update multiple entries at once
  • Portal: Allowed the Theme templates to access the full user, including extraData
  • Added health probes for the Remote App registry, so, the server will only be ready once the initial scan has been done (otherwise requests will hit instances with missing Apps).
  • Added health probes for Mongo, Redis, MQTT and AMQP. This means, if some plugins (e.g. storage) rely on them, the server ready probe (/mashroom/health/ready) will return an error if they are not available.
  • Core: Added the possibility to register health probes for plugins. Use this if your plugin relies on external service, and you want the flag the instance not ready if it is not available. Usage:
    const bootstrap: MashroomStoragePluginBootstrapFunction = async (pluginName, pluginConfig, pluginContextHolder) => {
        const {services: {core: {pluginService, healthProbeService}}} = pluginContextHolder.getPluginContext();
    
        healthProbeService.registerProbe(pluginName, healthProbe);
    
        pluginService.onUnloadOnce(pluginName, () => {
            healthProbeService.unregisterProbe(pluginName);
        });
    
        // ...
    };
    
  • Portal: Disabled browser cache for public pages as well, because they can contain dynamic content from enhancement plugins.
  • Storage: BREAKING CHANGE: MashroomStorageCollection.find() returns now a wrapper object with metadata such as the totalCount instead of directly the result
  • JSON Schemas: Fixed validation of custom plugin definitions
jkofler
published 1.9.4 •

jkofler
published 2.0.0-alpha.1 •

Changelog

Source

2.0.0-alpha.1 (January 21, 2022)

  • Portal: Prevent misusing resource requests for Remote Apps to access proxy targets (if a proxy target is a sub-path of the resource base URL)
  • Portal: Added config property addDemoPages to start with an empty Portal if set to false
  • Theme refurbishment: Switched to a new cool logo and a slightly more blueish primary color
  • Portal: Added CDN support for Theme and all Portal App resources. All you need to do is to add mashroom-cdn to your dependencies and configure it like shown below.
  • Added a CDN Service that can be used to obtain a CDN host to fetch resources. Basically, it just returns a host from a configurable list (round-robin):
      {
        "Mashroom CDN Services": {
          "cdnHosts": [
            "//cdn1.my-portal.com",
            "//cdn2.my-portal.com"
          ]
        }
      }
    
  • Added a middleware to deliver a robots.txt
  • Portal: Added to possibility to define custom App Config editors per Portal App. This is useful for Apps that have an editable content (e.g. from a Headless CMS). A custom editor is basically just another Portal App (SPA) that receives a special object within the appConfig with the config of the target App and a function to update it:
     const bootstrap: MashroomPortalAppPluginBootstrapFunction = (portalAppHostElement, portalAppSetup, clientServices) => {
       const {appConfig: {editorTarget /* MashroomPortalConfigEditorTarget */}} = portalAppSetup;
    
       const currentAppConfig = editorTarget.appConfig;
       // Open Editor with current config
    
       // Update with new Config
       editorTarget.updateAppConfig(newAppConfig);
     };
    
    In the App that wants to use the editor just update the plugin definition like this:
         "defaultConfig": {
           "editor": {
             "editorPortalApp": "My Editor App",
             "position": "in-place"
           }
        }
    
    Since the target App remains active it is also possible to use the message bus to exchange information between the editor and the actual App.
  • Portal: Support for Hybrid Apps with server side rendering added. When a page is rendered the Portal tries to get the initial HTML for all Apps on in and integrated it into the template. The server side HTML will also be cached (if configured). If the server side rendering takes too long (default more than 2000 ms) the Portal automatically switches to client side rendering, but puts the result into the cache anyways for subsequent page requests. The additional configuration in the mashroom-portal plugin looks like this:
      {
        "ssrConfig": {
          "ssrEnabled": true,
          "renderTimoutMs": 2000,
          "cacheTTLSec": 300,
          "inlineStyles": true
        }
      }
    
  • Portal: New plugin definition for Portal Apps with type portal-app2 added to be able to integrate new features such as SSR and config editor. Changes are compared to portal-app are:
    • Moved title, tags and category to defaultConfig, so it can be overwritten per server instance
    • bootstrap has been renamed to clientBootstrap
    • The resourcesRoot can now be defined for local deployment and remote access separately
    • restProxies has been renamed to proxies because the proxy supports all kinds of HTTP and WebSocket connections
    • Caching config added
    • Custom editor config added Existing portal-app definitions are still valid, but if you want to upgrade, change the following:
      {
        "name": "My Single Page App",
        "title": "My Single Page App",
        "category": "Demo",
        "tags": ["what", "ever"],
        "type": "portal-app",
        "bootstrap": "startMyApp",
        "defaultConfig": {
          "resourcesRoot": "./dist",
          "restProxies": {
             "spaceXApi": {
                 "targetUri": "https://api.spacexdata.com/v3",
                 "sendPermissionsHeader": false,
                 "restrictToRoles": ["Role1"]
             }
          }
        }
      }
    
    to:
      {
        "name": "My Single Page App",
        "type": "portal-app2",
        "clientBootstrap": "startMyApp",
        "local": {
          "resourcesRoot": "./dist",
          "ssrBootstrap": "optional-ssr-bootstrap-file"
        },
        "remote": {
          "resourcesRoot": "/if-remote-access-supported",
          "ssrInitialHtmlPath": "optional-ssr-route"
        },
        "defaultConfig": {
          "title": "My Single Page App",
          "category": "Demo",
          "tags": ["what", "ever"],
          "caching": {
            "ssrHtml": "same-config-and-user"
          },
          "editor": {
            "editorPortalApp": "My Optional App Config Editor",
            "position": "in-place",
            "appConfig": {
            }
          },
          "proxies": {
             "spaceXApi": {
                 "targetUri": "https://api.spacexdata.com/v3",
                 "sendPermissionsHeader": false,
                 "restrictToRoles": ["Role1"]
             }
          }
        }
      }
    
  • Storage: The Storage API (MashroomStorage) supports now a subset of Mongo's filter operations ($gt, $regex, ...), sorting and proper paging (skip + limit). So you can do something like:
         await storage.find({ $and: [{ b: { $gt: 1 }}, { x: { $exists: false }}]}, 10, 0, { b: 'asc' })
    
jkofler
published 2.0.0-alpha.0 •

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