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

pwrdrvr

v1.0.3

Published

Publish tool for deploying apps and updates

Downloads

226

Readme

Overview

pwrdrvr is the CLI used to deploy new MicroApps and new versions for existing MicroApps using the MicroApps framework.

Table of Contents

Video Preview of Deploying an App

Video Preview of Deploying an App

Installation

npm i -g pwrdrvr

Usage

Command - help

npx pwrdrvr help

Publish tool for deploying apps and updates

VERSION
  pwrdrvr/0.0.0 darwin-arm64 node-v18.12.1

USAGE
  $ pwrdrvr [COMMAND]

COMMANDS
  delete                  Delete app/version
  help                    display help for pwrdrvr
  nextjs-version          Apply version to next.config.js overtop of 0.0.0 placeholder
  nextjs-version-restore  Restore next.config.js
  preflight               Check if app/version are available
  publish                 Publish arbitrary framework app - deploy static assets to S3, alias the $LATEST Lambda
                          function, and add integration/route to API Gateway.
  publish-static          Publish arbitrary framework static app - deploy static assets to S3 only.

Command - preflight

npx pwrdrvr preflight help

Check if app/version are available

USAGE
  $ pwrdrvr preflight

OPTIONS
  -a, --app-name=app-name                          MicroApps app name (this becomes the path the app is rooted at)
  -d, --deployer-lambda-name=deployer-lambda-name  Name of the deployer lambda function
  -n, --new-version=new-version                    New semantic version to apply

  -o, --overwrite                                  Allow overwrite - Warn but do not fail if version exists.
                                                   Discouraged outside of test envs if cacheable static files have
                                                   changed.

  -v, --version                                    show CLI version

  --help                                           show CLI help

EXAMPLE
  $ pwrdrvr preflight -d microapps-deployer-dev -a release -n 0.0.13
  ✔ Preflight Version Check [0.2s]

Command - publish

npx pwrdrvr publish help

Publish arbitrary framework app - deploy static assets to S3, alias the $LATEST Lambda function, and add integration/route to API Gateway.

USAGE
  $ pwrdrvr publish

OPTIONS
  -a, --app-name=app-name                          MicroApps app name (this becomes the path the app is rooted at)
  -d, --deployer-lambda-name=deployer-lambda-name  Name of the deployer lambda function

  -i, --default-file=default-file                  Default file to return when the app is loaded via the router
                                                   without a version (e.g. when app/ is requested).

  -l, --app-lambda-name=app-lambda-name            ARN of lambda version, alias, or function (name or ARN) to deploy

  -n, --new-version=new-version                    New semantic version to apply

  -o, --overwrite                                  Allow overwrite - Warn but do not fail if version exists.
                                                   Discouraged outside of test envs if cacheable static files have
                                                   changed.

  -s, --static-assets-path=static-assets-path      Path to files to be uploaded to S3 static bucket at app/version/
                                                   path.  Do include app/version/ in path if files are already
                                                   "rooted" under that path locally.

  -t, --type=(apigwy|lambda-url|url|static)        [default: lambda-url] Type of the application and how its
                                                   requests are routed

  -u, --url=url                                    URL for `url` type applications

  -v, --version                                    show CLI version

  --help                                           show CLI help

  --no-cache                                       Force revalidation of CloudFront and browser caching of static
                                                   assets

  --startup-type=(iframe|direct)                   [default: iframe] How the app should be loaded

EXAMPLE
  $ pwrdrvr publish -d microapps-deployer-dev -l microapps-app-release-dev -a release -n 0.0.21
  ✔ Get S3 Temp Credentials [1s]
  ✔ Deploy to Lambda [0.6s]
  ✔ Confirm Static Assets Folder Exists [0.0s]
  ✔ Copy Static Files to Local Upload Dir [0.0s]
  ✔ Enumerate Files to Upload to S3 [0.0s]
  ✔ Upload Static Files to S3 [1s]
  ✔ Creating MicroApp Application: release [0.0s]
  ✔ Creating MicroApp Version: 0.0.21 [1s]

Command - publish-static

npx pwrdrvr publish-static help

Publish arbitrary framework static app - deploy static assets to S3 only.

USAGE
  $ pwrdrvr publish-static

OPTIONS
  -a, --app-name=app-name                          MicroApps app name (this becomes the path the app is rooted at)
  -d, --deployer-lambda-name=deployer-lambda-name  Name of the deployer lambda function

  -i, --default-file=default-file                  Default file to return when the app is loaded via the router
                                                   without a version (e.g. when app/ is requested).

  -n, --new-version=new-version                    New semantic version to apply

  -o, --overwrite                                  Allow overwrite - Warn but do not fail if version exists.
                                                   Discouraged outside of test envs if cacheable static files have
                                                   changed.

  -s, --static-assets-path=static-assets-path      Path to files to be uploaded to S3 static bucket at app/version/
                                                   path.  Do include app/version/ in path if files are already
                                                   "rooted" under that path locally.

  -v, --version                                    show CLI version

  --help                                           show CLI help

  --no-cache                                       Force revalidation of CloudFront and browser caching of static
                                                   assets

EXAMPLE
  $ pwrdrvr publish-static -d microapps-deployer-dev -l microapps-app-release-dev -a release -n 0.0.21
  ✔ Get S3 Temp Credentials [1s]
  ✔ Confirm Static Assets Folder Exists [0.0s]
  ✔ Copy Static Files to Local Upload Dir [0.0s]
  ✔ Enumerate Files to Upload to S3 [0.0s]
  ✔ Upload Static Files to S3 [1s]
  ✔ Creating MicroApp Application: release [0.0s]
  ✔ Creating MicroApp Version: 0.0.21 [1s]

Command - nextjs-version

npx pwrdrvr nextjs-version help

Apply version to next.config.js overtop of 0.0.0 placeholder

USAGE
  $ pwrdrvr nextjs-version

OPTIONS
  -l, --leave-copy               Leave a copy of the modifed files as .modified
  -n, --new-version=new-version  New semantic version to apply
  -v, --version                  show CLI version
  --help                         show CLI help

EXAMPLE
  $ pwrdrvr nextjs-version -n 0.0.13
  ✔ Modifying Config Files [0.0s]

Command - nextjs-version-restore

npx pwrdrvr nextjs-version-restore help

Restore next.config.js

USAGE
  $ pwrdrvr nextjs-version-restore

OPTIONS
  -v, --version  show CLI version
  --help         show CLI help

EXAMPLE
  $ pwrdrvr nextjs-version-restore
  ✔ Restoring Modified Config Files [0.0s]

Command - delete

npx pwrdrvr delete help

Delete app/version

USAGE
  $ pwrdrvr delete

OPTIONS
  -a, --app-name=app-name                          MicroApps app name (this becomes the path the app is rooted at)
  -d, --deployer-lambda-name=deployer-lambda-name  Name of the deployer lambda function
  -n, --new-version=new-version                    New semantic version to apply
  -v, --version                                    show CLI version
  --help                                           show CLI help

EXAMPLE
  $ pwrdrvr delete -d microapps-deployer-dev -a release -n 0.0.13
  ✔ App/Version deleted: release/0.0.13 [1.2s]