Socket
Book a DemoInstallSign in
Socket

merapi-plugin-aop

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

merapi-plugin-aop

Merapi AOP Plugin

0.2.0
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
3
Weekly downloads
 
Created
Source

Merapi Plugin: AOP

Introduction

This plugin will wrap selected method with specified handler method.

Installation

Add plugin to dependency list in package.json

npm install merapi-plugin-aop --save

Configuration

{
    name: "my-service",
    version: "1.0.0",
    plugins: [
        "aop"
        "aop-logger"
    ],
    aspects: {
        logging: {
            handler: aopLogger.logMethod,
            match: "*.*",
            options: {
                output: "test log [methodName]: [params] [result]"
            }
        },
        kafka: {
            handler: aopCom.kafkaPublish
            match: "*.create"
        }
    }
}

All configuration for AOP plugin are listed in aspects. Defined what kind of aspect you want to create as a key then set which handler you want to use in handler and which component you want to apply with in match. options is optional. To use handler from another AOP plugin simply state camel case version of plugin name as component name and available method in that plugin.

FAQs

Package last updated on 05 Apr 2018

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.