JSPM

serverless-plugin-disable-events

0.1.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 444
  • Score
    100M100P100Q96834F
  • License MIT

A serverless plugin for selectively disabling events

Package Exports

  • serverless-plugin-disable-events

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-plugin-disable-events) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

serverless-plugin-disable-events

npm version semantic-release

A serverless plugin for selectively disabling events.

The lack of YAML conditionals makes it difficult to disable events based on stage, env vars, or other conditions. Developers often have to resort to complicated YAML anchor gymnastics to disable function events in unsupported environments.

This plugin allows you to disable events based on a boolean value for all functions, or selected functions.

Usage

To disable all events for all functions. The value can be a string, boolean, or interpolated value.

plugins:
  - serverless-plugin-disable-events

custom:
  disableEvents: true

To disable events for specific functions

plugins:
  - serverless-plugin-disable-events

custom:
  disableEvents:
    my-function-name: true
    my-other-function: ${env:DISABLE_EVENTS}

functions:
  my-function-name: ...
  my-other-function: ...