https://github.com/artelydev/secure-publish
Secure publish of private packages
https://github.com/artelydev/secure-publish
npm package private private-package private-registry registry security
Last synced: 4 months ago
JSON representation
Secure publish of private packages
- Host: GitHub
- URL: https://github.com/artelydev/secure-publish
- Owner: artelydev
- License: mit
- Created: 2020-05-22T12:30:44.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-18T18:29:43.000Z (5 months ago)
- Last Synced: 2024-12-18T19:38:10.303Z (5 months ago)
- Topics: npm, package, private, private-package, private-registry, registry, security
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/secure-publish
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
:no_entry: secure-publish :no_entry_sign:
Private packages publishing made easy---
[](https://www.npmjs.com/package/secure-publish)
## Motivation
#### TL;DR
To prevent your private packages available publicly on `npmjs` or `yarnpkg`.---
If you are using `npm publish` for your private packages e.g. for publishing
them to a local npm registry or to your own private npm registry - at some point
you may end up with your package being available publicly on `npm` or `yarn` registry if
something will go wrong.This tool is just another safety catch for such situations, not allowing one
to simply pass through without all the needed setup.## Installation
```bash
$ npm i -D secure-publish
```Add pre-publish script in `package.json`:
```bash
{
...,
"scripts": {
"prepublishOnly": "secure-publish"
},
...
}
```Set a private registry in `.npmrc`:
```bash
registry=https://private.registry.com
```## Scoped packages
Just add the scope in your `package.json` and you're done:
```bash
{
"name": "@private-scope/private-package",
...
}
```
---
It is also **recommended** providing custom registry for scope in your `.npmrc` like this:```bash
@private-scope:registry=https://private-scope.registry.com
```## Usage
```bash
$ npm publish
```---
:dizzy: