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

@qiwi/semrel-plugin-creator

Package Overview
Dependencies
Maintainers
5
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qiwi/semrel-plugin-creator

Semrel plugin creator

  • 1.5.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
319
decreased by-27.17%
Maintainers
5
Weekly downloads
 
Created
Source

@qiwi/semrel-plugin-creator

Semrel plugin creator

Install

yarn add @qiwi/semrel-plugin-creator

Usage

import {createPlugin} from '@qiwi/semrel-plugin-creator'

const handler = async ({step, pluginConfig, context, name}) => {
  if (step === 'prepare') {
    pluginConfig.foo = 'bar'
  }

  if (step === 'publish') {
    await doSomething()
  }
}

const plugin = createPlugin({
  handler,
  name: 'plugin-name',
  include: ['prepare', 'publish']
})

API

export type TPluginHandlerContext = {
  pluginConfig: TPluginConfig
  stepConfig: TPluginConfig
  stepConfigs: TStepConfigs
  context: TSemrelContext
  step: TReleaseStep
}

export type TPluginFactoryOptionsNormalized = {
  handler: TReleaseHandler
  name?: string
  include: TReleaseStep[]
  exclude: TReleaseStep[]
  require: TReleaseStep[]
}

export type TPluginFactoryOptions = Partial<TPluginFactoryOptionsNormalized>

export type TReleaseHandler = (context: TPluginHandlerContext) => Promise<any>

export type TPluginFactory = (
  handler: TPluginFactoryOptions | TReleaseHandler,
) => TPlugin

FAQs

Package last updated on 19 Jan 2021

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

  • 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