Socket
Book a DemoInstallSign in
Socket

@xapp/serverless-plugin-type-definitions

Package Overview
Dependencies
Maintainers
6
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xapp/serverless-plugin-type-definitions

Common typescript types that can be used for creating serverless plugins.

latest
Source
npmnpm
Version
0.2.3
Version published
Maintainers
6
Created
Source

Deprecated

Do not use. Use @types/serverless instead.

serverless-plugin-type-definitions

Typescript definitions that can be used to make Serverless Plugins. Simply import this project and go.

This is so far incomplete and will be added upon as needed. PRs welcome.

Install

npm install --save-dev @xapp/serverless-plugin-type-definitions

Usage

In your Plugin file, simply import it like so:

MyPlugin.ts

import { Hooks, Serverless, ServerlessPlugin } from "@xapp/serverless-plugin-types"

class MyServerlessPlugin extends Plugin {

    private serverless: Serverless;
    hooks: Hooks;

    constructor(serverless: Serverless) {
        this.serverless = serverless;

        this.hooks = {
            "before:aws:deploy:deploy:createStack": this.doSomething.bind(this),
        }
    }

    doSomething() {
        this.serverless.cli.log("Hello from the plugin!");
    }
}

Keywords

serverless

FAQs

Package last updated on 11 May 2020

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