npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

serverless-commercetools-plugin

v1.1.8

Published

Serverless framework plugin that registers the deployed function as a commercetools API Extension or attaches it to a Subscription.

Downloads

62

Readme

commercetools Serverless Plugin

commercetools's plugin for the Serverless Framework allows you to seamlessly integrate your serverless functions with commercetools' extensibility options.

Contents

Features

  • Attach a newly deployed serverless function as a commercetools' API extension.
  • Create a new serverless function to process events from a commercetools' subscription.
  • Supports AWS and GCP

Install

npm i --save-dev serverless-commercetools-plugin
# or
yarn add --dev serverless-commercetools-plugin

Add the following plugin to your serverless.yml:

plugins:
  - serverless-commercetools-plugin

With the serverless CLI

serverless plugin install --name serverless-commercetools-plugin

Configuration

Add your commercetools' project settings to the serverless.yaml file. Add these values under the provider section:

provider:
  environment:
    CTP_PROJECT_KEY: "your_key"
    CTP_CLIENT_SECRET: "your_secret"
    CTP_CLIENT_ID: "your_clientid"
    CTP_AUTH_URL: "your_authurl"
    CTP_API_URL: "your_apiUrl"
    CTP_SCOPES: "your_scopes"

API Extension

Add environment vars for the deploy type ("extension") and your body configuration for the Extension.

    CTP_DEPLOY_TYPE: "extension"
    CTP_POST_BODY: '{
        "destination": {
          "type": "AWSLambda",
          "accessKey": "your_aws_key",
          "accessSecret": "your_aws_secret"
        },
        "triggers": [{
          "resourceTypeId": "cart",
          "actions": ["Create", "Update"]
        }]
    }'

Note: The Lambda ARN is determined by the plugin. You do not need to include it in the configuration.

For Google Cloud Platform functions set the CTP_POST_BODY to use the HTTP destination as outlined in the commercetools API Extension documentation.

Subscription

Add environment vars for the deploy type ("subscription") and your body configuration for the Subscription.

    CTP_DEPLOY_TYPE: "extension"
    CTP_POST_BODY: '{
        "destination": {
          "type": "AWSLambda",
          "accessKey": "your_aws_key",
          "accessSecret": "your_aws_secret"
        },
        "triggers": [{
          "resourceTypeId": "cart",
          "actions": ["Create", "Update"]
        }]
    }'

Usage

To build your cloud resources and configure the commercetools' project run:

serverless deploy

To remove all cloud resources and commercetools' configuration run:

serverless remove

Help

If you have any issues, please don't hesitate to:

When opening a new issue, please provide as much information as possible including:

  • Plugin version
  • node version
  • cloud environment
  • A reproducible code example

The GitHub issues are intended for bug reports and feature requests specifically related to the serverless plugin.

Development

Create a local serverless function or copy the code from the examples folder. Add the plugin code to a folder named .serverless_plugins at the root of your serverless project.

License

Released as-is under the MIT license. See LICENSE for details.