mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
chore: first version of website using docusaurus
This commit is contained in:
parent
018448b296
commit
83ef0b2305
45 changed files with 1474 additions and 203 deletions
|
@ -2,3 +2,4 @@ node_modules
|
|||
coverage/
|
||||
wiki/
|
||||
static/
|
||||
website/
|
||||
|
|
|
@ -4,7 +4,9 @@ coverage/
|
|||
verdaccio-*.tgz
|
||||
test-storage*
|
||||
scripts/
|
||||
wiki/
|
||||
docs/
|
||||
src/webui
|
||||
tools/
|
||||
/.*
|
||||
website/
|
||||
|
||||
|
|
49
crowdin.yaml
Normal file
49
crowdin.yaml
Normal file
|
@ -0,0 +1,49 @@
|
|||
project_identifier_env: CROWDIN_VERDACCIO_PROJECT_ID
|
||||
api_key_env: CROWDIN_VERDACCIO_API_KEY
|
||||
base_path: "./"
|
||||
preserve_hierarchy: true
|
||||
|
||||
files:
|
||||
-
|
||||
source: '/docs/*.md'
|
||||
translation: '/website/translated_docs/%locale%/%original_file_name%'
|
||||
languages_mapping: &anchor
|
||||
locale:
|
||||
'af': 'af'
|
||||
'ar': 'ar'
|
||||
'bs-BA': 'bs-BA'
|
||||
'ca': 'ca'
|
||||
'cs': 'cs'
|
||||
'da': 'da'
|
||||
'de': 'de'
|
||||
'el': 'el'
|
||||
'es-ES': 'es-ES'
|
||||
'fa': 'fa-IR'
|
||||
'fi': 'fi'
|
||||
'fr': 'fr'
|
||||
'he': 'he'
|
||||
'hu': 'hu'
|
||||
'id': 'id-ID'
|
||||
'it': 'it'
|
||||
'ja': 'ja'
|
||||
'ko': 'ko'
|
||||
'mr': 'mr-IN'
|
||||
'nl': 'nl'
|
||||
'no': 'no-NO'
|
||||
'pl': 'pl'
|
||||
'pt-BR': 'pt-BR'
|
||||
'pt-PT': 'pt-PT'
|
||||
'ro': 'ro'
|
||||
'ru': 'ru'
|
||||
'sk': 'sk-SK'
|
||||
'sr': 'sr'
|
||||
'sv-SE': 'sv-SE'
|
||||
'tr': 'tr'
|
||||
'uk': 'uk'
|
||||
'vi': 'vi'
|
||||
'zh-CN': 'zh-Hans'
|
||||
'zh-TW': 'zh-Hant'
|
||||
-
|
||||
source: '/website/i18n/en.json'
|
||||
translation: '/website/i18n/%locale%.json'
|
||||
languages_mapping: *anchor
|
|
@ -1,4 +1,8 @@
|
|||
# Installing with Ansible
|
||||
---
|
||||
id: ansible
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Installing with Ansible"
|
||||
---
|
||||
|
||||
We have a customised solution for `verdaccio` in our organization.
|
||||
|
|
@ -1,4 +1,8 @@
|
|||
# Authentification
|
||||
---
|
||||
id: authentification
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Authentification"
|
||||
---
|
||||
|
||||
The authentification is tied to the auth [plugin](plugins.md) you are using. The package restrictions also is handled by the [Package Access](packages.md).
|
||||
|
||||
|
@ -11,13 +15,13 @@ npm adduser --registry http://localhost:4873
|
|||
A token is generated in the `npm` configuration file hosted in your user home folder. For more information about `.npmrc` read the [official documentation](https://docs.npmjs.com/files/npmrc).
|
||||
|
||||
```bash
|
||||
cat .npmrc
|
||||
cat .npmrc
|
||||
registry=http://localhost:5555/
|
||||
//localhost:5555/:_authToken="secretVerdaccioToken"
|
||||
//registry.npmjs.org/:_authToken=secretNpmjsToken
|
||||
```
|
||||
|
||||
#### Anonymous publish
|
||||
#### Anonymous publish
|
||||
|
||||
`verdaccio`allows you to enable anonymous publish, to achieve that you will need to set up correctly your [packages acces](packages.md).
|
||||
|
||||
|
@ -28,9 +32,9 @@ Eg:
|
|||
access: $anonymous
|
||||
publish: $anonymous
|
||||
proxy: npmjs
|
||||
```
|
||||
```
|
||||
|
||||
As is described [on issue #212](https://github.com/verdaccio/verdaccio/issues/212#issuecomment-308578500) until `npm@5.3.0` and all minor releases **won't allow you publish without a token**. However `yarn` has not such limitation.
|
||||
As is described [on issue #212](https://github.com/verdaccio/verdaccio/issues/212#issuecomment-308578500) until `npm@5.3.0` and all minor releases **won't allow you publish without a token**. However `yarn` has not such limitation.
|
||||
|
||||
## Default htpasswd
|
||||
|
||||
|
@ -43,10 +47,10 @@ auth:
|
|||
# Maximum amount of users allowed to register, defaults to "+inf".
|
||||
# You can set this to -1 to disable registration.
|
||||
#max_users: 1000
|
||||
```
|
||||
```
|
||||
|
||||
Property | Type | Required | Example | Support | Description
|
||||
--- | --- | --- | --- | --- | ---
|
||||
Property | Type | Required | Example | Support | Description
|
||||
--- | --- | --- | --- | --- | ---
|
||||
file | string | Yes | ./htpasswd | all | file that host the encrypted credentials
|
||||
max_users | number | No | 1000 | all | set limit of users
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
# Build Verdaccio
|
||||
---
|
||||
id: build
|
||||
title: "Build the source code"
|
||||
---
|
||||
|
||||
Verdaccio relies on `yarn` instead `npm` to download depenedencies.
|
||||
|
||||
|
@ -19,11 +22,11 @@ On master branch the unique part we have to build is the UI which is based on Re
|
|||
|
||||
### Scripts
|
||||
|
||||
script | Description
|
||||
--- | --- |
|
||||
script | Description
|
||||
--- | --- |
|
||||
release | this script is used to generate changelog and raise up the version according the commits messages
|
||||
prepublish | it ensures before publish the new ui is being generated
|
||||
test | run all the test
|
||||
test | run all the test
|
||||
pre:ci | specific task for CI, build the UI required for test
|
||||
test:ci | run test generating coverage
|
||||
test:only | run only test
|
||||
|
@ -47,8 +50,8 @@ The next major version is based on `babel` and `flow`. If you switch from master
|
|||
|
||||
### Scripts
|
||||
|
||||
script | Description
|
||||
--- | --- |
|
||||
script | Description
|
||||
--- | --- |
|
||||
**flow** | run flow check
|
||||
**dev:start** | run `babel-node` and transpile code on memory
|
||||
**code:build** | transpile `verdaccio` with `babel` and copy transpiled code to `build/`
|
|
@ -1,6 +1,10 @@
|
|||
# Command Line Interface
|
||||
---
|
||||
id: cli
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Command Line Tool"
|
||||
---
|
||||
|
||||
The verdaccio CLI is your go start the application.
|
||||
The verdaccio CLI is your go start the application.
|
||||
|
||||
## Commands
|
||||
|
||||
|
@ -8,7 +12,7 @@ The verdaccio CLI is your go start the application.
|
|||
$ verdaccio --listen 4000 --config ./config.yaml
|
||||
```
|
||||
|
||||
Command | Default | Example | Description
|
||||
--- | --- | --- | ---
|
||||
Command | Default | Example | Description
|
||||
--- | --- | --- | ---
|
||||
--listen \ **-l** | 4873 | -p 7000 | http port
|
||||
--config \ **-c** | ~/home/user/.local/verdaccio/config.yaml | /foo/bar/config.yaml | the configuration file
|
|
@ -1,4 +1,8 @@
|
|||
# Configuration File
|
||||
---
|
||||
id: configuration
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Configuration File"
|
||||
---
|
||||
|
||||
This file is the cornerstone of verdaccio where you can modify the default behaviour, enable plugins and extend features.
|
||||
|
||||
|
@ -87,7 +91,7 @@ packages:
|
|||
|
||||
## Advanced Settings
|
||||
|
||||
### Offline Publish
|
||||
### Offline Publish
|
||||
|
||||
By default `verdaccio` does not allow to publish when the client is offline, that behavior can be overridden set it in to *true*.
|
||||
|
||||
|
@ -162,4 +166,4 @@ notify:
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,4 +1,8 @@
|
|||
# Contributing
|
||||
---
|
||||
id: contributing
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Contributing Verdaccio"
|
||||
---
|
||||
|
||||
First of all 👏👏 thanks for visiting this page, for us means you are willing contribute to `verdaccio` and we are happy for that. Jumping into an unfamiliar code base is not easy but we are here to help you.
|
||||
|
||||
|
@ -17,17 +21,17 @@ As a first glance verdaccio is a single repository, but there are many ways you
|
|||
|
||||
All we have different skills, so, let's see where you might feel comfortable.
|
||||
|
||||
#### I know or I want to learn Node.js
|
||||
### I know or I want to learn Node.js
|
||||
|
||||
Node.js is the base of `verdaccio`, we use libraries as `express`, `commander`, `request` or `async`. Verdaccio is basically a Rest API that create a communication with `npm` clients compatible, as `yarn`.
|
||||
Node.js is the base of `verdaccio`, we use libraries as `express`, `commander`, `request` or `async`. Verdaccio is basically a Rest API that create a communication with `npm` clients compatible, as `yarn`.
|
||||
|
||||
We have a long [list of plugins](https://github.com/verdaccio/verdaccio/blob/master/wiki/plugins.md) ready to be used and improved but at the same time [you might create your own](plugin.md).
|
||||
|
||||
#### I would prefer to work in the User Interface
|
||||
### I would prefer to work in the User Interface
|
||||
|
||||
Recently we have moved to modern techonologies as `React` and `element-react`.
|
||||
Recently we have moved to modern techonologies as `React` and `element-react`.
|
||||
|
||||
#### I feel more confortable improving the stack
|
||||
### I feel more confortable improving the stack
|
||||
|
||||
Of course, we will be happy to help us improving the stack, you can upgrade dependencies as `eslint`, `stylelint`, `webpack`. You migt merely improve the `webpack` configuration would be great. Any suggestion is very welcome. Furthermore whether you have experience with **Yeoman** you might help us with the [verdaccio generator](https://github.com/verdaccio/generator-verdaccio-plugin).
|
||||
|
||||
|
@ -40,15 +44,15 @@ Here some ideas:
|
|||
* Improve hot reload with Webpack
|
||||
* We use babel and webpack across all dependencies, why not a common preset?
|
||||
|
||||
#### I do great Documentation
|
||||
### I do great Documentation
|
||||
|
||||
Many contributors find typos and grammar issues, that also helps to improve the overall experience for troubleshooting.
|
||||
|
||||
#### I am a Designer
|
||||
### I am a Designer
|
||||
|
||||
We have a frontend website [http://www.verdaccio.org/](http://www.verdaccio.org/) that will be happy to see your ideas.
|
||||
|
||||
#### I am a DevOps
|
||||
### I am a DevOps
|
||||
|
||||
We have a widely popular Docker image [https://hub.docker.com/r/verdaccio/verdaccio/](https://hub.docker.com/r/verdaccio/verdaccio/) that need maintenance and pretty likely huge improvements, we need your knowledge for the benefits of all users.
|
||||
|
|
@ -1,10 +1,14 @@
|
|||
# Creating Plugins
|
||||
---
|
||||
id: dev-plugins
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Developing Plugins"
|
||||
---
|
||||
|
||||
There are many ways to extend `verdaccio`, currently we only support `authentication plugins`
|
||||
|
||||
## Authentication Plugins
|
||||
|
||||
This section will describe how it looks like a Verdaccio plugin in a ES5 way. Basically we have to return an object with a single method called `authenticate` that will recieve 3 arguments (`user, password, callback`). Once the authentication has been executed there is 2 options to give a response to `verdaccio`.
|
||||
This section will describe how it looks like a Verdaccio plugin in a ES5 way. Basically we have to return an object with a single method called `authenticate` that will recieve 3 arguments (`user, password, callback`). Once the authentication has been executed there is 2 options to give a response to `verdaccio`.
|
||||
|
||||
##### OnError
|
||||
|
|
@ -1,4 +1,8 @@
|
|||
# Prebuilt images
|
||||
---
|
||||
id: docker
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: Docker
|
||||
---
|
||||
|
||||
To pull the latest pre-built [docker image](https://hub.docker.com/r/verdaccio/verdaccio/):
|
||||
|
||||
|
@ -42,7 +46,7 @@ To run the docker container:
|
|||
```bash
|
||||
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
|
||||
```
|
||||
The last argument defines which image to use.
|
||||
The last argument defines which image to use.
|
||||
The above line will pull the latest prebuilt image from dockerhub, if you haven't done that already.
|
||||
|
||||
If you have [build an image locally](#build-your-own-docker-image) use `verdaccio` as the last argument.
|
||||
|
@ -69,7 +73,7 @@ This changes which port the docker container exposes and the port verdaccio list
|
|||
Of course the numbers you give to `-p` paremeter need to match,
|
||||
so assuming you want them to all be the same this is what you could copy, paste and adopt:
|
||||
```bash
|
||||
PORT=5000; docker run -it --rm --name verdaccio \
|
||||
PORT=5000; docker run -it --rm --name verdaccio \
|
||||
--env PORT -p $PORT:$PORT
|
||||
verdaccio/verdaccio
|
||||
```
|
||||
|
@ -79,7 +83,7 @@ You can configure the protocol verdaccio is going to listen on, similarly to the
|
|||
You have to overwrite the default value("http") of the `PROTOCOL` environment variable to "https", after you specified the certificates in the config.yaml.
|
||||
|
||||
```bash
|
||||
PROTOCOL=https; docker run -it --rm --name verdaccio \
|
||||
PROTOCOL=https; docker run -it --rm --name verdaccio \
|
||||
--env PROTOCOL -p 4873:4873
|
||||
verdaccio/verdaccio
|
||||
```
|
||||
|
@ -87,7 +91,7 @@ PROTOCOL=https; docker run -it --rm --name verdaccio \
|
|||
## Using docker-compose
|
||||
|
||||
1. Get the latest version of [docker-compose](https://github.com/docker/compose).
|
||||
2. Build and run the container:
|
||||
2. Build and run the container:
|
||||
|
||||
```bash
|
||||
$ docker-compose up --build
|
||||
|
@ -96,7 +100,7 @@ $ docker-compose up --build
|
|||
You can set the port to use (for both container and host) by prefixing the above command with `PORT=5000 `.
|
||||
|
||||
Docker will generate a named volume in which to store persistent application data. You can use `docker inspect` or `docker volume inspect` to reveal the physical location of the volume and edit the configuration, such as:
|
||||
|
||||
|
||||
```
|
||||
$ docker volume inspect verdaccio_verdaccio
|
||||
[
|
105
docs/home.md
Normal file
105
docs/home.md
Normal file
|
@ -0,0 +1,105 @@
|
|||
---
|
||||
id: home
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Verdaccio npm proxy private registry"
|
||||
---
|
||||
|
||||
|
||||
<div class="top-section-home">
|
||||
<div class="logo-section"></div>
|
||||
|
||||
<div class="title-section">
|
||||
site.title
|
||||
</div>
|
||||
|
||||
<div class="subtitle-section">
|
||||
site.description
|
||||
</div>
|
||||
|
||||
<div class="badges">
|
||||
<span>
|
||||
<a href="https://github.com/verdaccio/verdaccio">
|
||||
<img src="https://img.shields.io/github/stars/verdaccio/verdaccio.svg?style=social&label=Star&maxAge=3600" style="max-width:100%;">
|
||||
</a>
|
||||
</span>
|
||||
<span>
|
||||
<a href="https://www.npmjs.org/package/verdaccio">
|
||||
<img src="https://img.shields.io/npm/v/verdaccio.svg" alt="npm version badge">
|
||||
</a>
|
||||
</span>
|
||||
<span>
|
||||
<a href="https://www.npmjs.org/package/verdaccio">
|
||||
<img src="https://camo.githubusercontent.com/81e53cc0a99c3ae97709fa66232a5807c346c61e/687474703a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f76657264616363696f2e737667" alt="downloads badge" data-canonical-src="http://img.shields.io/npm/dm/verdaccio.svg" style="max-width:100%;">
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="link-section">
|
||||
<a href="https://github.com/verdaccio" title="Github verdaccio page">GitHub</a>
|
||||
<a href="https://github.com/verdaccio/verdaccio/tree/master/wiki" title="Documentation">Documentation</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
## Easy to Install
|
||||
|
||||
One single command to install the application
|
||||
|
||||
```sh
|
||||
$> npm install --global verdaccio
|
||||
|
||||
# or
|
||||
|
||||
$> yarn global add verdaccio
|
||||
|
||||
```
|
||||
|
||||
## Easy to Set Up
|
||||
|
||||
Set your verdaccio registry as default
|
||||
|
||||
```sh
|
||||
|
||||
$> npm set registry http://localhost:4873
|
||||
|
||||
$> npm adduser --registry http://localhost:4873
|
||||
|
||||
```
|
||||
|
||||
## Easy to Use
|
||||
|
||||
Run it in your terminal
|
||||
|
||||
```sh
|
||||
|
||||
$> verdaccio
|
||||
warn --- config file - /home/.config/verdaccio/config.yaml
|
||||
warn --- http address - http://localhost:5555/ - verdaccio/2.2.0
|
||||
|
||||
```
|
||||
|
||||
|
||||
#### That's it ! Enjoy your **private package manager**.
|
||||
|
||||
##### and all the most popular npm clients are supported.
|
||||
|
||||
<div class="client-support">
|
||||
<div class="client">
|
||||
<img src="css/icon/npm-logo.svg" alt="Docker Support" width="200"/>
|
||||
</div>
|
||||
<div class="client">
|
||||
<img src="css/icon/yarn-logo.svg" alt="Docker Support" width="200"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h1>
|
||||
Docker Ready
|
||||
</h1>
|
||||
<a href="https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md" target="_blank">
|
||||
<img src="css/icon/docker.jpeg" alt="Docker Support" width="200"/>
|
||||
</a>
|
||||
</div>
|
|
@ -1,15 +1,19 @@
|
|||
# Installing on IIS server
|
||||
---
|
||||
id: iss-server
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Installing on IIS server"
|
||||
---
|
||||
|
||||
These instructions were written for Windows Server 2012, IIS 8, [Node.js 0.12.3](https://nodejs.org/), [iisnode 0.2.16](https://github.com/tjanczuk/iisnode) and [verdaccio 2.1.0](https://github.com/verdaccio/verdaccio).
|
||||
|
||||
* Install IIS Install [iisnode](https://github.com/tjanczuk/iisnode).
|
||||
* Install IIS Install [iisnode](https://github.com/tjanczuk/iisnode).
|
||||
Make sure you install prerequisites (Url Rewrite Module & node) as explained in the instructions for iisnode.
|
||||
* Create a new folder in Explorer where you want to host verdaccio.
|
||||
For example `C:\verdaccio`.
|
||||
Save [package.json](https://github.com/verdaccio/verdaccio/wiki/Installing-on-IIS-server#packagejson),
|
||||
[start.js](https://github.com/verdaccio/verdaccio/wiki/Installing-on-IIS-server#startjs)
|
||||
* Create a new folder in Explorer where you want to host verdaccio.
|
||||
For example `C:\verdaccio`.
|
||||
Save [package.json](https://github.com/verdaccio/verdaccio/wiki/Installing-on-IIS-server#packagejson),
|
||||
[start.js](https://github.com/verdaccio/verdaccio/wiki/Installing-on-IIS-server#startjs)
|
||||
and [web.config](https://github.com/verdaccio/verdaccio/wiki/Installing-on-IIS-server#webconfig) in this folder.
|
||||
* Create a new site in Internet Information Services Manager. You can name it whatever you want.
|
||||
* Create a new site in Internet Information Services Manager. You can name it whatever you want.
|
||||
I'll call it verdaccio in these [instructions](http://www.iis.net/learn/manage/configuring-security/application-pool-identities). Specify the path to where you saved all files and a port number.
|
||||
* Go back to Explorer and give the user that runs the application pool modify rights to the folder you just created. If you've named the new site verdaccio and did not change the app pool, it's running under an ApplicationPoolIdentity and you should give the user IIS AppPool\verdaccio modify rights see instructions if you need help. (You can restrict access later if you want so that it only has modify rights on the iisnode and verdaccio\storage)
|
||||
* Start a command prompt and execute the commands below to download verdaccio:
|
||||
|
@ -29,8 +33,8 @@ I wanted the `verdaccio` site to be the default site in IIS so I did the followi
|
|||
* I stopped the "Default Web Site" and only start the site "verdaccio" site in IIS
|
||||
* I set the bindings to "http", ip address "All Unassigned" on port 80, ok any warning or prompts
|
||||
|
||||
These instructions are based on [Host Sinopia in IIS
|
||||
on Windows](https://gist.github.com/HCanber/4dd8409f79991a09ac75). I had to tweak my web config as per below but you may find the original from the
|
||||
These instructions are based on [Host Sinopia in IIS
|
||||
on Windows](https://gist.github.com/HCanber/4dd8409f79991a09ac75). I had to tweak my web config as per below but you may find the original from the
|
||||
for mentioned link works better
|
||||
|
||||
A default configuration file will be created `c:\verdaccio\verdaccio\config.yaml`
|
||||
|
@ -64,8 +68,8 @@ require('./node_modules/verdaccio/src/lib/cli.js');
|
|||
<modules>
|
||||
<remove name="WebDAVModule" />
|
||||
</modules>
|
||||
|
||||
<!-- indicates that the start.js file is a node.js application
|
||||
|
||||
<!-- indicates that the start.js file is a node.js application
|
||||
to be handled by the iisnode module -->
|
||||
<handlers>
|
||||
<remove name="WebDAV" />
|
||||
|
@ -76,7 +80,7 @@ require('./node_modules/verdaccio/src/lib/cli.js');
|
|||
<rewrite>
|
||||
<rules>
|
||||
|
||||
<!-- iisnode folder is where iisnode stores it's logs. These should
|
||||
<!-- iisnode folder is where iisnode stores it's logs. These should
|
||||
never be rewritten -->
|
||||
<rule name="iisnode" stopProcessing="true">
|
||||
<match url="iisnode*" />
|
||||
|
@ -92,15 +96,15 @@ require('./node_modules/verdaccio/src/lib/cli.js');
|
|||
</rewrite>
|
||||
|
||||
<!-- exclude node_modules directory and subdirectories from serving
|
||||
by IIS since these are implementation details of node.js applications -->
|
||||
by IIS since these are implementation details of node.js applications -->
|
||||
<security>
|
||||
<requestFiltering>
|
||||
<hiddenSegments>
|
||||
<add segment="node_modules" />
|
||||
</hiddenSegments>
|
||||
</requestFiltering>
|
||||
</security>
|
||||
|
||||
</security>
|
||||
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
````
|
88
docs/index.md
Normal file
88
docs/index.md
Normal file
|
@ -0,0 +1,88 @@
|
|||
---
|
||||
id: index1
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Docs Home"
|
||||
---
|
||||
|
||||
`verdaccio` is a fork of **sinopia** and it's backwards compatible.
|
||||
|
||||
## Why should I use verdaccio?👌
|
||||
|
||||
|
||||
* I am/was **sinopia** user and need an **easy migration**.
|
||||
* I need a lightweight and free solution 🎉 to host my private packages and no license worries 🎊.
|
||||
* I need long-term support and help when I got stuck.
|
||||
* I want a product compatible with the newer tools as **Yarn** and **DevOps (Docker, Ansible, Puppet, etc)** tools.
|
||||
* An evolving plugabble product, not only for **Authentification**, also for **Storage** and more in the future.
|
||||
* An active community 🙋♂️🙋.
|
||||
* Integration with **Nexus**, **Artifactoy** and any other npm compatible registry.
|
||||
|
||||
A bunch more of reasons [you might be interested](https://medium.com/@jotadeveloper/five-use-cases-where-a-npm-private-proxy-fits-in-your-workflow-632a81779c14).
|
||||
|
||||
### Why we forked from Sinopia? 🚀
|
||||
|
||||
It [appeared that sinopia maintenance had stalled and the author had abandoned it](https://github.com/rlidwka/sinopia/issues/376),
|
||||
so there was a suggestion that the sinopia-using community would benefit
|
||||
from a fresh look at the code and the outstanding issues. So here we are 🎉🎉🎉. The last step about the [detach from sinopia](https://github.com/verdaccio/verdaccio/issues/38).
|
||||
|
||||
### Near Future 🚧
|
||||
|
||||
`verdaccio` aims to be compatible with sinopia along the time preserving the main features, a lightweight app based on local file system and easy installation but being able to be pluggable and built over a modern tool stack.
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Installation
|
||||
|
||||
* [Installation](/docs/installation)
|
||||
|
||||
### Usage
|
||||
|
||||
* [Command Line](/docs/cli)
|
||||
|
||||
### Configuration
|
||||
|
||||
* [The configuration file](/docs/configuration)
|
||||
* [Setting up *uplinks*](/docs/uplinks)
|
||||
* [Packages Access](/docs/packages)
|
||||
* [Authorization and Access](/docs/authentication)
|
||||
* [Enable Notifications](/docs/notifications)
|
||||
|
||||
* [Custom Logs](/docs/logger)
|
||||
|
||||
### UI Customization
|
||||
|
||||
* [Configure the Web](/docs/webui)
|
||||
|
||||
|
||||
## Server Configurations
|
||||
|
||||
* [Advanced Server Configuration](/docs/server)
|
||||
* [Reverse Proxy](/docs/reverse-proxy)
|
||||
* [SSL Certificates](/docs/ssl)
|
||||
|
||||
### Windows Specific Settings
|
||||
|
||||
* [Installing As a Windows Service](/docs/windows)
|
||||
* [Installing on IIS server](/docs/iis-server)
|
||||
|
||||
## Extend Verdaccio
|
||||
* [Installing Plugins](/docs/plugins)
|
||||
|
||||
## DevOps
|
||||
|
||||
* [Configure with Ansible](/docs/ansible)
|
||||
* [Using Docker Image](/docs/docker)
|
||||
* [Using Kubernetes](/docs/kubernetes)
|
||||
|
||||
## Guides && Recipes
|
||||
|
||||
* [Learn how to protect your packages](/docs/recipes/protect-your-dependencies)
|
||||
|
||||
## Development
|
||||
|
||||
* [I want to to contribute](/docs/dev/contributing)
|
||||
* [Build verdaccio](/docs/dev/build)
|
||||
* [Create plugins](/docs/dev/plugins)
|
||||
* [Repositories](/docs/dev/repositories)
|
||||
* [Unit Testing](/docs/dev/unit-test)
|
|
@ -1,24 +1,27 @@
|
|||
# Installation
|
||||
---
|
||||
id: installation
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Installation"
|
||||
---
|
||||
|
||||
Verdaccio is a multiplatform web application, to install you need at least some prerequisites.
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
* Node higher than **4.6.1**
|
||||
* Node higher than (2.x **4.6.1**) | (3.x **6.12.0)
|
||||
* npm or yarn
|
||||
|
||||
|
||||
## Installing the CLI
|
||||
|
||||
`Verdaccio` must be install globaly using any of the most modern
|
||||
|
||||
Using `npm`
|
||||
Using `npm`
|
||||
|
||||
```bash
|
||||
npm install -g verdaccio
|
||||
|
||||
```
|
||||
or using `yarn`
|
||||
or using `yarn`
|
||||
|
||||
```bash
|
||||
yarn global add verdaccio
|
|
@ -1,4 +1,8 @@
|
|||
# Kubernetes
|
||||
---
|
||||
id: kubernetes
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Kubernetes"
|
||||
---
|
||||
|
||||
You can find instructions to deploy Verdaccio on a Kubernetes cluster on the
|
||||
[verdaccio/docker-example](https://github.com/verdaccio/docker-examples/tree/master/kubernetes-example)
|
|
@ -1,4 +1,8 @@
|
|||
# Logger
|
||||
---
|
||||
id: logger
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Logger"
|
||||
---
|
||||
|
||||
As any web application, verdaccio has a customisable built-in logger. You can define multiple types of outputs.
|
||||
|
||||
|
@ -14,9 +18,9 @@ Use `SIGUSR2` to notify the application, the log-file was rotated and it needs t
|
|||
|
||||
### Configuration
|
||||
|
||||
Property | Type | Required | Example | Support | Description
|
||||
--- | --- | --- | --- | --- | ---
|
||||
Property | Type | Required | Example | Support | Description
|
||||
--- | --- | --- | --- | --- | ---
|
||||
type | string | No | [stdout, file] | all | define the output
|
||||
path | string | No | verdaccio.log | all | if type is file, define the location of that file
|
||||
path | string | No | verdaccio.log | all | if type is file, define the location of that file
|
||||
format | string | No | [pretty, pretty-timestamped] | all | output format
|
||||
level | string | No | [fatal, error, warn, http, info, debug, trace] | all | verbose level
|
|
@ -1,5 +1,8 @@
|
|||
# Notifications
|
||||
|
||||
---
|
||||
id: notifications
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Notifications"
|
||||
---
|
||||
|
||||
Notify was built primarily to use with Slack's Incoming
|
||||
webhooks, but will also deliver a simple payload to
|
||||
|
@ -39,18 +42,18 @@ notify:
|
|||
headers: [{'Content-Type': 'application/json'}]
|
||||
endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken
|
||||
content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Property | Type | Required | Support | Default | Description
|
||||
Property | Type | Required | Support | Default | Description
|
||||
--- | --- | --- | --- | --- | ---
|
||||
method| string | No | all | | HTTP verb
|
||||
packagePattern| string | No | all | | Only run this notification if the package name matches the regular expression
|
||||
packagePatternFlags| string | No | | Any flags to be used with the regular expression
|
||||
headers| array/object | Yes | all | | If this endpoint requires specific headers, set them here as an array of key: value objects.
|
||||
endpoint| string | Yes | all | | set the URL endpoint for this call
|
||||
content| string | Yes | all | | any Handlebar expressions
|
||||
content| string | Yes | all | | any Handlebar expressions
|
||||
|
|
@ -1,4 +1,8 @@
|
|||
# Package Access
|
||||
---
|
||||
id: packages
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Package Access"
|
||||
---
|
||||
|
||||
It's a series of contrains that allow or restrict access to the local storage based in specific criteria.
|
||||
|
||||
|
@ -82,7 +86,7 @@ Define multiple access groups is fairly easy, just define them with a white spac
|
|||
allow_access: secret super-secret-area ultra-secret-area
|
||||
allow_publish: secret ultra-secret-area
|
||||
proxy_access: server1
|
||||
|
||||
|
||||
```
|
||||
|
||||
#### Blocking access to set of packages
|
||||
|
@ -101,11 +105,11 @@ packages:
|
|||
|
||||
You can define mutiple `packages` and each of them must have an unique `Regex`.
|
||||
|
||||
Property | Type | Required | Example | Support | Description
|
||||
--- | --- | --- | --- | --- | ---
|
||||
Property | Type | Required | Example | Support | Description
|
||||
--- | --- | --- | --- | --- | ---
|
||||
allow_access/access | string | No | $all | all | define groups allowed to access the package
|
||||
allow_publish/publish | string | No | $authenticated | all | define groups allowed to publish
|
||||
proxy_access/proxy | string | No |npmjs | all | limit look ups for specific uplink
|
||||
proxy_access/proxy | string | No |npmjs | all | limit look ups for specific uplink
|
||||
storage | boolean | No | [true,false] | all | TODO
|
||||
|
||||
We higlight recommend do not use **allow_access**/**allow_publish** and **proxy_access** anymore, those are deprecated, please use the short version of each of those (**access**/**publish**/**proxy**
|
|
@ -1,4 +1,8 @@
|
|||
# Plugins
|
||||
---
|
||||
id: plugins
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Plugins"
|
||||
---
|
||||
|
||||
Verdaccio is an plugabble aplication. Currently supports multiple plugins only for [Authentication](auth.md) but there are plans to [improve the plugin system](https://github.com/verdaccio/verdaccio/issues/169). If you are interested to develop your own plugin, read the [development](development.md) section.
|
||||
|
||||
|
@ -27,12 +31,12 @@ The default configuration looks like this, due we use a build-in `htpasswd` plug
|
|||
# Maximum amount of users allowed to register, defaults to "+inf".
|
||||
# You can set this to -1 to disable registration.
|
||||
#max_users: 1000
|
||||
```
|
||||
```
|
||||
|
||||
and replacing them with (in case you decide to use a `ldap` plugin.
|
||||
|
||||
```yaml
|
||||
auth:
|
||||
auth:
|
||||
activedirectory:
|
||||
url: "ldap://10.0.100.1"
|
||||
baseDN: 'dc=sample,dc=local'
|
|
@ -1,4 +1,8 @@
|
|||
# Protecting packages
|
||||
---
|
||||
id: protect-your-dependencies
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Protecting packages"
|
||||
---
|
||||
|
||||
`verdaccio` allows you protect publish, to achieve that you will need to set up correctly your [packages acces](packages).
|
||||
|
||||
|
@ -8,19 +12,19 @@ Let's see for instance the following set up. You have a set of dependencies what
|
|||
|
||||
```yaml
|
||||
'my-company-*':
|
||||
access: admin teamA teamB teamC
|
||||
access: admin teamA teamB teamC
|
||||
publish: admin teamA
|
||||
proxy: npmjs
|
||||
```
|
||||
```
|
||||
|
||||
With this configuration, basically we allow to groups **admin** and **teamA** to * publish* and **teamA** **teamB** **teamC** *access* to such dependencies.
|
||||
|
||||
### Use case: teamD try to access the dependency
|
||||
|
||||
So, if I am logged as **teamD**. I shouldn't be able to access all dependencies that match with `my-company-*` pattern.
|
||||
So, if I am logged as **teamD**. I shouldn't be able to access all dependencies that match with `my-company-*` pattern.
|
||||
|
||||
```bash
|
||||
➜ npm whoami
|
||||
➜ npm whoami
|
||||
teamD
|
||||
```
|
||||
I won't have access to such dependencies and also won't be visible via web for user **teamD**. If I try to access the following will happen.
|
|
@ -1,9 +1,13 @@
|
|||
# Repositories
|
||||
---
|
||||
id: source-code
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Source Code"
|
||||
---
|
||||
|
||||
`verdaccio` is composed or multiple repositories you might contribute. Look into the **issues** tab whether there is a ticket waiting for you 🤠.
|
||||
|
||||
Repository | Usage | Stack
|
||||
--- | ---| ---|
|
||||
--- | ---| ---|
|
||||
[https://github.com/verdaccio/verdaccio](https://github.com/verdaccio/verdaccio) | The main repository | Node, Express, async, React, Babel, ES6, Mocha, Markdown, HTML, Sass
|
||||
[https://github.com/verdaccio/streams](https://github.com/verdaccio/streams) | Small library to handle streams | ES6, Babel, *Soon: Flow*
|
||||
[https://github.com/verdaccio/file-locking](https://github.com/verdaccio/file-locking) | Small library to handle locked files | ES6, Babel, *Soon: Flow*
|
|
@ -1,4 +1,8 @@
|
|||
# Reverse Proxy Setup
|
||||
---
|
||||
id: reverse-proxy
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Reverse Proxy Setup"
|
||||
---
|
||||
|
||||
## Apache
|
||||
|
||||
|
@ -15,13 +19,13 @@ Apache and mod_proxy should not decode/encode slashes and leave them as they are
|
|||
### Configuration with SSL
|
||||
|
||||
config.yaml
|
||||
|
||||
|
||||
```yaml
|
||||
url_prefix: https://npm.your.domain.com
|
||||
```
|
||||
|
||||
|
||||
Apache virtual server configuration
|
||||
|
||||
|
||||
````
|
||||
apacheconfig
|
||||
<IfModule mod_ssl.c>
|
||||
|
@ -41,7 +45,7 @@ Apache virtual server configuration
|
|||
````
|
||||
|
||||
## Nginx
|
||||
|
||||
|
||||
|
||||
````
|
||||
server {
|
|
@ -1,4 +1,8 @@
|
|||
# Server configuration
|
||||
---
|
||||
id: server-configuration
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Server Configuration"
|
||||
---
|
||||
|
||||
This is mostly basic linux server configuration stuff but I felt it important to document and share the steps I took to get verdaccio running permanently on my server. You will need root (or sudo) permissions for the following.
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
# Set up the SSL Certificates
|
||||
|
||||
---
|
||||
id: ssl
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Set up the SSL Certificates"
|
||||
---
|
||||
|
||||
Follow this instructions to configure a SSL certificate to serve NPM registry under HTTPS.
|
||||
|
||||
|
@ -28,7 +31,7 @@ https:
|
|||
ca: ~/.config/verdaccio/server.ca
|
||||
````
|
||||
|
||||
Alternatively, if you have a certificate as `server.pfx` format, you can add the following configuration section. The passphrase is optional and only needed, if your certificate is encrypted.
|
||||
Alternatively, if you have a certificate as `server.pfx` format, you can add the following configuration section. The passphrase is optional and only needed, if your certificate is encrypted.
|
||||
|
||||
````
|
||||
https:
|
|
@ -1,10 +1,14 @@
|
|||
# Unit Test
|
||||
---
|
||||
id: unit-testing
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Unit Testing"
|
||||
---
|
||||
|
||||
All tests are split in three folders:
|
||||
|
||||
- `test/unit` - Tests that cover functions that transform data in an non-trivial way. These tests simply `require()` a few files and run code in there, so they are very fast.
|
||||
- `test/functional` - Tests that launch a verdaccio instance and perform a series of requests to it over http. They are slower than unit tests.
|
||||
- `test/integration` - Tests that launch a verdaccio instance and do requests to it using npm. They are really slow and can hit a real npm registry. **This actually has not been tested or
|
||||
- `test/integration` - Tests that launch a verdaccio instance and do requests to it using npm. They are really slow and can hit a real npm registry. **This actually has not been tested or
|
||||
|
||||
Unit and functional tests are executed automatically by running `npm test` from the project's root directory. Integration tests are supposed to be executed manually from time to time.
|
||||
|
||||
|
@ -14,7 +18,7 @@ We use `mocha` for all test.
|
|||
|
||||
## The npm Script
|
||||
|
||||
To run the test script you can use either `npm` or `yarn`.
|
||||
To run the test script you can use either `npm` or `yarn`.
|
||||
|
||||
```
|
||||
yarn run test
|
||||
|
@ -71,7 +75,7 @@ describe('functional test verdaccio', function() {
|
|||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
before(function() {
|
||||
return Promise.all([server, server2, server3].map(function(server) {
|
||||
// save a lsof -p output in order to compare on finish on finish all test
|
||||
|
@ -83,7 +87,7 @@ describe('functional test verdaccio', function() {
|
|||
require('./my-functional-test.js')();
|
||||
|
||||
// On finish kill all server
|
||||
after(function(done) {
|
||||
after(function(done) {
|
||||
Promise.all([check(server), check(server2), check(server3)]).then(function() {
|
||||
done();
|
||||
}, (reason) => {
|
||||
|
@ -99,7 +103,7 @@ Perhaps this is not he best approach, but, it's how works right now. So, you jus
|
|||
|
||||
#### The lib/server.js
|
||||
|
||||
The server class is just a wrapper that simulates a `npm` client and provides a simple API for the funtional test.
|
||||
The server class is just a wrapper that simulates a `npm` client and provides a simple API for the funtional test.
|
||||
|
||||
As we mention in the previous section, we are creating 3 process servers that are accessible in each process as `process.server;`, `process.server2;` and ``process.server3;`.
|
||||
|
||||
|
@ -124,7 +128,7 @@ module.exports = function() {
|
|||
// you can access the 3 instance through process global variables
|
||||
const server = process.server;
|
||||
const server2 = process.server2;
|
||||
|
||||
|
||||
describe('my-functional-group-test', function() {
|
||||
before(function() {
|
||||
// create a raw emtpy package
|
||||
|
@ -135,7 +139,7 @@ module.exports = function() {
|
|||
// check whether body response is ok
|
||||
.body_ok(/created new package/);
|
||||
});
|
||||
|
||||
|
||||
// since before are not registred, we use emtpy it to display before putPackage was success
|
||||
it('creating new package / srv1', function() {});
|
||||
|
|
@ -1,9 +1,13 @@
|
|||
# Uplinks
|
||||
---
|
||||
id: uplinks
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Uplinks"
|
||||
---
|
||||
|
||||
An *uplink* is a link with an external registry that provides acccess to external packages.
|
||||
An *uplink* is a link with an external registry that provides acccess to external packages.
|
||||
|
||||
### Usage
|
||||
|
||||
|
||||
```yaml
|
||||
uplinks:
|
||||
npmjs:
|
||||
|
@ -15,7 +19,7 @@ uplinks:
|
|||
url: http://mirror2.local.net:9000/
|
||||
baduplink:
|
||||
url: http://localhost:55666/
|
||||
```
|
||||
```
|
||||
### Configuration
|
||||
|
||||
You can define mutiple uplinks and each of them must have an unique name (key). They can have two properties:
|
|
@ -1,3 +1,9 @@
|
|||
---
|
||||
id: use-cases
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Use Cases"
|
||||
---
|
||||
|
||||
## Using private packages
|
||||
|
||||
You can add users and manage which users can access which packages.
|
|
@ -1,4 +1,8 @@
|
|||
# Web UI
|
||||
---
|
||||
id: webui
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Web User Interface"
|
||||
---
|
||||
|
||||
Verdaccio has a web user interface to display only the private packges and can be customisable.
|
||||
|
||||
|
@ -8,12 +12,12 @@ web:
|
|||
title: Verdaccio
|
||||
logo: logo.png
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Configuration
|
||||
|
||||
Property | Type | Required | Example | Support | Description
|
||||
--- | --- | --- | --- | --- | ---
|
||||
Property | Type | Required | Example | Support | Description
|
||||
--- | --- | --- | --- | --- | ---
|
||||
enable | boolean | No | true/false | all | allow to display the web interface
|
||||
title | string | No | $authenticated | all | HTML head title description
|
||||
logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located
|
|
@ -1,4 +1,8 @@
|
|||
# Installing As a Windows Service
|
||||
---
|
||||
id: windows
|
||||
date: '2017-07-10T23:36:56.503Z'
|
||||
title: "Installing As a Windows Service"
|
||||
---
|
||||
|
||||
Loosely based upon the instructions found [here](http://asysadmin.tumblr.com/post/32941224574/running-nginx-on-windows-as-a-service). I crafted the following and it provided me with a fully working verdaccio service installation:
|
||||
|
||||
|
@ -20,15 +24,15 @@ ALTERNATIVE METHOD: (WinSW package was missing when I tried to download it)
|
|||
|
||||
* Open an administrative command
|
||||
|
||||
* Run nssm install verdaccio At a minimum you must fill in the Application tab Path,
|
||||
Startup directory and Arguments fields. Assuming an install with node in the system path and a
|
||||
* Run nssm install verdaccio At a minimum you must fill in the Application tab Path,
|
||||
Startup directory and Arguments fields. Assuming an install with node in the system path and a
|
||||
location of c:\verdaccio the below values will work:
|
||||
* Path: `node`
|
||||
* Startup directory: `c:\verdaccio`
|
||||
* Arguments: `c:\verdaccio\node_modules\verdaccio\src\lib\cli.js -c c:\verdaccio\config.yaml`
|
||||
|
||||
|
||||
You can adjust other service settings under other tabs as desired. When you are done, click Install service button
|
||||
|
||||
|
||||
* Start the service sc start verdaccio
|
||||
|
||||
## Using WinSW
|
||||
|
@ -36,15 +40,15 @@ location of c:\verdaccio the below values will work:
|
|||
* As of 2015-10-27, WinSW is no longer available at the below location. Please follow the Using NSSM instructions above.
|
||||
* Download [WinSW](http://repo.jenkins-ci.org/releases/com/sun/winsw/winsw/)
|
||||
* Place the executable (e.g. `winsw-1.9-bin.exe`) into this folder (`c:\verdaccio`) and rename it to `verdaccio-winsw.exe`
|
||||
* Create a configuration file in `c:\verdaccio`, named `verdaccio-winsw.xml`
|
||||
* Create a configuration file in `c:\verdaccio`, named `verdaccio-winsw.xml`
|
||||
with the following configuration `xml verdaccio verdaccio verdaccio node c:\verdaccio\node_modules\verdaccio\src\lib\cli.js -c c:\verdaccio\config.yaml roll c:\verdaccio\ `.
|
||||
* Install your service
|
||||
* `cd c:\verdaccio`
|
||||
* `verdaccio-winsw.exe install`
|
||||
* Start your service
|
||||
* `verdaccio-winsw.exe start`
|
||||
|
||||
Some of the above config is more verbose than I had expected, it appears as though 'workingdirectory'
|
||||
is ignored, but other than that, this works for me and allows my verdaccio instance to
|
||||
persist between restarts of the server, and also restart itself should there be any crashes of the verdaccio process.
|
||||
|
||||
Some of the above config is more verbose than I had expected, it appears as though 'workingdirectory'
|
||||
is ignored, but other than that, this works for me and allows my verdaccio instance to
|
||||
persist between restarts of the server, and also restart itself should there be any crashes of the verdaccio process.
|
||||
|
11
website/.gitignore
vendored
Normal file
11
website/.gitignore
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
node_modules
|
||||
.DS_Store
|
||||
lib/core/metadata.js
|
||||
lib/core/MetadataBlog.js
|
||||
website/translated_docs
|
||||
website/build/
|
||||
website/yarn.lock
|
||||
website/node_modules
|
||||
|
||||
website/i18n/*
|
||||
!website/i18n/en.json
|
|
@ -0,0 +1,177 @@
|
|||
---
|
||||
title: Five use cases where a npm private proxy fits in your workflow
|
||||
author: Juan Picado
|
||||
authorURL: http://twitter.com/jotadeveloper
|
||||
authorFBID: 1122901551
|
||||
---
|
||||
|
||||
This article is about why setting up a npm private proxy is a good idea, going through most common questions that I’ve been asked since contributing to sinopia’s fork [verdaccio](http://www.verdaccio.org/), and how a developer addresses many use cases that made me appreciate how useful it can be set up a local private proxy
|
||||
Let’s review them.
|
||||
|
||||
## As offline installation
|
||||
|
||||
![An image from the slides doesn’t load due lack of connection](/img/blog/offline.png)
|
||||
|
||||
These days the solution to offline mode is called yarn and lately npm@5.x . It’s a valid argument, both clients are awesome. The offline mode works fine but does not solve all the offline issues.
|
||||
|
||||
<!--truncate-->
|
||||
|
||||
* Developer Teams: Yarn caches all your packages locally avoiding the possibility of you inadvertently sharing it within your company. Besides it is not unusual that anyone in your team stops working because he/she is unable to download any new dependency due lack of Internet connection.
|
||||
* Traveling: I’m a traveler 🛫 and I have to face this pretty often, either roaming or 3G makes downloading any tarball take an eternity. Have you coded while you traveling in an airplane?
|
||||
* IT Conferences: Please raise your hand if you have had connection issues in IT conferences as a speaker 😓 or attendee 😩. You might argue that **yarn/npm** can solve this. I agree with you, but, there are dozens of use cases that won’t be covered by their offline mode. For instance, a new dependency version you cannot publish yet publicly or pure demonstrations of publishing, dist-tags and any other command from yarn or npm. I recognize that having a local registry is pretty handy.
|
||||
|
||||
> Verdaccio is able to install and publish in offline mode.
|
||||
|
||||
Being offline seems to not be an issue in modern countries most of the time. But, reading the topics in verdaccio it is amazing how frequent it is for people to have internet restrictions in his own companies and their easier solution is backup the whole storage and restore it at work.
|
||||
|
||||
## As a hub to pull from many registries
|
||||
|
||||
![verdaccio/sinopia uplink concept](/img/blog/hub.png)
|
||||
|
||||
Handling multiple registries is something quite common these days and to keep switching is really a slow and annoying process.
|
||||
|
||||
```
|
||||
npm install --registry http://localhost:4873
|
||||
```
|
||||
Well, lately I found [this tool](https://github.com/Pana/nrm) to make this process painless, but still …
|
||||
Also, something is quite usual that many [developers use paid registries](https://github.com/verdaccio/verdaccio/issues?utf8=%E2%9C%93&q=Artifactory%20OR%20nexus%20) as JFrog Artifactory or Nexus3 ([Nexus has a free npm OSS](https://www.sonatype.com/nexus-repository-oss)) and sometimes online access is restricted for such registries.
|
||||
|
||||
### How verdaccio solves this?
|
||||
|
||||
Easy peasy, it uses [uplinks](https://github.com/verdaccio/verdaccio/blob/master/wiki/uplinks.md). You can proxy multiple registries using a single one instead, that’s cool, right?
|
||||
|
||||
```yaml
|
||||
uplinks:
|
||||
npmjs:
|
||||
url: https://registry.npmjs.org/
|
||||
server2:
|
||||
url: http://mirror.local.net/
|
||||
server3:
|
||||
url: http://mirror2.local.net:9000/
|
||||
yarn:
|
||||
url: https://registry.yarnpkg.com/
|
||||
```
|
||||
|
||||
Uplinks **allow you to set multiples registries and you can define later on which dependencies should be resolved by any of your multiple registries**. Even if any of them require any sort of specific header you can add/override them.
|
||||
|
||||
## As a staging registry server
|
||||
|
||||
![http://www.commitstrip.com/en/](/img/blog/staging.jpeg)
|
||||
|
||||
All of you are used to dealing with a staging server. It’s the final step before going into production and where we test our projects, which might, in the end, depend on private npm modules as well.
|
||||
Didn’t it happen to you that you found a bug in your favorite project and despite being easy to fix, they took years until they released a patch 😩😩 ? Yeah, 😅 I’m [one of those](https://github.com/verdaccio/verdaccio/issues?q=is%3Aissue+is%3Aopen+sort%3Acreated-asc), but I always try to reply asap 🙃.
|
||||
Let’s say you are using lodash and it turns out that it is an important library in your project and you need this fixed right now. You have some options here:
|
||||
|
||||
* [Commit](https://medium.com/@bestander_nz/my-node-modules-are-in-git-again-4fb18f5671a) `node_modules/lodash` ? That’s nasty.
|
||||
* Fix locally and pack the tarball within your package and reference it from `package.json` ? Well .. I did that one or two times. But frankly …how are you planning to get the future official patch then? You will need to switch again the dependency to a semver version anyway.
|
||||
|
||||
```
|
||||
"dependencies": {
|
||||
"lodash": "./packages/lodash.patch.tar.gz"
|
||||
}
|
||||
```
|
||||
* [Git reference is an usual work around](https://stackoverflow.com/a/23210615/308341), but frankly, I don’t like it.
|
||||
|
||||
```
|
||||
"dependencies" : {
|
||||
"name1" : "git://github.com/user/project.git#commit-ish",
|
||||
"name2" : "git://github.com/user/project.git#commit-ish"
|
||||
}
|
||||
```
|
||||
|
||||
Either if you have to deal with bugs or you have a registry running in your organization, a staging server comes quite handy when hosting all your private modules. You might have multiple servers or Docker containers which will require all your modules to be centralized in a single spot.
|
||||
|
||||
## I need a Light Solution
|
||||
|
||||
![A developer bored to wait for an endless installation](/img/blog/wait.jpeg)
|
||||
|
||||
The setup is always a critical step when a developer decides whether or not use a software. Read the a long Getting Started guide discourages any developer and most of the times it completely pisses you off when any step fails 😤.
|
||||
The verdaccio installation is quite fast and does not requires any configuration other than have node.js installed.
|
||||
|
||||
```
|
||||
npm install -g verdaccio
|
||||
```
|
||||
|
||||
You can customize later on as your wish, nevertheless the default configuration is good enough for the most of developers.
|
||||
|
||||
![A developer bored to wait for an endless installation](/img/blog/runningVerdaccio.gif)
|
||||
|
||||
And that’s all. Ins’t a big deal huh? Indeed it. You can start playing around with it.
|
||||
|
||||
## Composite with Docker
|
||||
|
||||
![http://www.commitstrip.com/en/](/img/blog/compose_swarm.png)
|
||||
|
||||
If you have a stack based in Docker you might want to combine your local registry in the workflow.
|
||||
|
||||
As you might know the [lock files keep references of the registry](https://github.com/yarnpkg/yarn/issues/579#issuecomment-253115162), ([#2](https://github.com/yarnpkg/rfcs/pull/64), and [#3](https://github.com/yarnpkg/yarn/issues/3330)) ,for each dependency, but, it’s seems npm does not do it. That will be a problem if you rely on lock files and your containers are not able to resolve the registry.
|
||||
|
||||
Verdaccio is ready for Docker and even there is a [example repository](https://github.com/verdaccio/docker-examples) you can use to set up your composite. The [most common configuration](https://github.com/verdaccio/docker-examples/tree/master/nginx-verdaccio) is as a proxy through **nginx** would looks like as follow:
|
||||
|
||||
```
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
verdaccio:
|
||||
image: verdaccio/verdaccio:latest
|
||||
container_name: verdaccio
|
||||
ports:
|
||||
- "4873:4873"
|
||||
volumes:
|
||||
- verdaccio:/verdaccio
|
||||
|
||||
nginx:
|
||||
restart: always
|
||||
build: ./conf/nginx/
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- /www/public
|
||||
volumes_from:
|
||||
- verdaccio
|
||||
links:
|
||||
- verdaccio:verdaccio
|
||||
|
||||
volumes:
|
||||
verdaccio:
|
||||
driver: local
|
||||
```
|
||||
|
||||
and the nginx configuration
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80 default_server;
|
||||
access_log /var/log/nginx/verdaccio.log;
|
||||
charset utf-8;
|
||||
location / {
|
||||
proxy_pass http://verdaccio:4873/;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Composite your Docker containers with Verdaccio is quite easy, also the configuration is minimal. If you need a more complex solution you may extend the default configuration and set an external volume as I [described in other examples](https://github.com/verdaccio/docker-examples/tree/master/docker-local-storage-volume).
|
||||
|
||||
## Wrap
|
||||
|
||||
Verdaccio is not he unique solution available, others have also some sort of OSS support. But not all is completely free. Verdaccio inherits from Sinopia [the plugin ecosystem for authentication](https://github.com/verdaccio/verdaccio/blob/master/wiki/plugins.md#sinopia-legacy-plugins) which is completely free an compatible with LDAP, Active Directory or Atlassian Crowd.
|
||||
|
||||
[local-npm](https://github.com/local-npm/local-npm) seems a quite good solution if you need only a offline proxy. [codebox-npm](https://github.com/craftship/codebox-npm) if you ony rely on Github auth and AWS as a platform and [Nexus3](https://www.sonatype.com/nexus-repository-oss) when you need to scale properly.
|
||||
|
||||
Perhaps you have in mind more use cases, I tried to select those that are the most common based on my experience as a maintainer and what people asked. Please, feel free to share your thoughts.
|
||||
|
||||
[http://www.verdaccio.org/](http://www.verdaccio.org/)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
8
website/blog/2017-12-20-new-version-3.0.0.md
Normal file
8
website/blog/2017-12-20-new-version-3.0.0.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
title: New Version 3.0.0
|
||||
author: Juan Picado
|
||||
authorURL: http://twitter.com/jotadeveloper
|
||||
authorFBID: 1122901551
|
||||
---
|
||||
|
||||
This blog post will test file name parsing issues when periods are present.
|
108
website/core/Footer.js
Normal file
108
website/core/Footer.js
Normal file
|
@ -0,0 +1,108 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require('react');
|
||||
|
||||
class Footer extends React.Component {
|
||||
render() {
|
||||
const currentYear = new Date().getFullYear();
|
||||
return (
|
||||
<footer className="nav-footer" id="footer">
|
||||
<section className="sitemap">
|
||||
<a href={this.props.config.baseUrl} className="nav-home">
|
||||
<img
|
||||
src={this.props.config.baseUrl + this.props.config.footerIcon}
|
||||
alt={this.props.config.title}
|
||||
width="66"
|
||||
height="58"
|
||||
/>
|
||||
</a>
|
||||
<div>
|
||||
<h5>Docs</h5>
|
||||
<a
|
||||
href={
|
||||
this.props.config.baseUrl +
|
||||
'docs/' +
|
||||
this.props.language +
|
||||
'/installation.html'
|
||||
}>
|
||||
Getting Started (or other categories)
|
||||
</a>
|
||||
<a
|
||||
href={
|
||||
this.props.config.baseUrl +
|
||||
'docs/' +
|
||||
this.props.language +
|
||||
'/doc2.html'
|
||||
}>
|
||||
Guides (or other categories)
|
||||
</a>
|
||||
<a
|
||||
href={
|
||||
this.props.config.baseUrl +
|
||||
'docs/' +
|
||||
this.props.language +
|
||||
'/doc3.html'
|
||||
}>
|
||||
API Reference (or other categories)
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<h5>Community</h5>
|
||||
<a
|
||||
href={
|
||||
this.props.config.baseUrl + this.props.language + '/users.html'
|
||||
}>
|
||||
User Showcase
|
||||
</a>
|
||||
<a
|
||||
href="http://stackoverflow.com/questions/tagged/"
|
||||
target="_blank">
|
||||
Stack Overflow
|
||||
</a>
|
||||
<a href="https://discordapp.com/">Project Chat</a>
|
||||
<a href="https://twitter.com/verdaccio_npm" target="_blank">
|
||||
Twitter
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<h5>More</h5>
|
||||
<a href={this.props.config.baseUrl + 'blog'}>Blog</a>
|
||||
<a href="https://github.com/verdaccio">GitHub</a>
|
||||
<a
|
||||
className="github-button"
|
||||
href={this.props.config.repoUrl}
|
||||
data-icon="octicon-star"
|
||||
data-count-href="/verdaccio/verdaccio/stargazers"
|
||||
data-show-count={true}
|
||||
data-count-aria-label="# stargazers on GitHub"
|
||||
aria-label="Star this project on GitHub">
|
||||
Star
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<a
|
||||
href="https://code.facebook.com/projects/"
|
||||
target="_blank"
|
||||
className="fbOpenSource">
|
||||
<img
|
||||
src={this.props.config.baseUrl + 'img/oss_logo.png'}
|
||||
alt="Facebook Open Source"
|
||||
width="170"
|
||||
height="45"
|
||||
/>
|
||||
</a>
|
||||
<section className="copyright">
|
||||
Copyright © {currentYear} Facebook Inc.
|
||||
</section>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Footer;
|
59
website/i18n/en.json
Normal file
59
website/i18n/en.json
Normal file
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"_comment": "This file is auto-generated by write-translations.js",
|
||||
"localized-strings": {
|
||||
"next": "Next",
|
||||
"previous": "Previous",
|
||||
"tagline": "A lightweight private npm proxy registry",
|
||||
"ansible": "Installing with Ansible",
|
||||
"authentification": "Authentification",
|
||||
"build": "Build the source code",
|
||||
"cli": "Command Line Tool",
|
||||
"configuration": "Configuration File",
|
||||
"contributing": "Contributing Verdaccio",
|
||||
"dev-plugins": "Developing Plugins",
|
||||
"docker": "Docker",
|
||||
"home": "Verdaccio npm proxy private registry",
|
||||
"iss-server": "Installing on IIS server",
|
||||
"index1": "Docs Home",
|
||||
"installation": "Installation",
|
||||
"kubernetes": "Kubernetes",
|
||||
"logger": "Logger",
|
||||
"notifications": "Notifications",
|
||||
"packages": "Package Access",
|
||||
"plugins": "Plugins",
|
||||
"protect-your-dependencies": "Protecting packages",
|
||||
"source-code": "Source Code",
|
||||
"reverse-proxy": "Reverse Proxy Setup",
|
||||
"server-configuration": "Server Configuration",
|
||||
"ssl": "Set up the SSL Certificates",
|
||||
"unit-testing": "Unit Testing",
|
||||
"uplinks": "Uplinks",
|
||||
"use-cases": "Use Cases",
|
||||
"webui": "Web User Interface",
|
||||
"windows": "Installing As a Windows Service",
|
||||
"Docs": "Docs",
|
||||
"API": "API",
|
||||
"Help": "Help",
|
||||
"Blog": "Blog",
|
||||
"Introduction": "Introduction",
|
||||
"Configuration": "Configuration",
|
||||
"Server": "Server",
|
||||
"Plugins": "Plugins",
|
||||
"DevOps": "DevOps",
|
||||
"Development": "Development",
|
||||
"Guides": "Guides"
|
||||
},
|
||||
"pages-strings": {
|
||||
"Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)|no description given": "Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)",
|
||||
"Browse Docs|no description given": "Browse Docs",
|
||||
"Ask questions about the documentation and project|no description given": "Ask questions about the documentation and project",
|
||||
"Join the community|no description given": "Join the community",
|
||||
"Find out what's new with this project|no description given": "Find out what's new with this project",
|
||||
"Stay up to date|no description given": "Stay up to date",
|
||||
"Need help?|no description given": "Need help?",
|
||||
"This project is maintained by a dedicated group of people.|statement made to reader": "This project is maintained by a dedicated group of people.",
|
||||
"Help Translate|recruit community translators for your project": "Help Translate",
|
||||
"Edit this Doc|recruitment message asking to edit the doc source": "Edit",
|
||||
"Translate this Doc|recruitment message asking to translate the docs": "Translate"
|
||||
}
|
||||
}
|
181
website/languages.js
Normal file
181
website/languages.js
Normal file
|
@ -0,0 +1,181 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const languages = [
|
||||
{
|
||||
enabled: true,
|
||||
name: 'English',
|
||||
tag: 'en',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: '日本語',
|
||||
tag: 'ja',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'العربية',
|
||||
tag: 'ar',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Bosanski',
|
||||
tag: 'bs-BA',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Català',
|
||||
tag: 'ca',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Čeština',
|
||||
tag: 'cs',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Dansk',
|
||||
tag: 'da',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Deutsch',
|
||||
tag: 'de',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Ελληνικά',
|
||||
tag: 'el',
|
||||
},
|
||||
{
|
||||
enabled: true,
|
||||
name: 'Español',
|
||||
tag: 'es-ES',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'فارسی',
|
||||
tag: 'fa-IR',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Suomi',
|
||||
tag: 'fi',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Français',
|
||||
tag: 'fr',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'עִברִית',
|
||||
tag: 'he',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Magyar',
|
||||
tag: 'hu',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Bahasa Indonesia',
|
||||
tag: 'id-ID',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Italiano',
|
||||
tag: 'it',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Afrikaans',
|
||||
tag: 'af',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: '한국어',
|
||||
tag: 'ko',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'मराठी',
|
||||
tag: 'mr-IN',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Nederlands',
|
||||
tag: 'nl',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Norsk',
|
||||
tag: 'no-NO',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Polskie',
|
||||
tag: 'pl',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Português',
|
||||
tag: 'pt-PT',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Português (Brasil)',
|
||||
tag: 'pt-BR',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Română',
|
||||
tag: 'ro',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Русский',
|
||||
tag: 'ru',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Slovenský',
|
||||
tag: 'sk-SK',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Српски језик (Ћирилица)',
|
||||
tag: 'sr',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Svenska',
|
||||
tag: 'sv-SE',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Türkçe',
|
||||
tag: 'tr',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Українська',
|
||||
tag: 'uk',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: 'Tiếng Việt',
|
||||
tag: 'vi',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: '中文',
|
||||
tag: 'zh-Hans',
|
||||
},
|
||||
{enabled: false, name: '繁體中文', tag: 'zh-Hant'},
|
||||
];
|
||||
module.exports = languages;
|
14
website/package.json
Normal file
14
website/package.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"scripts": {
|
||||
"examples": "docusaurus-examples",
|
||||
"start": "docusaurus-start",
|
||||
"build": "docusaurus-build",
|
||||
"publish-gh-pages": "docusaurus-publish",
|
||||
"write-translations": "docusaurus-write-translations",
|
||||
"version": "docusaurus-version",
|
||||
"rename-version": "docusaurus-rename-version"
|
||||
},
|
||||
"devDependencies": {
|
||||
"docusaurus": "^1.0.3"
|
||||
}
|
||||
}
|
70
website/pages/en/help-with-translations.js
Normal file
70
website/pages/en/help-with-translations.js
Normal file
|
@ -0,0 +1,70 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const CompLibrary = require('../../core/CompLibrary.js');
|
||||
const Container = CompLibrary.Container;
|
||||
const GridBlock = CompLibrary.GridBlock;
|
||||
|
||||
const translate = require('../../server/translate.js').translate;
|
||||
|
||||
const siteConfig = require(process.cwd() + '/siteConfig.js');
|
||||
|
||||
class Help extends React.Component {
|
||||
render() {
|
||||
const supportLinks = [
|
||||
{
|
||||
content: (
|
||||
<translate>
|
||||
Learn more using the [documentation on this
|
||||
site.](/test-site/docs/en/doc1.html)
|
||||
</translate>
|
||||
),
|
||||
title: <translate>Browse Docs</translate>,
|
||||
},
|
||||
{
|
||||
content: (
|
||||
<translate>
|
||||
Ask questions about the documentation and project
|
||||
</translate>
|
||||
),
|
||||
title: <translate>Join the community</translate>,
|
||||
},
|
||||
{
|
||||
content: <translate>Find out what's new with this project</translate>,
|
||||
title: <translate>Stay up to date</translate>,
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="docMainWrapper wrapper">
|
||||
<Container className="mainContainer documentContainer postContainer">
|
||||
<div className="post">
|
||||
<header className="postHeader">
|
||||
<h2>
|
||||
<translate>Need help?</translate>
|
||||
</h2>
|
||||
</header>
|
||||
<p>
|
||||
<translate desc="statement made to reader">
|
||||
This project is maintained by a dedicated group of people.
|
||||
</translate>
|
||||
</p>
|
||||
<GridBlock contents={supportLinks} layout="threeColumn" />
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Help.defaultProps = {
|
||||
language: 'en',
|
||||
};
|
||||
|
||||
module.exports = Help;
|
50
website/pages/en/help.js
Executable file
50
website/pages/en/help.js
Executable file
|
@ -0,0 +1,50 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const CompLibrary = require('../../core/CompLibrary.js');
|
||||
const Container = CompLibrary.Container;
|
||||
const GridBlock = CompLibrary.GridBlock;
|
||||
|
||||
const siteConfig = require(process.cwd() + '/siteConfig.js');
|
||||
|
||||
class Help extends React.Component {
|
||||
render() {
|
||||
const supportLinks = [
|
||||
{
|
||||
content:
|
||||
'Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)',
|
||||
title: 'Browse Docs',
|
||||
},
|
||||
{
|
||||
content: 'Ask questions about the documentation and project',
|
||||
title: 'Join the community',
|
||||
},
|
||||
{
|
||||
content: "Find out what's new with this project",
|
||||
title: 'Stay up to date',
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="docMainWrapper wrapper">
|
||||
<Container className="mainContainer documentContainer postContainer">
|
||||
<div className="post">
|
||||
<header className="postHeader">
|
||||
<h2>Need help?</h2>
|
||||
</header>
|
||||
<p>This project is maintained by a dedicated group of people.</p>
|
||||
<GridBlock contents={supportLinks} layout="threeColumn" />
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Help;
|
188
website/pages/en/index.js
Executable file
188
website/pages/en/index.js
Executable file
|
@ -0,0 +1,188 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const CompLibrary = require('../../core/CompLibrary.js');
|
||||
const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
|
||||
const Container = CompLibrary.Container;
|
||||
const GridBlock = CompLibrary.GridBlock;
|
||||
|
||||
const siteConfig = require(process.cwd() + '/siteConfig.js');
|
||||
|
||||
class Button extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="pluginWrapper buttonWrapper">
|
||||
<a className="button" href={this.props.href} target={this.props.target}>
|
||||
{this.props.children}
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Button.defaultProps = {
|
||||
target: '_self',
|
||||
};
|
||||
|
||||
class HomeSplash extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="homeContainer">
|
||||
<div className="homeSplashFade">
|
||||
<div className="wrapper homeWrapper">
|
||||
<div className="projectLogo">
|
||||
<img src={siteConfig.baseUrl + 'img/verdaccio-tiny@3x.png'} />
|
||||
</div>
|
||||
<div className="inner">
|
||||
<h2 className="projectTitle">
|
||||
<img title={siteConfig.title} src={siteConfig.baseUrl + 'img/verdaccio@2x.png'} />
|
||||
|
||||
<small>{siteConfig.tagline}</small>
|
||||
</h2>
|
||||
<div className="section promoSection">
|
||||
<div className="promoRow">
|
||||
<div className="pluginRowBlock">
|
||||
<Button href="https://github.com/verdaccio">Github</Button>
|
||||
<Button
|
||||
href={
|
||||
siteConfig.baseUrl +
|
||||
'docs/' +
|
||||
this.props.language +
|
||||
'/doc1.html'
|
||||
}>
|
||||
Documentation
|
||||
</Button>
|
||||
<Button
|
||||
href={
|
||||
siteConfig.baseUrl +
|
||||
'docs/' +
|
||||
this.props.language +
|
||||
'/contribute.html'
|
||||
}>
|
||||
Contribute
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class Index extends React.Component {
|
||||
render() {
|
||||
let language = this.props.language || 'en';
|
||||
const showcase = siteConfig.users
|
||||
.filter(user => {
|
||||
return user.pinned;
|
||||
})
|
||||
.map(user => {
|
||||
return (
|
||||
<a href={user.infoLink}>
|
||||
<img src={user.image} title={user.caption} />
|
||||
</a>
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HomeSplash language={language} />
|
||||
<div className="mainContainer">
|
||||
<Container padding={['bottom', 'top']}>
|
||||
<GridBlock
|
||||
align="center"
|
||||
contents={[
|
||||
{
|
||||
content: 'This is the content of my feature',
|
||||
image: siteConfig.baseUrl + 'img/npm.svg',
|
||||
imageAlign: 'top',
|
||||
title: 'Feature One',
|
||||
},
|
||||
{
|
||||
content: 'The content of my second feature',
|
||||
image: siteConfig.baseUrl + 'img/yarn.svg',
|
||||
imageAlign: 'top',
|
||||
title: 'Feature Two',
|
||||
},
|
||||
]}
|
||||
layout="fourColumn"
|
||||
/>
|
||||
</Container>
|
||||
|
||||
<div
|
||||
className="productShowcaseSection paddingBottom"
|
||||
style={{textAlign: 'center'}}>
|
||||
<h2>Feature Callout</h2>
|
||||
<MarkdownBlock>These are features of this project</MarkdownBlock>
|
||||
</div>
|
||||
|
||||
<Container padding={['bottom', 'top']} background="light">
|
||||
<GridBlock
|
||||
contents={[
|
||||
{
|
||||
content: 'Talk about learning how to use this',
|
||||
image: siteConfig.baseUrl + 'img/verdaccio-tiny@3x.png',
|
||||
imageAlign: 'right',
|
||||
title: 'Learn How',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Container>
|
||||
|
||||
<Container padding={['bottom', 'top']} id="try">
|
||||
<GridBlock
|
||||
contents={[
|
||||
{
|
||||
content: 'Talk about trying this out',
|
||||
image: siteConfig.baseUrl + 'img/verdaccio-tiny@3x.png',
|
||||
imageAlign: 'left',
|
||||
title: 'Try it Out',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Container>
|
||||
|
||||
<Container padding={['bottom', 'top']} background="dark">
|
||||
<GridBlock
|
||||
contents={[
|
||||
{
|
||||
content:
|
||||
'This is another description of how this project is useful',
|
||||
image: siteConfig.baseUrl + 'img/verdaccio-tiny@3x.png',
|
||||
imageAlign: 'right',
|
||||
title: 'Description',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Container>
|
||||
|
||||
<div className="productShowcaseSection paddingBottom">
|
||||
<h2>{"Who's Using This?"}</h2>
|
||||
<p>This project is used by all these people</p>
|
||||
<div className="logos">{showcase}</div>
|
||||
<div className="more-users">
|
||||
<a
|
||||
className="button"
|
||||
href={
|
||||
siteConfig.baseUrl + this.props.language + '/' + 'users.html'
|
||||
}>
|
||||
More {siteConfig.title} Users
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Index;
|
47
website/pages/en/users.js
Normal file
47
website/pages/en/users.js
Normal file
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const CompLibrary = require('../../core/CompLibrary.js');
|
||||
const Container = CompLibrary.Container;
|
||||
|
||||
const siteConfig = require(process.cwd() + '/siteConfig.js');
|
||||
|
||||
class Users extends React.Component {
|
||||
render() {
|
||||
const showcase = siteConfig.users.map((user, i) => {
|
||||
return (
|
||||
<a href={user.infoLink} key={i}>
|
||||
<img src={user.image} title={user.caption} />
|
||||
</a>
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="mainContainer">
|
||||
<Container padding={['bottom', 'top']}>
|
||||
<div className="showcaseSection">
|
||||
<div className="prose">
|
||||
<h1>Who's Using This?</h1>
|
||||
<p>This project is used by many folks</p>
|
||||
</div>
|
||||
<div className="logos">{showcase}</div>
|
||||
<p>Are you using this project?</p>
|
||||
<a
|
||||
href="https://github.com/facebook/docusaurus/edit/master/website/siteConfig.js"
|
||||
className="button">
|
||||
Add your company
|
||||
</a>
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Users;
|
40
website/sidebars.json
Normal file
40
website/sidebars.json
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"docs": {
|
||||
"Introduction": [
|
||||
"installation",
|
||||
"cli"
|
||||
],
|
||||
"Configuration": [
|
||||
"configuration",
|
||||
"uplinks",
|
||||
"packages",
|
||||
"authentification",
|
||||
"notifications",
|
||||
"logger",
|
||||
"webui"
|
||||
],
|
||||
"Server": [
|
||||
"server-configuration",
|
||||
"reverse-proxy",
|
||||
"ssl",
|
||||
"windows",
|
||||
"iss-server"
|
||||
],
|
||||
"Plugins": [
|
||||
"plugins",
|
||||
"dev-plugins"
|
||||
],
|
||||
"DevOps": [
|
||||
"docker",
|
||||
"kubernetes",
|
||||
"ansible"
|
||||
],
|
||||
"Development": [
|
||||
"build",
|
||||
"contributing",
|
||||
"source-code",
|
||||
"unit-testing"
|
||||
],
|
||||
"Guides": ["protect-your-dependencies"]
|
||||
}
|
||||
}
|
56
website/siteConfig.js
Normal file
56
website/siteConfig.js
Normal file
|
@ -0,0 +1,56 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/* List of projects/orgs using your project for the users page */
|
||||
const users = [
|
||||
{
|
||||
caption: 'User1',
|
||||
image: '/img/docusaurus.svg',
|
||||
infoLink: 'https://www.facebook.com',
|
||||
pinned: true,
|
||||
},
|
||||
];
|
||||
|
||||
const siteConfig = {
|
||||
title: 'Verdaccio' /* title for your website */,
|
||||
tagline: 'A lightweight private npm proxy registry',
|
||||
url: 'http://www.verdaccio.org' /* your website url */,
|
||||
baseUrl: '/' /* base url for your project */,
|
||||
projectName: 'verdaccio',
|
||||
headerLinks: [
|
||||
{doc: 'installation', label: 'Docs'},
|
||||
{doc: 'configuration', label: 'API'},
|
||||
{page: 'help', label: 'Help'},
|
||||
{blog: true, label: 'Blog'},
|
||||
],
|
||||
users,
|
||||
/* path to images for header/footer */
|
||||
headerIcon: 'img/verdaccio-tiny.png',
|
||||
footerIcon: 'img/verdaccio-blackwhite.png',
|
||||
favicon: 'img/favicon.png',
|
||||
/* colors for website */
|
||||
colors: {
|
||||
primaryColor: '#4B5E40',
|
||||
secondaryColor: '#205C3B',
|
||||
},
|
||||
// This copyright info is used in /core/Footer.js and blog rss/atom feeds.
|
||||
copyright:
|
||||
'Copyright © ' +
|
||||
new Date().getFullYear() +
|
||||
' Verdaccio Team',
|
||||
// organizationName: 'deltice', // or set an env variable ORGANIZATION_NAME
|
||||
// projectName: 'test-site', // or set an env variable PROJECT_NAME
|
||||
highlight: {
|
||||
// Highlight.js theme to use for syntax highlighting in code blocks
|
||||
theme: 'default',
|
||||
},
|
||||
scripts: ['https://buttons.github.io/buttons.js'],
|
||||
// You may provide arbitrary config keys to be used as needed by your template.
|
||||
repoUrl: 'https://github.com/verdaccio/verdaccio',
|
||||
};
|
||||
|
||||
module.exports = siteConfig;
|
BIN
website/yarn.lock
Normal file
BIN
website/yarn.lock
Normal file
Binary file not shown.
|
@ -1,85 +1,4 @@
|
|||
|
||||
<p align="center"><img src="https://github.com/verdaccio/verdaccio/raw/master/assets/bitmap/verdaccio%402x.png"></p>
|
||||
# Wiki
|
||||
|
||||
`verdaccio` is a fork of **sinopia** and it's backwards compatible.
|
||||
|
||||
## Why should I use verdaccio?👌
|
||||
|
||||
|
||||
* I am/was **sinopia** user and need an **easy migration**.
|
||||
* I need a lightweight and free solution 🎉 to host my private packages and no license worries 🎊.
|
||||
* I need long-term support and help when I got stuck.
|
||||
* I want a product compatible with the newer tools as **Yarn** and **DevOps (Docker, Ansible, Puppet, etc)** tools.
|
||||
* An evolving plugabble product, not only for **Authentification**, also for **Storage** and more in the future.
|
||||
* An active community 🙋♂️🙋.
|
||||
* Integration with **Nexus**, **Artifactoy** and any other npm compatible registry.
|
||||
|
||||
A bunch more of reasons [you might be interested](https://medium.com/@jotadeveloper/five-use-cases-where-a-npm-private-proxy-fits-in-your-workflow-632a81779c14).
|
||||
|
||||
### Why we forked from Sinopia? 🚀
|
||||
|
||||
It [appeared that sinopia maintenance had stalled and the author had abandoned it](https://github.com/rlidwka/sinopia/issues/376),
|
||||
so there was a suggestion that the sinopia-using community would benefit
|
||||
from a fresh look at the code and the outstanding issues. So here we are 🎉🎉🎉. The last step about the [detach from sinopia](https://github.com/verdaccio/verdaccio/issues/38).
|
||||
|
||||
### Near Future 🚧
|
||||
|
||||
`verdaccio` aims to be compatible with sinopia along the time preserving the main features, a lightweight app based on local file system and easy installation but being able to be pluggable and built over a modern tool stack.
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Installation
|
||||
|
||||
* [Installation](install.md)
|
||||
|
||||
### Usage
|
||||
|
||||
* [Command Line](cli.md)
|
||||
|
||||
### Configuration
|
||||
|
||||
* [The configuration file](config.md)
|
||||
* [Setting up *uplinks*](uplinks.md)
|
||||
* [Packages Access](packages.md)
|
||||
* [Authorization and Access](auth.md)
|
||||
* [Enable Notifications](notifications.md)
|
||||
|
||||
* [Custom Logs](logger.md)
|
||||
|
||||
### UI Customization
|
||||
|
||||
* [Configure the Web](web.md)
|
||||
|
||||
|
||||
## Server Configurations
|
||||
|
||||
* [Advanced Server Configuration](server.md)
|
||||
* [Reverse Proxy](reverse-proxy.md)
|
||||
* [SSL Certificates](ssl.md)
|
||||
|
||||
### Windows Specific Settings
|
||||
|
||||
* [Installing As a Windows Service](windows.md)
|
||||
* [Installing on IIS server](iis-server.md)
|
||||
|
||||
## Extend Verdaccio
|
||||
* [Installing Plugins](plugins.md)
|
||||
|
||||
## DevOps
|
||||
|
||||
* [Configure with Ansible](ansible.md)
|
||||
* [Using Docker Image](docker.md)
|
||||
* [Using Kubernetes](kubernetes.md)
|
||||
|
||||
## Verdaccio Recipes
|
||||
|
||||
* [Learn how to protect your packages](recipes/protect-your-dependencies.md)
|
||||
|
||||
## Development
|
||||
|
||||
* [I want to to contribute](dev/README.md)
|
||||
* [Build verdaccio](dev/build.md)
|
||||
* [Create plugins](dev/plugins.md)
|
||||
* [Repositories](dev/repositories.md)
|
||||
* [Unit Testing](dev/test.md)
|
||||
[Documentation moved here](https://github.com/verdaccio/verdaccio/tree/master/doc).
|
||||
|
|
Loading…
Reference in a new issue