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 🙏

© 2024 – Pkg Stats / Ryan Hefner

serverless-manifest-plugin

v1.0.9

Published

Output api endpoints and resource values for consumption

Downloads

9,557

Readme

Serverless Manifest Plugin

Generate a list of API endpoints, function information & stack outputs to a service manifest file.

The manifest data can be quite useful for:

After serverless deploy finishes, a .serverless/manifest.json file, is created.

Usage

Add to plugins array in serverless.yml

service: my-example-service

plugins:
 - serverless-manifest-plugin

Then run serverless manifest --help to see all options.

Options

You can set options via CLI flags or via the custom field in serverless.yml

# Custom settings for manifest plugin
custom:
  manifest:
    # Custom manifest output path. Default ./.serverless/manifest.json
    output: ./serverless.manifest.json
    # set to true to disable manifest file from being created
    disableOutput: false
    # Path to custom file with JS function for additional post processing
    postProcess: ./my-file-to-process-manifest-data.js
    # Set plugin log output to silent. Default false
    silent: false
    # Path to the function code. Default serverless.yml location (process.cwd())
    srcPath: ./dist

plugins:
 - serverless-manifest-plugin

Programatic usage

Using the json flag will pipe the service manifest to stdout. You can use this with a tool like jq to do something programatic with the data.

serverless manifest --json

Example:

serverless manifest --json | jq '.dev.functions'
# Outputs service function info

Generating a manifest file

The plugin will automatically create the manifest when you run serverless deploy

You can also manually generate the manifest at anytime with

serverless manifest

Additionally sls deploy --noDeploy will also generate a manifest file.

Example

Outputs urls, functions, outputs etc.

.serverless/manifest.json

{
  "dev": {
    "urls": {
      "apiGateway": "https://abc1234.execute-api.us-east-1.amazonaws.com/dev",
      "apiGatewayBaseURL": "https://abc1234.execute-api.us-east-1.amazonaws.com/dev",
      "httpApi": "https://qwertyxyz.execute-api.us-east-1.amazonaws.com",
      "httpApiBaseURL": "https://qwertyxyz.execute-api.us-east-1.amazonaws.com",
      "byPath": {
        "/user/profile": {
          "url": "https://qwertyxyz.execute-api.us-east-1.amazonaws.com/user/profile",
          "methods": [
            "POST",
            "GET"
          ]
        },
        "/tester": {
          "url": "https://abc1234.execute-api.us-east-1.amazonaws.com/dev/tester",
          "methods": [
            "POST"
          ]
        },
        "/wow-cool": {
          "url": "https://abc1234.execute-api.us-east-1.amazonaws.com/dev/wow-cool",
          "methods": [
            "POST"
          ]
        }
      },
      "byFunction": {
        "getProfileInfo": {
          "url": "https://qwertyxyz.execute-api.us-east-1.amazonaws.com/user/profile",
          "methods": [
            "GET"
          ]
        },
        "createProfileInfo": {
          "url": "https://qwertyxyz.execute-api.us-east-1.amazonaws.com/user/profile",
          "methods": [
            "POST"
          ]
        },
        "other": {
          "url": "https://abc1234.execute-api.us-east-1.amazonaws.com/dev/tester",
          "methods": [
            "POST"
          ]
        },
        "forth": {
          "url": "https://abc1234.execute-api.us-east-1.amazonaws.com/dev/wow-cool",
          "methods": [
            "POST"
          ]
        }
      },
      "byMethod": {
        "GET": [
          "https://qwertyxyz.execute-api.us-east-1.amazonaws.com/user/profile"
        ],
        "POST": [
          "https://qwertyxyz.execute-api.us-east-1.amazonaws.com/user/profile",
          "https://abc1234.execute-api.us-east-1.amazonaws.com/dev/tester",
          "https://abc1234.execute-api.us-east-1.amazonaws.com/dev/wow-cool"
        ]
      }
    },
    "functions": {
      "getProfileInfo": {
        "name": "http-api-node-dev-getProfileInfo",
        "arn": "arn:aws:lambda:us-east-1:xxxxxxxxxxxx:function:http-api-node-dev-getProfileInfo:4",
        "runtime": "nodejs12.x",
        "triggers": [
          "httpApi"
        ],
        "dependancies": {
          "direct": [
            "faker@^4.1.0",
            "analytics@^0.3.4"
          ],
          "nested": [
            "analytics-utils@^0.2.0",
            "dlv@^1.1.3",
            "@analytics/storage-utils@^0.2.3",
            "@analytics/cookie-utils@^0.2.3"
          ]
        }
      },
      "createProfileInfo": {
        "name": "http-api-node-dev-createProfileInfo",
        "arn": "arn:aws:lambda:us-east-1:xxxxxxxxxxxx:function:http-api-node-dev-createProfileInfo:4",
        "runtime": "nodejs12.x",
        "triggers": [
          "httpApi"
        ],
        "dependancies": {
          "direct": [
            "faker@^4.1.0",
            "analytics@^0.3.4"
          ],
          "nested": [
            "analytics-utils@^0.2.0",
            "dlv@^1.1.3",
            "@analytics/storage-utils@^0.2.3",
            "@analytics/cookie-utils@^0.2.3"
          ]
        }
      },
      "other": {
        "name": "http-api-node-dev-other",
        "arn": "arn:aws:lambda:us-east-1:xxxxxxxxxxxx:function:http-api-node-dev-other:3",
        "runtime": "nodejs12.x",
        "triggers": [
          "http"
        ],
        "dependancies": {
          "direct": [
            "faker@^4.1.0"
          ],
          "nested": []
        }
      },
      "forth": {
        "name": "http-api-node-dev-forth",
        "arn": "arn:aws:lambda:us-east-1:xxxxxxxxxxxx:function:http-api-node-dev-forth:2",
        "runtime": "nodejs12.x",
        "triggers": [
          "http"
        ],
        "dependancies": {
          "direct": [
            "[email protected]"
          ],
          "nested": []
        }
      }
    },
    "outputs": [
      {
        "OutputKey": "OtherLambdaFunctionQualifiedArn",
        "OutputValue": "arn:aws:lambda:us-east-1:xxxxxxxxxxxx:function:http-api-node-dev-other:3",
        "Description": "Current Lambda function version"
      },
      {
        "OutputKey": "GetProfileInfoLambdaFunctionQualifiedArn",
        "OutputValue": "arn:aws:lambda:us-east-1:xxxxxxxxxxxx:function:http-api-node-dev-getProfileInfo:4",
        "Description": "Current Lambda function version"
      },
      {
        "OutputKey": "ForthLambdaFunctionQualifiedArn",
        "OutputValue": "arn:aws:lambda:us-east-1:xxxxxxxxxxxx:function:http-api-node-dev-forth:2",
        "Description": "Current Lambda function version"
      },
      {
        "OutputKey": "ServiceEndpoint",
        "OutputValue": "https://abc1234.execute-api.us-east-1.amazonaws.com/dev",
        "Description": "URL of the service endpoint"
      },
      {
        "OutputKey": "ServerlessDeploymentBucketName",
        "OutputValue": "http-api-node-dev-serverlessdeploymentbucket-12eu0mj9zoo0s"
      },
      {
        "OutputKey": "CreateProfileInfoLambdaFunctionQualifiedArn",
        "OutputValue": "arn:aws:lambda:us-east-1:xxxxxxxxxxxx:function:http-api-node-dev-createProfileInfo:4",
        "Description": "Current Lambda function version"
      },
      {
        "OutputKey": "HttpApiUrl",
        "OutputValue": "https://qwertyxyz.execute-api.us-east-1.amazonaws.com",
        "Description": "URL of the HTTP API"
      }
    ]
  }
}