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

@otr-app/start-pipeline

v1.0.0-beta.7

Published

Helper script that kicks of a pipeline

Readme

@otr-app/start-pipeline

A utility package for managing AWS CodePipeline operations, providing command-line tools to start pipeline executions and retrieve information about successful deployments.

Overview

This package contains two main utilities:

  • start-pipeline: Initiates a new pipeline execution with the current Git commit
  • get-last-successful-commit: Retrieves the commit hash of a previous successful deployment

Installation

npm install @otr-app/start-pipeline

Usage

start-pipeline

Starts a new AWS CodePipeline execution using the current Git commit as the source revision.

npx start-pipeline <pipeline-name>

Example:

npx start-pipeline otr_frontend

What it does:

  1. Gets the current Git commit hash (git rev-parse HEAD)
  2. Creates a new pipeline execution with the commit as the source revision
  3. Outputs the execution details

get-last-successful-commit

Retrieves the commit hash of a previous successful deployment from a specified pipeline and stage.

node dist/get-last-successful-commit [n-deploys] [pipeline-name] [stage-name]

Parameters:

  • n-deploys (optional): Number of deployments to look back (default: 0 for the most recent)
  • pipeline-name (optional): Name of the pipeline (default: otr_frontend)
  • stage-name (optional): Name of the stage to check (default: deploy)

Examples:

# Get the most recent successful commit on otr_frontend
node dist/get-last-successful-commit

# Get the commit from 2 deployments ago on otr_frontend 
node dist/get-last-successful-commit 2

# Get the commit from a specific pipeline and stage
node dist/get-last-successful-commit 0 otr_backend_service_mono Devo

What it does:

  1. Queries AWS CodePipeline for successful executions in the specified stage
  2. Extracts commit hashes from the execution source revisions
  3. Returns the commit hash at the specified position (0 = most recent, 1 = previous, etc.)

Configuration

The package uses the following default settings (defined in settings.ts):

  • Default Region: us-east-1
  • Root Pipeline Name: otr_frontend

Prerequisites

  • AWS credentials configured (via AWS CLI, environment variables, or IAM roles)
  • Access to the specified AWS CodePipeline
  • Git repository with commit history

AWS Permissions

The following AWS permissions are required:

For start-pipeline:

  • codepipeline:StartPipelineExecution

For get-last-successful-commit:

  • codepipeline:GetPipeline
  • codepipeline:ListPipelineExecutions

Error Handling

Both commands will exit with code 1 if they encounter errors:

  • Invalid pipeline names
  • Missing AWS credentials
  • Network connectivity issues
  • Invalid command arguments

Development

Building

npm run build

Dependencies

  • @aws-sdk/client-codepipeline: AWS SDK for CodePipeline operations
  • typescript: TypeScript compiler

License

ISC