mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-03-25 02:32:52 -05:00
Merge branch 'master' into fix/open-external-links-in-new-tabs
This commit is contained in:
commit
bb27d19f10
37 changed files with 346 additions and 349 deletions
|
@ -32,7 +32,7 @@ aliases:
|
|||
restore_cache:
|
||||
keys:
|
||||
- *repo_key
|
||||
- &ignore_branches
|
||||
- &ignore_non_dev_branches
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
|
@ -41,6 +41,13 @@ aliases:
|
|||
- gh-pages
|
||||
- l10n_master
|
||||
- /release\/.*/
|
||||
- &execute_on_release
|
||||
filters:
|
||||
tags:
|
||||
only: /(v)?[0-9]+(\.[0-9]+)*/
|
||||
branches:
|
||||
ignore:
|
||||
- /.*/
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
|
@ -102,8 +109,9 @@ jobs:
|
|||
- *restore_repo
|
||||
- run:
|
||||
name: Test with Node 8
|
||||
command: yarn test
|
||||
command: yarn test:functional
|
||||
command: |
|
||||
yarn test
|
||||
yarn test:functional
|
||||
|
||||
test_node9:
|
||||
<<: *defaults
|
||||
|
@ -112,8 +120,9 @@ jobs:
|
|||
- *restore_repo
|
||||
- run:
|
||||
name: Test with Node 9
|
||||
command: yarn test
|
||||
command: yarn test:functional
|
||||
command: |
|
||||
yarn test
|
||||
yarn test:functional
|
||||
- save_cache:
|
||||
key: *coverage_key
|
||||
paths:
|
||||
|
@ -126,8 +135,9 @@ jobs:
|
|||
- *restore_repo
|
||||
- run:
|
||||
name: Test with Node 10
|
||||
command: yarn run test
|
||||
command: yarn test:functional
|
||||
command: |
|
||||
yarn run test
|
||||
yarn test:functional
|
||||
|
||||
test_e2e:
|
||||
<<: *defaults
|
||||
|
@ -187,27 +197,27 @@ workflows:
|
|||
workflow:
|
||||
jobs:
|
||||
- prepare:
|
||||
<<: *ignore_branches
|
||||
<<: *ignore_non_dev_branches
|
||||
- test_node6:
|
||||
requires:
|
||||
- prepare
|
||||
<<: *ignore_branches
|
||||
<<: *ignore_non_dev_branches
|
||||
- test_node8:
|
||||
requires:
|
||||
- prepare
|
||||
<<: *ignore_branches
|
||||
<<: *ignore_non_dev_branches
|
||||
- test_node9:
|
||||
requires:
|
||||
- prepare
|
||||
<<: *ignore_branches
|
||||
<<: *ignore_non_dev_branches
|
||||
- test_node10:
|
||||
requires:
|
||||
- prepare
|
||||
<<: *ignore_branches
|
||||
<<: *ignore_non_dev_branches
|
||||
- test_e2e:
|
||||
requires:
|
||||
- prepare
|
||||
<<: *ignore_branches
|
||||
<<: *ignore_non_dev_branches
|
||||
- coverage:
|
||||
requires:
|
||||
- test_node6
|
||||
|
@ -215,7 +225,7 @@ workflows:
|
|||
- test_node9
|
||||
- test_node10
|
||||
- test_e2e
|
||||
<<: *ignore_branches
|
||||
<<: *ignore_non_dev_branches
|
||||
- publish_gh_pages:
|
||||
requires:
|
||||
- test_node6
|
||||
|
@ -223,14 +233,9 @@ workflows:
|
|||
- test_node9
|
||||
- test_node10
|
||||
- test_e2e
|
||||
<<: *ignore_branches
|
||||
<<: *execute_on_release
|
||||
- publish_package:
|
||||
requires:
|
||||
- coverage
|
||||
- publish_gh_pages
|
||||
filters:
|
||||
tags:
|
||||
only: /(v)?[0-9]+(\.[0-9]+)*/
|
||||
branches:
|
||||
ignore:
|
||||
- /.*/
|
||||
<<: *execute_on_release
|
||||
|
|
11
.travis.yml
11
.travis.yml
|
@ -1,11 +0,0 @@
|
|||
language: node_js
|
||||
sudo: false
|
||||
node_js:
|
||||
- 'lts/boron'
|
||||
- 'lts/carbon'
|
||||
- 'lts/*'
|
||||
script:
|
||||
- npm install
|
||||
- commitlint-travis
|
||||
- npm run pre:ci
|
||||
- npm run test
|
|
@ -22,6 +22,7 @@
|
|||
<a href="https://codecov.io/github/verdaccio/verdaccio"><img alt="Coverage Status" src="https://img.shields.io/codecov/c/github/verdaccio/verdaccio/master.svg"></a>
|
||||
<a href="https://www.npmjs.org/package/verdaccio"><img alt="npm Downloads" src="http://img.shields.io/npm/dm/verdaccio.svg"></a>
|
||||
<a href="https://hub.docker.com/r/verdaccio/verdaccio/"><img alt="npm Downloads" src="https://img.shields.io/docker/pulls/verdaccio/verdaccio.svg?maxAge=43200"></a>
|
||||
<a href="https://www.browserstack.com/automate/public-build/am8rVDJ1V1BSbW90aE4xUnZsbnNUOFVuVS9ZRmJWL3NWcjkzRUxycHF3TT0tLUh5aTBiY2VzT1A1NDRWdHg2L0FQT3c9PQ==--0e9064ebcb01bfebb9976a543500b0396c0bfcae%"><img src='https://www.browserstack.com/automate/badge.svg?badge_key=am8rVDJ1V1BSbW90aE4xUnZsbnNUOFVuVS9ZRmJWL3NWcjkzRUxycHF3TT0tLUh5aTBiY2VzT1A1NDRWdHg2L0FQT3c9PQ==--0e9064ebcb01bfebb9976a543500b0396c0bfcae%'/></a>
|
||||
</div>
|
||||
<div align="center">
|
||||
<p align="center"><img src="https://github.com/verdaccio/verdaccio/blob/master/assets/gif/verdaccio_big_30.gif?raw=true"></p>
|
||||
|
|
|
@ -121,6 +121,7 @@ modern verdaccio API and using the prefix as *verdaccio-xx-name*.
|
|||
* [verdaccio-active-directory](https://github.com/nowhammies/verdaccio-activedirectory): Active Directory authentication plugin for verdaccio
|
||||
* [verdaccio-gitlab](https://github.com/bufferoverflow/verdaccio-gitlab): use GitLab Personal Access Token to authenticate
|
||||
* [verdaccio-htpasswd](https://github.com/verdaccio/verdaccio-htpasswd): Auth based on htpasswd file plugin (built-in) for verdaccio
|
||||
* [verdaccio-github-oauth](https://github.com/aroundus-inc/verdaccio-github-oauth): Github oauth authentication plugin for verdaccio.
|
||||
|
||||
### Middleware Plugins
|
||||
|
||||
|
|
|
@ -14,11 +14,12 @@ web:
|
|||
logo: logo.png
|
||||
```
|
||||
|
||||
All access restrictions defined to [protect your packages](protect-your-dependencies.md) will also apply to the Web Interface.
|
||||
|
||||
### Configuration
|
||||
|
||||
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
|
||||
title | string | No | Verdaccio | all | HTML head title description
|
||||
logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located
|
||||
|
|
|
@ -5,6 +5,7 @@ module.exports = {
|
|||
verbose: true,
|
||||
collectCoverage: true,
|
||||
testEnvironment: 'jest-environment-jsdom-global',
|
||||
testURL: 'http://localhost',
|
||||
testRegex: '(test/unit.*\\.spec|test/unit/webui/.*\\.spec)\\.js',
|
||||
setupFiles: [
|
||||
'./test/unit/setup.js'
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
"devDependencies": {
|
||||
"@commitlint/cli": "6.1.3",
|
||||
"@commitlint/config-conventional": "6.1.3",
|
||||
"@commitlint/travis-cli": "6.1.3",
|
||||
"@verdaccio/types": "3.0.0",
|
||||
"babel-cli": "6.26.0",
|
||||
"babel-core": "6.26.0",
|
||||
|
|
|
@ -27,12 +27,13 @@ export default class Header extends React.Component {
|
|||
this.toggleLoginModal = this.toggleLoginModal.bind(this);
|
||||
this.handleSubmit = this.handleSubmit.bind(this);
|
||||
this.handleInput = this.handleInput.bind(this);
|
||||
this.loadLogo = this.loadLogo.bind(this);
|
||||
}
|
||||
|
||||
toggleLoginModal() {
|
||||
this.setState({
|
||||
showLogin: !this.state.showLogin
|
||||
});
|
||||
this.setState((prevState) => ({
|
||||
showLogin: !prevState.showLogin
|
||||
}));
|
||||
this.setState({loginError: null});
|
||||
}
|
||||
|
||||
|
@ -43,11 +44,16 @@ export default class Header extends React.Component {
|
|||
}
|
||||
|
||||
componentWillMount() {
|
||||
API.request('logo')
|
||||
.then((response) => response.text().then((logo) => this.setState({logo})))
|
||||
.catch((error) => {
|
||||
this.loadLogo();
|
||||
}
|
||||
|
||||
async loadLogo() {
|
||||
try {
|
||||
const logo = await API.request('logo');
|
||||
this.setState({logo});
|
||||
} catch (error) {
|
||||
throw new Error(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async handleSubmit(event) {
|
||||
|
@ -66,13 +72,13 @@ export default class Header extends React.Component {
|
|||
username: this.state.username,
|
||||
password: this.state.password
|
||||
};
|
||||
let resp = await API.request(`login`, 'POST', {
|
||||
const resp = await API.request(`login`, 'POST', {
|
||||
body: JSON.stringify(credentials),
|
||||
headers: {
|
||||
Accept: HEADERS.JSON,
|
||||
'Content-Type': HEADERS.JSON
|
||||
}
|
||||
}).then((response) => response.json());
|
||||
});
|
||||
|
||||
storage.setItem('token', resp.token);
|
||||
storage.setItem('username', resp.username);
|
||||
|
@ -80,9 +86,9 @@ export default class Header extends React.Component {
|
|||
} catch (e) {
|
||||
const errorObj = {
|
||||
title: 'Unable to login',
|
||||
type: 'error'
|
||||
type: 'error',
|
||||
description: e.error
|
||||
};
|
||||
errorObj.description = e.message;
|
||||
this.setState({loginError: errorObj});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,9 +33,7 @@ export default class PackageSidebar extends React.Component {
|
|||
let packageMeta;
|
||||
|
||||
try {
|
||||
packageMeta = await API.request(`sidebar/${packageName}`, 'GET').then(function(response) {
|
||||
return response.json();
|
||||
});
|
||||
packageMeta = await API.request(`sidebar/${packageName}`, 'GET');
|
||||
} catch (err) {
|
||||
this.setState({
|
||||
failed: true
|
||||
|
|
|
@ -47,7 +47,7 @@ export default class Detail extends React.Component {
|
|||
});
|
||||
|
||||
try {
|
||||
const resp = await API.request(`package/readme/${packageName}`, 'GET').then((response) => response.text());
|
||||
const resp = await API.request(`package/readme/${packageName}`, 'GET');
|
||||
this.setState({
|
||||
readMe: resp
|
||||
});
|
||||
|
|
|
@ -51,7 +51,7 @@ export default class Home extends React.Component {
|
|||
|
||||
async loadPackages() {
|
||||
try {
|
||||
this.req = await API.request('packages', 'GET').then((response) => response.json());
|
||||
this.req = await API.request('packages', 'GET');
|
||||
|
||||
if (this.state.query === '') {
|
||||
this.setState({
|
||||
|
@ -70,7 +70,7 @@ export default class Home extends React.Component {
|
|||
|
||||
async searchPackage(query) {
|
||||
try {
|
||||
this.req = await API.request(`/search/${query}`, 'GET').then((response) => response.json());
|
||||
this.req = await API.request(`/search/${query}`, 'GET');
|
||||
|
||||
// Implement cancel feature later
|
||||
if (this.state.query === query) {
|
||||
|
|
|
@ -17,18 +17,42 @@ class API {
|
|||
url = window.VERDACCIO_API_URL + url;
|
||||
}
|
||||
|
||||
function handleErrors(response) {
|
||||
if (!response.ok) {
|
||||
throw Error(response.statusText);
|
||||
/**
|
||||
* Handles response according to content type
|
||||
* @param {object} response
|
||||
* @returns {promise}
|
||||
*/
|
||||
function handleResponseType(response) {
|
||||
if (response.headers) {
|
||||
const contentType = response.headers.get('Content-Type');
|
||||
if (contentType.includes('application/pdf')) {
|
||||
return Promise.all([response.ok, response.blob()]);
|
||||
}
|
||||
if (contentType.includes('application/json')) {
|
||||
return Promise.all([response.ok, response.json()]);
|
||||
}
|
||||
// it includes all text types
|
||||
if (contentType.includes('text/')) {
|
||||
return Promise.all([response.ok, response.text()]);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
return fetch(url, {
|
||||
method,
|
||||
credentials: 'same-origin',
|
||||
...options
|
||||
}).then(handleErrors);
|
||||
return new Promise((resolve, reject) => {
|
||||
fetch(url, {
|
||||
method,
|
||||
credentials: 'same-origin',
|
||||
...options
|
||||
})
|
||||
.then(handleResponseType)
|
||||
.then(([responseOk, body]) => {
|
||||
if (responseOk) {
|
||||
resolve(body);
|
||||
} else {
|
||||
reject(body);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<PackageSidebar /> : <Dependencies /> should load the package and match snapshot 1`] = `"<div class=\\"module dependenciesModule\\"><h2 class=\\"moduleTitle\\">Dependencies</h2><div><ul><li class=\\"dependency-item\\" title=\\"Depend on version: 0.0.3\\"><a href=\\"nullblank/#/detail/@verdaccio/file-locking\\">@verdaccio/file-locking</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: 0.0.2\\"><a href=\\"nullblank/#/detail/@verdaccio/streams\\">@verdaccio/streams</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.1.1\\"><a href=\\"nullblank/#/detail/JSONStream\\">JSONStream</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.1.2\\"><a href=\\"nullblank/#/detail/apache-md5\\">apache-md5</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^2.0.1\\"><a href=\\"nullblank/#/detail/async\\">async</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.15.0\\"><a href=\\"nullblank/#/detail/body-parser\\">body-parser</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.8.0\\"><a href=\\"nullblank/#/detail/bunyan\\">bunyan</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^2.0.1\\"><a href=\\"nullblank/#/detail/chalk\\">chalk</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^2.11.0\\"><a href=\\"nullblank/#/detail/commander\\">commander</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: 1.6.2\\"><a href=\\"nullblank/#/detail/compression\\">compression</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^0.7.0\\"><a href=\\"nullblank/#/detail/cookies\\">cookies</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^2.8.3\\"><a href=\\"nullblank/#/detail/cors\\">cors</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: 4.15.3\\"><a href=\\"nullblank/#/detail/express\\">express</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^4.3.2\\"><a href=\\"nullblank/#/detail/global\\">global</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: 4.0.5\\"><a href=\\"nullblank/#/detail/handlebars\\">handlebars</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.4.0\\"><a href=\\"nullblank/#/detail/http-errors\\">http-errors</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: 1.0.1\\"><a href=\\"nullblank/#/detail/js-string-escape\\">js-string-escape</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^3.6.0\\"><a href=\\"nullblank/#/detail/js-yaml\\">js-yaml</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^7.4.1\\"><a href=\\"nullblank/#/detail/jsonwebtoken\\">jsonwebtoken</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.0.1\\"><a href=\\"nullblank/#/detail/lockfile\\">lockfile</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: 4.17.4\\"><a href=\\"nullblank/#/detail/lodash\\">lodash</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^0.7.0\\"><a href=\\"nullblank/#/detail/lunr\\">lunr</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: 0.3.6\\"><a href=\\"nullblank/#/detail/marked\\">marked</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.3.6\\"><a href=\\"nullblank/#/detail/mime\\">mime</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^3.0.2\\"><a href=\\"nullblank/#/detail/minimatch\\">minimatch</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^0.5.1\\"><a href=\\"nullblank/#/detail/mkdirp\\">mkdirp</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^0.4.0\\"><a href=\\"nullblank/#/detail/pkginfo\\">pkginfo</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^2.72.0\\"><a href=\\"nullblank/#/detail/request\\">request</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^5.1.0\\"><a href=\\"nullblank/#/detail/semver\\">semver</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.0.0\\"><a href=\\"nullblank/#/detail/unix-crypt-td-js\\">unix-crypt-td-js</a></li></ul></div></div>"`;
|
||||
exports[`<PackageSidebar /> : <Dependencies /> should load the package and match snapshot 1`] = `"<div class=\\"module dependenciesModule\\"><h2 class=\\"moduleTitle\\">Dependencies</h2><div><ul><li class=\\"dependency-item\\" title=\\"Depend on version: 0.0.3\\"><a href=\\"http://localhost/#/detail/@verdaccio/file-locking\\">@verdaccio/file-locking</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: 0.0.2\\"><a href=\\"http://localhost/#/detail/@verdaccio/streams\\">@verdaccio/streams</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.1.1\\"><a href=\\"http://localhost/#/detail/JSONStream\\">JSONStream</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.1.2\\"><a href=\\"http://localhost/#/detail/apache-md5\\">apache-md5</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^2.0.1\\"><a href=\\"http://localhost/#/detail/async\\">async</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.15.0\\"><a href=\\"http://localhost/#/detail/body-parser\\">body-parser</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.8.0\\"><a href=\\"http://localhost/#/detail/bunyan\\">bunyan</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^2.0.1\\"><a href=\\"http://localhost/#/detail/chalk\\">chalk</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^2.11.0\\"><a href=\\"http://localhost/#/detail/commander\\">commander</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: 1.6.2\\"><a href=\\"http://localhost/#/detail/compression\\">compression</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^0.7.0\\"><a href=\\"http://localhost/#/detail/cookies\\">cookies</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^2.8.3\\"><a href=\\"http://localhost/#/detail/cors\\">cors</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: 4.15.3\\"><a href=\\"http://localhost/#/detail/express\\">express</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^4.3.2\\"><a href=\\"http://localhost/#/detail/global\\">global</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: 4.0.5\\"><a href=\\"http://localhost/#/detail/handlebars\\">handlebars</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.4.0\\"><a href=\\"http://localhost/#/detail/http-errors\\">http-errors</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: 1.0.1\\"><a href=\\"http://localhost/#/detail/js-string-escape\\">js-string-escape</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^3.6.0\\"><a href=\\"http://localhost/#/detail/js-yaml\\">js-yaml</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^7.4.1\\"><a href=\\"http://localhost/#/detail/jsonwebtoken\\">jsonwebtoken</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.0.1\\"><a href=\\"http://localhost/#/detail/lockfile\\">lockfile</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: 4.17.4\\"><a href=\\"http://localhost/#/detail/lodash\\">lodash</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^0.7.0\\"><a href=\\"http://localhost/#/detail/lunr\\">lunr</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: 0.3.6\\"><a href=\\"http://localhost/#/detail/marked\\">marked</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.3.6\\"><a href=\\"http://localhost/#/detail/mime\\">mime</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^3.0.2\\"><a href=\\"http://localhost/#/detail/minimatch\\">minimatch</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^0.5.1\\"><a href=\\"http://localhost/#/detail/mkdirp\\">mkdirp</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^0.4.0\\"><a href=\\"http://localhost/#/detail/pkginfo\\">pkginfo</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^2.72.0\\"><a href=\\"http://localhost/#/detail/request\\">request</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^5.1.0\\"><a href=\\"http://localhost/#/detail/semver\\">semver</a><span>, </span></li><li class=\\"dependency-item\\" title=\\"Depend on version: ^1.0.0\\"><a href=\\"http://localhost/#/detail/unix-crypt-td-js\\">unix-crypt-td-js</a></li></ul></div></div>"`;
|
||||
|
|
|
@ -22,11 +22,7 @@ const register = (url, method = 'get', options = {}) => {
|
|||
|
||||
if (url === 'sidebar/verdaccio' && method.toLocaleLowerCase() === 'get') {
|
||||
return new Promise(function(resolve) {
|
||||
resolve({
|
||||
json: function() {
|
||||
return packageMeta;
|
||||
}
|
||||
});
|
||||
resolve(packageMeta);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<Header /> snapshot test shoud match snapshot 1`] = `"<header class=\\"header\\"><div class=\\"headerWrap\\"><a href=\\"/\\"><img src=\\"\\" class=\\"logo\\"></a><figure>npm set registry nullblank<br>npm adduser --registry nullblank</figure><div class=\\"headerRight\\"><button class=\\"el-button el-button--default headerButton header-button-login\\" type=\\"button\\"><span>Login</span></button></div></div><div><div style=\\"z-index: 1013; display: none;\\" class=\\"el-dialog__wrapper\\"><div style=\\"top: 15%;\\" class=\\"el-dialog el-dialog--tiny\\"><div class=\\"el-dialog__header\\"><span class=\\"el-dialog__title\\">Login</span><button type=\\"button\\" class=\\"el-dialog__headerbtn\\"><i class=\\"el-dialog__close el-icon el-icon-close\\"></i></button></div><form class=\\"el-form el-form--label-right login-form\\"><div class=\\"el-dialog__body\\"><br><div class=\\"el-input\\"><input type=\\"text\\" name=\\"username\\" placeholder=\\"Username\\" class=\\"el-input__inner\\" autocomplete=\\"off\\"></div><br><br><div class=\\"el-input\\"><input type=\\"password\\" name=\\"password\\" placeholder=\\"Type your password\\" class=\\"el-input__inner\\" autocomplete=\\"off\\"></div></div><div class=\\"el-dialog__footer dialog-footer\\"><button class=\\"el-button el-button--default cancel-login-button\\" type=\\"button\\"><span>Cancel</span></button><button class=\\"el-button el-button--default login-button\\" type=\\"submit\\"><span>Login</span></button></div></form></div></div><div class=\\"v-modal\\" style=\\"z-index: 1012; display: none;\\"></div></div></header>"`;
|
||||
exports[`<Header /> snapshot test shoud match snapshot 1`] = `"<header class=\\"header\\"><div class=\\"headerWrap\\"><a href=\\"/\\"><img src=\\"\\" class=\\"logo\\"></a><figure>npm set registry http://localhost<br>npm adduser --registry http://localhost</figure><div class=\\"headerRight\\"><button class=\\"el-button el-button--default headerButton header-button-login\\" type=\\"button\\"><span>Login</span></button></div></div><div><div style=\\"z-index: 1013; display: none;\\" class=\\"el-dialog__wrapper\\"><div style=\\"top: 15%;\\" class=\\"el-dialog el-dialog--tiny\\"><div class=\\"el-dialog__header\\"><span class=\\"el-dialog__title\\">Login</span><button type=\\"button\\" class=\\"el-dialog__headerbtn\\"><i class=\\"el-dialog__close el-icon el-icon-close\\"></i></button></div><form class=\\"el-form el-form--label-right login-form\\"><div class=\\"el-dialog__body\\"><br><div class=\\"el-input\\"><input type=\\"text\\" name=\\"username\\" placeholder=\\"Username\\" class=\\"el-input__inner\\" autocomplete=\\"off\\"></div><br><br><div class=\\"el-input\\"><input type=\\"password\\" name=\\"password\\" placeholder=\\"Type your password\\" class=\\"el-input__inner\\" autocomplete=\\"off\\"></div></div><div class=\\"el-dialog__footer dialog-footer\\"><button class=\\"el-button el-button--default cancel-login-button\\" type=\\"button\\"><span>Cancel</span></button><button class=\\"el-button el-button--default login-button\\" type=\\"submit\\"><span>Login</span></button></div></form></div></div><div class=\\"v-modal\\" style=\\"z-index: 1012; display: none;\\"></div></div></header>"`;
|
||||
|
|
|
@ -34,9 +34,19 @@ describe('<Header /> component shallow', () => {
|
|||
expect(HeaderWrapper.state()).toEqual(state);
|
||||
});
|
||||
|
||||
it('should load verdaccio logo', () => {
|
||||
const HeaderWrapper = wrapper.find(Header).dive();
|
||||
const { loadLogo } = HeaderWrapper.instance();
|
||||
|
||||
loadLogo().then(() => {
|
||||
expect(HeaderWrapper.state('logo'))
|
||||
.toEqual('http://localhost/-/static/logo.png');
|
||||
});
|
||||
});
|
||||
|
||||
it('should toggleLogin modal', () => {
|
||||
const HeaderWrapper = wrapper.find(Header).dive();
|
||||
const toggleLoginModal = HeaderWrapper.instance().toggleLoginModal;
|
||||
const { toggleLoginModal } = HeaderWrapper.instance();
|
||||
|
||||
expect(toggleLoginModal()).toBeUndefined();
|
||||
expect(HeaderWrapper.state('showLogin')).toBeTruthy();
|
||||
|
@ -55,7 +65,7 @@ describe('<Header /> component shallow', () => {
|
|||
|
||||
it('handleSubmit - should give error for blank username and password', () => {
|
||||
const HeaderWrapper = wrapper.find(Header).dive();
|
||||
const handleSubmit = HeaderWrapper.instance().handleSubmit;
|
||||
const {handleSubmit} = HeaderWrapper.instance();
|
||||
const error = {
|
||||
description: "Username or password can't be empty!",
|
||||
title: 'Unable to login',
|
||||
|
@ -67,11 +77,14 @@ describe('<Header /> component shallow', () => {
|
|||
|
||||
it('handleSubmit - should login successfully', () => {
|
||||
const HeaderWrapper = wrapper.find(Header).dive();
|
||||
const handleSubmit = HeaderWrapper.instance().handleSubmit;
|
||||
|
||||
const {handleSubmit} = HeaderWrapper.instance();
|
||||
const event = {preventDefault: () => {}}
|
||||
const spy = jest.spyOn(event, 'preventDefault');
|
||||
|
||||
HeaderWrapper.setState({ username: 'sam', password: '1234' });
|
||||
|
||||
handleSubmit().then(() => {
|
||||
handleSubmit(event).then(() => {
|
||||
expect(spy).toHaveBeenCalled();
|
||||
expect(storage.getItem('token')).toEqual('TEST_TOKEN');
|
||||
expect(storage.getItem('username')).toEqual('sam');
|
||||
});
|
||||
|
@ -79,30 +92,37 @@ describe('<Header /> component shallow', () => {
|
|||
|
||||
it('handleSubmit - login should failed with 401', () => {
|
||||
const HeaderWrapper = wrapper.find(Header).dive();
|
||||
const handleSubmit = HeaderWrapper.instance().handleSubmit;
|
||||
const {handleSubmit} = HeaderWrapper.instance();
|
||||
const errorObject = {
|
||||
title: 'Unable to login',
|
||||
type: 'error',
|
||||
description: 'Unauthorized'
|
||||
description: 'bad username/password, access denied'
|
||||
};
|
||||
const event = { preventDefault: () => { } }
|
||||
const spy = jest.spyOn(event, 'preventDefault');
|
||||
HeaderWrapper.setState({ username: 'sam', password: '12345' });
|
||||
|
||||
handleSubmit().catch((error) => {
|
||||
handleSubmit(event).then(() => {
|
||||
expect(spy).toHaveBeenCalled();
|
||||
expect(HeaderWrapper.state('loginError')).toEqual(errorObject);
|
||||
});
|
||||
});
|
||||
|
||||
it('handleSubmit - login should failed with when no data is sent', () => {
|
||||
const HeaderWrapper = wrapper.find(Header).dive();
|
||||
const handleSubmit = HeaderWrapper.instance().handleSubmit;
|
||||
const {handleSubmit} = HeaderWrapper.instance();
|
||||
const error = {
|
||||
title: 'Unable to login',
|
||||
type: 'error',
|
||||
description: "Username or password can't be empty!"
|
||||
};
|
||||
const event = { preventDefault: () => { } }
|
||||
const spy = jest.spyOn(event, 'preventDefault');
|
||||
|
||||
HeaderWrapper.setState({});
|
||||
|
||||
handleSubmit().then(() => {
|
||||
handleSubmit(event).then(() => {
|
||||
expect(spy).toHaveBeenCalled();
|
||||
expect(HeaderWrapper.state('loginError')).toEqual(error);
|
||||
});
|
||||
});
|
||||
|
@ -117,4 +137,4 @@ describe('<Header /> snapshot test', () => {
|
|||
);
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
});
|
|
@ -4,21 +4,17 @@
|
|||
* @returns {promise}
|
||||
*/
|
||||
export default function(config) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const body = JSON.parse(config.body);
|
||||
if (body.username === 'sam' && body.password === '1234') {
|
||||
return new Promise(function(resolve) {
|
||||
resolve({
|
||||
json: function() {
|
||||
return {
|
||||
username: 'sam',
|
||||
token: 'TEST_TOKEN'
|
||||
}
|
||||
}
|
||||
username: 'sam',
|
||||
token: 'TEST_TOKEN'
|
||||
});
|
||||
});
|
||||
} else {
|
||||
throw Error('Unauthorized');
|
||||
reject({
|
||||
error: 'bad username/password, access denied'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* Mock response for login api
|
||||
* Mock response for logo api
|
||||
* @returns {promise}
|
||||
*/
|
||||
export default function() {
|
||||
const response = {
|
||||
url: 'http://xyz.com/image.jpg'
|
||||
};
|
||||
return Promise.resolve(response);
|
||||
return Promise.resolve('http://localhost/-/static/logo.png');
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ title: "Plugins"
|
|||
---
|
||||
Verdaccio es una aplicación extensible. Puede ser extendida en muchas maneras, tanto con nuevos métodos de autenticación, añadiendo endpoints o usando un almacenamiento personalizado.
|
||||
|
||||
> Si está interesado en desarrollar su propio plugin, lea la sección [development](development.md).
|
||||
> If you are interested to develop your own plugin, read the [development](dev-plugins.md) section.
|
||||
|
||||
## Uso
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ Hay dos variantes para instalar verdaccio utilizando este módulo Puppet:
|
|||
* Modo Aplicación (con aplicación de Puppet y sin necesidad de configurar el puppetmaster)
|
||||
* Modo Agente Maestro (con acceso del agente Puppet a su configuración a través del puppetmaster).
|
||||
|
||||
En ambas variantes tiene que llamar explícitamente a "class nodejs {}" en su script de marioneta porque el módulo de marioneta de verdaccio solo define esto como un requisito, por lo que tiene toda la flexibilidad que quiera cuando instale nodejs. Desplácese hacia abajo para detalles sobre la variante del Modo Agente Maestro.
|
||||
En ambas variantes tiene que llamar explícitamente a "class nodejs {}" en su script de puppet porque el módulo de puppet-verdaccio solo define esto como un requisito, por lo que tiene toda la flexibilidad que quiera cuando instale nodejs. Desplácese hacia abajo para detalles sobre la variante del Modo Agente Maestro.
|
||||
|
||||
Para más información:
|
||||
|
||||
|
|
|
@ -38,13 +38,13 @@ Si está ejecutando `verdaccio` en una instancia de Amazon EC2, [necesitará est
|
|||
|
||||
Podemos utilizar el paquete de nodo llamado 'forever' para mantener verdaccio ejecutándose todo el tiempo. https://github.com/nodejitsu/forever
|
||||
|
||||
Primero instales forever globalmente:
|
||||
Primero instale forever globalmente:
|
||||
|
||||
```bash
|
||||
$ sudo npm install -g forever
|
||||
```
|
||||
|
||||
Asegúrese que ha iniciado verdaccio al menos una vez para general el archivo de configuración y escriba el usuario admin creado. Puede entonces utilizar el siguiente comando para iniciar verdaccio:
|
||||
Asegúrese que ha iniciado verdaccio al menos una vez para generar el archivo de configuración y escriba el usuario admin creado. Puede entonces utilizar el siguiente comando para iniciar verdaccio:
|
||||
|
||||
```bash
|
||||
$ forever start `which verdaccio`
|
||||
|
|
|
@ -4,7 +4,7 @@ title: "Plugins"
|
|||
---
|
||||
Verdaccio is an plugabble aplication. It can be extended in many ways, either new authentication methods, adding endpoints or using a custom storage.
|
||||
|
||||
> If you are interested to develop your own plugin, read the [development](development.md) section.
|
||||
> If you are interested to develop your own plugin, read the [development](dev-plugins.md) section.
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
id: ansible
|
||||
title: "Ansible"
|
||||
---
|
||||
We have a customised solution for `verdaccio` in our organization.
|
||||
我们团队有`verdaccio`的定制解决方案。
|
||||
|
||||
<https://github.com/verdaccio/ansible-verdaccio>
|
||||
|
||||
#### Other options
|
||||
#### 其他选项
|
||||
|
||||
* Ansible role for Gentoo users: [jirutka/ansible-role-sinopia](https://github.com/jirutka/ansible-role-sinopia).
|
||||
* Ansible role for Ubuntu users: [jagregory/sinopia-ansible](https://github.com/jagregory/sinopia-ansible).
|
||||
* Ansible 对Gentoo用户的作用:[jirutka/ansible-role-sinopia](https://github.com/jirutka/ansible-role-sinopia)。
|
||||
* Ansible 对 Ubuntu 用户的作用: [jagregory/sinopia-ansible](https://github.com/jagregory/sinopia-ansible)。
|
||||
* ansible-verdaccio-role <https://github.com/refinery29/ansible-verdaccio-role>
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
id: authentification
|
||||
title: "Authentification"
|
||||
id: 认证
|
||||
title: "认证"
|
||||
---
|
||||
认证部分设置与 "Auth" [ 插件 ](plugins.md)息息相关。包的访问限制也同时通过 [ 包访问权限](packages.md) 控制。
|
||||
|
||||
|
@ -21,7 +21,7 @@ registry=http://localhost:5555/
|
|||
|
||||
#### 匿名发布包
|
||||
|
||||
`verdaccio`allows you to enable anonymous publish, to achieve that you will need to set up correctly your [packages access](packages.md).
|
||||
`verdaccio` 允许启用匿名发布,要使用这个功能,必须设置正确的 [程序包访问权限](packages.md)。
|
||||
|
||||
例如:
|
||||
|
||||
|
@ -36,7 +36,7 @@ registry=http://localhost:5555/
|
|||
|
||||
## 默认 htpasswd
|
||||
|
||||
In order to simplify the setup, `verdaccio` use a plugin based on `htpasswd`. As of version v3.0.x an [external plugin](https://github.com/verdaccio/verdaccio-htpasswd) is used by default. The v2.x version of this package still contains the built-in version of this plugin.
|
||||
为了简化安装,`verdaccio` 使用`htpasswd`基础上的插件。 到v3.0.x版本为止,默认使用[外部插件](https://github.com/verdaccio/verdaccio-htpasswd)。 此包的v2.x 版本仍然包含此插件的内置版本。
|
||||
|
||||
```yaml
|
||||
auth:
|
||||
|
@ -47,9 +47,9 @@ auth:
|
|||
#max_users: 1000
|
||||
```
|
||||
|
||||
| 属性 | 类型 | 必填 | 示例 | 支持 | 描述 |
|
||||
| --------- | ------ | -- | ---------- | ---- | ---------------------- |
|
||||
| file | string | 是 | ./htpasswd | 任意路径 | 存储了加密认证信息的 htpasswd 文件 |
|
||||
| max_users | number | 否 | 1000 | 任意数字 | 最大的用户数量 |
|
||||
| 属性 | 类型 | 必填 | 示例 | 支持 | 描述 |
|
||||
| --------- | --- | -- | ---------- | ---- | ---------------------- |
|
||||
| 文件 | 字符串 | 是 | ./htpasswd | 任意路径 | 存储了加密认证信息的 htpasswd 文件 |
|
||||
| max_users | 数字 | 否 | 1000 | 任意数字 | 最大的用户数量 |
|
||||
|
||||
如果需要禁止新用户注册,可将配置修改为 `max_users: -1`.
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
id: build
|
||||
title: "Build the source code"
|
||||
id: 创建
|
||||
title: "创建源代码"
|
||||
---
|
||||
Verdaccio relies on `yarn` instead `npm` to download dependencies.
|
||||
Verdaccio 依赖 `yarn` 而非 `npm` 来下载依赖项。
|
||||
|
||||
*Note: the current build only will build with `➜ yarn@1.x`.
|
||||
*请注意:当前创建源代码只能通过`➜ yarn@1.x`来生成。
|
||||
|
||||
```bash
|
||||
yarn install
|
||||
```
|
||||
|
||||
To see the complete list of scripts, [click here](https://github.com/verdaccio/verdaccio/wiki/Build-Source-Code).
|
||||
要查看脚本的完整列表, 请[点击这里](https://github.com/verdaccio/verdaccio/wiki/Build-Source-Code)。
|
|
@ -2,13 +2,13 @@
|
|||
id: chef
|
||||
title: "Chef Cookbook"
|
||||
---
|
||||
Using Chef Cookbook for Verdaccio
|
||||
Verdaccio使用Chef Cookbook
|
||||
|
||||
For further information:
|
||||
要获得更多的信息:
|
||||
|
||||
* <https://github.com/verdaccio/verdaccio-cookbook>
|
||||
* [https://github.com/verdaccio/verdaccio-cookbook ](https://github.com/verdaccio/verdaccio-cookbook)
|
||||
* <https://supermarket.chef.io/cookbooks/verdaccio>
|
||||
|
||||
> We are looking for contributors for this repository, if you are interested please notify the author via tickets.
|
||||
> 我们在寻找此资源库的贡献者,如果有兴趣请通过发票证方式通知作者。
|
||||
|
||||
Author: [Keli Grubb](https://github.com/kgrubb) && Barthelemy Vessemont.
|
||||
作者: [Keli Grubb](https://github.com/kgrubb) && Barthelemy Vessemont。
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
id: ci
|
||||
title: "Continuous Integration"
|
||||
title: "持续集成"
|
||||
---
|
||||
You may use verdaccio with continuous integration while login or publish. When using NPM to install a private module in a continuous integration environment for the first time, a brick wall is quickly hit. The NPM login command is designed to be used interactively. This causes an issue in CI, scripts, etc. Here’s how to use NPM login different continuous integration platforms.
|
||||
在登陆或发布的时候,您可以用verdaccio 进行持续集成。 初次使用NPM在持续集成的环境里安装专用模块,可能会马上碰到问题。 NPM 登陆命令设计为交互式使用。 它导致CI,脚本等问题。 下面是如何使用NPM 登陆不同持续集成平台的方法。
|
||||
|
||||
- [Travis CI](https://remysharp.com/2015/10/26/using-travis-with-private-npm-deps)
|
||||
- [Circle CI 1.0](https://circleci.com/docs/1.0/npm-login/) or [Circle CI 2.0](https://circleci.com/docs/2.0/deployment-integrations/#npm)
|
||||
- [Circle CI 1.0](https://circleci.com/docs/1.0/npm-login/) 或者[Circle CI 2.0](https://circleci.com/docs/2.0/deployment-integrations/#npm)
|
||||
- [Gitlab CI](https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/)
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
id: cli
|
||||
title: "Command Line Tool"
|
||||
title: "命令行工具"
|
||||
---
|
||||
Verdaccio 命令行是启动和控制此应用的工具
|
||||
Verdaccio 命令行是启动和控制此应用的工具。
|
||||
|
||||
## 命令
|
||||
|
||||
|
@ -15,10 +15,10 @@ verdaccio --listen 4000 --config ~./config.yaml
|
|||
| --listen \ **-l** | 4873 | -p 7000 | HTTP 监听端口 |
|
||||
| --config \ **-c** | ~/.local/verdaccio/config.yaml | ~./config.yaml | 配置文件路径 |
|
||||
|
||||
## Default config file location
|
||||
## 默认配置文件路径位置
|
||||
|
||||
To locate the home directory, we rely on **$XDG_DATA_HOME** as a first choice and Windows environment we look for [APPDATA environment variable](https://www.howtogeek.com/318177/what-is-the-appdata-folder-in-windows/).
|
||||
要找到主目录,我们首先选择 **$XDG_DATA_HOME**,接着寻找Windows 环境 [APPDATA 环境变量](https://www.howtogeek.com/318177/what-is-the-appdata-folder-in-windows/)。
|
||||
|
||||
## Default storage location
|
||||
## 默认存储位置
|
||||
|
||||
We use **$XDG_DATA_HOME** environment variable as default to locate the storage by default which [should be the same](https://askubuntu.com/questions/538526/is-home-local-share-the-default-value-for-xdg-data-home-in-ubuntu-14-04) as $HOME/.local/share. If you are using a custom storage, this location is irrelevant.
|
||||
我们以**$XDG_DATA_HOME** 环境变量为默认值来默认查找存储,[这应该和](https://askubuntu.com/questions/538526/is-home-local-share-the-default-value-for-xdg-data-home-in-ubuntu-14-04) $HOME/.local/share一样。 如果您正在使用自定义存储,则与此位置不相干。
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
id: configuration
|
||||
title: "Configuration File"
|
||||
id: 配置
|
||||
title: "配置文件"
|
||||
---
|
||||
此文件是 Verdaccio 的重要部分, 您可以在其中修改默认行为, 启用插件并扩展功能。
|
||||
|
||||
|
@ -43,7 +43,7 @@ storage: ./storage
|
|||
|
||||
### 认证
|
||||
|
||||
The authentification set up is done here, the default auth is based on `htpasswd` and is built-in. 您可以通过 [ 插件 ](plugins.md) 修改此行为。 如需了解更多信息,请阅读文档中的 ["认证" 部分](auth.md)
|
||||
在这里完成授权设置,默认授权是基于`htpasswd` 并且是内置的。 您可以通过 [ 插件 ](plugins.md) 修改此行为。 如需了解更多信息,请阅读文档中的 ["认证" 部分](auth.md)
|
||||
|
||||
```yaml
|
||||
auth:
|
||||
|
@ -89,7 +89,7 @@ packages:
|
|||
|
||||
### 离线发布
|
||||
|
||||
`Verdaccio` 默认不允许在与 Uplinks 断开连接后发布任何包,但是通过设置以下选项为 *ture* 来允许离线发布
|
||||
`Verdaccio` 默认不允许在与 Uplinks 断开连接后发布任何包,但是通过设置以下选项为 *true* 来允许离线发布。
|
||||
|
||||
```yaml
|
||||
publish:
|
||||
|
@ -106,9 +106,9 @@ url_prefix: https://dev.company.local/verdaccio/
|
|||
|
||||
Since: `verdaccio@2.3.6` due [#197](https://github.com/verdaccio/verdaccio/pull/197)
|
||||
|
||||
### 最大 Body 尺寸
|
||||
### 最大正文大小
|
||||
|
||||
By default the maximum body size for a JSON document is `10mb`, if you run in errors as `"request entity too large"` you may increase this value.
|
||||
默认的 JSON 文件最大正文大小是`10mb`, 如果遇到`“请求实体太大”`的错误,您可以增大此数值。
|
||||
|
||||
```yaml
|
||||
max_body_size: 10mb
|
||||
|
@ -116,7 +116,7 @@ max_body_size: 10mb
|
|||
|
||||
### 监听端口
|
||||
|
||||
`Verdaccio` 默认使用 `4873` 端口. 可以通过 [命令行传递参数](cli.md) 或修改配置文件,以下格式是有效的
|
||||
`Verdaccio` 默认使用 `4873` 端口. 可以通过 [命令行传递参数](cli.md) 或修改配置文件,以下格式是有效的。
|
||||
|
||||
```yaml
|
||||
listen:
|
||||
|
@ -139,13 +139,13 @@ https:
|
|||
ca: ./path/verdaccio-csr.pem
|
||||
```
|
||||
|
||||
### Proxy
|
||||
### 代理服务器
|
||||
|
||||
Proxies are special-purpose HTTP servers designed to transfer data from remote servers to local clients.
|
||||
代理服务器是专门把数据从远程服务器传输到本地客户端的HTTP 服务器。
|
||||
|
||||
#### http_proxy and https_proxy
|
||||
|
||||
If you have a proxy in your network you can set a `X-Forwarded-For` header using the following properties.
|
||||
如果您的网络里有代理服务器,您可以使用以下属性来设置`X-Forwarded-For`页眉。
|
||||
|
||||
```yaml
|
||||
http_proxy: http://something.local/
|
||||
|
@ -154,16 +154,16 @@ https_proxy: https://something.local/
|
|||
|
||||
#### no_proxy
|
||||
|
||||
This variable should contain a comma-separated list of domain extensions proxy should not be used for.
|
||||
此变量应该包含一个代理服务器不应该被用到的,以逗号分隔的域名扩展列表。
|
||||
|
||||
```yaml
|
||||
http_proxy: http://something.local/
|
||||
https_proxy: https://something.local/
|
||||
```
|
||||
|
||||
### Notifications
|
||||
### 通知
|
||||
|
||||
Enable notifications to three party tools is fairly easy via web hooks. For more information about this section read the [notifications page](notifications.md).
|
||||
使用web hooks来启用三方工具通知是非常容易的。如需了解更多此部分的内容,请阅读[通知页面](notifications.md)。
|
||||
|
||||
```yaml
|
||||
notify:
|
||||
|
@ -173,15 +173,15 @@ notify:
|
|||
content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
|
||||
```
|
||||
|
||||
> For more detailed configuration settings, please [check the source code](https://github.com/verdaccio/verdaccio/tree/master/conf).
|
||||
> 有关更多配置设置的详细信息,请[核对源代码](https://github.com/verdaccio/verdaccio/tree/master/conf)。
|
||||
|
||||
### Audit
|
||||
### 审核
|
||||
|
||||
<small>Since: <code>verdaccio@3.0.0</code></small>
|
||||
|
||||
`npm audit` is a new command released with [npm 6.x](https://github.com/npm/npm/releases/tag/v6.1.0). Verdaccio includes a built-in middleware plugin to handle this command.
|
||||
`npm audit` 是和[npm 6.x](https://github.com/npm/npm/releases/tag/v6.1.0) 一起发布的新命令。Verdaccio 包含一个内置的middleware (中间体)插件来处理此命令。
|
||||
|
||||
> If you have a new installation it comes by default, otherwise you need to add the following props to your config file
|
||||
> 新安装采用默认版本,但是您可以添加以下代码段到配置文件中
|
||||
|
||||
```yaml
|
||||
middlewares:
|
||||
|
|
|
@ -1,81 +1,81 @@
|
|||
---
|
||||
id: contributing
|
||||
title: "Contributing Verdaccio"
|
||||
id: 贡献
|
||||
title: "参与Verdaccio贡献"
|
||||
---
|
||||
First of all Jumping into an unfamiliar code base is not easy but we are here to help you.
|
||||
First of all 一头扎进不熟悉的代码库并不容易,但是我们会在此帮助你。
|
||||
|
||||
## Comunication Channels
|
||||
## 沟通频道
|
||||
|
||||
If you are willing for asking, we use two channels for discussions:
|
||||
如果您想知道,我们使用两个频道进行讨论:
|
||||
|
||||
* [Public Gitter channel](https://gitter.im/verdaccio/)
|
||||
* [Contributors Slack channel](https://verdaccio-npm.slack.com) (unfortunately only by email invitation, you might ask in **Gitter** to be included)
|
||||
* [公共Gitter频道](https://gitter.im/verdaccio/)
|
||||
* [贡献者Slack频道](https://verdaccio-npm.slack.com)(可惜只有通过电子邮件邀请才可以进入,您可以在**Gitter**里要求加入)
|
||||
|
||||
## Getting started
|
||||
## 开始
|
||||
|
||||
As a first glance verdaccio is a single repository, but there are many ways you might contribute and a variety of technologies to practice.
|
||||
乍一看,verdaccio只是单一资源库,但是有很多方法您可以参与贡献以及练习多种技术。
|
||||
|
||||
### Finding my spot
|
||||
### 寻找适合我的地方
|
||||
|
||||
All we have different skills, so, let's see where you might feel comfortable.
|
||||
大家都有不同的技能,因此,让我们看看您在哪个方面会感觉舒适。
|
||||
|
||||
### I know or I want to learn Node.js
|
||||
### 我知道或者我想要学习 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是`verdaccio`的基础, 我们使用 `express`, `commander`, `request` 或者 `async`程序库。 Verdaccio大体上就是一个Rest API ,它和`yarn`一样,创建与`npm` 客户端兼容的通信。
|
||||
|
||||
We have a long [list of plugins](plugins.md) ready to be used and improved but at the same time [you might create your own](dev-plugins.md).
|
||||
我们有很多[插件列表](plugins.md)可供使用和改善,但是同时[您也可以创建自己的插件](dev-plugins.md)。
|
||||
|
||||
### I would prefer to work in the User Interface
|
||||
### 我倾向在用户界面作业
|
||||
|
||||
Recently we have moved to modern techonologies as `React` and `element-react`. We are looking forward to see new ideas how to improve the UI.
|
||||
最近,我们已经转移到使用`React` 和 `element-react`这样的现代技术。我们期待看到如何改善UI 的新想法。
|
||||
|
||||
### 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).
|
||||
当然,我们会很乐意您帮助我们改善堆栈,您可以将依赖项升级为 `eslint`, `stylelint`, `webpack`。 哪怕只是改进 `webpack`配置都非常棒。 我们欢迎任何的建议。 此外,如果您有**Yeoman**的经验,您可以帮我们改善[verdaccio发生器](https://github.com/verdaccio/generator-verdaccio-plugin)。
|
||||
|
||||
Here some ideas:
|
||||
这里是一些想法:
|
||||
|
||||
* Create a common eslint rules to be used across all dependencies or plugins
|
||||
* Improve Flow types definitions delivery
|
||||
* Moving to Webpack 4
|
||||
* Improve hot reload with Webpack
|
||||
* We use babel and webpack across all dependencies, why not a common preset?
|
||||
* Improve continous integration delivery
|
||||
* 创建要在所有依赖项或插件中使用的eslint共同规则
|
||||
* 改善定义传递的流程类型
|
||||
* 迁移到Webpack 4
|
||||
* 改善Webpack的组件级
|
||||
* 我们在所有依赖项使用babel 和 webpack,为什么不能用通用预设?
|
||||
* 改善持续集成传递
|
||||
|
||||
### 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
|
||||
### 我是设计师
|
||||
|
||||
We have a frontend website <http://www.verdaccio.org/> that will be happy to see your ideas.
|
||||
我们有个前端网站<http://www.verdaccio.org/> ,将很高兴看到您的想法。
|
||||
|
||||
Our website is based on [Docusaurus](https://docusaurus.io/).
|
||||
我们的网站是基于[Docusaurus](https://docusaurus.io/)。
|
||||
|
||||
### I am a DevOps
|
||||
### 我是一名DevOps
|
||||
|
||||
We have a widely popular Docker image <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.
|
||||
我们有广受欢迎的Docker镜像<https://hub.docker.com/r/verdaccio/verdaccio/>,它需要维护和进行可能相当大的改善,我们需要您的知识来使所有用户都可受益。
|
||||
|
||||
We have support for **Kubernetes**, **Puppet**, **Ansible** and **Chef** and we need help in those fields, feel free to see all repositories.
|
||||
我们支持 **Kubernetes**, **Puppet**, **Ansible** 和 **Chef**,在这些领域我们需要帮助,请随时查看所有资源库。
|
||||
|
||||
### I can do translations
|
||||
### 我可以翻译
|
||||
|
||||
Verdaccio aims to be multilingual, in order to achieve it **we have the awesome support** of [Crowdin](https://crowdin.com) that is an amazing platform for translations.
|
||||
Verdaccio的目标是多语言,为了实现这个目标,**我们得到**[Crowdin](https://crowdin.com) 的巨大支持,它是一个了不起的翻译平台。
|
||||
|
||||
<img src="https://d3n8a8pro7vhmx.cloudfront.net/uridu/pages/144/attachments/original/1485948891/Crowdin.png" width="400px" />
|
||||
|
||||
We have setup a project where you can choose your favourite language, if you do not find your language feel free to request one [creating a ticket](https://github.com/verdaccio/verdaccio/issues/new).
|
||||
我们已经设置了一个项目,您可以选择自己最喜欢的语言,如果您没有找到想要的语言,请自由地发起[创建要求票证](https://github.com/verdaccio/verdaccio/issues/new)。
|
||||
|
||||
[Go to Crowdin Verdaccio](https://crowdin.com/project/verdaccio)
|
||||
[转到 Crowdin Verdaccio](https://crowdin.com/project/verdaccio)
|
||||
|
||||
## I'm ready to contribute
|
||||
## 我已经做好贡献的准备
|
||||
|
||||
If you are thinking *"I've seen already the [repositories](repositories.md) and I'm willing to start right away"* then I have good news for you, that's the next step.
|
||||
如果您正在想*“我已经查看[资源库](repositories.md),并且愿意马上开始贡献”*,那么我有好消息给您,也就是下一步。
|
||||
|
||||
You will need learn how to build, [we have prepared a guide just for that](build.md).
|
||||
您将要了解如何创建,[我们已经为您准备了指南](build.md)。
|
||||
|
||||
Once you have played around with all scripts and you know how to use them, we are ready to go to the next step, run the [**Unit Test**](test.md).
|
||||
一旦您熟悉了所有的脚本并知道如何使用它们,我们就做好进入下一步的准备,开始运行[**单元测试**](test.md)。
|
||||
|
||||
## Full list of contributors. We want to see your face here !
|
||||
## 这里是贡献者的完整名单。我们希望在这里看到您!
|
||||
|
||||
<a href="graphs/contributors"><img src="https://opencollective.com/verdaccio/contributors.svg?width=890&button=false" /></a>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
id: dev-plugins
|
||||
title: "Developing Plugins"
|
||||
title: "插件开发"
|
||||
---
|
||||
There are many ways to extend `verdaccio`, currently we support `authentication plugins`, `middleware plugins` (since `v2.7.0`) and `storage plugins` since (`v3.x`).
|
||||
有很多方法来扩展 `verdaccio`, 目前我们支持 `authentication plugins`, `middleware plugins` (自 `v2.7.0` 版本) 和 `storage plugins` 自 (`v3.x`)版本。
|
||||
|
||||
## Authentication Plugin
|
||||
## Authentication Plugin(认证插件)
|
||||
|
||||
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`.
|
||||
本节将描述 Verdaccio 插件在ES5 里是如何运作的。 基本上我们要用一个叫做`authenticate` 的单纯方法来返回一个 object(对象),此方法将接收到3 个参数 (`user, password, callback`)。 一旦执行认证后,有两个选项来回应 `verdaccio`。
|
||||
|
||||
### API
|
||||
|
||||
|
@ -18,21 +18,21 @@ function authenticate (user, password, callback) {
|
|||
|
||||
##### OnError
|
||||
|
||||
Either something bad happened or auth was unsuccessful.
|
||||
要么是发生了糟糕的事,要么是授权不成功。
|
||||
|
||||
callback(null, false)
|
||||
|
||||
|
||||
##### OnSuccess
|
||||
|
||||
The auth was successful.
|
||||
授权成功。
|
||||
|
||||
`groups` is an array of strings where the user is part of.
|
||||
`groups`是用户组成的一组字符串。
|
||||
|
||||
callback(null, groups);
|
||||
|
||||
|
||||
### Example
|
||||
### 例如
|
||||
|
||||
```javascript
|
||||
function Auth(config, stuff) {
|
||||
|
@ -65,7 +65,7 @@ Auth.prototype.authenticate = function (user, password, callback) {
|
|||
module.exports = Auth;
|
||||
```
|
||||
|
||||
And the setup
|
||||
设置
|
||||
|
||||
```yaml
|
||||
auth:
|
||||
|
@ -73,13 +73,13 @@ auth:
|
|||
file: ./htpasswd
|
||||
```
|
||||
|
||||
Where `htpasswd` is the sufix of the plugin name. eg: `verdaccio-htpasswd` and the rest of the body would be the plugin configuration params.
|
||||
其中`htpasswd` 是插件名称的后缀。例如:`verdaccio-htpasswd`,剩下的组成部分是插件配置的参数。
|
||||
|
||||
## Middleware Plugin
|
||||
## Middleware Plugin(Middleware 插件)
|
||||
|
||||
Middleware plugins have the capability to modify the API layer, either adding new endpoints or intercepting requests.
|
||||
Middleware 插件有能力修改API 接口,它可以添加新的端点,也可以截取请求。
|
||||
|
||||
> A pretty good example of middleware plugin is the [sinopia-github-oauth](https://github.com/soundtrackyourbrand/sinopia-github-oauth) and [verdaccio-audit](https://github.com/verdaccio/verdaccio-audit).
|
||||
> Middleware 插件的一个很好的例子是 [sinopia-github-oauth](https://github.com/soundtrackyourbrand/sinopia-github-oauth) 和 [verdaccio-audit](https://github.com/verdaccio/verdaccio-audit)。
|
||||
|
||||
### API
|
||||
|
||||
|
@ -89,15 +89,15 @@ function register_middlewares(expressApp, authInstance, storageInstance) {
|
|||
}
|
||||
```
|
||||
|
||||
To register a middleware we need an object with a single method called `register_middlewares` that will recieve 3 arguments (`expressApp, auth, storage`). *Auth* is the authentification instance and *storage* is also the main Storage instance that will give you have access to all to the storage actions.
|
||||
要注册middleware,我们需要一个object(对象) 以及一个叫做`register_middlewares` 的单纯方法,它将接收到3 个参数 (`expressApp, auth, storage`)。 *Auth* 是authentification(认证) 实例参数,*storage* 也是主存储实例,它将让您可以访问所有的存储操作。
|
||||
|
||||
## Storage Plugin
|
||||
## Storage Plugin(存储插件)
|
||||
|
||||
Verdaccio by default uses a file system storage plugin [local-storage](https://github.com/verdaccio/local-storage) but, since `verdaccio@3.x` you can plug in a custom storage.
|
||||
Verdaccio 默认使用文件系统存储插件 [local-storage](https://github.com/verdaccio/local-storage) ,但是从`verdaccio@3.x` 版本开始,您可以插入自定义存储。
|
||||
|
||||
### API
|
||||
|
||||
The storage API is a bit more complex, you will need to create a class that return a `ILocalData` implementation. Please see details bellow.
|
||||
API 存储更复杂一些,您得创建一个返回实现`ILocalData`的类(class)。请参阅以下详细信息。
|
||||
|
||||
```js
|
||||
<br />class LocalDatabase<ILocalData>{
|
||||
|
@ -139,15 +139,15 @@ interface IReadTarball extends stream$PassThrough {
|
|||
}
|
||||
```
|
||||
|
||||
> The Storage API is still experimental and might change in the next minor versions. For further information about Storage API please follow the [types definitions in our official repository](https://github.com/verdaccio/flow-types).
|
||||
> API存储仍然还在实验阶段并在接下来的次版本中可能会有修改。 有关存储API的更多信息,请遵循[ 我们官网资源库里的类型定义](https://github.com/verdaccio/flow-types)。
|
||||
|
||||
### Storage Plugins Examples
|
||||
### 存储插件示例
|
||||
|
||||
The following list of plugins are implementing the Storage API and might be used them as example.
|
||||
以下插件列表执行存储API,可以作为示例。
|
||||
|
||||
* [verdaccio-memory](https://github.com/verdaccio/verdaccio-memory)
|
||||
* [local-storage](https://github.com/verdaccio/local-storage)
|
||||
* [verdaccio-google-cloud](https://github.com/verdaccio/verdaccio-google-cloud)
|
||||
* [verdaccio-s3-storage](https://github.com/Remitly/verdaccio-s3-storage/tree/s3)
|
||||
|
||||
> Are you willing to contribute with new Storage Plugins? [Click here.](https://github.com/verdaccio/verdaccio/issues/103#issuecomment-357478295)
|
||||
> 您是否愿意为新的存储插件做贡献?请[点击此处。](https://github.com/verdaccio/verdaccio/issues/103#issuecomment-357478295)
|
|
@ -6,7 +6,7 @@ title: Docker
|
|||

|
||||
</div>
|
||||
|
||||
To pull the latest pre-built [docker image](https://hub.docker.com/r/verdaccio/verdaccio/):
|
||||
要下载(pull)最新的预先-创建的[docker镜像](https://hub.docker.com/r/verdaccio/verdaccio/):
|
||||
|
||||
```bash
|
||||
docker pull verdaccio/verdaccio
|
||||
|
@ -14,49 +14,49 @@ docker pull verdaccio/verdaccio
|
|||
|
||||

|
||||
|
||||
## Tagged Versions
|
||||
## 标记版本
|
||||
|
||||
Since version `v2.x` you can pull docker images by [tag](https://hub.docker.com/r/verdaccio/verdaccio/tags/), as follows:
|
||||
自版本`v2.x`开始,您可以通过[标签](https://hub.docker.com/r/verdaccio/verdaccio/tags/)来下载(pull)docker镜像,具体操作如下:
|
||||
|
||||
For a major version:
|
||||
对于主版本:
|
||||
|
||||
```bash
|
||||
docker pull verdaccio/verdaccio:3
|
||||
```
|
||||
|
||||
For a minor version:
|
||||
对于次版本:
|
||||
|
||||
```bash
|
||||
docker pull verdaccio/verdaccio:3.0
|
||||
```
|
||||
|
||||
For a specific (patch) version:
|
||||
对于特定(补丁)版本:
|
||||
|
||||
```bash
|
||||
docker pull verdaccio/verdaccio:3.0.1
|
||||
```
|
||||
|
||||
For the next major release using the `beta` (master branch) version.
|
||||
下一个主版本将使用 `beta`(主分支)版本。
|
||||
|
||||
```bash
|
||||
docker pull verdaccio/verdaccio:beta
|
||||
```
|
||||
|
||||
> If you are interested on a list of tags, [please visit the Docker Hub website](https://hub.docker.com/r/verdaccio/verdaccio/tags/).
|
||||
> 如果您对标签列表感兴趣,[ 请访问 Docker 网站枢纽](https://hub.docker.com/r/verdaccio/verdaccio/tags/)。
|
||||
|
||||
## Running verdaccio using Docker
|
||||
## 用Docker运行verdaccio
|
||||
|
||||
To run the docker container:
|
||||
要运行docker 容器:
|
||||
|
||||
```bash
|
||||
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
|
||||
```
|
||||
|
||||
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.
|
||||
最后一个参数定义要使用的镜像。如果您还没有试的话,上面的代码将从dockerhub里下载(pull) 最新的预先创建的镜像。
|
||||
|
||||
If you have [build an image locally](#build-your-own-docker-image) use `verdaccio` as the last argument.
|
||||
如果您已经用 `verdaccio`作为最后参数[在本地创建一个镜像](#build-your-own-docker-image)。
|
||||
|
||||
You can use `-v` to bind mount `conf` and `storage` to the hosts filesystem:
|
||||
您可以用`-v`来绑定安装 `conf`和`storage`到主机文件系统中:
|
||||
|
||||
```bash
|
||||
V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio -p 4873:4873 \
|
||||
|
@ -65,17 +65,17 @@ V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio -p 4873:4873 \
|
|||
verdaccio/verdaccio
|
||||
```
|
||||
|
||||
> Note: Verdaccio runs as a non-root user (uid=100, gid=101) inside the container, if you use bind mount to override default, you need to make sure the mount directory is assigned to the right user. In above example, you need to run `sudo chown -R 100:101 /opt/verdaccio` otherwise you will get permission errors at runtime. [Use docker volume](https://docs.docker.com/storage/volumes/) is recommended over using bind mount.
|
||||
> 请注意:Verdaccio 在容器内是作为non-root 用户端 (uid=100, gid=101) 运行, 如果您使用绑定安装来覆盖默认设置, 您需要确保安装目录是被指定到正确的用户端。 在上面的示例里,您要运行 `sudo chown -R 100:101 /opt/verdaccio`,否则在运行的时候您会得到权限错误提醒。 推荐[使用docker卷](https://docs.docker.com/storage/volumes/)来替代绑定安装。
|
||||
|
||||
### Docker and custom port configuration
|
||||
### Docker和自定义端口配置
|
||||
|
||||
Any `host:port` configured in `conf/config.yaml` under `listen` is currently ignored when using docker.
|
||||
在使用docker 的时候,当前任何在`listen` 下的`conf/config.yaml` 里配置的`host:port`都将被忽略。
|
||||
|
||||
If you want to reach verdaccio docker instance under different port, lets say `5000` in your `docker run` command replace `-p 4873:4873` with `-p 5000:4873`.
|
||||
如果您要在不同端口下获得 verdaccio docker 实例,比如 `docker run` 命令里的`5000`,您可以用 `-p 5000:4873`取代 `-p 4873:4873` 。
|
||||
|
||||
In case you need to specify which port to listen to **in the docker container**, since version 2.?.? you can do so by providing additional arguments to `docker run`: `--env PORT=5000` This changes which port the docker container exposes and the port verdaccio listens to.
|
||||
从版本2.?.? 开始,如果您需要指定**docker容器**内特定监听端口, 您可以通过提供额外参数给`docker run`: `--env PORT=5000`来达成。这会改变docker容器显示的端口以及 verdaccio要监听的端口。
|
||||
|
||||
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:
|
||||
当然您给出的 `-p` 参数数字必须吻合,因此,假设您希望他们全都一样,您可以复制,黏贴和采用以下代码:
|
||||
|
||||
```bash
|
||||
PORT=5000; docker run -it --rm --name verdaccio \
|
||||
|
@ -83,9 +83,9 @@ PORT=5000; docker run -it --rm --name verdaccio \
|
|||
verdaccio/verdaccio
|
||||
```
|
||||
|
||||
### Using HTTPS with Docker
|
||||
### HTTPS 和Docker一起使用
|
||||
|
||||
You can configure the protocol verdaccio is going to listen on, similarly to the port configuration. You have to overwrite the default value("http") of the `PROTOCOL` environment variable to "https", after you specified the certificates in the config.yaml.
|
||||
您可以配置verdaccio要监听的协议,类似于端口配置。 当您在config.yaml里指定证书后,您必须用 "https"覆盖`PROTOCOL` 环境变量的默认值 ("http") 。
|
||||
|
||||
```bash
|
||||
PROTOCOL=https; docker run -it --rm --name verdaccio \
|
||||
|
@ -93,18 +93,18 @@ PROTOCOL=https; docker run -it --rm --name verdaccio \
|
|||
verdaccio/verdaccio
|
||||
```
|
||||
|
||||
### Using docker-compose
|
||||
### 使用docker-compose
|
||||
|
||||
1. Get the latest version of [docker-compose](https://github.com/docker/compose).
|
||||
2. Build and run the container:
|
||||
1. 获取[docker-compose](https://github.com/docker/compose)的最新版本。
|
||||
2. 创建并运行容器:
|
||||
|
||||
```bash
|
||||
$ docker-compose up --build
|
||||
```
|
||||
|
||||
You can set the port to use (for both container and host) by prefixing the above command with `PORT=5000`.
|
||||
您可以添加`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将生成一个用于存储持续应用程序数据的命名卷(named volume)。 您可以使用 `docker inspect` 或者 `docker volume inspect` 来查看此卷(volume) 的物理位置并编辑配置,比如:
|
||||
|
||||
$ docker volume inspect verdaccio_verdaccio
|
||||
[
|
||||
|
@ -119,43 +119,43 @@ Docker will generate a named volume in which to store persistent application dat
|
|||
|
||||
|
||||
|
||||
## Build your own Docker image
|
||||
## 创建您自己的Docker镜像
|
||||
|
||||
```bash
|
||||
docker build -t verdaccio .
|
||||
```
|
||||
|
||||
There is also an npm script for building the docker image, so you can also do:
|
||||
还有一个创建 docker图片的npm 脚本,因此您还可以执行以下操作:
|
||||
|
||||
```bash
|
||||
npm run build:docker
|
||||
```
|
||||
|
||||
Note: The first build takes some minutes to build because it needs to run `npm install`, and it will take that long again whenever you change any file that is not listed in `.dockerignore`.
|
||||
请注意: 第一个创建的镜像要花几分钟时间,因为它需要运行 `npm install`, 而且,如果您更改任何未在`.dockerignore`列表里的文件,它也将会运行相同的时间。
|
||||
|
||||
If you want to use the docker image on a rpi or a compatible device there is also a dockerfile available. To build the docker image for raspberry pi execute:
|
||||
如果您要在rpi或者兼容设备上使用docker镜像,也有现有的dockerfile。要生成raspberry pi(树莓派)的docker镜像,需要执行:
|
||||
|
||||
```bash
|
||||
npm run build:docker:rpi
|
||||
```
|
||||
|
||||
Please note that for any of the above docker commands you need to have docker installed on your machine and the docker executable should be available on your `$PATH`.
|
||||
请注意, 以上所有docker命令都要求您的机台上安装docker, 而且docker 执行项必须在您的`$PATH`里。
|
||||
|
||||
## Docker Examples
|
||||
## Docker示例
|
||||
|
||||
There is a separate repository that hosts multiple configurations to compose Docker images with `verdaccio`, for instance, as reverse proxy:
|
||||
有个分开的资源库可以承载多个配置来用`verdaccio`生成Docker镜像, 比如,reverse proxy(反向代理服务器):
|
||||
|
||||
<https://github.com/verdaccio/docker-examples>
|
||||
|
||||
## Docker Custom Builds
|
||||
## Docker 自定义创建
|
||||
|
||||
* [docker-verdaccio-gitlab](https://github.com/snics/docker-verdaccio-gitlab)
|
||||
* [docker-verdaccio](https://github.com/deployable/docker-verdaccio)
|
||||
* [docker-verdaccio-s3](https://github.com/asynchrony/docker-verdaccio-s3) Private NPM container that can backup to s3
|
||||
* [docker-verdaccio-s3](https://github.com/asynchrony/docker-verdaccio-s3) 专用 NPM 容器可以备份到s3
|
||||
* [docker-verdaccio-ldap](https://github.com/snadn/docker-verdaccio-ldap)
|
||||
* [verdaccio-ldap](https://github.com/nathantreid/verdaccio-ldap)
|
||||
* [verdaccio-compose-local-bridge](https://github.com/shingtoli/verdaccio-compose-local-bridge)
|
||||
* [docker-verdaccio](https://github.com/Global-Solutions/docker-verdaccio)
|
||||
* [verdaccio-docker](https://github.com/idahobean/verdaccio-docker)
|
||||
* [verdaccio-server](https://github.com/andru255/verdaccio-server)
|
||||
* [coldrye-debian-verdaccio](https://github.com/coldrye-docker/coldrye-debian-verdaccio) docker image providing verdaccio from coldrye-debian-nodejs.
|
||||
* [coldrye-debian-verdaccio](https://github.com/coldrye-docker/coldrye-debian-verdaccio) coldrye-debian-nodejs支持的verdaccio docker镜像。
|
|
@ -1,14 +1,14 @@
|
|||
---
|
||||
id: iss-server
|
||||
title: "Installing on IIS server"
|
||||
title: "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).
|
||||
这些用法说明是为Windows Server 2012, IIS 8, [Node.js 0.12.3](https://nodejs.org/), [iisnode 0.2.16](https://github.com/tjanczuk/iisnode) 和[verdaccio 2.1.0](https://github.com/verdaccio/verdaccio)所写。
|
||||
|
||||
- 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](#packagejson), [start.js](#startjs) and [web.config](#webconfig) in this folder.
|
||||
- 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:
|
||||
- 安装IIS Install [iisnode](https://github.com/tjanczuk/iisnode)。请确保您依照iisnode用法说明中所说的安装先决条件 (Url 重写模块 & 节点) 。
|
||||
- 在要承载verdaccio的资源管理器中创建一个新文件夹。 例如 `C:\verdaccio`。 在此文件夹里保存 [package.json](#packagejson), [start.js](#startjs) 和 [web.config](#webconfig) 。
|
||||
- 在因特网信息服务管理器中创建一个新站点。 您可以随意给它命名。 我将在这些[用法说明](http://www.iis.net/learn/manage/configuring-security/application-pool-identities)中称它为verdaccio。 指定保存所有文件和端口号的路径。
|
||||
- 返回到资源管理器中,把对您刚创建的文件夹的修改权限赋予给运行此应用程序池的用户。 如果您已命名此站点为verdaccio,并没有修改该应用程序池,它正在ApplicationPoolIdentity下运行,您就应该给用户 IIS AppPool\verdaccio修改权限。如果您需要帮助的话,请参照用法说明。 (如果需要,可以在日后限制访问,这样它只有 iisnode 和verdaccio\storage的修改权限)
|
||||
- 启动命令行并执行以下命令来下载verdaccio:
|
||||
|
||||
cd c:\verdaccio
|
||||
npm install
|
||||
|
|
|
@ -4,7 +4,7 @@ title: "包的访问"
|
|||
---
|
||||
这是一系列的约束,它基于特定条件允许或限制对本地存储的访问。
|
||||
|
||||
安全约束构建于被使用的插件上,在默认情况下,`verdaccio`使用[htpasswd plugin](https://github.com/verdaccio/verdaccio-htpasswd)。 如果你使用不同的插件,行为可能会有所不同。 默认插件自己并不处理`allow_access`和`allow_publish`,它使用内部回退功能以防止插件尚未就绪。
|
||||
安全约束构建于被使用的插件上,在默认情况下,`verdaccio`使用[htpasswd 插件](https://github.com/verdaccio/verdaccio-htpasswd)。 如果你使用不同的插件,行为可能会有所不同。 默认插件自己并不处理`allow_access`和`allow_publish`,它使用内部回退功能以防止插件尚未就绪。
|
||||
|
||||
关于权限的更多信息,请访问[维基文档的认证部分](auth.md)。
|
||||
|
||||
|
@ -46,7 +46,7 @@ packages:
|
|||
'$all', '$anonymous', '@all', '@anonymous', 'all', 'undefined', 'anonymous'
|
||||
```
|
||||
|
||||
All users recieve all those set of permissions independently of is anonymous or not plus the groups provided by the plugin, in case of `htpasswd` return the username as a group. 例如,如果你以`npmUser`身份登录,组列表为:
|
||||
All users recieve all those set of permissions independently of is anonymous or not plus the groups provided by the plugin, in case of `htpasswd` return the username as a group. 例如,如果你以`npmUser`身份登录,组列表为。
|
||||
|
||||
```js
|
||||
// groups without '$' are going to be deprecated eventually
|
||||
|
@ -62,7 +62,7 @@ packages:
|
|||
publish: npmuser
|
||||
```
|
||||
|
||||
重启`verdaccio`并在命令行中安装`npmuser-core`。
|
||||
重启`verdaccio`并在命令行中尝试安装`npmuser-core`。
|
||||
|
||||
```bash
|
||||
$ npm install npmuser-core
|
||||
|
@ -94,7 +94,7 @@ npm ERR! /Users/user/.npm/_logs/2017-07-02T12_20_14_834Z-debug.log
|
|||
|
||||
#### 阻止对一组包的访问
|
||||
|
||||
如果你想要阻止访问/发布到一组包,只需要避免定义`access` 和 `publish`。
|
||||
如果你想要阻止访问/发布到一组包,只要不定义`access` 和 `publish`即可。
|
||||
|
||||
```yaml
|
||||
packages:
|
||||
|
@ -134,13 +134,13 @@ packages:
|
|||
* 我想要在`my-local-scope`范围内的所有依赖库但我需要避免代理它们。
|
||||
* 我想要代理所有剩余的依赖库。
|
||||
|
||||
**注意库定义的顺序很重要同时必须使用配对的通配符**。 因为如果你没有包含它,`verdaccio`会帮你来包含它,这样你的依赖库解析会受到影响。
|
||||
**注意库定义的顺序很重要同时必须使用双通配符**。 因为如果你没有包含它,`verdaccio`会帮你来包含它,这样你的依赖库解析会受到影响。
|
||||
|
||||
### 配置
|
||||
|
||||
你可以定义多个`包`,每个包都必须有一个唯一的`Regex`。
|
||||
你可以定义多个`packages`,每个包都必须有一个唯一的`Regex`。
|
||||
|
||||
| 属性 | 类型 | 必须的 | 范例 | 支持 | 描述 |
|
||||
| 属性 | 类型 | 必须的 | 示例 | 支持 | 描述 |
|
||||
| ------- | ------- | --- | -------------- | --- | --------------- |
|
||||
| access | string | No | $all | all | 定义允许访问包的组 |
|
||||
| publish | string | No | $authenticated | all | 定义允许发布的组 |
|
||||
|
|
|
@ -4,7 +4,7 @@ title: "插件"
|
|||
---
|
||||
Verdaccio是一个可插拔的应用程序。它可以通过多种方式进行扩展,例如新的认证方法,添加endpoints,或者使用自定义存储。
|
||||
|
||||
> 如果你对开发自己的插件感兴趣,请阅读[开发](development.md)部分。
|
||||
> If you are interested to develop your own plugin, read the [development](dev-plugins.md) section.
|
||||
|
||||
## 用法
|
||||
|
||||
|
@ -14,7 +14,7 @@ Verdaccio是一个可插拔的应用程序。它可以通过多种方式进行
|
|||
$> npm install --global verdaccio-activedirectory
|
||||
```
|
||||
|
||||
`verdaccio`作为一个sinopia的分支,它和兼容`sinopia@1.4.0`的插件具有向后兼容性。在这种情况下,安装方式相同。
|
||||
作为一个sinopia的分支项目,`verdaccio`和兼容`sinopia@1.4.0`的插件具有向后兼容性。在这种情况下,安装方式相同。
|
||||
|
||||
$> npm install --global sinopia-memory
|
||||
|
||||
|
@ -43,7 +43,7 @@ auth:
|
|||
domainSuffix: 'sample.local'
|
||||
```
|
||||
|
||||
#### 多个授权插件
|
||||
#### 多个Auth插件
|
||||
|
||||
这在技术上可行,插件的顺序变得非常重要,安全凭据将按顺序获取。
|
||||
|
||||
|
@ -87,51 +87,51 @@ store:
|
|||
(兼容所有版本)
|
||||
|
||||
* [sinopia-npm](https://www.npmjs.com/package/sinopia-npm):支持npm注册表的sinopia认证插件。
|
||||
* [sinopia-memory](https://www.npmjs.com/package/sinopia-memory): auth plugin for sinopia that keeps users in memory.
|
||||
* [sinopia-github-oauth-cli](https://www.npmjs.com/package/sinopia-github-oauth-cli).
|
||||
* [sinopia-crowd](https://www.npmjs.com/package/sinopia-crowd): auth plugin for sinopia supporting atlassian crowd.
|
||||
* [sinopia-activedirectory](https://www.npmjs.com/package/sinopia-activedirectory): Active Directory authentication plugin for sinopia.
|
||||
* [sinopia-github-oauth](https://www.npmjs.com/package/sinopia-github-oauth): authentication plugin for sinopia2, supporting github oauth web flow.
|
||||
* [sinopia-delegated-auth](https://www.npmjs.com/package/sinopia-delegated-auth): Sinopia authentication plugin that delegates authentication to another HTTP URL
|
||||
* [sinopia-altldap](https://www.npmjs.com/package/sinopia-altldap): Alternate LDAP Auth plugin for Sinopia
|
||||
* [sinopia-request](https://www.npmjs.com/package/sinopia-request): An easy and fully auth-plugin with configuration to use an external API.
|
||||
* [sinopia-htaccess-gpg-email](https://www.npmjs.com/package/sinopia-htaccess-gpg-email): Generate password in htaccess format, encrypt with GPG and send via MailGun API to users.
|
||||
* [sinopia-mongodb](https://www.npmjs.com/package/sinopia-mongodb): An easy and fully auth-plugin with configuration to use a mongodb database.
|
||||
* [sinopia-htpasswd](https://www.npmjs.com/package/sinopia-htpasswd): auth plugin for sinopia supporting htpasswd format.
|
||||
* [sinopia-leveldb](https://www.npmjs.com/package/sinopia-leveldb): a leveldb backed auth plugin for sinopia private npm.
|
||||
* [sinopia-gitlabheres](https://www.npmjs.com/package/sinopia-gitlabheres): Gitlab authentication plugin for sinopia.
|
||||
* [sinopia-gitlab](https://www.npmjs.com/package/sinopia-gitlab): Gitlab authentication plugin for sinopia
|
||||
* [sinopia-ldap](https://www.npmjs.com/package/sinopia-ldap): LDAP auth plugin for sinopia.
|
||||
* [sinopia-github-oauth-env](https://www.npmjs.com/package/sinopia-github-oauth-env) Sinopia authentication plugin with github oauth web flow.
|
||||
* [sinopia-memory](https://www.npmjs.com/package/sinopia-memory):在内存中缓存用户的sinopia认证插件。
|
||||
* [sinopia-github-oauth-cli](https://www.npmjs.com/package/sinopia-github-oauth-cli)。
|
||||
* [sinopia-crowd](https://www.npmjs.com/package/sinopia-crowd):支持atlassian crowd的sinopia认证插件。
|
||||
* [sinopia-activedirectory](https://www.npmjs.com/package/sinopia-activedirectory):sinopia Active Directory认证插件。
|
||||
* [sinopia-github-oauth](https://www.npmjs.com/package/sinopia-github-oauth):sinopia2的认证插件,支持github oauth web flow。
|
||||
* [sinopia-delegated-auth](https://www.npmjs.com/package/sinopia-delegated-auth):将认证代理给另一个HTTP URL的Sinopia认证插件。
|
||||
* [sinopia-altldap](https://www.npmjs.com/package/sinopia-altldap):另一个Sinopia LDAP认证插件
|
||||
* [sinopia-request](https://www.npmjs.com/package/sinopia-request):一个简单易用且功能齐全的认证插件,可以通过配置使用外部API。
|
||||
* [sinopia-htaccess-gpg-email](https://www.npmjs.com/package/sinopia-htaccess-gpg-email):使用htaccess格式生成密码,通过GPG加密并通过MailGun API发送给用户。
|
||||
* [sinopia-mongodb](https://www.npmjs.com/package/sinopia-mongodb):一个易用且功能齐全的认证插件,可通过配置使用mongodb数据库。
|
||||
* [sinopia-htpasswd](https://www.npmjs.com/package/sinopia-htpasswd):支持htpasswd格式的sinopia认证插件。
|
||||
* [sinopia-leveldb](https://www.npmjs.com/package/sinopia-leveldb):针对Sinopia private npm的基于leveldb的Sinopia认证插件。
|
||||
* [sinopia-gitlabheres](https://www.npmjs.com/package/sinopia-gitlabheres):sinopia Gitlab认证插件。
|
||||
* [sinopia-gitlab](https://www.npmjs.com/package/sinopia-gitlab):sinopia Gitlab认证插件。
|
||||
* [sinopia-ldap](https://www.npmjs.com/package/sinopia-ldap):sinopia LDAP认证插件。
|
||||
* [sinopia-github-oauth-env](https://www.npmjs.com/package/sinopia-github-oauth-env):基于github oauth web flow的Sinopia认证插件。
|
||||
|
||||
> All sinopia plugins should be compatible with all future verdaccio versions. Anyhow, we encourage contributors to migrate them to the modern verdaccio API and using the prefix as *verdaccio-xx-name*.
|
||||
> 所有的sinopia插件都应该和verdaccio的未来版本兼容。 无论如何,我们鼓励贡献者将它们迁移到最新的verdaccio API并且使用*verdaccio-xx-name*格式的前缀。
|
||||
|
||||
## Verdaccio Plugins
|
||||
## Verdaccio插件
|
||||
|
||||
(compatible since 2.1.x)
|
||||
(兼容2.1.x及以后版本)
|
||||
|
||||
### Authorization Plugins
|
||||
### 授权插件
|
||||
|
||||
* [verdaccio-bitbucket](https://github.com/idangozlan/verdaccio-bitbucket): Bitbucket authentication plugin for verdaccio.
|
||||
* [verdaccio-ldap](https://www.npmjs.com/package/verdaccio-ldap): LDAP auth plugin for verdaccio.
|
||||
* [verdaccio-active-directory](https://github.com/nowhammies/verdaccio-activedirectory): Active Directory authentication plugin for verdaccio
|
||||
* [verdaccio-gitlab](https://github.com/bufferoverflow/verdaccio-gitlab): use GitLab Personal Access Token to authenticate
|
||||
* [verdaccio-htpasswd](https://github.com/verdaccio/verdaccio-htpasswd): Auth based on htpasswd file plugin (built-in) for verdaccio
|
||||
* [verdaccio-bitbucket](https://github.com/idangozlan/verdaccio-bitbucket):verdaccio Bitbucket认证插件。
|
||||
* [verdaccio-ldap](https://www.npmjs.com/package/verdaccio-ldap):verdaccio LDAP认证插件。
|
||||
* [verdaccio-active-directory](https://github.com/nowhammies/verdaccio-activedirectory):verdaccio Active Directory认证插件
|
||||
* [verdaccio-gitlab](https://github.com/bufferoverflow/verdaccio-gitlab):使用Gitlab的Personal Access Token进行认证
|
||||
* [verdaccio-htpasswd](https://github.com/verdaccio/verdaccio-htpasswd):基于(内置)htpasswd文件插件的verdaccio认证插件
|
||||
|
||||
### Middleware Plugins
|
||||
### 中间件插件
|
||||
|
||||
* [verdaccio-audit](https://github.com/verdaccio/verdaccio-audit): verdaccio plugin for *npm audit* cli support (built-in) (compatible since 3.x)
|
||||
* [verdaccio-audit](https://github.com/verdaccio/verdaccio-audit):支持*npm audit* cli的verdaccio插件(内置) (自3.x版本后兼容)
|
||||
|
||||
* [verdaccio-profile-api](https://github.com/ahoracek/verdaccio-profile-api): verdacci plugin for *npm profile* cli support and *npm profile set password* for *verdaccio-htpasswd* based authentificaton
|
||||
* [verdaccio-profile-api](https://github.com/ahoracek/verdaccio-profile-api):该插件支持*npm profile*cli,以及针对基于*verdaccio-htpasswd*认证的*npm profile set password*插件。
|
||||
|
||||
### Storage Plugins
|
||||
### 存储插件
|
||||
|
||||
(compatible since 3.x)
|
||||
(兼容自3.x及以后版本)
|
||||
|
||||
* [verdaccio-memory](https://github.com/verdaccio/verdaccio-memory) Storage plugin to host packages in Memory
|
||||
* [verdaccio-s3-storage](https://github.com/remitly/verdaccio-s3-storage) Storage plugin to host packages **Amazon S3**
|
||||
* [verdaccio-google-cloud](https://github.com/verdaccio/verdaccio-google-cloud) Storage plugin to host packages **Google Cloud Storage**
|
||||
* [verdaccio-memory](https://github.com/verdaccio/verdaccio-memory)在内存中装载包的存储插件
|
||||
* [verdaccio-s3-storage](https://github.com/remitly/verdaccio-s3-storage)在**Amazon S3**中存储包的存储插件
|
||||
* [verdaccio-google-cloud](https://github.com/verdaccio/verdaccio-google-cloud)在**Google Cloud Storage**中存储包的存储插件
|
||||
|
||||
## Caveats
|
||||
## 警告
|
||||
|
||||
> Not all these plugins are been tested continuously, some of them might not work at all. Please if you found any issue feel free to notify the owner of each plugin.
|
||||
> 并不是所有这些插件都被持续测试过,其中有些可能不能正常工作。如果你发现任何问题,请和插件的所有者联系。
|
|
@ -2,19 +2,19 @@
|
|||
id: puppet
|
||||
title: "Puppet"
|
||||
---
|
||||
Install verdaccio for Debian, Ubuntu, Fedora, and RedHat.
|
||||
在Debian、Ubuntu、Fedora和RedHat中安装verdaccio。
|
||||
|
||||
# Usage
|
||||
# 用法
|
||||
|
||||
There are two variants to install verdaccio using this Puppet module:
|
||||
在使用Puppet模块安装verdaccio时有两个变量:
|
||||
|
||||
* Apply-mode (with puppet-apply and no puppetmaster setup needed)
|
||||
* Master-Agent-mode (with puppet-agent accessing your configuration through the puppetmaster).
|
||||
* Apply-mode (和puppet-apply一起使用,无需配置puppetmaster)
|
||||
* Master-Agent-mode (puppet-agent会通过puppetmaster访问你的配置)。
|
||||
|
||||
In both variants you have to explicitely call "class nodejs {}" in your puppet script because the puppet-verdaccio module only defines this as a requirement, so you have all the flexibility you want when installing nodejs. Scroll down for details about Master-Agent-mode variant.
|
||||
在这两个变量中,你必须在你的puppet代码中显式调用"class nodejs {}",原因在于puppet-verdaccio模块只以此做为先决条件,因此在安装nodejs时你具有所有你需要的灵活性。 向下滚动查看Master-Agent-mode的所有细节信息。
|
||||
|
||||
For further information:
|
||||
详细信息:
|
||||
|
||||
<https://github.com/verdaccio/puppet-verdaccio>
|
||||
|
||||
> We are looking for active contributors for this integration, if you are interested [refers to this ticket](https://github.com/verdaccio/puppet-verdaccio/issues/11).
|
||||
> 我们正在为这个集成寻找积极的贡献者,如果你感兴趣,请查看[这个票证](https://github.com/verdaccio/puppet-verdaccio/issues/11)。
|
51
yarn.lock
51
yarn.lock
|
@ -93,21 +93,6 @@
|
|||
lodash.pick "4.4.0"
|
||||
meow "3.7.0"
|
||||
|
||||
"@commitlint/cli@^6.1.3":
|
||||
version "6.2.0"
|
||||
resolved "https://registry.npmjs.org/@commitlint/cli/-/cli-6.2.0.tgz#b2f8190eb08ccd78eea65114b864f3c65eca466a"
|
||||
dependencies:
|
||||
"@commitlint/format" "^6.1.3"
|
||||
"@commitlint/lint" "^6.2.0"
|
||||
"@commitlint/load" "^6.1.3"
|
||||
"@commitlint/read" "^6.1.3"
|
||||
babel-polyfill "6.26.0"
|
||||
chalk "2.3.1"
|
||||
get-stdin "5.0.1"
|
||||
lodash.merge "4.6.1"
|
||||
lodash.pick "4.4.0"
|
||||
meow "4.0.0"
|
||||
|
||||
"@commitlint/config-conventional@6.1.3":
|
||||
version "6.1.3"
|
||||
resolved "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-6.1.3.tgz#6c06eeae04c5ac789c3618df4d52aeda89ffb810"
|
||||
|
@ -141,7 +126,7 @@
|
|||
dependencies:
|
||||
semver "5.5.0"
|
||||
|
||||
"@commitlint/lint@^6.1.3", "@commitlint/lint@^6.2.0":
|
||||
"@commitlint/lint@^6.1.3":
|
||||
version "6.2.0"
|
||||
resolved "https://registry.npmjs.org/@commitlint/lint/-/lint-6.2.0.tgz#d78f219745b77362e1b814d5f4cec2ecc3266619"
|
||||
dependencies:
|
||||
|
@ -215,14 +200,6 @@
|
|||
dependencies:
|
||||
find-up "^2.1.0"
|
||||
|
||||
"@commitlint/travis-cli@6.1.3":
|
||||
version "6.1.3"
|
||||
resolved "https://registry.npmjs.org/@commitlint/travis-cli/-/travis-cli-6.1.3.tgz#9bf1756d9b32a3bc4580ea40ae3ca92c87773800"
|
||||
dependencies:
|
||||
"@commitlint/cli" "^6.1.3"
|
||||
babel-runtime "6.26.0"
|
||||
execa "0.9.0"
|
||||
|
||||
"@marionebl/sander@^0.6.0":
|
||||
version "0.6.1"
|
||||
resolved "https://registry.npmjs.org/@marionebl/sander/-/sander-0.6.1.tgz#1958965874f24bc51be48875feb50d642fc41f7b"
|
||||
|
@ -3487,9 +3464,9 @@ exec-sh@^0.2.0:
|
|||
dependencies:
|
||||
merge "^1.1.3"
|
||||
|
||||
execa@0.9.0, execa@^0.9.0:
|
||||
version "0.9.0"
|
||||
resolved "https://registry.npmjs.org/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01"
|
||||
execa@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
|
||||
dependencies:
|
||||
cross-spawn "^5.0.1"
|
||||
get-stream "^3.0.0"
|
||||
|
@ -3499,9 +3476,9 @@ execa@0.9.0, execa@^0.9.0:
|
|||
signal-exit "^3.0.0"
|
||||
strip-eof "^1.0.0"
|
||||
|
||||
execa@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
|
||||
execa@^0.9.0:
|
||||
version "0.9.0"
|
||||
resolved "https://registry.npmjs.org/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01"
|
||||
dependencies:
|
||||
cross-spawn "^5.0.1"
|
||||
get-stream "^3.0.0"
|
||||
|
@ -6008,20 +5985,6 @@ meow@3.7.0, meow@^3.3.0, meow@^3.7.0:
|
|||
redent "^1.0.0"
|
||||
trim-newlines "^1.0.0"
|
||||
|
||||
meow@4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.npmjs.org/meow/-/meow-4.0.0.tgz#fd5855dd008db5b92c552082db1c307cba20b29d"
|
||||
dependencies:
|
||||
camelcase-keys "^4.0.0"
|
||||
decamelize-keys "^1.0.0"
|
||||
loud-rejection "^1.0.0"
|
||||
minimist "^1.1.3"
|
||||
minimist-options "^3.0.1"
|
||||
normalize-package-data "^2.3.4"
|
||||
read-pkg-up "^3.0.0"
|
||||
redent "^2.0.0"
|
||||
trim-newlines "^2.0.0"
|
||||
|
||||
meow@^4.0.0:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz#d48598f6f4b1472f35bf6317a95945ace347f975"
|
||||
|
|
Loading…
Add table
Reference in a new issue