🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@mashroom-content/mashroom-content-asset-processing

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mashroom-content/mashroom-content-asset-processing

Mashroom Content Asset services

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

Mashroom Content Assets

Plugin for Mashroom Server, a Microfrontend Integration Platform. Part of the Mashroom Content extension.

This plugin adds a service to fetch and process assets (e.g. image conversion).

Usage

If node_modules/@mashroom is configured as plugin path just add @mashroom-content/mashroom-content-asset-processing as dependency.

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

{
    "plugins": {
        "Mashroom Content Asset Processing Services": {
            "scaleUp": false,
            "defaultQuality": 75,
            "cacheEnable": true,
            "cacheDefaultTTLSec": 31536000,
            "cacheFolder": "./data/asset-proc-cache"
        }
    }
}
  • scaleUp: Scale images up (Default: false)
  • defaultQuality: Default image conversion quality (Default: 75)
  • cacheEnable: Enable asset cache (Default: true)
  • cacheDefaultTTLSec: Asset cache TTL in seconds (Default: 31536000)
  • cacheFolder: Cache folder (Default: ./data/asset-proc-cache)

Service

On the Server side you can use the following new service accessible through pluginContext.services.assetProc.service:

export interface MashroomContentAssetProcService {
    /**
     * Process and return given asset from URI - result will be cached
     */
    processAssetFromUri(assetUri: string, resize?: MashroomContentAssetProcImageResize, convert?: MashroomContentAssetProcImageConvert): Promise<MashroomContentAssetProc>;

    /**
     * Process given asset
     */
    processAsset(asset: Readable, resize?: MashroomContentAssetProcImageResize, convert?: MashroomContentAssetProcImageConvert): Promise<Readable>;
}

FAQs

Package last updated on 11 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts