Baggy
A reverse engineered NPM registry. This Project was originally intended to be a self-hosted alternative to host in AWS, however since they announced CodeArtifact, this project is on hold for now...
Install / Use
/learn @Tanuel/BaggyREADME
Baggy NPM Registry
Baggy is a reverse engineered NPM registry with a modular structure.
You can provide your own functionality for storing artifacts and metadata.
Disclaimer
Baggy is not a production-ready registry. I have started this project for learning purposes and maybe at some point it can be used for specific setups. For now unit tests are missing as well as support for a few npm commands.
This Project is als not published on NPM yet.
Supported npm commands
- [x] install/update/view
- [x] publish
- [x] unpublish
- [x] audit (will proxy to the npm registry)
- [x] ping
- [x] dist-tag
- [x] deprecate
- [ ] login
- [ ] whoami
- [ ] team
- [ ] token
- [ ] search
- [ ] stars
- [ ] star
- [ ] unstar
Requirements
Setup
Clone the registry, then run one of those commands
yarn installyarn serveto start the express server with filestorageyarn serve-sqliteto start the express server with sqlite storage
you can now run npm/yarn commands against http://localhost:3000 by setting the "registry" option
Development
Quickstart
- Run
yarn installto install dependencies - Run
yarn serveto start express server - Open a separate Terminal
- Run
make testto execute the test script which will execute a few commands like publish and install
Using ts-node and nodemon
we can restart the server on any file changes that affect the server.
Files will be to the project root in .local. If the directory does not exist, it will be created.
Formatting
Code will be formatted on commit with pretty-quick. Also there is yarn lint
Future Plans
More providers
Future Providers could be something like these:
- AWS DynamoDB for Metadata
- Other cloud providers
Authentication
Login should probably not be implemented in the core project (@baggy/registry), but rather as a kind of middleware for express and other implementations
