lerna-npm-proxy
v1.1.1
Published
Serve Lerna packages without publishing to a registry
Downloads
8
Maintainers
Readme
Serve Lerna packages without publishing to a registry.
Installation
yarn add lerna-npm-proxy
npm install lerna-npm-proxy
Installation
yarn add lerna-npm-proxy
npm install lerna-npm-proxy
CLI Usage
Running the server will allow you to use http://localhost:4873
to serve packages in your Lerna monorepo:
yarn lerna-npm-proxy
Then, in another terminal window:
yarn add @my-org/my-package --registry http://localhost:4873
This is especially useful for installing packages inside a docker container during development.
CLI Options
Usage: lerna-npm-proxy [options]
Serve Lerna packages as an NPM proxy.
Options:
-v --version Output the version number
-p --port <port> Port to listen on. Default: 4873
-r --registry <registry> Registry to proxy from
-s --silent Prevent logging. Default: false
-w --while <script> Script to run once server starts. Server will be killed once the script exits.
-h --help Display help for command
Commands:
help [command] Display help for command
Node API
import { start } from "lerna-npm-proxy";
start();
Types
import { start, Options, FastifyInstance } from "lernal-npm-proxy";
function start(options?: Options): Promise<FastifyInstance>;
type Options = {
/**
* Port to listen on. Default: 4873.
*/
port?: number;
/**
* Registry to proxy from.
*/
registry?: string;
/**
* Prevent logging. Default: false.
*/
silent?: boolean;
/**
* Script to run once server starts. Server will be killed once the script exits.
* This also disables server logging.
* NOTE: this is passed directly to `child_process.spawn`.
*/
while?: string;
};
- @bconnorwhite/exec: Execute commands while keeping flags easily configurable as an object
- chalk: Terminal string styling done right
- commander-version: A wrapper for Commander that automatically sets the version based on your package.json
- fastify: Fast and low overhead web framework, for Node.js
- fastify-http-proxy: proxy http requests, for Fastify
- package-run: Node API for running package.json scripts
- pacote: JavaScript package downloader
- parse-json-object: Parse a typed JSON object
- sha: Check and get file hashes
- which-pm-lockfile: Check if a project uses yarn, npm, or pnpm
- lerna: A tool for managing JavaScript projects with multiple packages.
- @bconnorwhite/bob: Bob is a toolkit for TypeScript projects
- @types/node: TypeScript definitions for Node.js
- @types/pacote: TypeScript definitions for pacote
- @types/sha: TypeScript definitions for sha