open-index/open-npm huggingface dataset:
npm package: @mashroom/mashroom-portal-demo-alternative-theme
Description: Alternative Portal Theme Demo
Latest version: 2.9.4


# Mashroom Portal Demo Alternative Theme

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This is an alternative demo theme for the _Mashroom Portal_.

This theme demonstrates how to create a **type safe** theme with *express-react-views* and *TypeScript*.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-alternative-theme** as *dependency*.
npm package: @mashroom/mashroom-portal-demo-angular-app
Description: A simple Angular based SPA that can be used in the Mashroom Portal
Latest version: 2.9.4


# Mashroom Portal Demo Angular App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This is a simple [Angular](https://angular.io) based SPA which can be developed and run standalone, but can also
act as a building block in the _Mashroom Portal_.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-angular-app** as *dependency*.

Then you can place it on any page via Portal Admin Toolbar.

## Implementation hints

Angular was clearly designed for monolithic web applications that use the whole browser window. So, to make it more behave
like a *Microfrontend* you have to change a few things in the template generated by the Angular CLI:

 * Since you can register a *NgModule* only once, use a dummy main module that loads the actual app module (see *loader.module.ts*),
   otherwise you could not load the App multiple times with different configurations on the same page
 * Remove all polyfills, since *Microfrontends* should not install global libraries
 * Get rid of *zone.js* because it installs itself globally and might infer with other Apps
npm package: @mashroom/mashroom-portal-demo-composite-app
Description: A simple SPA that uses other SPAs (which are registered to the Mashroom Portal) as building blocks
Latest version: 2.9.4


# Mashroom Portal Demo Composite App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This is a simple SPA that uses other SPAs (which are registered to the _Mashroom Portal_) as building blocks.
We call this a **Composite App*, and it could again be a building block for other Composite Apps.

The SPA itself is written in React but is uses other ones implemented with Vue.js, Angular and Svelte to build a dialog.
It is capable of server-side rendering, which includes the *embedded* Apps.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-composite-app** as *dependency*.

Then you can place it on any page via Portal Admin Toolbar.
npm package: @mashroom/mashroom-portal-demo-go-wasm-app
Description: Simple Go/WebAssembly based app that integrates into the Mashroom Portal
Latest version: 1.0.3


# Mashroom Portal Demo Go WebAssembly App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

Demonstrates how a WebAssembly can be used as a Portal App (Microfrontend) for _Mashroom Portal_.

![Mashroom Portal](screenshot.png)

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-go-wasm-app** as *dependency*.

Then you can place it on any page via Admin UI.

## Development Setup

 * Install node
 * Install go 
 * Install dependencies:
        
        go mod download
        
 * Start in dev mode:
  
        npm run dev
        
 * Open in your browser: http://localhost:8055

## Links

 * Details about Go WebAssembly: https://github.com/golang/go/wiki/WebAssembly
 * W3C WebAssembly recommendation: https://www.w3.org/TR/wasm-core-1/
 * Browser support: https://caniuse.com/#feat=wasm
 
 ## Hints
 
  * The created WebAssembly is very big (around 3.5MB). This could be improved by using [TinyGo](https://tinygo.org/), 
    but unfortunately it can currently not import *text/template*. See: https://github.com/trashhalo/tinygo-import-report/blob/master/Readme.md
npm package: @mashroom/mashroom-portal-demo-load-dynamically-app
Description: A simple SPA that demonstrates how to load and unload other registered SPAs on a page with a specific config
Latest version: 2.9.4


# Mashroom Portal Demo Load Dynamically App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This is a simple SPA that demonstrates how an App registered to the _Mashroom Portal_ can load and unload other Portal Apps
on a page with a specific config.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-load-dynamically-app** as *dependency*.

Then you can place it on any page via Portal Admin Toolbar.
npm package: @mashroom/mashroom-portal-demo-react-app
Description: A simple React based SPA that can be used in the Mashroom Portal
Latest version: 2.9.4


# Mashroom Portal Demo React App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This is a simple [React](https://reactjs.org) based SPA which can be developed and run standalone, but can also
act as a building block in the _Mashroom Portal_.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-react-app** as *dependency*.

Then you can place it on any page via Portal Admin Toolbar.
npm package: @mashroom/mashroom-portal-demo-react-app2
Description: A simple React based SPA that supports SSR and brings a custom config editor that can be used in the Mashroom Portal
Latest version: 2.9.4


# Mashroom Portal Demo React App 2

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This is another simple [React](https://reactjs.org) based SPA which can be developed and run standalone, but can also
act as a building block in the _Mashroom Portal_.

This SPA also supports server side rendering and demonstrates how a custom editor can be used
for the Portal App configuration (instead of the default JSON editor).

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-react-app** as *dependency*.

Then you can place it on any page via Portal Admin Toolbar.
npm package: @mashroom/mashroom-portal-demo-reasonreact-app
Description: Simple ReasonML based app that integrates into the Portal
Author: Milan Heimschild
Latest version: 1.6.4


# Mashroom Portal Demo ReasonReact App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Integration Platform for Microfrontends**.

Adds a demo portal app (SPA) based on [ReasonReact](https://reasonml.github.io/reason-react/) to the _Mashroom Portal_.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-reasonreact-app** as *dependency*.

Then you can place it on any page via Portal Admin Toolbar.
npm package: @mashroom/mashroom-portal-demo-remote-messaging
Description: Simple app that demonstrates remote messaging
Latest version: 1.6.4


# Mashroom Portal Demo Remote Messaging App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Integration Platform for Microfrontends**.

Adds a demo portal app (SPA) to demonstrate the remote messaging capabilities. This app requires the
_mashroom-messaging_ and _mashroom-websocket_ plugins to be installed.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-remote-messaging** as *dependency*.

After adding the app to a page you can send a message to another user (or another browser tab)
by using the (remote) topic _user/&lt;other-username&gt;/<something>_.
And the app will automatically subscribe the topic _user/<your_username>/#_ to receive all user messages.
npm package: @mashroom/mashroom-portal-demo-rest-proxy-app
Description: A simple SPA that demonstrates how the Mashroom Portal proxy can be used to connect to a REST API which cannot be reached directly by the client
Latest version: 2.9.4


# Mashroom Portal Demo Rest Proxy App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This is a simple SPA that demonstrates how the _Mashroom Portal_ proxy could be used to connect to a
REST API that cannot be reached directly by the client.

It fetches data *rocketlaunch.live*, but connects through the Portal. So the actual endpoint will not be visible
in the browser.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-rest-proxy-app** as *dependency*.

Then you can place it on any page via Portal Admin Toolbar.
npm package: @mashroom/mashroom-portal-demo-solidjs-app
Description: A simple SolidJS based SPA that can be used in the Mashroom Portal
Latest version: 2.9.4


# Mashroom Portal Demo SolidJS App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This is a simple [SolidJS](https://www.solidjs.com) based SPA which can be developed and run standalone, but can also
act as a building block in the _Mashroom Portal_.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-solidjs-app** as *dependency*.

Then you can place it on any page via Portal Admin Toolbar.
npm package: @mashroom/mashroom-portal-demo-svelte-app
Description: A simple Svelte based SPA that can be used in the Mashroom Portal
Latest version: 2.9.4


# Mashroom Portal Demo Svelte App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This is a simple [Svelte](https://svelte.dev) based SPA which can be developed and run standalone, but can also
act as a building block in the _Mashroom Portal_.
It also demonstrates how SSR support can be added.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-svelte-app** as *dependency*.

Then you can place it on any page via Portal Admin Toolbar.
npm package: @mashroom/mashroom-portal-demo-vue-app
Description: A simple Vue.js based SPA that can be used in the Mashroom Portal
Latest version: 2.9.4


# Mashroom Portal Demo Vue App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This is a simple [Vue](https://vuejs.org) based SPA which can be developed and run standalone, but can also
act as a building block in the _Mashroom Portal_.
It also demonstrates how SSR support can be added.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-vue-app** as *dependency*.

Then you can place it on any page via Portal Admin Toolbar.
npm package: @mashroom/mashroom-portal-demo-websocket-proxy-app
Description: A simple SPA that demonstrates how the Mashroom Portal proxy can be used to connect to a WebSocket server which cannot be reached directly by the client
Latest version: 2.9.4


# Mashroom Portal Demo WebSocket Proxy App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This is a simple SPA that demonstrates how the _Mashroom Portal_ proxy can be used to connect to a
WebSocket server that cannot be reached directly by the client.

By default, it connects to an echo server on ws://ws.ifelse.io/, but that server might go down any time.
If you can't connect, you can always launch a local WebSocket server (like [https://github.com/pmuellr/ws-echo](https://github.com/pmuellr/ws-echo))
and change the *targetUri* in *package.json* accordingly.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-rest-proxy-app** as *dependency*.

Then you can place it on any page via Portal Admin Toolbar.
npm package: @mashroom/mashroom-portal-iframe-app
Description: A Mashroom Portal App that shows an arbitrary site within an IFrame. Can be made responsive if the embedded site posts its height via message.
Latest version: 2.9.4


# Mashroom Portal iFrame App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

Adds a (responsive) iFrame Portal App to the _Mashroom Portal_.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-iframe-app** as *dependency*.

After placing it on a page use the Portal Admin Toolbar to set the following properties:

 * _url_: The URL of the page to show in the iframe
 * _width_: The iframe width (Default 100%)
 * _defaultHeight_: The height to use if the embedded page doesn't post the actual required height

To make the iFrame responsive, the embedded page has to post its
height via message like so:

```
var lastContentHeight = null;

function sendHeight() {
    var contentHeight = document.getElementById('content-wrapper').offsetHeight;
    if (lastContentHeight !== contentHeight) {
        parent.postMessage({
            height: contentHeight + /* margin */ 20
        }, "*");
        lastContentHeight = contentHeight;
    }
}

setInterval(sendHeight, 1000);
```
npm package: @mashroom/mashroom-portal-legacy-browser-support
Description: Adds support for legacy browsers such as IE11 to the Mashroom Portal
Latest version: 2.1.3


# Mashroom Portal Legacy Browser Support

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This plugin adds support for legacy browsers such as IE11 to the *Mashroom Portal*.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-enhancement-legacy-browser** as *dependency*.
npm package: @mashroom/mashroom-portal-remote-messaging-app
Description: A Mashroom Portal App that can be used to test the remote messaging capabilities of the Mashroom Portal
Latest version: 2.9.4


# Mashroom Portal Remote Messaging App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This _Mashroom Portal_ App can be used to test remote messaging in the _Mashroom Portal_.
This App requires the _mashroom-messaging_ and _mashroom-websocket_ plugins to be installed.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-demo-remote-messaging** as *dependency*.

After adding the app to a page you can send a message to another user (or another browser tab)
by using the (remote) topic _user/&lt;other-username&gt;/<something>_.
And the app will automatically subscribe the topic _user/<your_username>/#_ to receive all user messages.
npm package: @mashroom/mashroom-portal-sandbox-app
Description: A Mashroom Portal App that can be used to load any other Portal App with a specific configuration and to test message bus interaction
Latest version: 2.9.4


# Mashroom Portal Sandbox App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This _Mashroom Portal_ App can be used to load and **test any Portal App** with a specific configuration and to interact with the App via Message Bus.
It can also be used for end-2-end testing with tools such as Selenium.

## Usage

 * If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-sandbox-app** as *dependency*.
 * Add the _Mashroom Sandbox App_ app on an empty page
 * Select the app you want to run within the sandbox

The app supports the following query parameters:

 * *sbAutoTest*: This is an automated tests ann all JSON inputs should be replaced by simple textareas
 * *sbPreselectAppName*: The name of the app that should be preselected (without starting it)
 * *sbAppName*: The name of the app that should be started in the sandbox.
   If this parameter is given the app will be started automatically, otherwise all other query parameters are ignored.
 * *sbWidth*: The width the app should be started with. Default: 100%
 * *sbLang*: The language code that should be passed to the app.
 * *sbPermissions*: The base64 encoded _permissions_ object that should be passed to the app. E.g.:
 ```
btoa(JSON.stringify({
    permissionA: true
}))
```
 * *sbAppConfig*: The Base64 encoded _appConfig_ object that should be passed to the app.

For an example how to use the sandbox in an end-2-end test see:
[https://github.com/nonblocking/mashroom-portal-quickstart/tree/master/plugin-packages/example-react-app/test-e2e/example.test.js](https://github.com/nonblocking/mashroom-portal-quickstart/tree/master/plugin-packages/example-react-app/test-e2e/example.test.js)
npm package: @mashroom/mashroom-portal-tabify-app
Description: A Mashroom Portal App that automatically organizes all other Apps in the area where it is placed in tabs
Latest version: 2.9.4


# Mashroom Portal Tabify App

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This _Mashroom Portal_ App turns any app area where it is placed automatically into a tabbed container.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-portal-tabify-app** as *dependency*.

After placing it on a page use the Portal Admin Toolbar to set the following properties:

 * _addCloseButtons_: Defines if a close button will be added to remove a portal app displayed as tab
 * _appNameTitleMapping_: A map to override the displayed title in the tab (Portal App Name -> Title to display)
 * _fixedTabTitles_: A list of fixed tab titles per position (null means not fixed). E.g.: [null, 'the second tag']

**Updates via MessageBus**

It is possible to change the App/Title mapping and to show a specific Tab via _MessageBus_. This is especially
useful for dynamic cockpits where you load Apps programmatically via _MashroomPortalAppService_.

Available topics:

 * tabify-add-plugin-name-title-mapping
 * tabify-add-app-id-title-mapping
 * tabify-focus-app

_tabify-add-plugin-name-title-mapping_ expect a message like this:

```
{
    pluginName: 'My App',
    title: 'Another title'
}
```

_tabify-add-app-id-title-mapping_ expect a message like this:

```
{
    appId: '1234123',
    title: 'Another title'
}
```

And _tabify-focus-app_ expects just an id:

```
{
    appId: '1234123'
}
```
npm package: @mashroom/mashroom-robots
Description: Adds a middleware that exposes a robots.txt file for search engines
Latest version: 2.9.4


# Mashroom Robots

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This plugin adds a middleware that exposes a robots.txt file for search engines.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-robots** as *dependency*.

You can override the default config in your Mashroom config file like this:

```json
{
    "plugins": {
        "Mashroom Robots Middleware": {
            "robots.txt": "./robots.txt"
        }
    }
}
```

* _robots.txt_: The path to the robots.txt file. Can be relative to the server config file or absolute.
  If not provided, the default config denies the access to all search engines.
npm package: @mashroom/mashroom-security-default-login-webapp
Description: The default login webapp, that will be available at /login
Latest version: 2.9.4


# Mashroom Security Default Login Webapp

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This plugin adds a default login webapp which can be used for security providers that require a login page.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-security-default-login-webapp** as *dependency*.

You can override the default config in your Mashroom config file like this:

```json
{
  "plugins": {
        "Mashroom Security Default Login Webapp": {
            "path": "/login",
            "pageTitle": "My fancy website",
            "loginFormTitle": "Login",
            "darkMode": "auto",
            "styleFile": "./login_style.css"
        }
    }
}
```

 * _path_: The path of the login page (Default: /login)
 * _pageTitle_: A custom page title, can be the actual title or a message key (i18n) (Default is the server name)
 * _loginFormTitle_: A custom title for the login form, can be the actual title or a message key (i18n) (Default: _login_)
 * _darkMode_: Possible values: *true*, *false*, *"auto"* (Default: "auto")
 * _styleFile_: Custom CSS that will be loaded instead of the built-in style (relative to Mashroom config file, default: null)
npm package: @mashroom/mashroom-security-provider-basic-wrapper
Description: Adds support for BASIC to any other security provider that implements login() properly
Latest version: 2.9.4


# Mashroom Basic Authentication Wrapper Security Provider

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This plugin adds support for Basic authentication to any other security provider that implements _login()_ properly.
This can be useful when you need to access some APIs on the server from an external system or for test purposes.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-security-provider-basic-wrapper** as *dependency*.

To activate this provider configure the _Mashroom Security_ plugin like this:

```json
{
    "plugins": {
        "Mashroom Security Services": {
            "provider": "Mashroom Basic Wrapper Security Provider"
        }
    }
}
```

And configure this plugin like this in the Mashroom config file:

```json
{
  "plugins": {
        "Mashroom Basic Wrapper Security Provider": {
             "targetSecurityProvider": "Mashroom Security Simple Provider",
             "onlyPreemptive": true,
             "realm": "mashroom"
        }
    }
}
```

 * _targetSecurityProvider_: The actual security provider that is used to login (Default: Mashroom Security Simple Provider)
 * _onlyPreemptive_: Only use BASIC if it is sent preemptively if true. Otherwise, the plugin will send HTTP 401 and *WWW-Authenticate*
   which will trigger the Browser's login popup (Default: true)
 * _realm_: The realm name that should be used if _onlyPreemptive_ is false (Default: mashroom)
npm package: @mashroom/mashroom-security-provider-simple
Description: Simple JSON file based security provider
Latest version: 2.9.4


# Mashroom Security Simple Provider

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This plugin adds a simple, JSON file based security provider.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-security-provider-simple** as *dependency*.

To activate this provider configure the _Mashroom Security_ plugin like this:

```json
{
    "plugins": {
        "Mashroom Security Services": {
            "provider": "Mashroom Security Simple Provider"
        }
    }
}
```

And configure this plugin like this in the Mashroom config file:

```json
{
  "plugins": {
        "Mashroom Security Simple Provider": {
            "users": "./users.json",
            "loginPage": "/login",
            "authenticationTimeoutSec": 1200
        }
    }
}
```

 * _users_: The path to the JSON file with user and role definitions (Default: ./users.json)
 * _loginPage_: The path to redirect to if a restricted resource is requested but the user not logged in yet (Default: /login)
 * _authenticationTimeoutSec_: The inactivity time after that the authentication expires. Since this plugin uses the session to store make sure the session _cookie.maxAge_ is greater than this value (Default: 1200)

 The content of the JSON file might look like this.

 ```json
{
    "$schema": "https://www.mashroom-server.com/schemas/mashroom-security-simple-provider-users.json",
    "users": [
        {
            "username": "admin",
            "displayName": "Administrator",
            "email": "xxxxx@xxxx.com",
            "pictureUrl": "xxxx",
            "passwordHash": "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918",
            "extraData": {
                "firstName": "John",
                "lastName": "Do"
            },
            "roles": [
                "Administrator"
            ],
            "secrets": {
                "token": "xxxxxxx"
            }
        },
        {
            "username": "john",
            "displayName": "John Do",
            "passwordHash": "96d9632f363564cc3032521409cf22a852f2032eec099ed5967c0d000cec607a",
            "roles": [
                "User",
                "PowerUser"
            ]
        }
    ]
}

```

The _passwordHash_ is the SHA256 hash of the password. _displayName_, _email_ and _pictureUrl_ are optional.
_extraData_ will be mapped to _user.extraData_ and _secrets_ will be mapped to _user.secrets_.
npm package: @mashroom/mashroom-session
Description: Session middleware with configurable provider
Latest version: 2.9.4


# Mashroom Session

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This plugin adds [Express session](https://www.npmjs.com/package/express-session) as middleware.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-session** as *dependency*.

You can override the default config in your Mashroom config file like this:

```json
{
    "plugins": {
        "Mashroom Session Middleware": {
            "order": -100,
            "provider": "Mashroom Session Filestore Provider",
            "session": {
                "secret": "EWhQ5hvETGkqvPDA",
                "resave": false,
                "saveUninitialized": false,
                "cookie": {
                    "httpOnly": true,
                    "secure": false,
                    "sameSite": false
                }
            }
        }
    }
}
```

 * _order_: The middleware order (Default: -100)
 * _provider_: The plugin from type _session-store-provider_ that implements the store (Default: memory)
 * _session_: The properties are just passed to express-session. See [Express session](https://www.npmjs.com/package/express-session) for possible options.
    * _cookie.maxAge_: Max cookie age in ms, which should be the max expected session duration (Default 2h)

**Security hints**:

  * Change the default _secret_
  * You should consider setting _cookie.sameSite_ to either "lax" or "strict" (CSRF protection).

## Plugin Types

### session-store-provider

This plugin type adds a session store that can be used by this plugin.

To register a custom session-store-provider plugin add this to _package.json_:

```json
{
    "mashroom": {
        "plugins": [
            {
                "name": "My Session Provider",
                "type": "session-store-provider",
                "bootstrap": "./dist/mashroom-bootstrap.js",
                "defaultConfig": {
                    "myProperty": "test"
                }
            }
        ]
    }
}
```

The bootstrap returns the express session store (here for example the file store):

```ts
import sessionFileStore from 'session-file-store';

import type {MashroomSessionStoreProviderPluginBootstrapFunction} from '@mashroom/mashroom-session/type-definitions';

const bootstrap: MashroomSessionStoreProviderPluginBootstrapFunction = async (pluginName, pluginConfig, pluginContextHolder, expressSession) => {
    const options = {...pluginConfig};
    const FileStore = sessionFileStore(expressSession);
    return new FileStore(options);
};

export default bootstrap;
```
npm package: @mashroom/mashroom-session-provider-filestore
Description: Mashroom Server session file store provider
Latest version: 2.9.4


# Mashroom Session Filestore Provider

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This plugin adds a file based session store that can be used by _Mashroom Session_.
Actually this is just a wrapper for the [session-file-store](https://github.com/valery-barysok/session-file-store) package.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-session-provider-filestore** as *dependency*.

Activate this session provider in your Mashroom config file like this:

```json
{
  "plugins": {
        "Mashroom Session Middleware": {
            "provider": "Mashroom Session Filestore Provider"
        }
    }
}
```

And to change the default config of this plugin add:

```json
{
  "plugins": {
        "Mashroom Session Filestore Provider": {
            "path": "../../data/sessions"
        }
    }
}
```

<span class="panel-info">
**NOTE**: The base for relative paths is the Mashroom config file.
</span>

All config options are passed to the _session-file-store_. See [session-file-store](https://github.com/valery-barysok/session-file-store) for available options.
npm package: @mashroom/mashroom-session-provider-mongodb
Description: Mashroom Server MongoDB provider
Latest version: 2.9.4


# Mashroom Session MongoDB Provider

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This plugin adds a mongoDB session store that can be used by _Mashroom Session_.
Actually this is just a wrapper for the [connect-mongo](https://github.com/jdesboeufs/connect-mongo) package.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-session-provider-mongodb** as *dependency*.

Activate this session provider in your Mashroom config file like this:

```json
{
  "plugins": {
        "Mashroom Session Middleware": {
            "provider": "Mashroom Session MongoDB Provider"
        }
    }
}
```

And to change the default config of this plugin add:

```json
{
  "plugins": {
      "Mashroom Session MongoDB Provider": {
          "client": {
              "uri": "mongodb://localhost:27017/mashroom_session_db?connectTimeoutMS=1000&socketTimeoutMS=2500",
              "connectionOptions": {
                  "minPoolSize": 5,
                  "serverSelectionTimeoutMS": 3000
              }
          },
          "collectionName": "mashroom-sessions",
          "ttl": 86400,
          "autoRemove": "native",
          "autoRemoveInterval": 10,
          "touchAfter": 0,
          "crypto": {
              "secret": false
          }
      }
    }
}
```

 * *client*: Options to construct the client. *connectionOptions* are passed to the [mongodb driver](https://github.com/mongodb/node-mongodb-native).
 * *collectionName*: Mongo collection to store sessions (Default: mashroom-sessions)
 * *ttl*: TTL in seconds (Default: 86400 - one day)
 * *autoRemove*: Session remove strategy (Default: native)
 * *autoRemoveInterval*: Remove interval in seconds if *autoRemove* is interval (Default: 10)
 * *touchAfter*: Interval in seconds between session updates (Default: 0)
 * *crypto*: Options regarding session encryption. For details see [connect-mongo](https://github.com/jdesboeufs/connect-mongo).
npm package: @mashroom/mashroom-storage-provider-filestore
Description: Simple Mashroom storage provider based on JSON files
Latest version: 2.9.4


# Mashroom Storage Filestore Provider

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This plugin adds a simple but cluster-safe, JSON based storage provider.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-storage-provider-filestore** as *dependency*.

To activate this provider configure the _Mashroom Security_ plugin like this:

```json
{
    "plugins": {
         "Mashroom Storage Services": {
              "provider": "Mashroom Storage Filestore Provider"
          }
    }
}
```

And configure this plugin like this in the Mashroom config file:

```json
{
  "plugins": {
        "Mashroom Storage Filestore Provider": {
            "dataFolder": "/var/mashroom/data/storage",
            "checkExternalChangePeriodMs": 100,
            "prettyPrintJson": true
        }
    }
}
```

 * _dataFolder_: The **shared folder** to store the data files. The base for relative paths is the Mashroom config file (Default: ./data/storage)
 * _checkExternalChangePeriodMs_: Poll interval for external file changes (by other servers in the cluster).
   You can increase the default if you run a single server, the config is readonly or performance is more important than consistency (Default: 100)
 * _prettyPrintJson_: Pretty print the JSON files to make it human-readable (Default: true)
npm package: @mashroom/mashroom-storage-provider-mongodb
Description: Mashroom storage provider backed by MongoDB
Latest version: 2.9.4


# Mashroom Storage MongoDB Provider

Plugin for [Mashroom Server](https://www.mashroom-server.com), a **Microfrontend Integration Platform**.

This plugin adds a [MongoDB](https://www.mongodb.com/) based storage provider.

## Usage

If *node_modules/@mashroom* is configured as plugin path just add **@mashroom/mashroom-storage-provider-mongodb** as *dependency*.

To activate this provider, configure the _Mashroom Security_ plugin like this:

```json
{
    "plugins": {
         "Mashroom Storage Services": {
              "provider": "Mashroom Storage MongoDB Provider"
          }
    }
}
```

And configure this plugin like this in the Mashroom config file:

```json
{
  "plugins": {
        "Mashroom Storage MongoDB Provider": {
            "uri": "mongodb://user:xxxxx@localhost:27017/mashroom_storage_db",
            "connectionOptions": {
                "poolSize": 5,
                "useUnifiedTopology": true,
                "useNewUrlParser": true
            }
        }
    }
}
```

 * _uri_: A MongoDB connection string (see [MongoDB documentation](https://docs.mongodb.com/manual/reference/connection-string)).
   **Must** contain the database to use.
 * _connectionOptions_: The MongoDB connection options (see [MongoDB documentation](https://mongodb.github.io/node-mongodb-native/2.2/reference/connecting/connection-settings)).
npm package: @mashroomwolf/koishi-plugin-daynew
Description: Daily 60s News Plugin
Latest version: 1.0.8

# @mashroomwolf/koishi-plugin-daynew

[![npm](https://img.shields.io/npm/v/@mashroomwolf/koishi-plugin-daynew?style=flat-square)](https://www.npmjs.com/package/@mashroomwolf/koishi-plugin-daynew)

一个暂时仅测试了 QQ onebot 机器人的每日新闻插件

# 食用方法

在发送信息配置中`添加项目`, 然后输入机器人所在群号即可

本项目注册了一个名为 `daily` 的命令，和定时任务发出的信息一样
若不需要该命令，请在`指令管理`中关闭

# 注意事项

- 必须服务：cron 会标橙色是正常现象， 显示`koishi-plugin-cron (已加载)`时即可使用
- 插件默认每天早上 9 点发送新闻
- 目前仅测试了 QQ onebot 机器人可用
- 如果新闻源未读取，请自行添加其他新闻源
npm package: @mashroomwolf/koishi-plugin-dice-dagger-heart
Description: dice-dagger-heart bot (including dice rolling)
Latest version: 0.0.6

# @mashroomwolf/koishi-plugin-dice-dagger-heart

[![npm](https://img.shields.io/npm/v/@mashroomwolf/koishi-plugin-dice-dagger-heart?style=flat-square)](https://www.npmjs.com/package/@mashroomwolf/koishi-plugin-dice-dagger-heart)

一个匕首之心骰子机器人插件

# 食用方法

- `dd` 指令可以掷出二元骰
- `dd +2+1d4` 可以在二元骰后进行加值
- `r 1d6` 指令可以掷出普通骰子

# 注意事项

- 目前仅测试了 QQ onebot 机器人可用

# 开发计划

- [x] 实现基本的二元骰功能
- [x] 实现基本的普通骰子功能
- [ ] 实现人物卡创建功能
- [ ] 实现人物卡查询功能

# 开发日志

> ## V0.0.6 命令美化
>
> 新增自定义结果语句

> ## V0.0.4 命令更新
>
> 修改命令触发从命令改为中间件
>
> ## V0.0.1 初始版本
>
> 初始版本，仅包含基本的骰子功能
npm package: @mashtuntech/repo-to-ai-context
Description: Node.js CLI application reads all files in the current directory, excluding those specified in the `.gitignore`
file and a hardcoded blacklist, and aggregates them into a single output file named `fullrepo.txt`.
Author: phil@bohnenkamptech.com
Latest version: 0.1.4

# Repository Contextualizer for AI Prompting

This Node.js CLI application reads all files in the current directory, excluding those specified in the `.gitignore`
file and a hardcoded blacklist, and aggregates them into a single output file named `fullrepo.txt`.

When run from the root of your repository, it effectively builds a context you can use to prompt AI's with.

## Features

* Reads all files in the current directory.
* Excludes files and directories specified in the `.gitignore` file.
* Excludes a hardcoded blacklist of files and directories.
  *   `package-lock.json`
  *   `yarn.lock`
  *   `.git/**/*`
  *   `fullrepo.txt`
  *   `package-lock.json`
  *   `yarn.lock`
  *   `*.png`
  *   `*.jpg`
  *   `*.jpeg`
  *   `*.gif`
  *   `*.svg`
  *   `*.ico`
  *   `*.pdf`
  *   `*.zip`
  *   `*.tar.gz`
  *   `*.rar`
  *   `*.7z`
  *   `*.mp3`
  *   `*.mp4`
  *   `*.wav`
  *   `*.mov`
  *   `*.av`
* Aggregates file contents into a single output file (`fullrepo.txt`).
* Wraps each file's content in an XML-like "envelope" with the file path as an attribute.
```
<file path=.........>
...content ....
</file> 
```
* Warns if the output file exceeds 10MB in size.

## Usage
```bash
npx @mashtuntech/repo-to-ai-context@latest
```

You can install the package globally and run it without the @mashtuntech scope but be sure to update to latest version periodically
```bash
npm install -g @mashtuntech/repo-to-ai-context@latest
npx repo-to-ai-context
```