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

@dwp/casa-massimo-cli

v0.1.1

Published

A command line tool for generating CASA massimo plugins (wraps massimo-cli)

Readme

casa-massimo-cli

A command line tool for generating CASA massimo plugins (wraps the Massimo cli tool).

Installation

npm install @dwp/casa-massimo-cli --save-dev
npm install @dwp/casa-massimo-plugin

Usage

Generate a CASA Massimo plugin from a local Open API schema (JSON or YAML) and save it into our /plugins folder:

npx casamassimo ./schemas/movies.openapi.json --output=casa --name=movies --folder=./plugins/movies

You also fetch the schema from a remote URL:

npx casamassimo https://movies.api/api-docs --output=casa --name=movies --folder=./plugins/movies

Then import it into your CASA app:

import { configure } from "@dwp/govuk-casa";
import moviesPlugin from "./plugins/movies/movies.mjs";

const { ancilloryRouter } = configure({
  ...
  plugins: [await moviesPlugin({
    // The base URL of the API
    url: "http://movies.api",
    // Optional: throw an error on error level status codes. Default: false.
    throwOnError: true,
    // Set headers on all HTTP requests from the client:
    getHeaders(req, res, opts) {
      return { "x-correlation-id": req.id };
    }
  })]
});

ancilloryRouter.get("/movie/:id", async (req, res, next) => {
  const movie = await req.movies.getMovieById({ id: 100 });
  res.render("movie.njk", movie.body);
});

You can also generate standard express middleware:

npx casamassimo ./schemas/movies.openapi.json --output=express --name=movies --folder=./middleware/movies
import express from "express";
import middleware from "./middleware/movies/movies.mjs";

const app = express();

// Supports the same options
app.use(await middleware({ url: "http://movies.api" }));

app.get("/movie/:id", async (req, res, next) => {
  const movie = await req.movies.getMovieById({ id: 100 });
  res.json("movie.njk", movie.body);
});

Or just a client library:

npx casamassimo ./schemas/movies.openapi.json --output=client --name=movies --folder=./lib/movies
import client from "./lib/movies/movies.mjs";

const movie = await client.getMovieById({ id: 100 });

By default Massimo cli will enable both the "full request" and "full response" Massimo client options with the --full option. If you just want one or the other, you must disable --full then enable either --full-request or --full-response:

npx casamassimo ./schemas/movies.openapi.json --output=client --full=false --full-response=true

For example:

// Full request clients require you to specify where the params go in the
// request:
const res = fullRequestClient.findMovie({
  query: {
    title: "Rope"
  },
  headers: {
    auth: "Token"
  }
});

// With full request disabled you can use a flat options object:
const res = await notFullRequestClient.findMovie({ title: "Rope", auth: "Token" });

// A full response client returns the status code, headers and body:
const res = await fullBodyClient.findMovie({ title: "Rope", auth: "Token" });
console.log(res); // { statusCode: 200, headers: {...}, body: { id: 100 } }

// With full response disabled the client will only return the body
const movie = await notFullBodyClient.findMovie({ title: "Rope", auth: "Token" });
console.log(movie); // { id: 100 }

For more information see the Massimo documentation.