Socket
Socket
Sign inDemoInstall

@mashroom/mashroom-storage

Package Overview
Dependencies
40
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous1
35
9Next

2.0.0

Diff

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 •

jkofler
published 1.9.3 •

Changelog

Source

1.9.3 (January 11, 2022)

  • Portal: Added i18n title to MashroomPortalAppService.getAvailableApps()
  • Background Jobs: The cronSchedule property is now optional for backend jobs. If you omit it the job will be executed exactly once at startup. Which is useful if you want to do something during startup.
  • Core: When the build fails, also info gathered from stdout is logged. Tools like eslint use this channel to provide more detailed info about the failure
jkofler
published 1.9.2 •

Changelog

Source

1.9.2 (December 11, 2021)

  • Security: The security providers that rely on the Express Session (Simple, LDAP, OpenID-Connect) are going to log an error now if the session configuration is not suitable (e.g. when the access token lives longer than the session that stores it).
  • Browser Cache: Increased the default TTL to 30d to improve the Lighthouse score. Make sure all your resources in the Theme use cache busting or set a lower TTL value for your server like this:
     {
       "plugins": {
         "Mashroom Cache Control Services": {
           "maxAgeSec": 86400
         }
       }
     }
    
  • Portal Default Theme: Fixed setting and updating meta description and keywords
  • Portal Default Theme: Fixed crawlability (some hrefs were missing)
  • MongoDB Session Provider: Fixed startup and detecting connected state
  • Admin Toolbar: Works now if the site path is "/" (because the /portal/my-site is mapped to / via vhost path mapper)
  • Portal: Made sure the MashroomPortalStateService works with dynamic routing (when paths are updated via History API)
jkofler
published 1.9.1 •

Changelog

Source

1.9.1 (November 8, 2021)

  • Portal: Fixed loading multiple instances of an App on the same page (was broken due to a caching issue, see issue #89)
  • LDAP Security Provider: Fixed searching for groups if the distinguished name contains special characters (as defined in RFC 2253)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc