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

@saouas/cascade-js

v0.0.4

Published

The CasC SDK made for interacting with your AWS secrets from JavaScript or TypeScript applications.

Readme

CasC JS SDK

The CasC SDK made for interacting with your AWS secrets from JavaScript or TypeScript applications.

Table of Contents

Install

NPM

npm install @saouas/cascade-js --save 

Yarn

yarn add @saouas/cascade-js

Usage

Define your configuration contract

Create a casc.config.yml file in the root of your project, and define the structure and types of your application configuration.

For example:

database:
  host:
    type: string
  port:
    type: integer
  username:
    type: string
  password:
    type: string
    secret: true
    regex: ^[a-zA-Z0-9]+$
  • You can nest properties to any depth level
  • Supported types are boolean, string, integer and float
  • Properties can be flagged with optional: true, or secret: true
  • For type string, you can add a regex expression that the value will have to match

Build your configuration to access it in your code

You can add a build configuration command to your package.json:

{
  "scripts": {
    "build:config": "cascade-js build"
  }
}

And then run npm run build:config or yarn build:config

Init your configuration at the start of your application

For example, in main.ts:

import { Casc } from '@casc-sdk';

async function bootstrap() {
  await Casc.init({ secretId: process.env.AWS_SECRET_ID });
  const app = await NestFactory.create(ApplicationModule);
  await app.listen(9999);
}

bootstrap();

Use your configuration anywhere in your code

Your configuration is then accessible with the import:

import { Casc } from '@casc-sdk';

Or using require:

const { Casc } = require('@casc-sdk');

For example:

import { Casc } from '@casc-sdk';
import { Client } from "postgres";

export class DatabaseClient {
  private client: Client;

  constructor() {
    this.client = new Client({
      host: Casc.config.database.host,
      port: Casc.config.database.port,
      username: Casc.config.database.username,
      password: Casc.config.database.password,
    })
  }
}

Create your local configuration file

Create a casc.local.yml file in the root of your project, defining the values matching your configuration contract.

For example:

database:
  host: "localhost"
  port: 5432
  username: "postgres"
  password: "XPJc5qAbQcn77GWg"

Check your configuration is valid

In your CI or CD pipeline, run:

cascade-js validate --api-key $YOUR_ENVIRONMENT_API_KEY

Which will check if the values filled in the Casc platform comply with your contract.

Casc CLI commands

cascade-js build

Build your typescript types from your contract file.

-c, --contract-file

The path to your configuration contract file. Default is casc.config.yml.

-r, --force-recreate

By default, if contract stays identical, configuration won't be rebuilt to save time. Passing this option will force the rebuild of your configuration.

cascade-js validate

Check that with your configuration values, either read from a local file or fetched from the Casc platform, match your contract.

-c, --contract-file

The path to your configuration contract file. Default is casc.config.yml.

-f, --values-file

The path to your local values file. Default is casc.local.yml.

-s, --secret-id

The AWS secret id that will be used to fetch values. If specified, parameter -f, --values-file is ignored.