GithubHelp home page GithubHelp logo

isabella232 / npm-seal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zaach/npm-seal

0.0 0.0 0.0 162 KB

Verify that packages installed during development match those installed in production

JavaScript 71.44% HTML 28.56%

npm-seal's Introduction

A note from BitGo:

This is an updated version of zaach's npm-seal project, where we use a modern version of the npm dependency and we fetch the shasums from the package's local node_modules directory, rather than the global node.js cache directory (~/.npm).

seal

seal can verify that packages installed during development are identical to those installed during deployment. The standard npm shrinkwrap only ensures that package versions are the same, but does not verify contents. seal checks the shasum of the package tarballs downloaded by npm during development and deployment to ensure they are the same.

seal

Usage:

  1. Install you packages (npm install)
  2. Generate shrinkwrap (npm shrinkwrap)
  3. Generate a sealed shrinkwrap file (seal g)
  4. Deploy code and install packages (on server, npm install)
  5. Check sealed shrinkwrap against installed packages (on server, seal c)
  6. If the check fails, errors will be dumped to stderr in JSON

Install

npm install seal -g

CLI

$ seal -h

Usage: seal <command> [input] [options]

command     [generate|g|check|c] generate from a shrinkwrap or check a sealed shrinkwrap 
input       the shrinkwrap or sealed shrinkwrap file

Options:
   -o FILE, --output FILE    write output to specified file
   -c DIR, --cache-dir DIR   directory where npm package downloads are cached
   -v, --version             print version and exit

Examples:
seal generate ./npm-shrinkwrap.json
seal check ./sealed-npm-shrinkwrap.json

If the check fails, JSON will be dumped to stderr. E.g.:
[
  {
    "dep": "nomnom 1.5.2",
    "expected": "0ca9b018aedeeee38838a3c573d3caafa510522878adc4d26a51eea69fc7cf52",
    "actual": "b6cfb2d504d702a8cebca2b66d28efcf6a0f752dceeb234d1a9b291e9f62249d"
  },
  {
    "dep": "seal 0.0.1",
    "expected": "cb6454e280f5ab0218a756902cd0709b5c573f636fc3fa7ba1439a29da8b9824",
    "actual": "14a7e03047fd3eef6590382d0456d410965f35b685a63c15620e3b2fb0dedd92"
  }
]

License

MIT

npm-seal's People

Contributors

zaach avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.