mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-24 21:15:51 +01:00
chore(website): plugin search ui (#3539)
* chore: plugin search ui chore: progress chore: format code chore: progress chore: @verdaccio-ui/copy-clipboard chore: search finish * chore: ui-components * Update ToolList.tsx * xss protection * Update static-data.yml * Update AddonCard.tsx
This commit is contained in:
parent
d54e04976c
commit
3d158a195a
2
.github/workflows/static-data.yml
vendored
2
.github/workflows/static-data.yml
vendored
@ -42,6 +42,8 @@ jobs:
|
||||
run: pnpm run contributors
|
||||
env:
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: update addson data
|
||||
run: pnpm script:addson
|
||||
- name: update translations
|
||||
run: pnpm run translations
|
||||
env:
|
||||
|
@ -8,13 +8,15 @@
|
||||
**/wrong.package.json
|
||||
crowdin.yaml
|
||||
/docs/website
|
||||
/website/*
|
||||
/website/translated_docs/
|
||||
CHANGELOG.md
|
||||
CONTRIBUTORS.md
|
||||
node_modules/
|
||||
**/coverage/**
|
||||
**/static/*.js
|
||||
**/dist/*.js
|
||||
website/.docusaurus/**/*
|
||||
website/i18n/**/*
|
||||
**/build/*.js
|
||||
packages/core/local-storage/_storage/**
|
||||
packages/partials/storage_default_storage/
|
||||
|
10
package.json
10
package.json
@ -43,6 +43,14 @@
|
||||
"@changesets/cli": "2.24.4",
|
||||
"@changesets/get-dependents-graph": "1.3.4",
|
||||
"@crowdin/cli": "3.9.1",
|
||||
"@emotion/react": "11.10.5",
|
||||
"@emotion/styled": "11.10.5",
|
||||
"@mui/material": "5.11.1",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"@mui/icons-material": "5.11.0",
|
||||
"@mui/styles": "5.11.1",
|
||||
"@mui/system": "5.11.1",
|
||||
"@trivago/prettier-plugin-sort-imports": "3.4.0",
|
||||
"@types/async": "3.2.15",
|
||||
"@types/express": "4.17.14",
|
||||
@ -93,6 +101,7 @@
|
||||
"jest-junit": "12.3.0",
|
||||
"kleur": "3.0.3",
|
||||
"lint-staged": "11.2.6",
|
||||
"got": "11.8.5",
|
||||
"nock": "13.2.9",
|
||||
"nodemon": "2.0.20",
|
||||
"npm-run-all": "4.1.5",
|
||||
@ -122,6 +131,7 @@
|
||||
"test:e2e:ui": "pnpm test --filter ...@verdaccio/e2e-ui",
|
||||
"start": "concurrently --kill-others \"pnpm _start:server\" \"pnpm _start:web\"",
|
||||
"contributors": "ts-node ./scripts/contributors-update.ts",
|
||||
"script:addson": "ts-node ./scripts/addon-update.ts",
|
||||
"start:watch": "concurrently --kill-others \"pnpm _build:watch\" \"pnpm _start:server\" \"pnpm _debug:reload\"",
|
||||
"_build:watch": "pnpm run --parallel watch --filter ./packages",
|
||||
"_start:server": "node --inspect packages/verdaccio/debug/bootstrap.js --listen 8000",
|
||||
|
@ -12,15 +12,19 @@
|
||||
},
|
||||
"homepage": "https://verdaccio.org",
|
||||
"main": "index.js",
|
||||
"peerDependencies": {
|
||||
"@emotion/react": "11.10.5",
|
||||
"@emotion/styled": "11.10.5",
|
||||
"@mui/material": "5.11.1",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"@mui/icons-material": "5.11.0",
|
||||
"@mui/styles": "5.11.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@emotion/babel-plugin": "11.10.5",
|
||||
"@emotion/css": "11.10.5",
|
||||
"@emotion/jest": "11.10.5",
|
||||
"@emotion/react": "11.10.5",
|
||||
"@emotion/styled": "11.10.5",
|
||||
"@mui/icons-material": "5.10.14",
|
||||
"@mui/material": "5.10.14",
|
||||
"@mui/styles": "5.10.14",
|
||||
"@rematch/core": "2.2.0",
|
||||
"@rematch/loading": "2.1.2",
|
||||
"@rematch/persist": "2.1.2",
|
||||
@ -33,6 +37,7 @@
|
||||
"@types/react-virtualized": "9.21.21",
|
||||
"@types/redux": "3.6.0",
|
||||
"@verdaccio/node-api": "workspace:6.0.0-6-next.52",
|
||||
"@verdaccio/ui-components": "workspace:1.0.0",
|
||||
"@verdaccio/types": "workspace:*",
|
||||
"babel-loader": "8.3.0",
|
||||
"babel-plugin-dynamic-import-node": "2.3.3",
|
||||
|
@ -236,8 +236,12 @@ label+.emotion-5 {
|
||||
transform: scaleX(1) translateX(0);
|
||||
}
|
||||
|
||||
.emotion-5.Mui-error:before,
|
||||
.emotion-5.Mui-error:after {
|
||||
border-bottom-color: #d32f2f;
|
||||
}
|
||||
|
||||
.emotion-5.Mui-error:focus-within:after {
|
||||
-webkit-transform: scaleX(1);
|
||||
-moz-transform: scaleX(1);
|
||||
-ms-transform: scaleX(1);
|
||||
@ -256,12 +260,12 @@ label+.emotion-5 {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.emotion-5:hover:not(.Mui-disabled):before {
|
||||
border-bottom: 2px solid rgba(0, 0, 0, 0.87);
|
||||
.emotion-5:hover:not(.Mui-disabled, .Mui-error):before {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.87);
|
||||
}
|
||||
|
||||
@media (hover: none) {
|
||||
.emotion-5:hover:not(.Mui-disabled):before {
|
||||
.emotion-5:hover:not(.Mui-disabled, .Mui-error):before {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.42);
|
||||
}
|
||||
}
|
||||
|
@ -1,43 +1,16 @@
|
||||
import styled from '@emotion/styled';
|
||||
import FileCopy from '@mui/icons-material/FileCopy';
|
||||
import IconButton from '@mui/material/IconButton';
|
||||
import Tooltip from '@mui/material/Tooltip';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { copyToClipBoardUtility } from 'verdaccio-ui/utils/cli-utils';
|
||||
|
||||
import { CopyClipboard as CopyClipboardOriginal } from '@verdaccio/ui-components';
|
||||
|
||||
interface Props {
|
||||
text: string;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
function CopyToClipBoard({ text, children, ...props }: Props) {
|
||||
function CopyToClipBoard(props: Props) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Wrapper {...props}>
|
||||
<Content>{children ?? text}</Content>
|
||||
<Tooltip disableFocusListener={true} title={t('copy-to-clipboard')}>
|
||||
<IconButton onClick={copyToClipBoardUtility(text)} data-testid="copy-icon" size="large">
|
||||
<FileCopy />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
</Wrapper>
|
||||
);
|
||||
return <CopyClipboardOriginal title={t('copy-to-clipboard')} dataTestId="copy-icon" {...props} />;
|
||||
}
|
||||
|
||||
export default CopyToClipBoard;
|
||||
|
||||
const Wrapper = styled('div')({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
});
|
||||
|
||||
const Content = styled('span')({
|
||||
display: 'inline-block',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
height: 'auto',
|
||||
whiteSpace: 'break-spaces',
|
||||
fontSize: '1rem',
|
||||
});
|
||||
|
@ -218,7 +218,7 @@ exports[`<UpLinks /> component should render the component with uplinks 1`] = `
|
||||
<span
|
||||
class="MuiTypography-root MuiTypography-body1 MuiListItemText-primary emotion-6"
|
||||
>
|
||||
4 years ago
|
||||
5 years ago
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
@ -346,7 +346,7 @@ exports[`<UpLinks /> component should render the component with uplinks 1`] = `
|
||||
<span
|
||||
class="MuiTypography-root MuiTypography-body1 MuiListItemText-primary emotion-6"
|
||||
>
|
||||
4 years ago
|
||||
5 years ago
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -63,7 +63,7 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.emotion-9 {
|
||||
.emotion-8 {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@ -72,7 +72,7 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.emotion-11 {
|
||||
.emotion-9 {
|
||||
display: -webkit-inline-box;
|
||||
display: -webkit-inline-flex;
|
||||
display: -ms-inline-flexbox;
|
||||
@ -120,38 +120,38 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
|
||||
.emotion-11::-moz-focus-inner {
|
||||
.emotion-9::-moz-focus-inner {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
.emotion-11.Mui-disabled {
|
||||
.emotion-9.Mui-disabled {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.emotion-11 {
|
||||
.emotion-9 {
|
||||
-webkit-print-color-adjust: exact;
|
||||
color-adjust: exact;
|
||||
}
|
||||
}
|
||||
|
||||
.emotion-11:hover {
|
||||
.emotion-9:hover {
|
||||
background-color: rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
@media (hover: none) {
|
||||
.emotion-11:hover {
|
||||
.emotion-9:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.emotion-11.Mui-disabled {
|
||||
.emotion-9.Mui-disabled {
|
||||
background-color: transparent;
|
||||
color: rgba(0, 0, 0, 0.26);
|
||||
}
|
||||
|
||||
.emotion-12 {
|
||||
.emotion-10 {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
@ -168,7 +168,7 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.emotion-13 {
|
||||
.emotion-11 {
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
@ -180,7 +180,7 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
.emotion-22 {
|
||||
.emotion-18 {
|
||||
margin: 0;
|
||||
font-family: -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
|
||||
font-weight: 400;
|
||||
@ -188,7 +188,7 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
||||
line-height: 1.43;
|
||||
}
|
||||
|
||||
.emotion-23 {
|
||||
.emotion-19 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
@ -200,11 +200,11 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.emotion-23>:not(:first-of-type) {
|
||||
.emotion-19>:not(:first-of-type) {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.emotion-24 {
|
||||
.emotion-20 {
|
||||
display: -webkit-inline-box;
|
||||
display: -webkit-inline-flex;
|
||||
display: -ms-inline-flexbox;
|
||||
@ -250,35 +250,35 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
||||
color: #4b5e40;
|
||||
}
|
||||
|
||||
.emotion-24::-moz-focus-inner {
|
||||
.emotion-20::-moz-focus-inner {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
.emotion-24.Mui-disabled {
|
||||
.emotion-20.Mui-disabled {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.emotion-24 {
|
||||
.emotion-20 {
|
||||
-webkit-print-color-adjust: exact;
|
||||
color-adjust: exact;
|
||||
}
|
||||
}
|
||||
|
||||
.emotion-24:hover {
|
||||
.emotion-20:hover {
|
||||
-webkit-text-decoration: none;
|
||||
text-decoration: none;
|
||||
background-color: rgba(75, 94, 64, 0.04);
|
||||
}
|
||||
|
||||
@media (hover: none) {
|
||||
.emotion-24:hover {
|
||||
.emotion-20:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.emotion-24.Mui-disabled {
|
||||
.emotion-20.Mui-disabled {
|
||||
color: rgba(0, 0, 0, 0.26);
|
||||
}
|
||||
|
||||
@ -307,16 +307,16 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
||||
1. Create user
|
||||
</p>
|
||||
<div
|
||||
class="emotion-7 emotion-8"
|
||||
class="emotion-7"
|
||||
>
|
||||
<span
|
||||
class="emotion-9 emotion-10"
|
||||
class="emotion-8"
|
||||
>
|
||||
npm adduser --registry http://localhost:9000/
|
||||
</span>
|
||||
<button
|
||||
aria-label="Copy to clipboard"
|
||||
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeLarge emotion-11"
|
||||
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeLarge emotion-9"
|
||||
data-mui-internal-clone-element="true"
|
||||
data-testid="copy-icon"
|
||||
tabindex="0"
|
||||
@ -324,7 +324,7 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium emotion-12"
|
||||
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium emotion-10"
|
||||
data-testid="FileCopyIcon"
|
||||
focusable="false"
|
||||
viewBox="0 0 24 24"
|
||||
@ -334,7 +334,7 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
class="MuiTouchRipple-root emotion-13"
|
||||
class="MuiTouchRipple-root emotion-11"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
@ -344,16 +344,16 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
||||
2. Publish
|
||||
</p>
|
||||
<div
|
||||
class="emotion-7 emotion-8"
|
||||
class="emotion-7"
|
||||
>
|
||||
<span
|
||||
class="emotion-9 emotion-10"
|
||||
class="emotion-8"
|
||||
>
|
||||
npm publish --registry http://localhost:9000/
|
||||
</span>
|
||||
<button
|
||||
aria-label="Copy to clipboard"
|
||||
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeLarge emotion-11"
|
||||
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeLarge emotion-9"
|
||||
data-mui-internal-clone-element="true"
|
||||
data-testid="copy-icon"
|
||||
tabindex="0"
|
||||
@ -361,7 +361,7 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium emotion-12"
|
||||
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium emotion-10"
|
||||
data-testid="FileCopyIcon"
|
||||
focusable="false"
|
||||
viewBox="0 0 24 24"
|
||||
@ -371,27 +371,27 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
class="MuiTouchRipple-root emotion-13"
|
||||
class="MuiTouchRipple-root emotion-11"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body2 emotion-22"
|
||||
class="MuiTypography-root MuiTypography-body2 emotion-18"
|
||||
>
|
||||
3. Refresh this page
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
class="MuiCardActions-root MuiCardActions-spacing emotion-23"
|
||||
class="MuiCardActions-root MuiCardActions-spacing emotion-19"
|
||||
>
|
||||
<a
|
||||
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall emotion-24"
|
||||
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall emotion-20"
|
||||
href="https://verdaccio.org/docs/cli-registry"
|
||||
tabindex="0"
|
||||
>
|
||||
Learn More
|
||||
<span
|
||||
class="MuiTouchRipple-root emotion-13"
|
||||
class="MuiTouchRipple-root emotion-11"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -20,6 +20,9 @@
|
||||
"references": [
|
||||
{
|
||||
"path": "../../node-api"
|
||||
},
|
||||
{
|
||||
"path": "../../ui-components"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
15
packages/ui-components/.babelrc
Normal file
15
packages/ui-components/.babelrc
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "../../.babelrc",
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"targets": ["last 5 versions"],
|
||||
"bugfixes": true,
|
||||
"modules": "auto",
|
||||
"debug": false
|
||||
}
|
||||
],
|
||||
"@babel/preset-react"
|
||||
],
|
||||
}
|
28
packages/ui-components/package.json
Normal file
28
packages/ui-components/package.json
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "@verdaccio/ui-components",
|
||||
"version": "1.0.0",
|
||||
"description": "theme ui component",
|
||||
"author": "Juan Picado <juanpicado19@gmail.com>",
|
||||
"license": "MIT",
|
||||
"homepage": "https://verdaccio.org",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
"files": [
|
||||
"./build"
|
||||
],
|
||||
"peerDependencies": {
|
||||
"@emotion/react": "11.10.5",
|
||||
"@emotion/styled": "11.10.5",
|
||||
"@mui/material": "5.11.1",
|
||||
"@mui/icons-material": "5.11.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf ./build",
|
||||
"type-check": "tsc --noEmit -p tsconfig.build.json",
|
||||
"build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
|
||||
"build:js": "babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||
"build": "pnpm run build:js && pnpm run build:types"
|
||||
}
|
||||
}
|
44
packages/ui-components/src/CopyClipboard/CopyToClipBoard.tsx
Normal file
44
packages/ui-components/src/CopyClipboard/CopyToClipBoard.tsx
Normal file
@ -0,0 +1,44 @@
|
||||
import styled from '@emotion/styled';
|
||||
import FileCopy from '@mui/icons-material/FileCopy';
|
||||
import IconButton from '@mui/material/IconButton';
|
||||
import Tooltip from '@mui/material/Tooltip';
|
||||
import React from 'react';
|
||||
|
||||
import { copyToClipBoardUtility } from './utils';
|
||||
|
||||
interface Props {
|
||||
text: string;
|
||||
title: string;
|
||||
dataTestId: string;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
const Wrapper = styled('div')({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
});
|
||||
|
||||
const Content = styled('span')({
|
||||
display: 'inline-block',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
height: 'auto',
|
||||
whiteSpace: 'break-spaces',
|
||||
fontSize: '1rem',
|
||||
});
|
||||
|
||||
function CopyToClipBoard({ text, children, dataTestId, title, ...props }: Props) {
|
||||
return (
|
||||
<Wrapper {...props}>
|
||||
<Content>{children ?? text}</Content>
|
||||
<Tooltip disableFocusListener={true} title={title}>
|
||||
<IconButton onClick={copyToClipBoardUtility(text)} data-testid={dataTestId} size="large">
|
||||
<FileCopy />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
</Wrapper>
|
||||
);
|
||||
}
|
||||
|
||||
export default CopyToClipBoard;
|
2
packages/ui-components/src/CopyClipboard/index.ts
Normal file
2
packages/ui-components/src/CopyClipboard/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export { default } from './CopyToClipBoard';
|
||||
export { copyToClipBoardUtility } from './utils';
|
21
packages/ui-components/src/CopyClipboard/utils.ts
Normal file
21
packages/ui-components/src/CopyClipboard/utils.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { SyntheticEvent } from 'react';
|
||||
|
||||
export const copyToClipBoardUtility =
|
||||
(str: string): ((e: SyntheticEvent<HTMLElement>) => void) =>
|
||||
(event: SyntheticEvent<HTMLElement>): void => {
|
||||
event.preventDefault();
|
||||
|
||||
const node = document.createElement('div');
|
||||
node.innerText = str;
|
||||
if (document.body) {
|
||||
document.body.appendChild(node);
|
||||
|
||||
const range = document.createRange();
|
||||
const selection = window.getSelection() as Selection;
|
||||
range.selectNodeContents(node);
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(node);
|
||||
}
|
||||
};
|
2
packages/ui-components/src/index.ts
Normal file
2
packages/ui-components/src/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export { default as CopyClipboard } from './CopyClipboard';
|
||||
export * from './CopyClipboard';
|
10
packages/ui-components/tsconfig.build.json
Normal file
10
packages/ui-components/tsconfig.build.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./build",
|
||||
"jsx": "react-jsx"
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
9
packages/ui-components/tsconfig.json
Normal file
9
packages/ui-components/tsconfig.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.reference.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./build"
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
484
pnpm-lock.yaml
generated
484
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -2,6 +2,7 @@ packages:
|
||||
- packages/*
|
||||
- packages/core/*
|
||||
- packages/tools/*
|
||||
- packages/ui/*
|
||||
- packages/server/*
|
||||
- packages/plugins/audit
|
||||
- packages/plugins/auth-memory
|
||||
|
34
scripts/addon-update.ts
Normal file
34
scripts/addon-update.ts
Normal file
@ -0,0 +1,34 @@
|
||||
import fs from 'fs/promises';
|
||||
import got from 'got';
|
||||
import path from 'path';
|
||||
|
||||
(async () => {
|
||||
const data = require('../website/src/components/EcosystemSearch/addons.json');
|
||||
for (let item of data.addons) {
|
||||
try {
|
||||
const d = await got(`https://registry.npmjs.org/${item.name}`).json();
|
||||
const apiDownloads = await got(
|
||||
`https://api.npmjs.org/downloads/point/last-month/${item.name}`
|
||||
).json();
|
||||
// @ts-ignore
|
||||
item.description = d.description;
|
||||
item.url = `https://www.npmjs.org/${item.name}`;
|
||||
item.registry = `https://registry.npmjs.org/${item.name}`;
|
||||
item.bundled = typeof item.bundled === 'boolean' ? item.bundled : false;
|
||||
item.origin = item.origin ? item.origin : 'community';
|
||||
item.category = item.category ? item.category : 'authentication';
|
||||
// @ts-ignore
|
||||
item.latest = d['dist-tags'].latest;
|
||||
// @ts-ignore
|
||||
item.downloads = apiDownloads.downloads;
|
||||
// console.log('d', item);
|
||||
} catch (err) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('error for %s', item.name, err);
|
||||
}
|
||||
}
|
||||
await fs.writeFile(
|
||||
path.join(__dirname, '../website/src/components/EcosystemSearch/addons.json'),
|
||||
JSON.stringify({ ...data }, null, 4)
|
||||
);
|
||||
})();
|
@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get the last tag from GitHub
|
||||
lastTag=$(git describe --tags $(git rev-list --tags --max-count=1))
|
||||
|
||||
# Print it to the console for verification
|
||||
echo "Bumping version to new tag: ${lastTag}"
|
||||
|
||||
# creating .npmrc
|
||||
echo "//$REGISTRY_URL/:_authToken=$REGISTRY_AUTH_TOKEN" > .npmrc
|
||||
|
||||
# Publish to NPM
|
||||
npm publish --registry https://$REGISTRY_URL/
|
@ -2,21 +2,19 @@ module.exports = {
|
||||
root: true,
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
project: './tsconfig.json'
|
||||
project: './tsconfig.json',
|
||||
},
|
||||
plugins: [
|
||||
'@typescript-eslint',
|
||||
],
|
||||
plugins: ['@typescript-eslint'],
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'@verdaccio/eslint-config'
|
||||
'@verdaccio/eslint-config',
|
||||
],
|
||||
rules: {
|
||||
"@typescript-eslint/no-use-before-define": "warn",
|
||||
"max-len": "off",
|
||||
"react/jsx-one-expression-per-line": "off",
|
||||
"react/prop-types": "off",
|
||||
"react/require-default-props": "off",
|
||||
}
|
||||
'@typescript-eslint/no-use-before-define': 'warn',
|
||||
'max-len': 'off',
|
||||
'react/jsx-one-expression-per-line': 'off',
|
||||
'react/prop-types': 'off',
|
||||
'react/require-default-props': 'off',
|
||||
},
|
||||
};
|
||||
|
@ -93,18 +93,18 @@ auth:
|
||||
ldap:
|
||||
type: ldap
|
||||
client_options:
|
||||
url: "ldap://ldap.verdaccio.private.rocks"
|
||||
url: 'ldap://ldap.verdaccio.private.rocks'
|
||||
# Only required if you need auth to bind
|
||||
adminDn: "cn=readonly,dc=verdaccio.private,dc=rocks"
|
||||
adminPassword: "********"
|
||||
adminDn: 'cn=readonly,dc=verdaccio.private,dc=rocks'
|
||||
adminPassword: '********'
|
||||
# Search base for users
|
||||
searchBase: "dc=verdaccio.private,dc=rocks"
|
||||
searchFilter: "(&(uid={{username}})(memberOf=cn=npm_users,ou=npm,ou=groups,ou=developers,dc=verdaccio.private,dc=rocks))"
|
||||
searchBase: 'dc=verdaccio.private,dc=rocks'
|
||||
searchFilter: '(&(uid={{username}})(memberOf=cn=npm_users,ou=npm,ou=groups,ou=developers,dc=verdaccio.private,dc=rocks))'
|
||||
# # If you are using groups, this is also needed
|
||||
groupDnProperty: "cn"
|
||||
groupSearchBase: "ou=npm,ou=groups,ou=developers,dc=verdaccio.private,dc=rocks"
|
||||
groupDnProperty: 'cn'
|
||||
groupSearchBase: 'ou=npm,ou=groups,ou=developers,dc=verdaccio.private,dc=rocks'
|
||||
# If you have memberOf support on your ldap
|
||||
searchAttributes: ["*", "memberOf"]
|
||||
searchAttributes: ['*', 'memberOf']
|
||||
# Else, if you don't (use one or the other):
|
||||
# groupSearchFilter: '(memberUid={{dn}})'
|
||||
#
|
||||
@ -120,24 +120,24 @@ uplinks:
|
||||
url: https://registry.npmjs.org/
|
||||
|
||||
packages:
|
||||
"@scope-*/*":
|
||||
'@scope-*/*':
|
||||
# scoped packages
|
||||
access: npm_access
|
||||
publish: npm_publisher
|
||||
unpublish: npm_publisher
|
||||
|
||||
"@scope/*":
|
||||
'@scope/*':
|
||||
# scoped packages
|
||||
access: npm_access
|
||||
publish: npm_publisher
|
||||
unpublish: npm_publisher
|
||||
|
||||
"@*/*":
|
||||
'@*/*':
|
||||
# scoped packages
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
proxy: npmjs
|
||||
"**":
|
||||
'**':
|
||||
# allow all users (including non-authenticated users) to read and
|
||||
# publish all packages
|
||||
#
|
||||
@ -176,7 +176,7 @@ I use the `memberOf` overlay, and this LDAP query will allow to connect only use
|
||||
If you are not using the `memberOf` overlay, you can allow all users to login as follow:
|
||||
|
||||
```yaml
|
||||
searchFilter: "(&(uid={{username}}))"
|
||||
searchFilter: '(&(uid={{username}}))'
|
||||
```
|
||||
|
||||
**`groupSearchBase`**
|
||||
@ -184,7 +184,7 @@ searchFilter: "(&(uid={{username}}))"
|
||||
I use an organization unit to store all my group for verdaccio-ldap security.
|
||||
|
||||
```yaml
|
||||
groupSearchBase: "ou=npm,ou=groups,ou=developers,dc=verdaccio.private,dc=rocks"
|
||||
groupSearchBase: 'ou=npm,ou=groups,ou=developers,dc=verdaccio.private,dc=rocks'
|
||||
```
|
||||
|
||||
### Security {#security}
|
||||
@ -198,12 +198,12 @@ Note that we do not use `proxy: npmjs` because they only exist on our private re
|
||||
I recommend you to create scope for all of your private packages, and reserve the group on npmjs registry so no one will be able to publish publicly in it in the futur.
|
||||
|
||||
```yaml
|
||||
"@scope-*/*":
|
||||
'@scope-*/*':
|
||||
access: npm_access
|
||||
publish: npm_publisher
|
||||
unpublish: npm_publisher
|
||||
|
||||
"@scope/*":
|
||||
'@scope/*':
|
||||
# scoped packages
|
||||
access: npm_access
|
||||
publish: npm_publisher
|
||||
@ -215,7 +215,7 @@ They are some public package on npmjs registry which are scoped, this will proxy
|
||||
I recommend not to change this, otherwise you might get issue to download them.
|
||||
|
||||
```yaml
|
||||
"@*/*":
|
||||
'@*/*':
|
||||
# scoped packages
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
@ -228,7 +228,7 @@ We also use `proxy: npmjs` so we also serve all the public package on npmjs regi
|
||||
We allow `$all` to download from our registry, because it is public, but if you want to preserve your bandwidth or just forbid unknown user to authenticate, just use `$authenticated` as well.
|
||||
|
||||
```yaml
|
||||
"**":
|
||||
'**':
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
proxy: npmjs
|
||||
|
@ -210,7 +210,7 @@ web:
|
||||
|
||||
If you have a custom UI plugin for the them you will need to adapt your build to the new requirements.
|
||||
|
||||
The previous version you only need to return a function with a string and the path of the directory.
|
||||
The previous version you only need to return a function with a string and the path of the directory.
|
||||
|
||||
```
|
||||
const path = require('path');
|
||||
@ -245,6 +245,7 @@ Since Verdaccio 5 the module must return an object and the `index.html` is ignor
|
||||
},
|
||||
manifestFiles: { js: [ 'runtime.js', 'vendors.js', 'main.js' ] }
|
||||
```
|
||||
|
||||
- `staticPath`: is the same data returned in Verdaccio 4.
|
||||
- `manifest`: A webpack manifest object.
|
||||
- `manifestFiles`: A object with one property `js` and the array (order matters) of the manifest id to be loaded in the template dynamically.
|
||||
@ -268,7 +269,6 @@ const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
|
||||
|
||||
```
|
||||
|
||||
|
||||
# Troubleshooting
|
||||
|
||||
### After upgrade I don't see packages on the UI {#after-upgrade-i-dont-see-packages-on-the-ui}
|
||||
@ -280,4 +280,3 @@ storage: ./storage
|
||||
```
|
||||
|
||||
Use an absolute path instead, more info [here](https://github.com/verdaccio/verdaccio/issues/2204).
|
||||
|
||||
|
@ -4,7 +4,6 @@ hide_title: true
|
||||
sidebar_label: Help
|
||||
---
|
||||
|
||||
|
||||
This project is maintained by the Verdaccio community, maintainers and users that provide helps to other users. Independently the source you select for seeking answers **remind to be polite and patience**.
|
||||
|
||||
## Questions {#questions}
|
||||
@ -26,7 +25,7 @@ If you have a question, most probably has already been answer, few ways to disco
|
||||
height="500"
|
||||
frameBorder="0"
|
||||
/>
|
||||
```
|
||||
```
|
||||
|
||||
## Package Managers {#package-managers}
|
||||
|
||||
@ -40,7 +39,7 @@ A private registry is mostly used with a package manager, some issues or questio
|
||||
|
||||
## News {#news}
|
||||
|
||||
- [Twitter](http://twitter.com/verdaccio)
|
||||
- [Twitter Community](https://twitter.com/i/communities/1502550839499579393)
|
||||
- [Telegram](https://t.me/verdaccio)
|
||||
- [Blog](https://verdaccio.org/blog)
|
||||
- [Twitter](http://twitter.com/verdaccio)
|
||||
- [Twitter Community](https://twitter.com/i/communities/1502550839499579393)
|
||||
- [Telegram](https://t.me/verdaccio)
|
||||
- [Blog](https://verdaccio.org/blog)
|
||||
|
12
website/dev/1-plugins-search.md
Normal file
12
website/dev/1-plugins-search.md
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
title: Plugins Search
|
||||
hide_title: true
|
||||
sidebar_label: Plugin Search
|
||||
---
|
||||
|
||||
```mdx-code-block
|
||||
import EcosystemSearch from '@site/src/components/EcosystemSearch';
|
||||
|
||||
<EcosystemSearch />
|
||||
|
||||
```
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: amazon
|
||||
title: "Amazon Web Services"
|
||||
title: 'Amazon Web Services'
|
||||
---
|
||||
|
||||
This document describes several approaches for deploying Verdaccio in the AWS cloud.
|
||||
@ -29,19 +29,21 @@ Elastic File System
|
||||
```
|
||||
|
||||
Architecture notes:
|
||||
* Deploy this stack into the region closest to your users for maximum performance.
|
||||
* We use an auto scaling group primarily for self-healing. The system requirements of Verdaccio are pretty low, so it's unlikely you'll need multiple instances to handle traffic load.
|
||||
* Because Amazon Linux 2 doesn't include Node, we run Verdaccio as a Docker image rather than natively on the instance. This is faster and more secure than relying on third party package sources for Node.
|
||||
* Elastic File System is cheap and stateful, and works across AZs. An alternative would be the [third-party S3 storage plugin](https://github.com/remitly/verdaccio-s3-storage).
|
||||
* For backup, use AWS Backup
|
||||
|
||||
- Deploy this stack into the region closest to your users for maximum performance.
|
||||
- We use an auto scaling group primarily for self-healing. The system requirements of Verdaccio are pretty low, so it's unlikely you'll need multiple instances to handle traffic load.
|
||||
- Because Amazon Linux 2 doesn't include Node, we run Verdaccio as a Docker image rather than natively on the instance. This is faster and more secure than relying on third party package sources for Node.
|
||||
- Elastic File System is cheap and stateful, and works across AZs. An alternative would be the [third-party S3 storage plugin](https://github.com/remitly/verdaccio-s3-storage).
|
||||
- For backup, use AWS Backup
|
||||
|
||||
Estimated monthly cost for a small installation (in us-east-1):
|
||||
* ALB (1 LCU average): $22.265/mo
|
||||
* EC2 (t3.nano): $3.796/mo
|
||||
* EBS (8gb): $0.80/mo
|
||||
* EFS (5gb): $1.5/mo
|
||||
* Data transfer: (10gb): $0.9/mo
|
||||
* **TOTAL:** Under $30/mo
|
||||
|
||||
- ALB (1 LCU average): $22.265/mo
|
||||
- EC2 (t3.nano): $3.796/mo
|
||||
- EBS (8gb): $0.80/mo
|
||||
- EFS (5gb): $1.5/mo
|
||||
- Data transfer: (10gb): $0.9/mo
|
||||
- **TOTAL:** Under $30/mo
|
||||
|
||||
## ECS {#ecs}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: ansible
|
||||
title: "Ansible"
|
||||
title: 'Ansible'
|
||||
---
|
||||
|
||||
We have a customised solution for `verdaccio` in our organization.
|
||||
@ -9,10 +9,9 @@ We have a customised solution for `verdaccio` in our organization.
|
||||
|
||||
#### Other options {#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-verdaccio-role [https://github.com/refinery29/ansible-verdaccio-role](https://github.com/refinery29/ansible-verdaccio-role)
|
||||
|
||||
- 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-verdaccio-role [https://github.com/refinery29/ansible-verdaccio-role](https://github.com/refinery29/ansible-verdaccio-role)
|
||||
|
||||
#### Related talks {#related-talks}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: articles
|
||||
title: "Articles"
|
||||
title: 'Articles'
|
||||
---
|
||||
|
||||
Below is a list of articles about Verdaccio. If you have written a blog post or tutorial that mentions Verdaccio, feel free to add it here!
|
||||
@ -9,92 +9,87 @@ Below is a list of articles about Verdaccio. If you have written a blog post or
|
||||
|
||||
## Maintainer Articles {#maintainers-articles}
|
||||
|
||||
* [An Introduction to Verdaccio](https://medium.com/@jotadeveloper/an-introduction-to-verdaccio-f6c72e865425)
|
||||
* [Five use cases where a npm private proxy fits in your workflow](https://medium.com/@jotadeveloper/five-use-cases-where-a-npm-private-proxy-fits-in-your-workflow-632a81779c14)
|
||||
* [An Introduction to Verdaccio](https://medium.com/@jotadeveloper/an-introduction-to-verdaccio-f6c72e865425)
|
||||
* [NPM Registry for your organisation](https://medium.com/@ayusharma.in/npm-registry-for-your-organisation-aeb8ea76144)
|
||||
* [Verdaccio 3 released 🎉!!](https://medium.com/verdaccio/verdaccio-3-released-feb06ef38558)
|
||||
* [The crazy story of Verdaccio](https://medium.com/verdaccio/the-crazy-story-of-verdaccio-d35d924728bc)
|
||||
* [Verdaccio 4 alpha release 🚀](https://medium.com/verdaccio/verdaccio-4-alpha-release-400c7ed4884d)
|
||||
* [Verdaccio and deterministic lock files](https://medium.com/verdaccio/verdaccio-and-deterministic-lock-files-5339d82d611e)
|
||||
* [Setting up Verdaccio on DigitalOcean](https://medium.com/verdaccio/setting-up-verdaccio-on-digitalocean-61b5d08e4f0d)
|
||||
* [How I learned React Js and how you can…](https://medium.com/verdaccio/how-i-learned-react-js-and-how-you-can-8663f938426c)
|
||||
* [How did I fall in the open source world…and that was a nice thing!](https://medium.com/@priscilawebdev/how-do-i-fall-in-the-open-source-world-and-that-was-a-nice-thing-b0e85d05490d)
|
||||
|
||||
|
||||
- [An Introduction to Verdaccio](https://medium.com/@jotadeveloper/an-introduction-to-verdaccio-f6c72e865425)
|
||||
- [Five use cases where a npm private proxy fits in your workflow](https://medium.com/@jotadeveloper/five-use-cases-where-a-npm-private-proxy-fits-in-your-workflow-632a81779c14)
|
||||
- [An Introduction to Verdaccio](https://medium.com/@jotadeveloper/an-introduction-to-verdaccio-f6c72e865425)
|
||||
- [NPM Registry for your organisation](https://medium.com/@ayusharma.in/npm-registry-for-your-organisation-aeb8ea76144)
|
||||
- [Verdaccio 3 released 🎉!!](https://medium.com/verdaccio/verdaccio-3-released-feb06ef38558)
|
||||
- [The crazy story of Verdaccio](https://medium.com/verdaccio/the-crazy-story-of-verdaccio-d35d924728bc)
|
||||
- [Verdaccio 4 alpha release 🚀](https://medium.com/verdaccio/verdaccio-4-alpha-release-400c7ed4884d)
|
||||
- [Verdaccio and deterministic lock files](https://medium.com/verdaccio/verdaccio-and-deterministic-lock-files-5339d82d611e)
|
||||
- [Setting up Verdaccio on DigitalOcean](https://medium.com/verdaccio/setting-up-verdaccio-on-digitalocean-61b5d08e4f0d)
|
||||
- [How I learned React Js and how you can…](https://medium.com/verdaccio/how-i-learned-react-js-and-how-you-can-8663f938426c)
|
||||
- [How did I fall in the open source world…and that was a nice thing!](https://medium.com/@priscilawebdev/how-do-i-fall-in-the-open-source-world-and-that-was-a-nice-thing-b0e85d05490d)
|
||||
|
||||
# Articles / Blogs / Tutorials (by Language)
|
||||
|
||||
### Remarkable Articles {#remarkable-articles}
|
||||
|
||||
* [Why Private Npm Registries Matter and How Verdaccio Makes It Easy](https://fusebit.io/blog/private-npm-verdaccio/?utm_source=verdaccio.org&utm_medium=referral)
|
||||
* [Automating package publishing in JavaScript projects](https://blog.codecentric.de/en/2021/02/automating-package-publishing-in-javascript-projects/)
|
||||
* [10 npm Security Best Practices](https://snyk.io/blog/ten-npm-security-best-practices/)
|
||||
* [Cover Your Apps While Still Using npm](https://nodesource.com/blog/cover-your-apps-while-still-using-npm/)
|
||||
* [Containerizing Node.js Applications with Docker](https://nodesource.com/blog/containerizing-node-js-applications-with-docker)
|
||||
* [Verdaccio - A lightweight npm proxy registry - Interview with Juan Picado](https://survivejs.com/blog/verdaccio-interview/)
|
||||
* [Host, Publish and Manage Private npm Packages with Verdaccio](https://www.sitepoint.com/private-npm-packages-verdaccio/)
|
||||
* [Free Private NPM with Verdaccio and AWS](https://medium.com/@odahcam/free-private-npm-with-verdaccio-and-aws-a88e6f0f4beb)
|
||||
* [Run your own Unity Package Server!](https://medium.com/@markushofer/run-your-own-unity-package-server-b4fe9995704e)
|
||||
* [Ways to have your private npm registry — and a final DIY solution](https://medium.com/engenharia-noalvo/ways-to-have-your-private-npm-registry-and-a-final-diy-solution-eed001a88e74)
|
||||
* [How to set up a free private npm registry… for Windows](https://medium.com/@Anderson7301/how-to-set-up-a-free-private-npm-registry-for-windows-f532c6a381ce)
|
||||
* [Setup a Private NPM Server on Azure in 45 Seconds](https://edi.wang/post/2020/7/7/setup-a-private-npm-server-on-azure-in-45-seconds)
|
||||
- [Why Private Npm Registries Matter and How Verdaccio Makes It Easy](https://fusebit.io/blog/private-npm-verdaccio/?utm_source=verdaccio.org&utm_medium=referral)
|
||||
- [Automating package publishing in JavaScript projects](https://blog.codecentric.de/en/2021/02/automating-package-publishing-in-javascript-projects/)
|
||||
- [10 npm Security Best Practices](https://snyk.io/blog/ten-npm-security-best-practices/)
|
||||
- [Cover Your Apps While Still Using npm](https://nodesource.com/blog/cover-your-apps-while-still-using-npm/)
|
||||
- [Containerizing Node.js Applications with Docker](https://nodesource.com/blog/containerizing-node-js-applications-with-docker)
|
||||
- [Verdaccio - A lightweight npm proxy registry - Interview with Juan Picado](https://survivejs.com/blog/verdaccio-interview/)
|
||||
- [Host, Publish and Manage Private npm Packages with Verdaccio](https://www.sitepoint.com/private-npm-packages-verdaccio/)
|
||||
- [Free Private NPM with Verdaccio and AWS](https://medium.com/@odahcam/free-private-npm-with-verdaccio-and-aws-a88e6f0f4beb)
|
||||
- [Run your own Unity Package Server!](https://medium.com/@markushofer/run-your-own-unity-package-server-b4fe9995704e)
|
||||
- [Ways to have your private npm registry — and a final DIY solution](https://medium.com/engenharia-noalvo/ways-to-have-your-private-npm-registry-and-a-final-diy-solution-eed001a88e74)
|
||||
- [How to set up a free private npm registry… for Windows](https://medium.com/@Anderson7301/how-to-set-up-a-free-private-npm-registry-for-windows-f532c6a381ce)
|
||||
- [Setup a Private NPM Server on Azure in 45 Seconds](https://edi.wang/post/2020/7/7/setup-a-private-npm-server-on-azure-in-45-seconds)
|
||||
|
||||
### English {#english}
|
||||
|
||||
* [Testing your npm package before releasing it using Verdaccio + ngrok](https://medium.com/strapi/testing-your-npm-package-before-releasing-it-using-verdaccio-ngrok-28e2832c850a)
|
||||
* [Host your own private NPM repository with Verdaccio](https://medium.com/devopslinks/host-your-own-private-npm-repository-with-verdaccio-e8a3202b97c5)
|
||||
* [Local npm private registry with zero configuration](https://dev.to/iriskatastic/local-npm-private-registry-with-zero-configuration-njo)
|
||||
* [It depends. On the registry](https://blog.softwaremill.com/it-depends-on-the-registry-8fa9d9c5a3b)
|
||||
* [Host, Publish and Manage Private npm Packages with Verdaccio](http://allprowebdesigns.com/2017/01/host-publish-and-manage-private-npm-packages-with-verdaccio/)
|
||||
* [Setting Up a Private NPM Registry](https://gir.me.uk/posts/private-npm-registry.html)
|
||||
* [Testing NPM alpha / beta / rc packages](https://medium.com/@the1mills/testing-npm-alpha-beta-rc-packages-108b65eb03d2)
|
||||
* [Running a local npm repository on Windows Server using Verdaccio](https://robertwray.co.uk/blog/running-a-local-npm-repository-on-windows-server-using-verdaccio)
|
||||
* [Kubernetes private NPM registry](https://medium.com/@tompape/kubernetes-private-npm-registry-fb5f450fa611)
|
||||
* [Verdaccio examples for Google Cloud and K8s setups. https://github.com/papezt/verdaccio-examples](https://github.com/papezt/verdaccio-examples)
|
||||
* [Setting up a private NPM Registry Is Easier Than You Think](https://medium.com/@902Labs/setting-up-a-private-npm-registry-is-easier-than-you-think-455e1bd438f2)
|
||||
- [Testing your npm package before releasing it using Verdaccio + ngrok](https://medium.com/strapi/testing-your-npm-package-before-releasing-it-using-verdaccio-ngrok-28e2832c850a)
|
||||
- [Host your own private NPM repository with Verdaccio](https://medium.com/devopslinks/host-your-own-private-npm-repository-with-verdaccio-e8a3202b97c5)
|
||||
- [Local npm private registry with zero configuration](https://dev.to/iriskatastic/local-npm-private-registry-with-zero-configuration-njo)
|
||||
- [It depends. On the registry](https://blog.softwaremill.com/it-depends-on-the-registry-8fa9d9c5a3b)
|
||||
- [Host, Publish and Manage Private npm Packages with Verdaccio](http://allprowebdesigns.com/2017/01/host-publish-and-manage-private-npm-packages-with-verdaccio/)
|
||||
- [Setting Up a Private NPM Registry](https://gir.me.uk/posts/private-npm-registry.html)
|
||||
- [Testing NPM alpha / beta / rc packages](https://medium.com/@the1mills/testing-npm-alpha-beta-rc-packages-108b65eb03d2)
|
||||
- [Running a local npm repository on Windows Server using Verdaccio](https://robertwray.co.uk/blog/running-a-local-npm-repository-on-windows-server-using-verdaccio)
|
||||
- [Kubernetes private NPM registry](https://medium.com/@tompape/kubernetes-private-npm-registry-fb5f450fa611)
|
||||
- [Verdaccio examples for Google Cloud and K8s setups. https://github.com/papezt/verdaccio-examples](https://github.com/papezt/verdaccio-examples)
|
||||
- [Setting up a private NPM Registry Is Easier Than You Think](https://medium.com/@902Labs/setting-up-a-private-npm-registry-is-easier-than-you-think-455e1bd438f2)
|
||||
|
||||
### Japanese {#japanese}
|
||||
|
||||
* [Verdaccio でプライベート npm リポジトリをサクッと立てる](http://neos21.hatenablog.com/entry/2017/09/08/080000)
|
||||
* [verdaccioでprivateなnpmリポジトリを作成](https://qiita.com/mtokiwa/items/1bc22a2270e4408d4cdd)
|
||||
* [Version control of my own UnityPackage with Unity × Verdaccio / Unity×Verdaccioで自作UnityPackageをバージョン管理する](https://synamon.hatenablog.com/entry/2018/08/15/185607)
|
||||
- [Verdaccio でプライベート npm リポジトリをサクッと立てる](http://neos21.hatenablog.com/entry/2017/09/08/080000)
|
||||
- [verdaccio で private な npm リポジトリを作成](https://qiita.com/mtokiwa/items/1bc22a2270e4408d4cdd)
|
||||
- [Version control of my own UnityPackage with Unity × Verdaccio / Unity×Verdaccio で自作 UnityPackage をバージョン管理する](https://synamon.hatenablog.com/entry/2018/08/15/185607)
|
||||
|
||||
### Chinese {#chinese}
|
||||
|
||||
* [使用 verdaccio 搭建 npm 私有仓储](https://blog.sigoden.com/verdaccio--private-npm-registry/)
|
||||
* [Verdaccio:一个轻量级的私有npm代理注册表(sinopia fork)](https://www.ctolib.com/verdaccio-verdaccio.html)
|
||||
* [npm 私服工具verdaccio 安装配置试用](http://www.cnblogs.com/rongfengliang/p/7811838.html)
|
||||
* [搭建私有npm镜像](http://www.blackcater.win/2018/03/01/%E6%90%AD%E5%BB%BA%E7%A7%81%E6%9C%89npm%E9%95%9C%E5%83%8F/)
|
||||
* [搭建离线npm私库——verdaccio](https://www.jishux.com/plus/view-765581-1.html)
|
||||
* [[筆記] 建立自己的 npm, 以npm Orgs跟Verdaccio為例](https://medium.com/@ceall8650/%E7%AD%86%E8%A8%98-%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E7%9A%84-npm-%E4%BB%A5npm-orgs%E8%B7%9Fverdaccio%E7%82%BA%E4%BE%8B-cfb83b2307e6)
|
||||
|
||||
- [使用 verdaccio 搭建 npm 私有仓储](https://blog.sigoden.com/verdaccio--private-npm-registry/)
|
||||
- [Verdaccio:一个轻量级的私有 npm 代理注册表(sinopia fork)](https://www.ctolib.com/verdaccio-verdaccio.html)
|
||||
- [npm 私服工具 verdaccio 安装配置试用](http://www.cnblogs.com/rongfengliang/p/7811838.html)
|
||||
- [搭建私有 npm 镜像](http://www.blackcater.win/2018/03/01/%E6%90%AD%E5%BB%BA%E7%A7%81%E6%9C%89npm%E9%95%9C%E5%83%8F/)
|
||||
- [搭建离线 npm 私库——verdaccio](https://www.jishux.com/plus/view-765581-1.html)
|
||||
- [[筆記] 建立自己的 npm, 以 npm Orgs 跟 Verdaccio 為例](https://medium.com/@ceall8650/%E7%AD%86%E8%A8%98-%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E7%9A%84-npm-%E4%BB%A5npm-orgs%E8%B7%9Fverdaccio%E7%82%BA%E4%BE%8B-cfb83b2307e6)
|
||||
|
||||
### French {#french}
|
||||
|
||||
* [Installer un registre NPM](https://allons-y.io/wiki/installer-un-registre-npm)
|
||||
* [Verdaccio - Un registre de paquets npm](https://blog.yoannfleury.dev/verdaccio-un-registre-de-paquets-npm/)
|
||||
|
||||
- [Installer un registre NPM](https://allons-y.io/wiki/installer-un-registre-npm)
|
||||
- [Verdaccio - Un registre de paquets npm](https://blog.yoannfleury.dev/verdaccio-un-registre-de-paquets-npm/)
|
||||
|
||||
### Spanish {#spanish}
|
||||
* [NPM privado: instalar y configurar Verdaccio](https://www.todojs.com/npm-privado-con-verdaccio/)
|
||||
* [NPM privado: 5 razones y 7 recomendaciones para utilizarlo](https://www.todojs.com/npm-privado-5-razones-y-7-recomendaciones/)
|
||||
|
||||
- [NPM privado: instalar y configurar Verdaccio](https://www.todojs.com/npm-privado-con-verdaccio/)
|
||||
- [NPM privado: 5 razones y 7 recomendaciones para utilizarlo](https://www.todojs.com/npm-privado-5-razones-y-7-recomendaciones/)
|
||||
|
||||
### Portuguese-BR {#portuguese-BR}
|
||||
|
||||
* [Problemas com pacotes do npm? Verdaccio pode ser a solução](https://dev.to/dxwebster/pt-br-problemas-com-pacotes-do-npm-verdaccio-pode-ser-a-solucao-2966)
|
||||
|
||||
- [Problemas com pacotes do npm? Verdaccio pode ser a solução](https://dev.to/dxwebster/pt-br-problemas-com-pacotes-do-npm-verdaccio-pode-ser-a-solucao-2966)
|
||||
|
||||
### German {#german}
|
||||
|
||||
* [Struktur für große Angular-Anwendungen: Microservices, Module, MonoRepo?](https://jaxenter.de/struktur-angular-anwendungen-67467)
|
||||
* [Angular in einer Microservices-Welt](https://jaxenter.de/angular-microservices-66445)
|
||||
* [Privates NPM Repository mit Verdaccio (SSL & Docker)](https://blog.zotorn.de/privates-npm-repository-mit-verdaccio-ssl-docker-1/)
|
||||
- [Struktur für große Angular-Anwendungen: Microservices, Module, MonoRepo?](https://jaxenter.de/struktur-angular-anwendungen-67467)
|
||||
- [Angular in einer Microservices-Welt](https://jaxenter.de/angular-microservices-66445)
|
||||
- [Privates NPM Repository mit Verdaccio (SSL & Docker)](https://blog.zotorn.de/privates-npm-repository-mit-verdaccio-ssl-docker-1/)
|
||||
|
||||
## Slides {#slides}
|
||||
|
||||
* [Introduction to Verdaccio VueJS Meetup 2018](https://www.slideshare.net/juancarlospicado/introduction-to-verdaccio)
|
||||
* [Introduction Verdaccio Vienna JS Meetup 2019](https://docs.google.com/presentation/d/1eam_OtXCQh5IVYyia2GHhxVD8tb37B0yIadVa8wxQSk/edit?usp=sharing)
|
||||
* [Cover Your Apps While Still Using npm](https://www.slideshare.net/TierneyCoren/cover-your-apps-while-still-using-npm)
|
||||
* [Unity 2018-2019を見据えたDeNAのUnity開発のこれから [DeNA TechCon 2019]](https://www.slideshare.net/dena_tech/unity-20182019denaunity-dena-techcon-2019)
|
||||
- [Introduction to Verdaccio VueJS Meetup 2018](https://www.slideshare.net/juancarlospicado/introduction-to-verdaccio)
|
||||
- [Introduction Verdaccio Vienna JS Meetup 2019](https://docs.google.com/presentation/d/1eam_OtXCQh5IVYyia2GHhxVD8tb37B0yIadVa8wxQSk/edit?usp=sharing)
|
||||
- [Cover Your Apps While Still Using npm](https://www.slideshare.net/TierneyCoren/cover-your-apps-while-still-using-npm)
|
||||
- [Unity 2018-2019 を見据えた DeNA の Unity 開発のこれから [DeNA TechCon 2019]](https://www.slideshare.net/dena_tech/unity-20182019denaunity-dena-techcon-2019)
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: authentication
|
||||
title: "Authentication"
|
||||
title: 'Authentication'
|
||||
---
|
||||
|
||||
The authentication is tied to the auth [plugin](plugins.md) you are using. The package restrictions are also handled by the [Package Access](packages.md).
|
||||
@ -27,10 +27,10 @@ registry=http://localhost:5555/
|
||||
Eg:
|
||||
|
||||
```yaml
|
||||
'my-company-*':
|
||||
access: $anonymous
|
||||
publish: $anonymous
|
||||
proxy: npmjs
|
||||
'my-company-*':
|
||||
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**.
|
||||
@ -39,11 +39,11 @@ As is described [on issue #212](https://github.com/verdaccio/verdaccio/issues/21
|
||||
|
||||
### The meaning of `$all` and `$anonymous` {#the-meaning-of-all-and-anonymous}
|
||||
|
||||
As you know *Verdaccio* uses `htpasswd` by default. That plugin does not implement the methods `allow_access`, `allow_publish` and `allow_unpublish`.
|
||||
Thus, *Verdaccio* will handle that in the following way:
|
||||
As you know _Verdaccio_ uses `htpasswd` by default. That plugin does not implement the methods `allow_access`, `allow_publish` and `allow_unpublish`.
|
||||
Thus, _Verdaccio_ will handle that in the following way:
|
||||
|
||||
* If you are not logged in (you are anonymous), `$all` and `$anonymous` means exactly the same.
|
||||
* If you are logged in, `$anonymous` won't be part of your groups and `$all` will match any logged user. A new group `$authenticated` will be added to your group list.
|
||||
- If you are not logged in (you are anonymous), `$all` and `$anonymous` means exactly the same.
|
||||
- If you are logged in, `$anonymous` won't be part of your groups and `$all` will match any logged user. A new group `$authenticated` will be added to your group list.
|
||||
|
||||
Please note: `$all` **will match all users, whether logged in or not**.
|
||||
|
||||
@ -52,8 +52,8 @@ Please note: `$all` **will match all users, whether logged in or not**.
|
||||
|
||||
Let's recap:
|
||||
|
||||
* **logged in**: `$all` and `$authenticated` + groups added by the plugin.
|
||||
* **logged out (anonymous)**: `$all` and `$anonymous`.
|
||||
- **logged in**: `$all` and `$authenticated` + groups added by the plugin.
|
||||
- **logged out (anonymous)**: `$all` and `$anonymous`.
|
||||
|
||||
## Default htpasswd {#default-htpasswd}
|
||||
|
||||
@ -70,17 +70,17 @@ auth:
|
||||
# Hash algorithm, possible options are: "bcrypt", "md5", "sha1", "crypt".
|
||||
algorithm: bcrypt # by default is crypt, but is recommended use bcrypt for new installations
|
||||
# Rounds number for "bcrypt", will be ignored for other algorithms.
|
||||
rounds: 10
|
||||
rounds: 10
|
||||
```
|
||||
|
||||
> The default algorithm is `crypt`, considered not secure for production environments, it's recommended for new installations use `bcrypt` instead. Note after verdaccio 6.x
|
||||
the default will be `bcrypt`.
|
||||
> the default will be `bcrypt`.
|
||||
|
||||
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
|
||||
algorithm | string | No | bcrypt/md5/sha1/crypt | >=5.13.0 | set hasing password algorithm
|
||||
rounds | number | No | 10 | >=5.13.0 | Rounds number for "bcrypt", will be ignored for other algorithms
|
||||
| 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 |
|
||||
| algorithm | string | No | bcrypt/md5/sha1/crypt | >=5.13.0 | set hasing password algorithm |
|
||||
| rounds | number | No | 10 | >=5.13.0 | Rounds number for "bcrypt", will be ignored for other algorithms |
|
||||
|
||||
> In case you decide to prevent users from signing up themselves, you can set `max_users: -1`.
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: best
|
||||
title: "Best Practices"
|
||||
title: 'Best Practices'
|
||||
---
|
||||
|
||||
The following guide is a list of the best practices collected and that we usually recommend to all users. Do not take this guide as
|
||||
@ -52,7 +52,7 @@ There's two options here:
|
||||
|
||||
```yaml
|
||||
packages:
|
||||
"@my-company/*":
|
||||
'@my-company/*':
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
# comment it out or leave it empty
|
||||
@ -84,7 +84,7 @@ Additional reading:
|
||||
- **[Avoiding npm substitution attacks](https://github.blog/2021-02-12-avoiding-npm-substitution-attacks/)**
|
||||
- **[Dependency Confusion: When Are Your npm Packages Vulnerable?](https://blog.includesecurity.com/2021/02/dependency-confusion-when-are-your-npm-packages-vulnerable/)**
|
||||
- **[Practical Mitigations For Dependency Confusion Attack](https://www.kernelcrypt.com/posts/depedency-confusion-explained/)**
|
||||
> Feel free to attach here new useful articles to improve the security.
|
||||
> Feel free to attach here new useful articles to improve the security.
|
||||
|
||||
### Strong package access with `$authenticated` {#strong-package-access-with-authenticated}
|
||||
|
||||
@ -92,13 +92,13 @@ By default all packages you publish in Verdaccio are accessible for all users. W
|
||||
|
||||
```yaml
|
||||
packages:
|
||||
"@my-company/*":
|
||||
'@my-company/*':
|
||||
access: $authenticated
|
||||
publish: $authenticated
|
||||
"@*/*":
|
||||
'@*/*':
|
||||
access: $authenticated
|
||||
publish: $authenticated
|
||||
"**":
|
||||
'**':
|
||||
access: $authenticated
|
||||
publish: $authenticated
|
||||
```
|
||||
@ -111,11 +111,11 @@ After a clean installation, by default all packages will be resolved to the defa
|
||||
|
||||
```yaml
|
||||
packages:
|
||||
"@*/*":
|
||||
'@*/*':
|
||||
access: $authenticated
|
||||
publish: $authenticated
|
||||
proxy: npmjs
|
||||
"**":
|
||||
'**':
|
||||
access: $authenticated
|
||||
publish: $authenticated
|
||||
proxy: npmjs
|
||||
@ -125,15 +125,15 @@ This means that even if a private package like `@my-company/auth` is published l
|
||||
|
||||
```yaml
|
||||
packages:
|
||||
"@my-company/*":
|
||||
'@my-company/*':
|
||||
access: $authenticated
|
||||
publish: $authenticated
|
||||
unpublish: $authenticated
|
||||
"@*/*":
|
||||
'@*/*':
|
||||
access: $authenticated
|
||||
publish: $authenticated
|
||||
proxy: npmjs
|
||||
"**":
|
||||
'**':
|
||||
access: $authenticated
|
||||
publish: $authenticated
|
||||
proxy: npmjs
|
||||
@ -180,7 +180,6 @@ Since version `v5.4.0` critical endpoints have enabled by default rate limit. Th
|
||||
|
||||
The previous list of endpoints are limited to `100` request peer _15 minutes_ which is enough for a basic usage, if you need to increase this levels please check the `userRateLimit` configuration options.
|
||||
|
||||
|
||||
```yaml
|
||||
userRateLimit:
|
||||
windowMs: 50000 <- (minutes * 60 * 1000)
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: caching
|
||||
title: "Caching strategies"
|
||||
title: 'Caching strategies'
|
||||
---
|
||||
|
||||
Verdaccio caches all packages by default into the `/storage` folder. But you can decide whether you want to follow
|
||||
@ -8,15 +8,14 @@ a different strategy. Using of plugins you might use the cloud or any sort of da
|
||||
|
||||
## Caching scenarios {#caching-scenarios}
|
||||
|
||||
* Build a Node.js project on **Continuous Integration** (Bamboo, GitLab, Jenkins, etc) servers is a task that might take several times at a day, thus, the server will download tons of tarballs from the registry every time takes place. As usual, the CI tools clear the cache after each build and the process start over and over again. That is a waste of bandwidth and reduces the external traffic.
|
||||
**You can use Verdaccio for caching tarballs and metadata in our internal network and give a boost in your build time.**
|
||||
* **Latency and Connectivity**, not all countries enjoy a high-speed connection. For such reason cache packages locally in your network
|
||||
is really handy. Either if you are traveling, or have a weak connection, roaming or countries with strong Firewalls that might affect the user experience (eg: corrupting tarballs).
|
||||
* **Offline Mode**, all Node Package Managers nowadays uses their own internal cache, but it common that different projects might use
|
||||
different tools, which implies lock files and so on. Those tools are unable to share cache, the unique solution is centralized and relies on
|
||||
a proxy registry, Verdaccio cache all metadata and tarballs are downloaded by demand being able to share them across all your project.
|
||||
* Avoid that any remote registry suddenly returns *HTTP 404* error for tarballs were previously available a.k.a ([left-pad issue](https://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/)).
|
||||
|
||||
- Build a Node.js project on **Continuous Integration** (Bamboo, GitLab, Jenkins, etc) servers is a task that might take several times at a day, thus, the server will download tons of tarballs from the registry every time takes place. As usual, the CI tools clear the cache after each build and the process start over and over again. That is a waste of bandwidth and reduces the external traffic.
|
||||
**You can use Verdaccio for caching tarballs and metadata in our internal network and give a boost in your build time.**
|
||||
- **Latency and Connectivity**, not all countries enjoy a high-speed connection. For such reason cache packages locally in your network
|
||||
is really handy. Either if you are traveling, or have a weak connection, roaming or countries with strong Firewalls that might affect the user experience (eg: corrupting tarballs).
|
||||
- **Offline Mode**, all Node Package Managers nowadays uses their own internal cache, but it common that different projects might use
|
||||
different tools, which implies lock files and so on. Those tools are unable to share cache, the unique solution is centralized and relies on
|
||||
a proxy registry, Verdaccio cache all metadata and tarballs are downloaded by demand being able to share them across all your project.
|
||||
- Avoid that any remote registry suddenly returns _HTTP 404_ error for tarballs were previously available a.k.a ([left-pad issue](https://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/)).
|
||||
|
||||
# Strategies for faster builds
|
||||
|
||||
@ -36,7 +35,7 @@ uplinks:
|
||||
|
||||
## Extending Cache Expiration Time {#extending-cache-expiration-time}
|
||||
|
||||
Verdaccio by default waits 2 minutes to invalidate the cache metadata before fetching new information from the remote registry.
|
||||
Verdaccio by default waits 2 minutes to invalidate the cache metadata before fetching new information from the remote registry.
|
||||
|
||||
```yaml
|
||||
uplinks:
|
||||
@ -48,7 +47,6 @@ uplinks:
|
||||
Increasing the value of `maxage` in each `uplink` remotes will be asked less frequently. This might be a valid strategy if
|
||||
you don't update dependencies so often.
|
||||
|
||||
|
||||
## Using the memory instead the hardrive {#using-the-memory-instead-the-hardrive}
|
||||
|
||||
Sometimes caching packages is not a critical step, rather than route packages from different registries and achieving
|
||||
|
@ -1,17 +1,15 @@
|
||||
---
|
||||
id: chef
|
||||
title: "Chef Cookbook"
|
||||
title: 'Chef Cookbook'
|
||||
---
|
||||
|
||||
Using Chef Cookbook for Verdaccio
|
||||
|
||||
For further information:
|
||||
|
||||
* [https://github.com/verdaccio/verdaccio-cookbook](https://github.com/verdaccio/verdaccio-cookbook)
|
||||
* [https://supermarket.chef.io/cookbooks/verdaccio](https://supermarket.chef.io/cookbooks/verdaccio)
|
||||
- [https://github.com/verdaccio/verdaccio-cookbook](https://github.com/verdaccio/verdaccio-cookbook)
|
||||
- [https://supermarket.chef.io/cookbooks/verdaccio](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.
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: ci
|
||||
title: "Continuous Integration"
|
||||
title: 'Continuous Integration'
|
||||
---
|
||||
|
||||
Verdaccio can be used with continuous integration (CI) platforms to install or publish packages.
|
||||
|
@ -1,10 +1,10 @@
|
||||
---
|
||||
id: cli-registry
|
||||
title: "Using a private registry"
|
||||
title: 'Using a private registry'
|
||||
---
|
||||
|
||||
Setting up a private registry is quite easy on all major Package managers and can be achieved in a few different ways depenging on your goals. The following links details how you can achieve this goal for each major package manager.
|
||||
|
||||
* [npm](setup-npm.md)
|
||||
* [yarn](setup-yarn.md)
|
||||
* [pnpm](setup-pnpm.md)
|
||||
- [npm](setup-npm.md)
|
||||
- [yarn](setup-yarn.md)
|
||||
- [pnpm](setup-pnpm.md)
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: cli
|
||||
title: "Command Line Tool"
|
||||
title: 'Command Line Tool'
|
||||
---
|
||||
|
||||
The Verdaccio CLI is your tool to start and stop the application.
|
||||
@ -11,12 +11,12 @@ The Verdaccio CLI is your tool to start and stop the application.
|
||||
verdaccio --listen 4000 --config ~./config.yaml
|
||||
```
|
||||
|
||||
Command | Default | Example | Description
|
||||
--- | --- | --- | ---
|
||||
--listen \ **-l** | http:localhost:4873 | 7000 | Define protocol + host + port ([formats](https://github.com/verdaccio/verdaccio/blob/08c36e688e8635733f92080eb3598239d43259cb/packages/node-api/src/cli-utils.ts#L7-L16))
|
||||
--config \ **-c** | ~/.local/verdaccio/config.yaml | ~./config.yaml | Set location of the configuration file
|
||||
--info \ **-i** | | | Print local environment information
|
||||
--version \ **-v** | | | Show version information
|
||||
| Command | Default | Example | Description |
|
||||
| ------------------ | ------------------------------ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| --listen \ **-l** | http:localhost:4873 | 7000 | Define protocol + host + port ([formats](https://github.com/verdaccio/verdaccio/blob/08c36e688e8635733f92080eb3598239d43259cb/packages/node-api/src/cli-utils.ts#L7-L16)) |
|
||||
| --config \ **-c** | ~/.local/verdaccio/config.yaml | ~./config.yaml | Set location of the configuration file |
|
||||
| --info \ **-i** | | | Print local environment information |
|
||||
| --version \ **-v** | | | Show version information |
|
||||
|
||||
## Default config file location {#default-config-file-location}
|
||||
|
||||
@ -37,9 +37,8 @@ The default database file location is in the storage location.
|
||||
Starting with version 4.0.0, the database file name will be **.verdaccio-db.json** for a new installation of Verdaccio.
|
||||
When upgrading an existing Verdaccio server, the file name will remain **.sinopia-db.json**.
|
||||
|
||||
|
||||
## Environment variables {#environment-variables}
|
||||
|
||||
[Full list of environment variables](https://github.com/verdaccio/verdaccio/blob/master/docs/env.variables.md).
|
||||
|
||||
* `VERDACCIO_HANDLE_KILL_SIGNALS` to enable gracefully shutdown (since v4.12.0)
|
||||
- `VERDACCIO_HANDLE_KILL_SIGNALS` to enable gracefully shutdown (since v4.12.0)
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: configuration
|
||||
title: "Configuration File"
|
||||
title: 'Configuration File'
|
||||
---
|
||||
|
||||
This file is the cornerstone of Verdaccio where you can modify the default behaviour, enable plugins and extend features.
|
||||
@ -20,11 +20,11 @@ uplinks:
|
||||
npmjs:
|
||||
url: https://registry.npmjs.org/
|
||||
packages:
|
||||
"@*/*":
|
||||
'@*/*':
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
proxy: npmjs
|
||||
"**":
|
||||
'**':
|
||||
proxy: npmjs
|
||||
log: { type: stdout, format: pretty, level: http }
|
||||
```
|
||||
@ -129,7 +129,7 @@ This section allows you to control how packages are accessed. For more informati
|
||||
|
||||
```yaml
|
||||
packages:
|
||||
"@*/*":
|
||||
'@*/*':
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
proxy: npmjs
|
||||
@ -271,7 +271,7 @@ Enabling notifications to third-party tools is fairly easy via webhooks. For mor
|
||||
```yaml
|
||||
notify:
|
||||
method: POST
|
||||
headers: [{ "Content-Type": "application/json" }]
|
||||
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"}'
|
||||
```
|
||||
|
@ -1,15 +1,15 @@
|
||||
---
|
||||
id: dev-plugins
|
||||
title: "Developing Plugins"
|
||||
title: 'Developing Plugins'
|
||||
---
|
||||
|
||||
There are many ways to extend `verdaccio`, the kind of plugins supported are:
|
||||
|
||||
* [Authentication](plugin-auth.md)
|
||||
* [Middleware](plugin-middleware.md)
|
||||
* [Storage](plugin-storage.md)
|
||||
* Theme
|
||||
* Filter plugins
|
||||
- [Authentication](plugin-auth.md)
|
||||
- [Middleware](plugin-middleware.md)
|
||||
- [Storage](plugin-storage.md)
|
||||
- Theme
|
||||
- Filter plugins
|
||||
|
||||
> We recommend developing plugins using our [TypeScript type definitions](https://github.com/verdaccio/monorepo/tree/9.x/core/types).
|
||||
|
||||
@ -17,7 +17,6 @@ There are many ways to extend `verdaccio`, the kind of plugins supported are:
|
||||
|
||||
The following plugins are valid and in process of incubation.
|
||||
|
||||
|
||||
## Theme Plugin {#theme-plugin}
|
||||
|
||||
The plugin must return a function that returns a **string**. The string should be the absolute location of the root of your user interface.
|
||||
@ -36,27 +35,23 @@ It is imporant that the name of the plugin **must start with `verdaccio-theme-`
|
||||
|
||||
### Theme Example {#theme-example}
|
||||
|
||||
* [@verdaccio/ui-theme](https://github.com/verdaccio/ui): The default Verdaccio theme based in React.js.
|
||||
- [@verdaccio/ui-theme](https://github.com/verdaccio/ui): The default Verdaccio theme based in React.js.
|
||||
|
||||
## Filter Plugin {#filter-plugin}
|
||||
|
||||
Since [`4.1.0`](https://github.com/verdaccio/verdaccio/pull/1313)
|
||||
|
||||
|
||||
Filter plugins were introduced due a [request](https://github.com/verdaccio/verdaccio/issues/818) in order
|
||||
to be able to filter metadata from uplinks.
|
||||
|
||||
More [info in the PR](https://github.com/verdaccio/verdaccio/pull/1161).
|
||||
|
||||
|
||||
|
||||
```yaml
|
||||
filters:
|
||||
storage-filter-blackwhitelist:
|
||||
filter_file: /path/to/file
|
||||
storage-filter-blackwhitelist:
|
||||
filter_file: /path/to/file
|
||||
```
|
||||
|
||||
|
||||
### API {#api-1}
|
||||
|
||||
The method `filter_metadata` will allow you to filter metadata that comes from any uplink, it is `Promise` based
|
||||
|
@ -15,7 +15,7 @@ docker pull verdaccio/verdaccio
|
||||
|
||||
## Tagged Versions {#tagged-versions}
|
||||
|
||||
![alt Docker Pulls Count](https://dockeri.co/image/verdaccio/verdaccio "Docker Pulls Count")
|
||||
![alt Docker Pulls Count](https://dockeri.co/image/verdaccio/verdaccio 'Docker Pulls Count')
|
||||
|
||||
Since version `v2.x` you can pull docker images by [tag](https://hub.docker.com/r/verdaccio/verdaccio/tags/), as follows:
|
||||
|
||||
@ -24,6 +24,7 @@ For a major version:
|
||||
```bash
|
||||
docker pull verdaccio/verdaccio:4
|
||||
```
|
||||
|
||||
For a minor version:
|
||||
|
||||
```bash
|
||||
@ -51,7 +52,6 @@ The above line will pull the latest prebuilt image from dockerhub, if you haven'
|
||||
|
||||
If you have [build an image locally](#build-your-own-docker-image) use `verdaccio` as the last argument.
|
||||
|
||||
|
||||
You can use `-v` to bind mount `conf`, `storage` and `plugins` to the hosts filesystem (example below).
|
||||
|
||||
Note that if you do mount conf like this, that you will first need to supply a copy of config.yaml in that directory; the Docker container will not start properly if this file is missing. You can copy this file initially from https://github.com/verdaccio/verdaccio/blob/5.x/conf/docker.yaml. However, note the security warnings in that file; you will definitely want to lock it down in production.
|
||||
@ -64,24 +64,23 @@ V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio \
|
||||
-v $V_PATH/plugins:/verdaccio/plugins \
|
||||
verdaccio/verdaccio
|
||||
```
|
||||
|
||||
> if you are running in a server, you might want to add -d to run it in the background
|
||||
|
||||
>Note: Verdaccio runs as a non-root user (uid=10001) 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 10001:65533 /path/for/verdaccio` otherwise
|
||||
you will get permission errors at runtime.
|
||||
[Use docker volume](https://docs.docker.com/storage/volumes/) is recommended over using bind mount.
|
||||
> Note: Verdaccio runs as a non-root user (uid=10001) 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 10001:65533 /path/for/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 4 provides a new set of environment variables to modify either permissions, port or http protocol. Here the complete list:
|
||||
|
||||
Property | default | Description
|
||||
--- | --- | ---
|
||||
VERDACCIO_APPDIR | `/opt/verdaccio` | the docker working directory
|
||||
VERDACCIO_USER_NAME | `verdaccio` | the system user
|
||||
VERDACCIO_USER_UID | `10001` | the user id being used to apply folder permissions
|
||||
VERDACCIO_PORT | `4873` | the verdaccio port
|
||||
VERDACCIO_PROTOCOL | `http` | the default http protocol
|
||||
|
||||
|
||||
| Property | default | Description |
|
||||
| ------------------- | ---------------- | -------------------------------------------------- |
|
||||
| VERDACCIO_APPDIR | `/opt/verdaccio` | the docker working directory |
|
||||
| VERDACCIO_USER_NAME | `verdaccio` | the system user |
|
||||
| VERDACCIO_USER_UID | `10001` | the user id being used to apply folder permissions |
|
||||
| VERDACCIO_PORT | `4873` | the verdaccio port |
|
||||
| VERDACCIO_PROTOCOL | `http` | the default http protocol |
|
||||
|
||||
### SELinux {#selinux}
|
||||
|
||||
@ -117,7 +116,7 @@ RUN mkdir -p /verdaccio/plugins \
|
||||
&& cd /verdaccio/plugins \
|
||||
&& npm install --global-style --no-bin-links --omit=optional verdaccio-auth-memory@latest
|
||||
FROM verdaccio/verdaccio:5
|
||||
ADD docker.yaml /verdaccio/conf/config.yaml
|
||||
ADD docker.yaml /verdaccio/conf/config.yaml
|
||||
COPY --chown=$VERDACCIO_USER_UID:root --from=builder \
|
||||
/verdaccio/plugins/node_modules/verdaccio-auth-memory \
|
||||
/verdaccio/plugins/verdaccio-auth-memory
|
||||
@ -125,7 +124,6 @@ COPY --chown=$VERDACCIO_USER_UID:root --from=builder \
|
||||
|
||||
For more information check real plugin examples with Docker in our [source code](https://github.com/verdaccio/verdaccio/tree/master/docker-examples/v5/plugins).
|
||||
|
||||
|
||||
### Docker and custom port configuration {#docker-and-custom-port-configuration}
|
||||
|
||||
Any `host:port` configured in `conf/config.yaml` under `listen` **is currently ignored when using docker**.
|
||||
@ -135,7 +133,7 @@ in your `docker run` command add the environment variable `VERDACCIO_PORT=5000`
|
||||
|
||||
```bash
|
||||
V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio \
|
||||
-e "VERDACCIO_PORT=8080" -p 8080:8080 \
|
||||
-e "VERDACCIO_PORT=8080" -p 8080:8080 \
|
||||
verdaccio/verdaccio
|
||||
```
|
||||
|
||||
@ -163,24 +161,23 @@ $ docker-compose up --build
|
||||
|
||||
You can set the port to use (for both container and host) by prefixing the above command with `VERDACCIO_PORT=5000 `.
|
||||
|
||||
|
||||
```yaml
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
verdaccio:
|
||||
image: verdaccio/verdaccio
|
||||
container_name: "verdaccio"
|
||||
container_name: 'verdaccio'
|
||||
networks:
|
||||
- node-network
|
||||
environment:
|
||||
- VERDACCIO_PORT=4873
|
||||
ports:
|
||||
- "4873:4873"
|
||||
- '4873:4873'
|
||||
volumes:
|
||||
- "./storage:/verdaccio/storage"
|
||||
- "./config:/verdaccio/conf"
|
||||
- "./plugins:/verdaccio/plugins"
|
||||
- './storage:/verdaccio/storage'
|
||||
- './config:/verdaccio/conf'
|
||||
- './plugins:/verdaccio/plugins'
|
||||
networks:
|
||||
node-network:
|
||||
driver: bridge
|
||||
@ -204,7 +201,6 @@ $ docker volume inspect verdaccio_verdaccio
|
||||
|
||||
## Build your own Docker image {#build-your-own-docker-image}
|
||||
|
||||
|
||||
```bash
|
||||
docker build -t verdaccio .
|
||||
```
|
||||
@ -226,20 +222,19 @@ There is a separate repository that hosts multiple configurations to compose Doc
|
||||
|
||||
[https://github.com/verdaccio/docker-examples](https://github.com/verdaccio/verdaccio/tree/master/docker-examples)
|
||||
|
||||
|
||||
## Docker Custom Builds {#docker-custom-builds}
|
||||
|
||||
> If you have made an image based on Verdaccio, feel free to add it to this list.
|
||||
|
||||
* [docker-verdaccio-multiarch](https://github.com/hertzg/docker-verdaccio-multiarch) Multiarch image mirrors
|
||||
* [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-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.
|
||||
* [verdaccio-github-oauth-ui](https://github.com/n4bb12/verdaccio-github-oauth-ui/blob/master/Dockerfile)
|
||||
- [docker-verdaccio-multiarch](https://github.com/hertzg/docker-verdaccio-multiarch) Multiarch image mirrors
|
||||
- [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-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.
|
||||
- [verdaccio-github-oauth-ui](https://github.com/n4bb12/verdaccio-github-oauth-ui/blob/master/Dockerfile)
|
||||
|
@ -1,12 +1,11 @@
|
||||
---
|
||||
id: e2e
|
||||
title: "End to End testing"
|
||||
title: 'End to End testing'
|
||||
---
|
||||
|
||||
### Testing the integrity of React components by publishing in a private registry
|
||||
|
||||
> The final stage of a react component is when it is being published and distributed. How can I ensure my packages won’t crash in production? This talk will help you to test your React components by publishing them to a private registry and running End-to-End tests against them.
|
||||
|
||||
> The final stage of a react component is when it is being published and distributed. How can I ensure my packages won’t crash in production? This talk will help you to test your React components by publishing them to a private registry and running End-to-End tests against them.
|
||||
|
||||
<iframe width="300" height="600" src="https://www.youtube.com/embed/bRKZbrlQqLY" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
|
||||
@ -19,9 +18,9 @@ Some projects organize packages in multi-packages repositories or [monorepos](ht
|
||||
|
||||
Such approach has been really hard to achieve considering:
|
||||
|
||||
* Populate canary packages on public services seems not to be a good idea
|
||||
* Some self-hosted OSS registries are too heavy
|
||||
* Offline environments (private networks)
|
||||
- Populate canary packages on public services seems not to be a good idea
|
||||
- Some self-hosted OSS registries are too heavy
|
||||
- Offline environments (private networks)
|
||||
|
||||
**Verdaccio** is a lightweight registry with zero-configuration that **fits perfectly in any E2E + CI workflow**.
|
||||
|
||||
@ -30,22 +29,21 @@ Such approach has been really hard to achieve considering:
|
||||
There is no a silver bullet yet, each implementation seems to be specific for each project, you can check some of them in
|
||||
the following thread [clicking here](https://stackoverflow.com/a/50222427/308341).
|
||||
|
||||
|
||||
## Examples in Open Source
|
||||
|
||||
The following projects have examples using Verdaccio in Open Source
|
||||
|
||||
### Bash Examples
|
||||
|
||||
* [Babel.js](https://github.com/babel/babel) *(+35k ⭐️)*
|
||||
* [Docusaurus](https://github.com/facebook/docusaurus) *(+31k ⭐️)*
|
||||
* [create-react-app](https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md#contributing-to-e2e-end-to-end-tests) *(+73.5k ⭐️)*
|
||||
* [Uppy](https://github.com/transloadit/uppy) *(+21k ⭐️)*
|
||||
* [ethereum/web3.js](https://github.com/ethereum/web3.js) *(+8k ⭐️)*
|
||||
* [adobe react-spectrum](https://github.com/adobe/react-spectrum/pull/2432) *(+6k ⭐️)*
|
||||
* [Mozilla Neutrino](https://github.com/neutrinojs/neutrino) *(+3k ⭐️)*
|
||||
- [Babel.js](https://github.com/babel/babel) _(+35k ⭐️)_
|
||||
- [Docusaurus](https://github.com/facebook/docusaurus) _(+31k ⭐️)_
|
||||
- [create-react-app](https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md#contributing-to-e2e-end-to-end-tests) _(+73.5k ⭐️)_
|
||||
- [Uppy](https://github.com/transloadit/uppy) _(+21k ⭐️)_
|
||||
- [ethereum/web3.js](https://github.com/ethereum/web3.js) _(+8k ⭐️)_
|
||||
- [adobe react-spectrum](https://github.com/adobe/react-spectrum/pull/2432) _(+6k ⭐️)_
|
||||
- [Mozilla Neutrino](https://github.com/neutrinojs/neutrino) _(+3k ⭐️)_
|
||||
|
||||
This is the most simple example using Verdaccio in a bash script (extracted from *create-react-app*).
|
||||
This is the most simple example using Verdaccio in a bash script (extracted from _create-react-app_).
|
||||
|
||||
```bash
|
||||
#!/bin/sh
|
||||
@ -69,35 +67,32 @@ sh -c "npm --registry $local_registry publish"
|
||||
|
||||
### Docker Examples
|
||||
|
||||
* [Hyperledger](https://github.com/hyperledger/fabric-chaincode-node)
|
||||
- [Hyperledger](https://github.com/hyperledger/fabric-chaincode-node)
|
||||
|
||||
### Programtically Examples
|
||||
|
||||
* [Storybook](https://github.com/storybooks/storybook) *(+44k ⭐️)*
|
||||
* [Gatsby](https://github.com/gatsbyjs/gatsby) *(+40k ⭐️)
|
||||
- [Storybook](https://github.com/storybooks/storybook) _(+44k ⭐️)_
|
||||
- [Gatsby](https://github.com/gatsbyjs/gatsby) \*(+40k ⭐️)
|
||||
|
||||
#### Verdaccio module
|
||||
|
||||
Via CLI:
|
||||
|
||||
* [Aurelia Framework](https://github.com/aurelia) *(+12k ⭐️)*
|
||||
* [Netlify CLI](https://github.com/netlify/cli) *(+1k ⭐️)*
|
||||
* [Embark](https://embark.status.im/) *(+3k ⭐️)*
|
||||
* [Microsoft Beachball](https://github.com/microsoft/beachball)
|
||||
- [Aurelia Framework](https://github.com/aurelia) _(+12k ⭐️)_
|
||||
- [Netlify CLI](https://github.com/netlify/cli) _(+1k ⭐️)_
|
||||
- [Embark](https://embark.status.im/) _(+3k ⭐️)_
|
||||
- [Microsoft Beachball](https://github.com/microsoft/beachball)
|
||||
|
||||
#### Node.js `child_process` examples
|
||||
|
||||
* [Angular CLI](https://github.com/angular/angular-cli) *(+25k ⭐️)*
|
||||
* [bit](https://github.com/teambit/bit) *(+6k ⭐️)*
|
||||
* [pnpm](https://github.com/pnpm/pnpm) *(+6k ⭐️)*
|
||||
* [aws-sdk cli v3](https://github.com/aws/aws-sdk-js-v3) *(+1k ⭐️)*
|
||||
* [angular-eslint](https://github.com/angular-eslint/angular-eslint) *(+1k ⭐️)*
|
||||
- [Angular CLI](https://github.com/angular/angular-cli) _(+25k ⭐️)_
|
||||
- [bit](https://github.com/teambit/bit) _(+6k ⭐️)_
|
||||
- [pnpm](https://github.com/pnpm/pnpm) _(+6k ⭐️)_
|
||||
- [aws-sdk cli v3](https://github.com/aws/aws-sdk-js-v3) _(+1k ⭐️)_
|
||||
- [angular-eslint](https://github.com/angular-eslint/angular-eslint) _(+1k ⭐️)_
|
||||
|
||||
## Example repositories
|
||||
## Example repositories
|
||||
|
||||
- [e2e-ci-example-gh-actions](https://github.com/juanpicado/e2e-ci-example-gh-actions)
|
||||
- [verdaccio-end-to-end-tests](https://github.com/juanpicado/verdaccio-end-to-end-tests)
|
||||
- [verdaccio-fork](https://github.com/juanpicado/verdaccio-fork)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: github-actions
|
||||
title: "GitHub Actions"
|
||||
title: 'GitHub Actions'
|
||||
---
|
||||
|
||||
With [GitHub Actions](https://github.com/features/actions) you can automate your workflow, each GitHub Action performs a specific step in a process.
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: aws
|
||||
title: "Amazon Web Services"
|
||||
title: 'Amazon Web Services'
|
||||
---
|
||||
|
||||
This document describes simple steps to setup Verdaccio private registry on Amazon Web Services platform using EC2 service. This assumes you have already created an EC2 Amazon Linux instance; if not then please check this tutorial on [AWS EC2 Setup](https://www.howtoinmagento.com/2018/04/aws-cli-commands-for-aws-ec2-amazon.html).
|
||||
@ -11,123 +11,119 @@ This document describes simple steps to setup Verdaccio private registry on Amaz
|
||||
|
||||
**Step 2:** Install Node Version Manager (nvm) first, close and re-open the SSH using your EC2 key.
|
||||
|
||||
``` sudo apt update ```
|
||||
|
||||
``` wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash ```
|
||||
|
||||
``` exit ```
|
||||
|
||||
`sudo apt update`
|
||||
|
||||
`wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash`
|
||||
|
||||
`exit`
|
||||
|
||||
**Step 3:** Install Node using Node Version Manager (nvm)
|
||||
|
||||
``` nvm install node ```
|
||||
`nvm install node`
|
||||
|
||||
**Step 4:** Install Verdaccio & pm2, will require to run Verdaccio service in background
|
||||
|
||||
``` npm i -g verdaccio pm2 ```
|
||||
`npm i -g verdaccio pm2`
|
||||
|
||||
**Step 5:** Set the verdaccio registry as a source. By default original NPM registry set.
|
||||
|
||||
``` npm set registry http://localhost:4873 ```
|
||||
|
||||
``` npm set ca null ```
|
||||
|
||||
`npm set registry http://localhost:4873`
|
||||
|
||||
`npm set ca null`
|
||||
|
||||
**Step 6:** Run Verdaccio and stop it (ctrl+c). It will create a config file we will use.
|
||||
|
||||
``` verdaccio ```
|
||||
|
||||
`verdaccio`
|
||||
|
||||
**Step 7:** Now do below configuration for listening to all addresses on that server machine / EC2 instance. [(read more)](https://github.com/verdaccio/verdaccio/blob/master/conf/full.yaml)
|
||||
|
||||
Open and edit `config.yaml` file:
|
||||
|
||||
``` nano .config/verdaccio/config.yaml ``` or ``` nano ~/verdaccio/config.yaml ```
|
||||
` nano .config/verdaccio/config.yaml` or ` nano ~/verdaccio/config.yaml`
|
||||
|
||||
Add below lines at the end. [(read more)](https://github.com/verdaccio/verdaccio/blob/ff409ab7c05542a152100e3bc39cfadb36a8a080/conf/full.yaml#L113)
|
||||
|
||||
```
|
||||
listen:
|
||||
- 0.0.0.0:4873
|
||||
```
|
||||
listen:
|
||||
- 0.0.0.0:4873
|
||||
```
|
||||
|
||||
Change below line so that only authenticated person can access our registry
|
||||
|
||||
``` Replace "access: $all" with "access: $authenticated" ```
|
||||
|
||||
(Optional) Change below line according to how many users you wish to grant access to the scoped registry
|
||||
|
||||
``` Replace "#max_users: 1000" with "max_users: 1" ```
|
||||
`Replace "access: $all" with "access: $authenticated"`
|
||||
|
||||
(Optional) Change below line according to how many users you wish to grant access to the scoped registry
|
||||
|
||||
`Replace "#max_users: 1000" with "max_users: 1"`
|
||||
|
||||
There are some more parameters available to configure it. Like storage, proxy, default port change. [(read more)](https://github.com/verdaccio/verdaccio/blob/ff409ab7c05542a152100e3bc39cfadb36a8a080/conf/full.yaml#L113)
|
||||
|
||||
**Step 8:** Run Verdaccio in background using PM2:
|
||||
|
||||
``` pm2 start verdaccio ```
|
||||
`pm2 start verdaccio`
|
||||
|
||||
**Step 9:** Now, You can access your Verdaccio web UI.
|
||||
|
||||
The URL will look like something:
|
||||
|
||||
``` http://ec2-..compute.amazonaws.com:4873 ```
|
||||
`http://ec2-..compute.amazonaws.com:4873`
|
||||
|
||||
{or}
|
||||
|
||||
``` http://your-ec2-public-ip-address:4873 (You can check your EC2 instance public ip from AWS console) ```
|
||||
`http://your-ec2-public-ip-address:4873 (You can check your EC2 instance public ip from AWS console)`
|
||||
|
||||
To confirm Verdaccio's running status, run the command below:
|
||||
|
||||
``` pm2 list ```
|
||||
|
||||
To make Verdaccio launch on startup, run the commands below:
|
||||
|
||||
``` pm2 stop verdaccio ```
|
||||
|
||||
``` pm2 delete verdaccio ```
|
||||
|
||||
``` pm2 startup ``` This will show a command in your terminal. Copy / paste it and execute it to have pm2 make a startup service for you.
|
||||
|
||||
``` which verdaccio ``` Copy the path shown by this command.
|
||||
|
||||
``` pm2 start /home/ubuntu/.nvm/versions/node/v17.1.0/bin/verdaccio ``` (put the path you copied from command above).
|
||||
|
||||
``` pm2 status ``` This should show "online" on the status of verdaccio service.
|
||||
|
||||
``` pm2 save ``` Now when you reboot the EC2 instance, it should launch verdaccio.
|
||||
` pm2 list`
|
||||
|
||||
To make Verdaccio launch on startup, run the commands below:
|
||||
|
||||
`pm2 stop verdaccio`
|
||||
|
||||
`pm2 delete verdaccio`
|
||||
|
||||
`pm2 startup` This will show a command in your terminal. Copy / paste it and execute it to have pm2 make a startup service for you.
|
||||
|
||||
`which verdaccio` Copy the path shown by this command.
|
||||
|
||||
`pm2 start /home/ubuntu/.nvm/versions/node/v17.1.0/bin/verdaccio` (put the path you copied from command above).
|
||||
|
||||
`pm2 status` This should show "online" on the status of verdaccio service.
|
||||
|
||||
`pm2 save` Now when you reboot the EC2 instance, it should launch verdaccio.
|
||||
|
||||
**Step 10:** Registering a user in verdaccio registry
|
||||
|
||||
``` npm set always-auth true ```
|
||||
|
||||
``` npm adduser ```
|
||||
` npm set always-auth true`
|
||||
|
||||
` npm adduser`
|
||||
|
||||
It will ask for username, password and valid email id to be entered. Make a note of this details that will use later to login in verdaccio registry to publish our library.
|
||||
|
||||
|
||||
**Step 11:** Now we are ready to use our AWS server instance work as a private registry.
|
||||
|
||||
Login into verdaccio registry. Enter the same username, password and email id set in above Step.
|
||||
|
||||
``` npm set registry http://your-ec2-public-ip-address:4873 ```
|
||||
|
||||
``` npm login ```
|
||||
` npm set registry http://your-ec2-public-ip-address:4873`
|
||||
|
||||
` npm login`
|
||||
|
||||
**Step 12:** Go to your custom library package path. In my case this is my Angular 7 package path -> `/libraries/dist/your-library-name/your-library-name-0.0.1.tgz`
|
||||
|
||||
If you like to know how to create angular 7 library/package then [(click here)](https://www.howtoinmagento.com/2019/11/how-to-create-your-first-angular-7.html)
|
||||
|
||||
``` cd [custom library package path] ```
|
||||
` cd [custom library package path]`
|
||||
|
||||
**Step 13:** Finally publish our library `your-library-name-0.0.1.tgz` on verdaccio registry
|
||||
|
||||
``` [custom library package path] >> npm publish your-library-name-0.0.1.tgz ```
|
||||
` [custom library package path] >> npm publish your-library-name-0.0.1.tgz`
|
||||
|
||||
{or}
|
||||
|
||||
``` [custom library package path] >> npm publish ```
|
||||
` [custom library package path] >> npm publish`
|
||||
|
||||
{or}
|
||||
|
||||
``` [custom library package path] >> npm publish --registry http://your-ec2-public-ip-address:4873 ```
|
||||
|
||||
Now browse ``` http://your-ec2-public-ip-address:4873 ``` and you will see new library package there.
|
||||
|
||||
|
||||
` [custom library package path] >> npm publish --registry http://your-ec2-public-ip-address:4873`
|
||||
|
||||
Now browse ` http://your-ec2-public-ip-address:4873` and you will see new library package there.
|
||||
|
@ -1,34 +1,34 @@
|
||||
---
|
||||
id: iss-server
|
||||
title: "Installing on IIS server"
|
||||
title: 'Installing on IIS server'
|
||||
---
|
||||
|
||||
These instructions were written for Windows Server 2016, IIS 10, [Node.js 10.15.0](https://nodejs.org/), [iisnode 0.2.26](https://github.com/Azure/iisnode) and [verdaccio 3.11.0](https://github.com/verdaccio/verdaccio).
|
||||
|
||||
* Install IIS Install [iisnode](https://github.com/Azure/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:
|
||||
- Install IIS Install [iisnode](https://github.com/Azure/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:
|
||||
|
||||
````
|
||||
```
|
||||
cd c:\verdaccio
|
||||
npm install
|
||||
````
|
||||
```
|
||||
|
||||
* Make sure you have an inbound rule accepting TCP traffic to the port in Windows Firewall
|
||||
* Thats it! Now you can navigate to the host and port that you specified
|
||||
- Make sure you have an inbound rule accepting TCP traffic to the port in Windows Firewall
|
||||
- Thats it! Now you can navigate to the host and port that you specified
|
||||
|
||||
I wanted the `verdaccio` site to be the default site in IIS so I did the following:
|
||||
|
||||
* 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
|
||||
- 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
|
||||
@ -36,9 +36,9 @@ for mentioned link works better
|
||||
|
||||
A default configuration file will be created `c:\verdaccio\verdaccio\config.yaml`
|
||||
|
||||
### package.json {#packagejson}
|
||||
### package.json {#packagejson}
|
||||
|
||||
````json
|
||||
```json
|
||||
{
|
||||
"name": "iisnode-verdaccio",
|
||||
"version": "1.0.0",
|
||||
@ -48,25 +48,25 @@ A default configuration file will be created `c:\verdaccio\verdaccio\config.yaml
|
||||
"verdaccio": "^3.11.0"
|
||||
}
|
||||
}
|
||||
````
|
||||
```
|
||||
|
||||
### start.js {#startjs}
|
||||
|
||||
````bash
|
||||
```bash
|
||||
process.argv.push('-l', 'unix:' + process.env.PORT, '-c', './config.yaml');
|
||||
require('./node_modules/verdaccio/build/lib/cli.js');
|
||||
````
|
||||
```
|
||||
|
||||
### Alternate start.js for Verdaccio versions < v3.0 {#alternate-startjs-for-verdaccio-versions--v30}
|
||||
|
||||
````bash
|
||||
```bash
|
||||
process.argv.push('-l', 'unix:' + process.env.PORT);
|
||||
require('./node_modules/verdaccio/src/lib/cli.js');
|
||||
````
|
||||
```
|
||||
|
||||
### web.config {#webconfig}
|
||||
|
||||
````xml
|
||||
```xml
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<modules>
|
||||
@ -113,16 +113,17 @@ require('./node_modules/verdaccio/src/lib/cli.js');
|
||||
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
````
|
||||
```
|
||||
|
||||
### Troubleshooting {#troubleshooting}
|
||||
|
||||
- **The web interface does not load when hosted with https as it tries to download scripts over http.**
|
||||
Make sure that you have enabled `X-Forwarded-Proto` in IISNode using `enableXFF`. See [the related issue](https://github.com/verdaccio/verdaccio/issues/2003).
|
||||
````
|
||||
Make sure that you have enabled `X-Forwarded-Proto` in IISNode using `enableXFF`. See [the related issue](https://github.com/verdaccio/verdaccio/issues/2003).
|
||||
|
||||
```
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<iisnode enableXFF="true" />
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
````
|
||||
|
||||
```
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: installation
|
||||
title: "Installation"
|
||||
title: 'Installation'
|
||||
---
|
||||
|
||||
Verdaccio is a Node.js private and proxy registry. To install it, you need a few basic prerequisites.
|
||||
@ -35,7 +35,7 @@ Using `npm`
|
||||
npm install --location=global verdaccio@6-next
|
||||
```
|
||||
|
||||
or using `yarn@1.x` _classic_,
|
||||
or using `yarn@1.x` _classic_,
|
||||
|
||||
```bash
|
||||
yarn global add verdaccio
|
||||
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
id: kubernetes
|
||||
title: "Kubernetes"
|
||||
title: 'Kubernetes'
|
||||
---
|
||||
|
||||
You can find instructions to deploy Verdaccio on a Kubernetes cluster on the
|
||||
You can find instructions to deploy Verdaccio on a Kubernetes cluster on the
|
||||
[verdaccio/docker-example](https://github.com/verdaccio/verdaccio/tree/5.x/docker-examples/kubernetes-example)
|
||||
repository. However, the recommended method to install Verdaccio on a Kubernetes
|
||||
cluster is to use [Helm](https://helm.sh). Helm is a
|
||||
@ -61,10 +61,9 @@ helm uninstall npm
|
||||
**Note:** this command delete all the resources, including packages that you may
|
||||
have previously published to the registry.
|
||||
|
||||
|
||||
### Custom Verdaccio configuration {#custom-verdaccio-configuration}
|
||||
|
||||
You can customize the Verdaccio configuration using a Kubernetes *configMap*.
|
||||
You can customize the Verdaccio configuration using a Kubernetes _configMap_.
|
||||
|
||||
#### Prepare {#prepare}
|
||||
|
||||
@ -109,6 +108,7 @@ This allows you to inject sensitive values to the container via a [Kubernetes Se
|
||||
|
||||
1. Update your Verdaccio config according to the [Uplinks](./uplinks.md#auth-property) documentation
|
||||
2. Pass the secret environment variable to your values file or via `--set secretEnvVars.FOO_TOKEN=superSecretBarToken`
|
||||
|
||||
```yaml
|
||||
# values.yaml
|
||||
secretEnvVars:
|
||||
@ -119,6 +119,7 @@ secretEnvVars:
|
||||
|
||||
The standard k8s NGINX ingress proxy allows for 1MB for body-size which can be increased
|
||||
by modifying the default deployment options according to the [documentation](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#custom-max-body-size):
|
||||
|
||||
```yaml
|
||||
...
|
||||
|
||||
@ -126,7 +127,7 @@ annotations:
|
||||
...
|
||||
|
||||
kubernetes.io/proxy-body-size: 20m
|
||||
....
|
||||
....
|
||||
...
|
||||
|
||||
```
|
||||
@ -135,4 +136,4 @@ annotations:
|
||||
|
||||
[Rancher](http://rancher.com/) is a complete container management platform that makes managing and using containers in production really easy.
|
||||
|
||||
* [verdaccio-rancher](https://github.com/lgaticaq/verdaccio-rancher)
|
||||
- [verdaccio-rancher](https://github.com/lgaticaq/verdaccio-rancher)
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: linking-remote-registry
|
||||
title: "Linking a Remote Registry"
|
||||
title: 'Linking a Remote Registry'
|
||||
---
|
||||
|
||||
Verdaccio is a proxy and by default [links](uplinks.md) the public registry.
|
||||
@ -25,10 +25,10 @@ registry=https://registry.npmjs.org
|
||||
|
||||
This approach is valid, but comes with several disadvantages:
|
||||
|
||||
* It **only works with scopes**
|
||||
* Scope must match, **no Regular Expressions are allowed**
|
||||
* One scope **cannot fetch from multiple registries**
|
||||
* Tokens/passwords **must be defined within** `.npmrc` and checked in into the repo.
|
||||
- It **only works with scopes**
|
||||
- Scope must match, **no Regular Expressions are allowed**
|
||||
- One scope **cannot fetch from multiple registries**
|
||||
- Tokens/passwords **must be defined within** `.npmrc` and checked in into the repo.
|
||||
|
||||
See a full example [here](https://stackoverflow.com/questions/54543979/npmrc-multiple-registries-for-the-same-scope/54550940#54550940).
|
||||
|
||||
@ -78,7 +78,6 @@ Having a full Offline Registry is completely possible. If you don't want any con
|
||||
can do the following.
|
||||
|
||||
```yaml
|
||||
|
||||
auth:
|
||||
htpasswd:
|
||||
file: ./htpasswd
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: logger
|
||||
title: "Logger"
|
||||
title: 'Logger'
|
||||
---
|
||||
|
||||
As with any web application, Verdaccio has a customisable built-in logger. You can define multiple types of outputs.
|
||||
@ -24,10 +24,10 @@ Note: Rotating log stream is not supported in cluster mode. [See here](https://g
|
||||
|
||||
### Configuration {#configuration}
|
||||
|
||||
| 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 |
|
||||
| format | string | No | [pretty, pretty-timestamped] | all | output format |
|
||||
| level | string | No | [fatal, error, warn, http, info, debug, trace] | all | verbose level |
|
||||
| colors | boolean | No | false | v5.7.0 | disable or enable colors |
|
||||
| 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 |
|
||||
| format | string | No | [pretty, pretty-timestamped] | all | output format |
|
||||
| level | string | No | [fatal, error, warn, http, info, debug, trace] | all | verbose level |
|
||||
| colors | boolean | No | false | v5.7.0 | disable or enable colors |
|
||||
|
@ -1,20 +1,20 @@
|
||||
---
|
||||
id: logo
|
||||
title: "Logotype"
|
||||
title: 'Logotype'
|
||||
---
|
||||
|
||||
The logotype was designed by __[Breno Rodrigues](https://github.com/rodriguesbreno)__ which
|
||||
The logotype was designed by **[Breno Rodrigues](https://github.com/rodriguesbreno)** which
|
||||
won the [contest](https://github.com/verdaccio/verdaccio/issues/237)
|
||||
([last stage](https://github.com/verdaccio/verdaccio/issues/328)) and donated his work to this project.
|
||||
|
||||
> All logos are licensed under [Creative Commons](https://github.com/verdaccio/verdaccio/blob/master/LICENSE-docs).
|
||||
|
||||
Special thanks to *[@Lisapressmar](https://github.com/Lisapressmar)* for her contribution
|
||||
Special thanks to _[@Lisapressmar](https://github.com/Lisapressmar)_ for her contribution
|
||||
with multiple image formats and sizes.
|
||||
|
||||
## Symbols {#symbols}
|
||||
|
||||
__With text__
|
||||
**With text**
|
||||
|
||||
![symbol tiny with text](/img/logo/symbol/png/logo-small-header-bottom.png)
|
||||
|
||||
@ -22,11 +22,11 @@ __With text__
|
||||
|
||||
![symbol big with text](/img/logo/symbol/png/logo-small-header-bottom@3x.png)
|
||||
|
||||
__SVG__
|
||||
**SVG**
|
||||
|
||||
![symbol svg](/img/logo/symbol/svg/logo-small-header-bottom.svg)
|
||||
|
||||
__No text__
|
||||
**No text**
|
||||
|
||||
![symbol tiny](/img/logo/symbol/png/verdaccio-tiny.png)
|
||||
|
||||
@ -34,12 +34,10 @@ __No text__
|
||||
|
||||
![symbol big](/img/logo/symbol/png/verdaccio-tiny@3x.png)
|
||||
|
||||
__SVG__
|
||||
**SVG**
|
||||
|
||||
![svg format symbol no text](/img/logo/symbol/svg/verdaccio-tiny.svg)
|
||||
|
||||
|
||||
|
||||
### Black&White {#blackwhite}
|
||||
|
||||
![symbol bw small](/img/logo/symbol/png/verdaccio-blackwhite.png)
|
||||
@ -48,11 +46,10 @@ __SVG__
|
||||
|
||||
![symbol bw big](/img/logo/symbol/png/verdaccio-blackwhite@3x.png)
|
||||
|
||||
__SVG__
|
||||
**SVG**
|
||||
|
||||
![symbol bw svg](/img/logo/symbol/svg/verdaccio-blackwhite.svg)
|
||||
|
||||
|
||||
## Banner {#banner}
|
||||
|
||||
![banner small](/img/logo/banner/png/verdaccio-banner.png)
|
||||
@ -60,5 +57,3 @@ __SVG__
|
||||
![banner medium](/img/logo/banner/png/verdaccio-banner@2x.png)
|
||||
|
||||
![banner big](/img/logo/banner/png/verdaccio-banner@3x.png)
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: node-api
|
||||
title: "Node API"
|
||||
title: 'Node API'
|
||||
---
|
||||
|
||||
Verdaccio can be invoked programmatically. The Node API was introduced after version `verdaccio@3.0.0`.
|
||||
@ -62,11 +62,12 @@ startServer(
|
||||
|
||||
## Other implementations {#other-implementations}
|
||||
|
||||
* [verdaccio-server](https://github.com/boringame/verdaccio-server) local npm registry proxy server
|
||||
- [verdaccio-server](https://github.com/boringame/verdaccio-server) local npm registry proxy server
|
||||
|
||||
```js
|
||||
// js
|
||||
import * as verdaccioServer from "verdaccio-server";
|
||||
import * as verdaccioServer from 'verdaccio-server';
|
||||
|
||||
verdaccioServer.start();
|
||||
verdaccioServer.stop();
|
||||
verdaccioServer.list();
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: notifications
|
||||
title: "Notifications"
|
||||
title: 'Notifications'
|
||||
---
|
||||
|
||||
Notify was built primarily to use with Slack's Incoming
|
||||
@ -19,7 +19,7 @@ An example with a **HipChat**, **Stride** and **Google Hangouts Chat** hook:
|
||||
```yaml
|
||||
notify:
|
||||
method: POST
|
||||
headers: [{'Content-Type': 'application/json'}]
|
||||
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"}'
|
||||
```
|
||||
@ -30,19 +30,19 @@ notify:
|
||||
notify:
|
||||
'example-google-chat':
|
||||
method: POST
|
||||
headers: [{'Content-Type': 'application/json'}]
|
||||
headers: [{ 'Content-Type': 'application/json' }]
|
||||
endpoint: https://chat.googleapis.com/v1/spaces/AAAAB_TcJYs/messages?key=myKey&token=myToken
|
||||
content: '{"text":"New package published: `{{ name }}{{#each versions}} v{{version}}{{/each}}`"}'
|
||||
'example-hipchat':
|
||||
method: POST
|
||||
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"}'
|
||||
method: POST
|
||||
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"}'
|
||||
'example-stride':
|
||||
method: POST
|
||||
headers: [{'Content-Type': 'application/json'}, {'authorization': 'Bearer secretToken'}]
|
||||
endpoint: https://api.atlassian.com/site/{cloudId}/conversation/{conversationId}/message
|
||||
content: '{"body": {"version": 1,"type": "doc","content": [{"type": "paragraph","content": [{"type": "text","text": "New package published: * {{ name }}* Publisher name: * {{ publisher.name }}"}]}]}}'
|
||||
method: POST
|
||||
headers: [{ 'Content-Type': 'application/json' }, { 'authorization': 'Bearer secretToken' }]
|
||||
endpoint: https://api.atlassian.com/site/{cloudId}/conversation/{conversationId}/message
|
||||
content: '{"body": {"version": 1,"type": "doc","content": [{"type": "paragraph","content": [{"type": "text","text": "New package published: * {{ name }}* Publisher name: * {{ publisher.name }}"}]}]}}'
|
||||
```
|
||||
|
||||
## Template {#template}
|
||||
@ -63,9 +63,9 @@ We use [Handlebars](https://handlebarsjs.com/) as main template engine.
|
||||
|
||||
List of properties accesible via template
|
||||
|
||||
* Metadata
|
||||
* Publisher (who is publishing)
|
||||
* Package Published (package@1.0.0)
|
||||
- Metadata
|
||||
- Publisher (who is publishing)
|
||||
- Package Published (package@1.0.0)
|
||||
|
||||
### Metadata {#metadata}
|
||||
|
||||
@ -121,7 +121,6 @@ Package metadata that the template has access
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Publisher {#publisher}
|
||||
|
||||
You can get access to the package publisher information in the `content` of a webhook using the `publisher` object.
|
||||
@ -158,11 +157,11 @@ You can access to the package is being published with the keyword `{{publishedPa
|
||||
|
||||
## Configuration {#configuration}
|
||||
|
||||
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 | all | | 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](https://handlebarsjs.com/) expressions
|
||||
| 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 | all | | 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](https://handlebarsjs.com/) expressions |
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: packages
|
||||
title: "Package Access"
|
||||
title: 'Package Access'
|
||||
---
|
||||
|
||||
This is a series of constraints that allow or restrict access to the local storage based on specific criteria.
|
||||
@ -44,14 +44,14 @@ packages:
|
||||
The list internal groups handled by `verdaccio` are:
|
||||
|
||||
```js
|
||||
'$all', '$anonymous', '@all', '@anonymous', 'all', 'undefined', 'anonymous'
|
||||
'$all', '$anonymous', '@all', '@anonymous', 'all', 'undefined', 'anonymous';
|
||||
```
|
||||
|
||||
All users receive 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. For instance, if you are logged as `npmUser` the list of groups will be.
|
||||
|
||||
```js
|
||||
// groups without '$' are going to be deprecated eventually
|
||||
'$all', '$anonymous', '@all', '@anonymous', 'all', 'undefined', 'anonymous', 'npmUser'
|
||||
'$all', '$anonymous', '@all', '@anonymous', 'all', 'undefined', 'anonymous', 'npmUser';
|
||||
```
|
||||
|
||||
If you want to protect specific set packages under your group, you need to do something like this. Let's use a `Regex` that covers all prefixed `npmuser-` packages. We recommend using a prefix for your packages, in that way it will be easier to protect them.
|
||||
@ -88,14 +88,14 @@ $ npm config set always-auth=true
|
||||
Defining multiple access groups is fairly easy, just define them with a white space between them.
|
||||
|
||||
```yaml
|
||||
'company-*':
|
||||
access: admin internal
|
||||
publish: admin
|
||||
proxy: server1
|
||||
'supersecret-*':
|
||||
access: secret super-secret-area ultra-secret-area
|
||||
publish: secret ultra-secret-area
|
||||
proxy: server1
|
||||
'company-*':
|
||||
access: admin internal
|
||||
publish: admin
|
||||
proxy: server1
|
||||
'supersecret-*':
|
||||
access: secret super-secret-area ultra-secret-area
|
||||
publish: secret ultra-secret-area
|
||||
proxy: server1
|
||||
```
|
||||
|
||||
#### Blocking access to set of packages {#blocking-access-to-set-of-packages}
|
||||
@ -112,7 +112,7 @@ packages:
|
||||
|
||||
#### Blocking proxying a set of specific packages {#blocking-proxying-a-set-of-specific-packages}
|
||||
|
||||
You might want to block one or several packages from fetching from remote repositories., but, at the same time, allow others to access different *uplinks*.
|
||||
You might want to block one or several packages from fetching from remote repositories., but, at the same time, allow others to access different _uplinks_.
|
||||
|
||||
Let's see the following example:
|
||||
|
||||
@ -135,10 +135,10 @@ packages:
|
||||
|
||||
Let's describe what we want with the above example:
|
||||
|
||||
* I want to host my own `jquery` dependency but I need to avoid proxying it.
|
||||
* I want all dependencies that match with `my-company-*` but I need to avoid proxying them.
|
||||
* I want all dependencies that are in the `my-local-scope` scope but I need to avoid proxying them.
|
||||
* I want proxying for all the rest of the dependencies.
|
||||
- I want to host my own `jquery` dependency but I need to avoid proxying it.
|
||||
- I want all dependencies that match with `my-company-*` but I need to avoid proxying them.
|
||||
- I want all dependencies that are in the `my-local-scope` scope but I need to avoid proxying them.
|
||||
- I want proxying for all the rest of the dependencies.
|
||||
|
||||
Be **aware that the order of your packages definitions is important and always use double wilcard**. Because if you do not include it `verdaccio` will include it for you and the way that your dependencies are resolved will be affected.
|
||||
|
||||
@ -155,7 +155,7 @@ You may assign multiple uplinks for use as a proxy to use in the case of failove
|
||||
|
||||
#### Unpublishing Packages {#unpublishing-packages}
|
||||
|
||||
The property `publish` handle permissions for `npm publish` and `npm unpublish`. But, if you want to be more specific, you can use the property
|
||||
The property `publish` handle permissions for `npm publish` and `npm unpublish`. But, if you want to be more specific, you can use the property
|
||||
`unpublish` in your package access section, for instance:
|
||||
|
||||
```yaml
|
||||
@ -180,21 +180,20 @@ packages:
|
||||
|
||||
In the previous example, the behaviour would be described:
|
||||
|
||||
* all users can publish the `jquery` package, but only the user `root` would be able to unpublish any version.
|
||||
* only authenticated users can publish `my-company-*` packages, but **nobody would be allowed to unpublish them**.
|
||||
* If `unpublish` is commented out, the access will be granted or denied by the `publish` definition.
|
||||
|
||||
- all users can publish the `jquery` package, but only the user `root` would be able to unpublish any version.
|
||||
- only authenticated users can publish `my-company-*` packages, but **nobody would be allowed to unpublish them**.
|
||||
- If `unpublish` is commented out, the access will be granted or denied by the `publish` definition.
|
||||
|
||||
### Configuration {#configuration}
|
||||
|
||||
You can define mutiple `packages` and each of them must have an unique `Regex`. The syntax is based on [minimatch glob expressions](https://github.com/isaacs/minimatch).
|
||||
|
||||
Property | Type | Required | Example | Support | Description
|
||||
--- | --- | --- | --- | --- | ---
|
||||
access | string | No | $all | all | define groups allowed to access the package
|
||||
publish | string | No | $authenticated | all | define groups allowed to publish
|
||||
proxy | string | No | npmjs | all | limit look ups for specific uplink
|
||||
storage | string | No | string | `/some-folder` | it creates a subfolder whithin the storage folder for each package access
|
||||
| Property | Type | Required | Example | Support | Description |
|
||||
| -------- | ------ | -------- | -------------- | -------------- | ------------------------------------------------------------------------- |
|
||||
| access | string | No | $all | all | define groups allowed to access the package |
|
||||
| publish | string | No | $authenticated | all | define groups allowed to publish |
|
||||
| proxy | string | No | npmjs | all | limit look ups for specific uplink |
|
||||
| storage | string | No | string | `/some-folder` | it creates a subfolder whithin the storage folder for each package access |
|
||||
|
||||
> We higlight that we recommend to not use **allow_access**/**allow_publish** and **proxy_access** anymore, those are deprecated and will soon be removed, please use the short version of each of those (**access**/**publish**/**proxy**).
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: plugin-auth
|
||||
title: "Authentication Plugin"
|
||||
title: 'Authentication Plugin'
|
||||
---
|
||||
|
||||
## What's an Authentication Plugin? {#whats-an-authentication-plugin}
|
||||
@ -8,7 +8,7 @@ title: "Authentication Plugin"
|
||||
Is a sort plugin that allows to handle who access or publish to a specific package. By default the `htpasswd` is built-in, but can
|
||||
easily be replaced by your own.
|
||||
|
||||
## Getting Started
|
||||
## Getting Started
|
||||
|
||||
The authentication plugins are defined in the `auth:` section, as follows:
|
||||
|
||||
@ -43,17 +43,22 @@ On each request, `authenticate` will be triggered and the plugin should return t
|
||||
### API {#api}
|
||||
|
||||
```typescript
|
||||
interface IPluginAuth<T> extends IPlugin<T> {
|
||||
authenticate(user: string, password: string, cb: AuthCallback): void;
|
||||
adduser?(user: string, password: string, cb: AuthCallback): void;
|
||||
changePassword?(user: string, password: string, newPassword: string, cb: AuthCallback): void;
|
||||
allow_publish?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: AuthAccessCallback): void;
|
||||
allow_access?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: AuthAccessCallback): void;
|
||||
allow_unpublish?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: AuthAccessCallback): void;
|
||||
apiJWTmiddleware?(helpers: any): Function;
|
||||
}
|
||||
interface IPluginAuth<T> extends IPlugin<T> {
|
||||
authenticate(user: string, password: string, cb: AuthCallback): void;
|
||||
adduser?(user: string, password: string, cb: AuthCallback): void;
|
||||
changePassword?(user: string, password: string, newPassword: string, cb: AuthCallback): void;
|
||||
allow_publish?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: AuthAccessCallback): void;
|
||||
allow_access?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: AuthAccessCallback): void;
|
||||
allow_unpublish?(
|
||||
user: RemoteUser,
|
||||
pkg: AllowAccess & PackageAccess,
|
||||
cb: AuthAccessCallback
|
||||
): void;
|
||||
apiJWTmiddleware?(helpers: any): Function;
|
||||
}
|
||||
```
|
||||
> Only `adduser`, `allow_access`, `apiJWTmiddleware`, `allow_publish` and `allow_unpublish` are optional, verdaccio provide a fallback in all those cases.
|
||||
|
||||
> Only `adduser`, `allow_access`, `apiJWTmiddleware`, `allow_publish` and `allow_unpublish` are optional, verdaccio provide a fallback in all those cases.
|
||||
|
||||
#### `apiJWTmiddleware` method {#apijwtmiddleware-method}
|
||||
|
||||
@ -61,12 +66,10 @@ Since `v4.0.0`
|
||||
|
||||
`apiJWTmiddleware` was introduced on [PR#1227](https://github.com/verdaccio/verdaccio/pull/1227) in order to have full control of the token handler, overriding this method will disable `login/adduser` support. We recommend don't implement this method unless is totally necessary. See a full example [here](https://github.com/verdaccio/verdaccio/pull/1227#issuecomment-463235068).
|
||||
|
||||
|
||||
## What should I return in each of the methods? {#what-should-i-return-in-each-of-the-methods}
|
||||
|
||||
Verdaccio relies on `callback` functions at time of this writing. Each method should call the method and what you return is important, let's review how to do it.
|
||||
|
||||
|
||||
### `authentication` callback {#authentication-callback}
|
||||
|
||||
Once the authentication has been executed there is 2 options to give a response to `verdaccio`.
|
||||
@ -76,14 +79,13 @@ Once the authentication has been executed there is 2 options to give a response
|
||||
If the auth was unsuccessful, return `false` as the second argument.
|
||||
|
||||
```typescript
|
||||
callback(null, false)
|
||||
callback(null, false);
|
||||
```
|
||||
|
||||
##### If the authentication success {#if-the-authentication-success}
|
||||
|
||||
The auth was successful.
|
||||
|
||||
|
||||
`groups` is an array of strings where the user is part of.
|
||||
|
||||
```
|
||||
@ -102,7 +104,6 @@ The authentication service might fails, and you might want to reflect that in th
|
||||
|
||||
> A failure on login is not the same as service error, if you want to notify user the credentials are wrong, just return `false` instead string of groups. The behaviour mostly depends of you.
|
||||
|
||||
|
||||
### `adduser` callback {#adduser-callback}
|
||||
|
||||
##### If adduser success {#if-adduser-success}
|
||||
@ -110,7 +111,7 @@ The authentication service might fails, and you might want to reflect that in th
|
||||
If the service is able to create an user, return `true` as the second argument.
|
||||
|
||||
```typescript
|
||||
callback(null, true)
|
||||
callback(null, true);
|
||||
```
|
||||
|
||||
##### If adduser fails {#if-adduser-fails}
|
||||
@ -134,7 +135,7 @@ If the service is able to create an user, return `true` as the second argument.
|
||||
```typescript
|
||||
const user = serviceUpdatePassword(user, password, newPassword);
|
||||
|
||||
callback(null, user)
|
||||
callback(null, user);
|
||||
```
|
||||
|
||||
##### If the request fails {#if-the-request-fails}
|
||||
@ -144,7 +145,7 @@ Any other action different than success must return an error.
|
||||
```typescript
|
||||
import { getNotFound } from '@verdaccio/commons-api';
|
||||
|
||||
const err = getNotFound('user not found');
|
||||
const err = getNotFound('user not found');
|
||||
|
||||
callback(err);
|
||||
```
|
||||
@ -173,7 +174,7 @@ Any other action different than success must return an error.
|
||||
```typescript
|
||||
import { getNotFound } from '@verdaccio/commons-api';
|
||||
|
||||
const err = getForbidden('not allowed to access package');
|
||||
const err = getForbidden('not allowed to access package');
|
||||
|
||||
callback(err);
|
||||
```
|
||||
@ -285,19 +286,19 @@ Where `htpasswd` is the sufix of the plugin name. eg: `verdaccio-htpasswd` and t
|
||||
|
||||
### List Community Authentication Plugins {#list-community-authentication-plugins}
|
||||
|
||||
* [verdaccio-bitbucket](https://github.com/idangozlan/verdaccio-bitbucket): Bitbucket authentication plugin for verdaccio.
|
||||
* [verdaccio-bitbucket-server](https://github.com/oeph/verdaccio-bitbucket-server): Bitbucket Server 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-gitlab-ci](https://github.com/lab360-ch/verdaccio-gitlab-ci): Enable GitLab CI to authenticate against verdaccio.
|
||||
* [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.
|
||||
* [verdaccio-github-oauth-ui](https://github.com/n4bb12/verdaccio-github-oauth-ui): GitHub OAuth plugin for the verdaccio login button.
|
||||
* [verdaccio-groupnames](https://github.com/deinstapel/verdaccio-groupnames): Plugin to handle dynamic group associations utilizing `$group` syntax. Works best with the ldap plugin.
|
||||
* [verdaccio-sqlite](https://github.com/bchanudet/verdaccio-sqlite): SQLite Authentication plugin for Verdaccio
|
||||
* [verdaccio-okta-auth](https://github.com/hogarthww-labs/verdaccio-okta-auth) Verdaccio Okta Auth
|
||||
* [verdaccio-azure-ad-login](https://github.com/IhToN/verdaccio-azure-ad-login) Let your users authenticate into Verdaccio via Azure AD OAuth 2.0 API
|
||||
* [verdaccio-auth-gitlab](https://github.com/pfdgithub/verdaccio-auth-gitlab) Verdaccio authentication plugin by gitlab personal access tokens.
|
||||
- [verdaccio-bitbucket](https://github.com/idangozlan/verdaccio-bitbucket): Bitbucket authentication plugin for verdaccio.
|
||||
- [verdaccio-bitbucket-server](https://github.com/oeph/verdaccio-bitbucket-server): Bitbucket Server 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-gitlab-ci](https://github.com/lab360-ch/verdaccio-gitlab-ci): Enable GitLab CI to authenticate against verdaccio.
|
||||
- [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.
|
||||
- [verdaccio-github-oauth-ui](https://github.com/n4bb12/verdaccio-github-oauth-ui): GitHub OAuth plugin for the verdaccio login button.
|
||||
- [verdaccio-groupnames](https://github.com/deinstapel/verdaccio-groupnames): Plugin to handle dynamic group associations utilizing `$group` syntax. Works best with the ldap plugin.
|
||||
- [verdaccio-sqlite](https://github.com/bchanudet/verdaccio-sqlite): SQLite Authentication plugin for Verdaccio
|
||||
- [verdaccio-okta-auth](https://github.com/hogarthww-labs/verdaccio-okta-auth) Verdaccio Okta Auth
|
||||
- [verdaccio-azure-ad-login](https://github.com/IhToN/verdaccio-azure-ad-login) Let your users authenticate into Verdaccio via Azure AD OAuth 2.0 API
|
||||
- [verdaccio-auth-gitlab](https://github.com/pfdgithub/verdaccio-auth-gitlab) Verdaccio authentication plugin by gitlab personal access tokens.
|
||||
|
||||
**Have you developed a new plugin? Add it here !**
|
||||
|
@ -1,13 +1,13 @@
|
||||
---
|
||||
id: plugin-generator
|
||||
title: "Plugin Generator"
|
||||
title: 'Plugin Generator'
|
||||
---
|
||||
|
||||
## Installing the Yeoman Generator {#installing-the-yeoman-generator}
|
||||
|
||||
Verdaccio is a pluggable application, with the objective to help developers to generate new plugins, we have a custom generator based in **[Yeoman](https://yeoman.io/)** for generate all sort of plugins.
|
||||
|
||||
To install the generator, as first step you must install the *yeoman* command `yo`.
|
||||
To install the generator, as first step you must install the _yeoman_ command `yo`.
|
||||
|
||||
```bash
|
||||
npm install -g yo
|
||||
@ -62,13 +62,13 @@ Setting the project root at: /Users/user/verdaccio_yo_generator
|
||||
```
|
||||
|
||||
- Don't hesitate to include meaningful keywords, as `verdaccio`, `plugin` or your plugin type. Good keywords will help us to find you and future improvement in our collect information about all plugins.
|
||||
|
||||
```
|
||||
? Key your keywords (comma to split) verdaccio,plugin,storage,minio,verdaccio-plugin
|
||||
```
|
||||
|
||||
- Keep your generator **updated**, don't miss any bug-fixes and performance improvements.
|
||||
|
||||
|
||||
### Contributing {#contributing}
|
||||
|
||||
Help us to improve the generator, you can contribute in the following repository.
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: plugin-middleware
|
||||
title: "Middleware Plugin"
|
||||
title: 'Middleware Plugin'
|
||||
---
|
||||
|
||||
## What's an Middleware Plugin? {#whats-an-middleware-plugin}
|
||||
@ -40,7 +40,6 @@ public register_middlewares(
|
||||
|
||||
The `auth` and `storage` are instances and can be extended, but we don't recommend this approach unless is well founded.
|
||||
|
||||
|
||||
> A good example of a middleware plugin is the [verdaccio-audit](https://github.com/verdaccio/monorepo/tree/master/plugins/audit).
|
||||
|
||||
## Generate an middleware plugin {#generate-an-middleware-plugin}
|
||||
@ -109,12 +108,12 @@ The middleware are registrered after built-in endpoints, thus, it is not possibl
|
||||
|
||||
### List Community Middleware Plugins {#list-community-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): verdaccio plugin for _npm audit_ cli support (built-in) (compatible since 3.x)
|
||||
|
||||
* [verdaccio-profile-api](https://github.com/ahoracek/verdaccio-profile-api): verdaccio 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): verdaccio plugin for _npm profile_ cli support and _npm profile set password_ for _verdaccio-htpasswd_ based authentificaton
|
||||
|
||||
* [verdaccio-https](https://github.com/honzahommer/verdaccio-https) Verdaccio middleware plugin to redirect to https if x-forwarded-proto header is set
|
||||
* [verdaccio-badges](https://github.com/tavvy/verdaccio-badges) A verdaccio plugin to provide a version badge generator endpoint
|
||||
* [verdaccio-openmetrics](https://github.com/freight-hub/verdaccio-openmetrics) Verdaccio plugin exposing an OpenMetrics/Prometheus endpoint with health and traffic metrics
|
||||
* [verdaccio-sentry](https://github.com/juanpicado/verdaccio-sentry) sentry loggin errors
|
||||
* [verdaccio-pacman](https://github.com/PaddeK/verdaccio-pacman) Verdaccio Middleware Plugin to manage tags and versions of packages
|
||||
- [verdaccio-https](https://github.com/honzahommer/verdaccio-https) Verdaccio middleware plugin to redirect to https if x-forwarded-proto header is set
|
||||
- [verdaccio-badges](https://github.com/tavvy/verdaccio-badges) A verdaccio plugin to provide a version badge generator endpoint
|
||||
- [verdaccio-openmetrics](https://github.com/freight-hub/verdaccio-openmetrics) Verdaccio plugin exposing an OpenMetrics/Prometheus endpoint with health and traffic metrics
|
||||
- [verdaccio-sentry](https://github.com/juanpicado/verdaccio-sentry) sentry loggin errors
|
||||
- [verdaccio-pacman](https://github.com/PaddeK/verdaccio-pacman) Verdaccio Middleware Plugin to manage tags and versions of packages
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: plugin-storage
|
||||
title: "Storage Plugin"
|
||||
title: 'Storage Plugin'
|
||||
---
|
||||
|
||||
## What's an Storage Plugin? {#whats-an-storage-plugin}
|
||||
@ -11,22 +11,27 @@ Verdaccio by default uses a file system storage plugin [local-storage](https://g
|
||||
|
||||
Storage plugins are composed of two objects, the `IPluginStorage<T>` and the `IPackageStorage`.
|
||||
|
||||
* The `IPluginStorage` object handle the local database for private packages.
|
||||
- The `IPluginStorage` object handle the local database for private packages.
|
||||
|
||||
```typescript
|
||||
interface IPluginStorage<T> extends IPlugin<T>, ITokenActions {
|
||||
logger: Logger;
|
||||
config: T & Config;
|
||||
add(name: string, callback: Callback): void;
|
||||
remove(name: string, callback: Callback): void;
|
||||
get(callback: Callback): void;
|
||||
getSecret(): Promise<string>;
|
||||
setSecret(secret: string): Promise<any>;
|
||||
getPackageStorage(packageInfo: string): IPackageStorage;
|
||||
search(onPackage: onSearchPackage, onEnd: onEndSearchPackage, validateName: onValidatePackage): void;
|
||||
}
|
||||
interface IPluginStorage<T> extends IPlugin<T>, ITokenActions {
|
||||
logger: Logger;
|
||||
config: T & Config;
|
||||
add(name: string, callback: Callback): void;
|
||||
remove(name: string, callback: Callback): void;
|
||||
get(callback: Callback): void;
|
||||
getSecret(): Promise<string>;
|
||||
setSecret(secret: string): Promise<any>;
|
||||
getPackageStorage(packageInfo: string): IPackageStorage;
|
||||
search(
|
||||
onPackage: onSearchPackage,
|
||||
onEnd: onEndSearchPackage,
|
||||
validateName: onValidatePackage
|
||||
): void;
|
||||
}
|
||||
```
|
||||
* The `IPackageStorage` is an object that is created by each request that handles the I/O actions for the metadata and tarballs.
|
||||
|
||||
- The `IPackageStorage` is an object that is created by each request that handles the I/O actions for the metadata and tarballs.
|
||||
|
||||
```typescript
|
||||
interface IPackageStorage {
|
||||
@ -103,9 +108,9 @@ I'm all done. Running npm install for you to install the required dependencies.
|
||||
|
||||
The following list of plugins are implementing the Storage API and might be used them as example.
|
||||
|
||||
* [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-aws-s3-storage](https://github.com/verdaccio/monorepo/tree/master/plugins/aws-s3-storage) Storage plugin to host packages **Amazon S3** (maintained by Verdaccio core team)
|
||||
* [verdaccio-google-cloud](https://github.com/verdaccio/verdaccio-google-cloud) Storage plugin to host packages **Google Cloud Storage**
|
||||
* [verdaccio-minio](https://github.com/barolab/verdaccio-minio) A verdaccio plugin for storing data in Minio
|
||||
* [verdaccio-offline-storage](https://github.com/g3ngar/verdaccio-offline-storage) local-storage plugin BUT with locally available packages as first class citizens.
|
||||
- [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-aws-s3-storage](https://github.com/verdaccio/monorepo/tree/master/plugins/aws-s3-storage) Storage plugin to host packages **Amazon S3** (maintained by Verdaccio core team)
|
||||
- [verdaccio-google-cloud](https://github.com/verdaccio/verdaccio-google-cloud) Storage plugin to host packages **Google Cloud Storage**
|
||||
- [verdaccio-minio](https://github.com/barolab/verdaccio-minio) A verdaccio plugin for storing data in Minio
|
||||
- [verdaccio-offline-storage](https://github.com/g3ngar/verdaccio-offline-storage) local-storage plugin BUT with locally available packages as first class citizens.
|
||||
|
@ -1,16 +1,16 @@
|
||||
---
|
||||
id: plugins
|
||||
title: "Plugins"
|
||||
title: 'Plugins'
|
||||
---
|
||||
|
||||
Verdaccio is a pluggable application. It can be extended in many ways, either new authentication methods, adding endpoints or using a custom storage.
|
||||
|
||||
There are 5 types of plugins:
|
||||
|
||||
* [Authentication](plugin-auth.md)
|
||||
* [Middleware](plugin-middleware.md)
|
||||
* [Storage](plugin-storage.md)
|
||||
* Custom Theme and filters
|
||||
- [Authentication](plugin-auth.md)
|
||||
- [Middleware](plugin-middleware.md)
|
||||
- [Storage](plugin-storage.md)
|
||||
- Custom Theme and filters
|
||||
|
||||
> If you are interested to develop your own plugin, read the [development](dev-plugins.md) section.
|
||||
|
||||
@ -34,7 +34,7 @@ Open the `config.yaml` file and update the `auth` section as follows:
|
||||
|
||||
The default configuration looks like this, due we use a build-in `htpasswd` plugin by default that you can disable just commenting out the following lines.
|
||||
|
||||
### Naming convention {#naming-convention}
|
||||
### Naming convention {#naming-convention}
|
||||
|
||||
Since version `2.0.0` until version plugins must start with the following convention:
|
||||
|
||||
@ -51,12 +51,13 @@ auth:
|
||||
store:
|
||||
'@my-org/store-awesome-plugin':
|
||||
foo: some value
|
||||
bar: another value
|
||||
bar: another value
|
||||
middleware:
|
||||
'@my-org/middleware-awesome-plugin':
|
||||
foo: some value
|
||||
bar: another value
|
||||
bar: another value
|
||||
```
|
||||
|
||||
### Authentication Configuration {#authentication-configuration}
|
||||
|
||||
```yaml
|
||||
@ -71,7 +72,7 @@ and replacing them with (in case you decide to use a `ldap` plugin.
|
||||
```yaml
|
||||
auth:
|
||||
activedirectory:
|
||||
url: "ldap://10.0.100.1"
|
||||
url: 'ldap://10.0.100.1'
|
||||
baseDN: 'dc=sample,dc=local'
|
||||
domainSuffix: 'sample.local'
|
||||
```
|
||||
@ -86,7 +87,7 @@ auth:
|
||||
file: ./htpasswd
|
||||
#max_users: 1000
|
||||
activedirectory:
|
||||
url: "ldap://10.0.100.1"
|
||||
url: 'ldap://10.0.100.1'
|
||||
baseDN: 'dc=sample,dc=local'
|
||||
domainSuffix: 'sample.local'
|
||||
```
|
||||
@ -126,7 +127,6 @@ $> npm install --global verdaccio-theme-dark
|
||||
|
||||
> The plugin name prefix must start with `verdaccio-theme`, otherwise the plugin won't load.
|
||||
|
||||
|
||||
You can load only one theme at a time and pass through options if you need it.
|
||||
|
||||
```yaml
|
||||
@ -142,7 +142,7 @@ theme:
|
||||
|
||||
If you have a custom UI plugin for the them you will need to adapt your build to the new requirements.
|
||||
|
||||
The previous version you only need to return a function with a string and the path of the directory.
|
||||
The previous version you only need to return a function with a string and the path of the directory.
|
||||
|
||||
```
|
||||
const path = require('path');
|
||||
@ -177,6 +177,7 @@ The module must return an object and the `index.html` is ignored since support d
|
||||
},
|
||||
manifestFiles: { js: [ 'runtime.js', 'vendors.js', 'main.js' ] }
|
||||
```
|
||||
|
||||
- `staticPath`: is the same data returned in Verdaccio 4.
|
||||
- `manifest`: A webpack manifest object.
|
||||
- `manifestFiles`: A object with one property `js` and the array (order matters) of the manifest id to be loaded in the template dynamically.
|
||||
@ -206,24 +207,23 @@ const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
|
||||
|
||||
> If you are relying on any sinopia plugin, remember are deprecated and might no work in the future.
|
||||
|
||||
* [sinopia-npm](https://www.npmjs.com/package/sinopia-npm): auth plugin for sinopia supporting an npm registry.
|
||||
* [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-npm](https://www.npmjs.com/package/sinopia-npm): auth plugin for sinopia supporting an npm registry.
|
||||
- [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.
|
||||
|
||||
> 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*.
|
||||
|
||||
> modern verdaccio API and using the prefix as _verdaccio-xx-name_.
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: verdaccio-programmatically
|
||||
title: "Node.js API"
|
||||
title: 'Node.js API'
|
||||
---
|
||||
|
||||
Verdaccio is a binary command which is available in your enviroment when you install globally the package eg `npm i -g verdaccio`, but also can be dependency in your project and use it programmatically.
|
||||
@ -12,27 +12,23 @@ Using the binary is the faster way to use verdaccio programatically, you need to
|
||||
> If you are using ESM modules the `require` won't be available.
|
||||
|
||||
```typescript
|
||||
export function runRegistry(
|
||||
args: string[] = [],
|
||||
childOptions: {}
|
||||
): Promise<ChildProcess> {
|
||||
export function runRegistry(args: string[] = [], childOptions: {}): Promise<ChildProcess> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const childFork = fork(require.resolve('verdaccio/bin/verdaccio'), args, childOptions);
|
||||
childFork.on('message', (msg: {verdaccio_started: boolean}) => {
|
||||
if(msg.verdaccio_started){
|
||||
const childFork = fork(require.resolve('verdaccio/bin/verdaccio'), args, childOptions);
|
||||
childFork.on('message', (msg: { verdaccio_started: boolean }) => {
|
||||
if (msg.verdaccio_started) {
|
||||
resolve(childFork);
|
||||
}
|
||||
});
|
||||
childFork.on('error', (err: any) => reject([err]));
|
||||
childFork.on('disconnect', (err: any) => reject([err]));
|
||||
childFork.on('disconnect', (err: any) => reject([err]));
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
You can see the full example on this repository.
|
||||
|
||||
[https://github.com/juanpicado/verdaccio-fork](https://github.com/juanpicado/verdaccio-fork
|
||||
)
|
||||
[https://github.com/juanpicado/verdaccio-fork](https://github.com/juanpicado/verdaccio-fork)
|
||||
|
||||
### Using the module API
|
||||
|
||||
@ -59,13 +55,13 @@ There are three ways to use it:
|
||||
With an object you need to add `self_path`, manually (it's not nice but would be a breaking change changing it now) on v6 this is not longer need it.
|
||||
|
||||
```js
|
||||
const {runServer, parseConfigFile} = require('verdaccio');
|
||||
const configPath = join(__dirname, './config.yaml');
|
||||
const c = parseConfigFile(configPath);
|
||||
// workaround
|
||||
// on v5 the `self_path` still exists and will be removed in v6
|
||||
c.self_path = 'foo';
|
||||
runServer(c).then(() => {});
|
||||
const { runServer, parseConfigFile } = require('verdaccio');
|
||||
const configPath = join(__dirname, './config.yaml');
|
||||
const c = parseConfigFile(configPath);
|
||||
// workaround
|
||||
// on v5 the `self_path` still exists and will be removed in v6
|
||||
c.self_path = 'foo';
|
||||
runServer(c).then(() => {});
|
||||
```
|
||||
|
||||
Feature available minor than `v5.11.0`.
|
||||
@ -79,20 +75,20 @@ const verdaccio = require('verdaccio').default;
|
||||
const YAML = require('js-yaml');
|
||||
|
||||
const getConfig = () => {
|
||||
return YAML.safeLoad(fs.readFileSync(path.join(__dirname, 'config.yaml'), 'utf8'));
|
||||
}
|
||||
return YAML.safeLoad(fs.readFileSync(path.join(__dirname, 'config.yaml'), 'utf8'));
|
||||
};
|
||||
|
||||
const cache = path.join(__dirname, 'cache');
|
||||
const config = Object.assign({}, getConfig(), {
|
||||
self_path: cache
|
||||
self_path: cache,
|
||||
});
|
||||
|
||||
verdaccio(config, 6000, cache, '1.0.0', 'verdaccio', (webServer, addrs, pkgName, pkgVersion) => {
|
||||
try {
|
||||
webServer.unref();
|
||||
webServer.listen(addrs.port || addrs.path, addrs.host, () => {
|
||||
console.log('verdaccio running');
|
||||
});
|
||||
webServer.unref();
|
||||
webServer.listen(addrs.port || addrs.path, addrs.host, () => {
|
||||
console.log('verdaccio running');
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: protect-your-dependencies
|
||||
title: "Protecting packages"
|
||||
title: 'Protecting packages'
|
||||
---
|
||||
|
||||
Verdaccio allows you protect publishing to your registry. To achieve that you will need to set up correctly configure your [packages access](packages).
|
||||
@ -10,7 +10,7 @@ Verdaccio allows you protect publishing to your registry. To achieve that you wi
|
||||
Let's see for instance the following set up. You have a set of dependencies that are prefixed with `my-company-*` and you need to protect them from anonymous or other non-authorized logged-in users.
|
||||
|
||||
```yaml
|
||||
"my-company-*":
|
||||
'my-company-*':
|
||||
access: admin teamA teamB teamC
|
||||
publish: admin teamA
|
||||
```
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: puppet
|
||||
title: "Puppet"
|
||||
title: 'Puppet'
|
||||
---
|
||||
|
||||
Install verdaccio for Debian, Ubuntu, Fedora, and RedHat.
|
||||
@ -9,8 +9,8 @@ Install verdaccio for Debian, Ubuntu, Fedora, and RedHat.
|
||||
|
||||
There are two variants to install verdaccio using this Puppet module:
|
||||
|
||||
* Apply-mode (with puppet-apply and no puppetmaster setup needed)
|
||||
* Master-Agent-mode (with puppet-agent accessing your configuration through the puppetmaster).
|
||||
- Apply-mode (with puppet-apply and no puppetmaster setup needed)
|
||||
- Master-Agent-mode (with puppet-agent accessing your configuration through the puppetmaster).
|
||||
|
||||
In both variants you have to explicitly 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.
|
||||
@ -21,8 +21,4 @@ For further information:
|
||||
[https://github.com/verdaccio/puppet-verdaccio](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).
|
||||
|
||||
|
||||
|
||||
|
||||
> [refers to this ticket](https://github.com/verdaccio/puppet-verdaccio/issues/11).
|
||||
|
@ -6,4 +6,3 @@ 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 🤠.
|
||||
|
||||
To see the complete list of repositories, [click here](https://github.com/verdaccio/verdaccio/wiki/Repositories).
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
---
|
||||
id: reverse-proxy
|
||||
title: "Reverse Proxy Setup"
|
||||
title: 'Reverse Proxy Setup'
|
||||
---
|
||||
|
||||
Using a reverse proxy is a common practice. The following configurations are the
|
||||
most recommended and used ones.
|
||||
|
||||
|
||||
**Important**, the headers are considered to resolve the public are `X-Forwarded-Proto` for the protocol and `Host` for the domain, please include them in your configuration.
|
||||
|
||||
# Apache
|
||||
@ -15,16 +14,17 @@ Apache and `mod_proxy` should **not decode/encode slashes** and leave them as th
|
||||
|
||||
For installing at relative path, `/npm`, on the server
|
||||
|
||||
````
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
AllowEncodedSlashes NoDecode
|
||||
ProxyPass /npm http://127.0.0.1:4873 nocanon
|
||||
ProxyPassReverse /npm http://127.0.0.1:4873
|
||||
</VirtualHost>
|
||||
````
|
||||
```
|
||||
|
||||
For installing at root path, `/`, on the server
|
||||
````
|
||||
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
ServerName your.domain.com
|
||||
ServerAdmin hello@your.domain.com
|
||||
@ -33,13 +33,13 @@ For installing at root path, `/`, on the server
|
||||
ProxyPass / http://127.0.0.1:4873/ nocanon
|
||||
ProxyPassReverse / http://127.0.0.1:4873/
|
||||
</VirtualHost>
|
||||
````
|
||||
```
|
||||
|
||||
### Configuration with SSL {#configuration-with-ssl}
|
||||
|
||||
Apache virtual server configuration.
|
||||
|
||||
````apache
|
||||
```apache
|
||||
<IfModule mod_ssl.c>
|
||||
<VirtualHost *:443>
|
||||
ServerName npm.your.domain.com
|
||||
@ -55,42 +55,41 @@ Apache virtual server configuration.
|
||||
RequestHeader set X-Forwarded-Proto "https"
|
||||
</VirtualHost>
|
||||
</IfModule>
|
||||
````
|
||||
```
|
||||
|
||||
## Invalid checksum
|
||||
|
||||
Sometimes the gzip compression can mess with the request when running `npm install` and result in error messages like this:
|
||||
|
||||
````
|
||||
```
|
||||
npm WARN tar TAR_ENTRY_INVALID checksum failure
|
||||
npm WARN tar zlib: incorrect data check
|
||||
````
|
||||
```
|
||||
|
||||
A possible fix for this, can be by disabling gzip compression for the virtual host, by adding this to your config:
|
||||
|
||||
````
|
||||
```
|
||||
SetEnv no-gzip 1
|
||||
````
|
||||
```
|
||||
|
||||
Resulting in a config like so:
|
||||
|
||||
````
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
AllowEncodedSlashes NoDecode
|
||||
SetEnv no-gzip 1
|
||||
ProxyPass /npm http://127.0.0.1:4873 nocanon
|
||||
ProxyPassReverse /npm http://127.0.0.1:4873
|
||||
</VirtualHost>
|
||||
````
|
||||
```
|
||||
|
||||
You should only add it to your virtual host config, if you are experiencing the issue.
|
||||
|
||||
|
||||
# Nginx
|
||||
|
||||
The following snippet is a full `docker` example can be tested in our [Docker examples repository](https://github.com/verdaccio/verdaccio/tree/5.x/docker-examples/reverse_proxy/nginx).
|
||||
|
||||
````nginx
|
||||
```nginx
|
||||
upstream verdaccio_v4 {
|
||||
server verdaccio_relative_path_v4:4873;
|
||||
keepalive 8;
|
||||
@ -139,11 +138,11 @@ server {
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
````
|
||||
```
|
||||
|
||||
## SSL example {#ssl-example}
|
||||
|
||||
````nginx
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
return 302 https://$host$request_uri;
|
||||
@ -181,7 +180,7 @@ server {
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
````
|
||||
```
|
||||
|
||||
## Run behind reverse proxy with different domain and port {#run-behind-reverse-proxy-with-different-domain-and-port}
|
||||
|
||||
@ -208,6 +207,7 @@ location / {
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
```
|
||||
|
||||
For this case, `url_prefix` should **NOT** set in Verdaccio config
|
||||
|
||||
---
|
||||
@ -222,6 +222,7 @@ location ~ ^/verdaccio/(.*)$ {
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
```
|
||||
|
||||
For this case, `url_prefix` should set to `/verdaccio/`
|
||||
|
||||
> Note: There is a slash after the install path (`https://your-domain:port/verdaccio/`)!
|
||||
@ -230,7 +231,6 @@ For this case, `url_prefix` should set to `/verdaccio/`
|
||||
|
||||
> Since `verdaccio@5.0.0`
|
||||
|
||||
|
||||
The new `VERDACCIO_PUBLIC_URL` is intended to be used behind proxies, this variable will be used for:
|
||||
|
||||
- Used as base path to serve UI resources as (js, favicon, etc)
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: security-policy
|
||||
title: "Security Policy"
|
||||
title: 'Security Policy'
|
||||
---
|
||||
|
||||
Follow our security policy on [GitHub](https://github.com/verdaccio/verdaccio/security/policy)
|
||||
Follow our security policy on [GitHub](https://github.com/verdaccio/verdaccio/security/policy)
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: server-configuration
|
||||
title: "Server Configuration"
|
||||
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 steps.
|
||||
@ -31,6 +31,7 @@ The `cd` command sends you to the home directory of the Verdaccio user. Make sur
|
||||
## Listening on all addresses {#listening-on-all-addresses}
|
||||
|
||||
If you want to listen to every external address set the listen directive in the config to:
|
||||
|
||||
```yaml
|
||||
# you can specify listen address (or simply a port)
|
||||
listen: 0.0.0.0:4873
|
||||
@ -85,7 +86,9 @@ $ which verdaccio
|
||||
## Using systemd {#using-systemd}
|
||||
|
||||
Instead of `forever` you can use `systemd` for starting Verdaccio and keeping it running. Verdaccio installation has systemd unit, you only need to copy it:
|
||||
|
||||
```bash
|
||||
$ sudo cp /usr/lib/node_modules/verdaccio/systemd/verdaccio.service /lib/systemd/system/ && sudo systemctl daemon-reload
|
||||
```
|
||||
|
||||
This unit assumes you have configuration in `/etc/verdaccio/config.yaml` and store data in `/var/lib/verdaccio`, so either move your files to those locations or edit the unit.
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: setup-npm
|
||||
title: "npm"
|
||||
title: 'npm'
|
||||
---
|
||||
|
||||
# npm {#npm}
|
||||
@ -14,14 +14,17 @@ To set the registry for all your local projects in any terminal window run:
|
||||
```bash
|
||||
npm set registry http://localhost:4873/
|
||||
```
|
||||
|
||||
This will set the registry for your operational system user and you can find it on the file `~/.npmrc`.
|
||||
|
||||
## Using registry for a specific project {#specific}
|
||||
|
||||
To set this value for a specific project open its root folder on a terminal window and run:
|
||||
|
||||
```bash
|
||||
npm set registry http://localhost:4873/ --location project
|
||||
```
|
||||
|
||||
This will set the registry in a `.npmrc` file in your project root directory.
|
||||
|
||||
or by specific scope eg: `@my-scope/auth`:
|
||||
@ -64,11 +67,13 @@ npm adduser --registry http://localhost:4873
|
||||
after version `npm@9` the commands works separately:
|
||||
|
||||
- `login` does not create users.
|
||||
|
||||
```bash
|
||||
npm login --registry http://localhost:4873
|
||||
```
|
||||
|
||||
- `adduser` does not login users.
|
||||
|
||||
```bash
|
||||
npm adduser --registry http://localhost:4873
|
||||
```
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
id: setup-pnpm
|
||||
title: "pnpm"
|
||||
title: 'pnpm'
|
||||
---
|
||||
|
||||
### pnpm {#pnpm}
|
||||
|
||||
> This includes 4.x and 5.x series.
|
||||
|
||||
`pnpm` recognize by default the configuration at `.npmrc` and also the `--registry` value.
|
||||
`pnpm` recognize by default the configuration at `.npmrc` and also the `--registry` value.
|
||||
This means that you can follow the same commands described in [npm](setup-npm.md) replacing `npm` by `pnpm`.
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: setup-yarn
|
||||
title: "yarn"
|
||||
title: 'yarn'
|
||||
---
|
||||
|
||||
# yarn {#yarn}
|
||||
|
@ -1,53 +1,53 @@
|
||||
---
|
||||
id: ssl
|
||||
title: "Set up the SSL Certificates"
|
||||
title: 'Set up the SSL Certificates'
|
||||
---
|
||||
|
||||
Follow these instructions to configure an SSL certificate to serve an npm registry over HTTPS.
|
||||
|
||||
- Update the listen property in your `~/.config/verdaccio/config.yaml`:
|
||||
|
||||
* Update the listen property in your `~/.config/verdaccio/config.yaml`:
|
||||
|
||||
````
|
||||
```
|
||||
listen: 'https://your.domain.com/'
|
||||
````
|
||||
```
|
||||
|
||||
Once you've updated the listen property and try to run verdaccio again, it will ask for certificates.
|
||||
|
||||
* Generate your certificates
|
||||
- Generate your certificates
|
||||
|
||||
````
|
||||
```
|
||||
$ openssl genrsa -out /Users/user/.config/verdaccio/verdaccio-key.pem 2048
|
||||
$ openssl req -new -sha256 -key /Users/user/.config/verdaccio/verdaccio-key.pem -out /Users/user/.config/verdaccio/verdaccio-csr.pem
|
||||
$ openssl x509 -req -in /Users/user/.config/verdaccio/verdaccio-csr.pem -signkey /Users/user/.config/verdaccio/verdaccio-key.pem -out /Users/user/.config/verdaccio/verdaccio-cert.pem
|
||||
````
|
||||
```
|
||||
|
||||
* Edit your config file `/Users/user/.config/verdaccio/config.yaml` and add the following section:
|
||||
- Edit your config file `/Users/user/.config/verdaccio/config.yaml` and add the following section:
|
||||
|
||||
````
|
||||
```
|
||||
https:
|
||||
key: /Users/user/.config/verdaccio/verdaccio-key.pem
|
||||
cert: /Users/user/.config/verdaccio/verdaccio-cert.pem
|
||||
ca: /Users/user/.config/verdaccio/verdaccio-csr.pem
|
||||
````
|
||||
```
|
||||
|
||||
Alternatively, if you have a certificate with the `server.pfx` format, you can add the following configuration section: (The passphrase is optional and only needed if your certificate is encrypted.)
|
||||
|
||||
````
|
||||
```
|
||||
https:
|
||||
pfx: /Users/user/.config/verdaccio/server.pfx
|
||||
passphrase: 'secret'
|
||||
````
|
||||
```
|
||||
|
||||
You can find more info on the `key`, `cert`, `ca`, `pfx`, and `passphrase` arguments in the [Node documentation](https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options)
|
||||
|
||||
* Run `verdaccio` in your command line.
|
||||
- Run `verdaccio` in your command line.
|
||||
|
||||
* Open the browser and visit `https://your.domain.com:port/`
|
||||
- Open the browser and visit `https://your.domain.com:port/`
|
||||
|
||||
These instructions are mostly valid under OSX and Linux; on Windows the paths will vary, but the steps are the same.
|
||||
|
||||
## Docker
|
||||
|
||||
If you are using the Docker image, you have to set the `VERDACCIO_PROTOCOL` environment variable to `https`, as the `listen` argument is provided in the [Dockerfile](https://github.com/verdaccio/verdaccio/blob/master/Dockerfile#L43) and thus ignored from your config file.
|
||||
|
||||
You can also set the `VERDACCIO_PORT` environment variable if you are using a port other than `4873`.
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: third-party
|
||||
title: "Third-party Integrations"
|
||||
title: 'Third-party Integrations'
|
||||
---
|
||||
|
||||
## Cloudron {#cloudron}
|
||||
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
id: uplinks
|
||||
title: "Uplinks"
|
||||
title: 'Uplinks'
|
||||
---
|
||||
|
||||
An *uplink* is a link with an external registry that provides access to external packages.
|
||||
An _uplink_ is a link with an external registry that provides access to external packages.
|
||||
|
||||
![Uplinks](https://user-images.githubusercontent.com/558752/52976233-fb0e3980-33c8-11e9-8eea-5415e6018144.png)
|
||||
|
||||
@ -12,7 +12,7 @@ An *uplink* is a link with an external registry that provides access to external
|
||||
```yaml
|
||||
uplinks:
|
||||
npmjs:
|
||||
url: https://registry.npmjs.org/
|
||||
url: https://registry.npmjs.org/
|
||||
server2:
|
||||
url: http://mirror.local.net/
|
||||
timeout: 100ms
|
||||
@ -21,23 +21,24 @@ uplinks:
|
||||
baduplink:
|
||||
url: http://localhost:55666/
|
||||
```
|
||||
|
||||
### Configuration {#configuration}
|
||||
|
||||
You can define mutiple uplinks and each of them must have an unique name (key). They can have the following properties:
|
||||
|
||||
Property | Type | Required | Example | Support | Description | Default
|
||||
--- | --- | --- | --- | --- | --- | ---
|
||||
url | string | Yes | https://registry.npmjs.org/ | all | The registry url | npmjs
|
||||
ca | string | No | ~./ssl/client.crt' | all | SSL path certificate | No default
|
||||
timeout | string | No | 100ms | all | set new timeout for the request | 30s
|
||||
maxage | string | No |10m | all | the time threshold to the cache is valid | 2m
|
||||
fail_timeout | string | No |10m | all | defines max time when a request becomes a failure | 5m
|
||||
max_fails | number | No |2 | all | limit maximun failure request | 2
|
||||
cache | boolean | No |[true,false] | >= 2.1 | cache all remote tarballs in storage | true
|
||||
auth | list | No | [see below](uplinks.md#auth-property) | >= 2.5 | assigns the header 'Authorization' [more info](http://blog.npmjs.org/post/118393368555/deploying-with-npm-private-modules) | disabled
|
||||
headers | list | No | authorization: "Bearer SecretJWToken==" | all | list of custom headers for the uplink | disabled
|
||||
strict_ssl | boolean | No | [true,false] | >= 3.0 | If true, requires SSL certificates be valid. | true
|
||||
agent_options | object | No | maxSockets: 10 | >= 4.0.2 | options for the HTTP or HTTPS Agent responsible for managing uplink connection persistence and reuse [more info](https://nodejs.org/api/http.html#http_class_http_agent) | No default
|
||||
| Property | Type | Required | Example | Support | Description | Default |
|
||||
| ------------- | ------- | -------- | --------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- |
|
||||
| url | string | Yes | https://registry.npmjs.org/ | all | The registry url | npmjs |
|
||||
| ca | string | No | ~./ssl/client.crt' | all | SSL path certificate | No default |
|
||||
| timeout | string | No | 100ms | all | set new timeout for the request | 30s |
|
||||
| maxage | string | No | 10m | all | the time threshold to the cache is valid | 2m |
|
||||
| fail_timeout | string | No | 10m | all | defines max time when a request becomes a failure | 5m |
|
||||
| max_fails | number | No | 2 | all | limit maximun failure request | 2 |
|
||||
| cache | boolean | No | [true,false] | >= 2.1 | cache all remote tarballs in storage | true |
|
||||
| auth | list | No | [see below](uplinks.md#auth-property) | >= 2.5 | assigns the header 'Authorization' [more info](http://blog.npmjs.org/post/118393368555/deploying-with-npm-private-modules) | disabled |
|
||||
| headers | list | No | authorization: "Bearer SecretJWToken==" | all | list of custom headers for the uplink | disabled |
|
||||
| strict_ssl | boolean | No | [true,false] | >= 3.0 | If true, requires SSL certificates be valid. | true |
|
||||
| agent_options | object | No | maxSockets: 10 | >= 4.0.2 | options for the HTTP or HTTPS Agent responsible for managing uplink connection persistence and reuse [more info](https://nodejs.org/api/http.html#http_class_http_agent) | No default |
|
||||
|
||||
#### Auth property {#auth-property}
|
||||
|
||||
@ -73,15 +74,15 @@ uplinks:
|
||||
url: https://private-registry.domain.com/registry
|
||||
auth:
|
||||
type: bearer
|
||||
token: "token"
|
||||
token: 'token'
|
||||
```
|
||||
|
||||
> Note: `token` has priority over `token_env`
|
||||
|
||||
### You Must know {#you-must-know}
|
||||
|
||||
* Uplinks must be registries compatible with the `npm` endpoints. Eg: *verdaccio*, `sinopia@1.4.0`, *npmjs registry*, *yarn registry*, *JFrog*, *Nexus* and more.
|
||||
* Setting `cache` to false will help to save space in your hard drive. This will avoid store `tarballs` but [it will keep metadata in folders](https://github.com/verdaccio/verdaccio/issues/391).
|
||||
* Multiple uplinks might slow down the lookup of your packages. For each request an npm client makes, verdaccio makes 1 call to each configured uplink.
|
||||
* The (timeout, maxage and fail_timeout) format follow the [NGINX measurement units](http://nginx.org/en/docs/syntax.html)
|
||||
* When using the [Helm Chart](https://github.com/verdaccio/charts), you can use `secretEnvVars` to inject sensitive environment variables, which can be used to configure private uplink auth.
|
||||
- Uplinks must be registries compatible with the `npm` endpoints. Eg: _verdaccio_, `sinopia@1.4.0`, _npmjs registry_, _yarn registry_, _JFrog_, _Nexus_ and more.
|
||||
- Setting `cache` to false will help to save space in your hard drive. This will avoid store `tarballs` but [it will keep metadata in folders](https://github.com/verdaccio/verdaccio/issues/391).
|
||||
- Multiple uplinks might slow down the lookup of your packages. For each request an npm client makes, verdaccio makes 1 call to each configured uplink.
|
||||
- The (timeout, maxage and fail_timeout) format follow the [NGINX measurement units](http://nginx.org/en/docs/syntax.html)
|
||||
- When using the [Helm Chart](https://github.com/verdaccio/charts), you can use `secretEnvVars` to inject sensitive environment variables, which can be used to configure private uplink auth.
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: webui
|
||||
title: "Web User Interface"
|
||||
title: 'Web User Interface'
|
||||
---
|
||||
|
||||
![Uplinks](https://user-images.githubusercontent.com/558752/52916111-fa4ba980-32db-11e9-8a64-f4e06eb920b3.png)
|
||||
@ -12,9 +12,9 @@ web:
|
||||
enable: true
|
||||
title: Verdaccio
|
||||
logo: http://somedomain/somelogo.png
|
||||
primary_color: "#4b5e40"
|
||||
primary_color: '#4b5e40'
|
||||
gravatar: true | false
|
||||
scope: "@scope"
|
||||
scope: '@scope'
|
||||
sort_packages: asc | desc
|
||||
darkMode: false
|
||||
favicon: http://somedomain/favicon.ico | /path/favicon.ico
|
||||
@ -65,33 +65,32 @@ i18n:
|
||||
|
||||
### Configuration {#configuration}
|
||||
|
||||
| Property | Type | Required | Example | Support | Description |
|
||||
| ------------- | ---------- | -------- | ------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
| enable | boolean | No | true/false | all | allow to display the web interface |
|
||||
| title | string | No | Verdaccio | all | HTML head title description (if is not define set "Verdaccio" by default). |
|
||||
| gravatar | boolean | No | true | `>v4` | Gravatars will be generated under the hood if this property is enabled |
|
||||
| sort_packages | [asc,desc] | No | asc | `>v4` | By default private packages are sorted by ascending |
|
||||
| logo | string | No | `/local/path/to/my/logo.png` `http://my.logo.domain/logo.png` | all | a URI where logo is located (header logo) |
|
||||
| primary_color | string | No | "#4b5e40" | `>4` | The primary color to use throughout the UI (header, etc) |
|
||||
| scope | string | No | @myscope | `>v3.x` | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header |
|
||||
| darkMode | boolean | No | false | `>=v4.6.0` | This mode is an special theme for those want to live in the dark side |
|
||||
| favicon | string | No | false | `>=v5.0.1` | Display a custom favicon, can be local resource or valid url |
|
||||
| rateLimit | object | No | use `userRateLimit` configuration | `>=v5.4.0` | Increase or decrease rate limit, by default is 5k request every 2 minutes, only limit web api endpoints, the CSS, JS, etcc are ingnored |
|
||||
| pkgManagers | npm, pnpm or yarn | No | npm | `>=v5.5.0` | Allow customise which package managers on the side bar and registry information dialog are visible |
|
||||
| login | boolean | No | true or false | `>=v5.5.0` | Allow disable login on the UI (also include web endpoints). |
|
||||
| scriptsBodyAfter | string[] | No | any list of strings | `>=5.0.0` | inject scripts after the <body/> tag |
|
||||
| metaScripts | string[] | No | any list of strings | `>=5.0.0` | inject scripts inside <head/> |
|
||||
| scriptsbodyBefore | string[] | No | any list of strings | `>=5.0.0` | inject scripts before the <body/>|
|
||||
| html_cache | boolean | No | true | `>=v5.9.0` | whether the html cache is enabled, default true |
|
||||
| showInfo | boolean | No | true | `>=v5.10.0` | display the info button on the header |
|
||||
| showSettings | boolean | No | true | `>=v5.10.0` | display the settings button on the header |
|
||||
| showThemeSwitch | boolean | No | true | `>=v5.10.0` | display the theme switch button on the header |
|
||||
| showFooter | boolean | No | true | `>=v5.10.0` | allow hide footer |
|
||||
| showSearch | boolean | No | true | `>=v5.10.0` | allow hide search component |
|
||||
| showDownloadTarball | boolean | No | true | `>=v5.10.0` | allow hide download button on the sidebar |
|
||||
| showRaw | boolean | No | true | `>=v5.10.0` | allow hide manifest button on the sidebar (experimental feature) |
|
||||
|
||||
| Property | Type | Required | Example | Support | Description |
|
||||
| ------------------- | ----------------- | -------- | ------------------------------------------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| enable | boolean | No | true/false | all | allow to display the web interface |
|
||||
| title | string | No | Verdaccio | all | HTML head title description (if is not define set "Verdaccio" by default). |
|
||||
| gravatar | boolean | No | true | `>v4` | Gravatars will be generated under the hood if this property is enabled |
|
||||
| sort_packages | [asc,desc] | No | asc | `>v4` | By default private packages are sorted by ascending |
|
||||
| logo | string | No | `/local/path/to/my/logo.png` `http://my.logo.domain/logo.png` | all | a URI where logo is located (header logo) |
|
||||
| primary_color | string | No | "#4b5e40" | `>4` | The primary color to use throughout the UI (header, etc) |
|
||||
| scope | string | No | @myscope | `>v3.x` | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header |
|
||||
| darkMode | boolean | No | false | `>=v4.6.0` | This mode is an special theme for those want to live in the dark side |
|
||||
| favicon | string | No | false | `>=v5.0.1` | Display a custom favicon, can be local resource or valid url |
|
||||
| rateLimit | object | No | use `userRateLimit` configuration | `>=v5.4.0` | Increase or decrease rate limit, by default is 5k request every 2 minutes, only limit web api endpoints, the CSS, JS, etcc are ingnored |
|
||||
| pkgManagers | npm, pnpm or yarn | No | npm | `>=v5.5.0` | Allow customise which package managers on the side bar and registry information dialog are visible |
|
||||
| login | boolean | No | true or false | `>=v5.5.0` | Allow disable login on the UI (also include web endpoints). |
|
||||
| scriptsBodyAfter | string[] | No | any list of strings | `>=5.0.0` | inject scripts after the <body/> tag |
|
||||
| metaScripts | string[] | No | any list of strings | `>=5.0.0` | inject scripts inside <head/> |
|
||||
| scriptsbodyBefore | string[] | No | any list of strings | `>=5.0.0` | inject scripts before the <body/> |
|
||||
| html_cache | boolean | No | true | `>=v5.9.0` | whether the html cache is enabled, default true |
|
||||
| showInfo | boolean | No | true | `>=v5.10.0` | display the info button on the header |
|
||||
| showSettings | boolean | No | true | `>=v5.10.0` | display the settings button on the header |
|
||||
| showThemeSwitch | boolean | No | true | `>=v5.10.0` | display the theme switch button on the header |
|
||||
| showFooter | boolean | No | true | `>=v5.10.0` | allow hide footer |
|
||||
| showSearch | boolean | No | true | `>=v5.10.0` | allow hide search component |
|
||||
| showDownloadTarball | boolean | No | true | `>=v5.10.0` | allow hide download button on the sidebar |
|
||||
| showRaw | boolean | No | true | `>=v5.10.0` | allow hide manifest button on the sidebar (experimental feature) |
|
||||
|
||||
> The recommended logo size is `40x40` pixels.
|
||||
|
||||
> The `darkMode` can be enabled via UI and is persisted in the browser local storage. If you combine `showThemeSwitch: false` with `darkMode` users will be forced to use an specific theme. Furthermore, also void `primary_color` and dark cannot be customized.
|
||||
> The `darkMode` can be enabled via UI and is persisted in the browser local storage. If you combine `showThemeSwitch: false` with `darkMode` users will be forced to use an specific theme. Furthermore, also void `primary_color` and dark cannot be customized.
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: what-is-verdaccio
|
||||
title: "What is Verdaccio?"
|
||||
title: 'What is Verdaccio?'
|
||||
---
|
||||
|
||||
Verdaccio is a **lightweight private npm proxy registry** built in **Node.js**
|
||||
@ -12,9 +12,9 @@ recommended by the Open Web Application Security Project ([OWASP](https://owasp.
|
||||
|
||||
## What's a registry? {#whats-a-registry}
|
||||
|
||||
* A registry is a repository for packages, that implements the **CommonJS Compliant Package Registry specification** for reading package's information.
|
||||
* Provide a compatible API with npm clients **(yarn/npm/pnpm)**.
|
||||
* Semantic Versioning compatible **(semver)**.
|
||||
- A registry is a repository for packages, that implements the **CommonJS Compliant Package Registry specification** for reading package's information.
|
||||
- Provide a compatible API with npm clients **(yarn/npm/pnpm)**.
|
||||
- Semantic Versioning compatible **(semver)**.
|
||||
|
||||
```bash
|
||||
$> verdaccio
|
||||
@ -58,11 +58,11 @@ Verdaccio cache all dependencies on demand and speed up installations in local o
|
||||
|
||||
## In a Nutshell {#in-a-nutshell}
|
||||
|
||||
* It's a web app based on Node.js
|
||||
* It's a private npm registry
|
||||
* It's a local network proxy
|
||||
* It's a Pluggable application
|
||||
* It's fairly easy to install and to use
|
||||
* We offer Docker and Kubernetes support
|
||||
* It is 100% compatible with yarn, npm and pnpm
|
||||
* Verdaccio means **A green color popular in late medieval Italy for fresco painting**.
|
||||
- It's a web app based on Node.js
|
||||
- It's a private npm registry
|
||||
- It's a local network proxy
|
||||
- It's a Pluggable application
|
||||
- It's fairly easy to install and to use
|
||||
- We offer Docker and Kubernetes support
|
||||
- It is 100% compatible with yarn, npm and pnpm
|
||||
- Verdaccio means **A green color popular in late medieval Italy for fresco painting**.
|
||||
|
@ -1,35 +1,32 @@
|
||||
---
|
||||
id: who-is-using
|
||||
title: "Who is using Verdaccio?"
|
||||
title: 'Who is using Verdaccio?'
|
||||
---
|
||||
|
||||
### As a Business {#as-a-business}
|
||||
|
||||
*If you are using Verdaccio in your business and want to share your experience, let us know. We will be happy to listen to you.*
|
||||
|
||||
* [SheetJS](https://sheetjs.com/)
|
||||
* [Satispay](https://www.satispay.com/)
|
||||
_If you are using Verdaccio in your business and want to share your experience, let us know. We will be happy to listen to you._
|
||||
|
||||
- [SheetJS](https://sheetjs.com/)
|
||||
- [Satispay](https://www.satispay.com/)
|
||||
|
||||
### Open Source Projects {#open-source-projects}
|
||||
|
||||
> **Feel free to suggest other OSS are using Verdaccio.**
|
||||
|
||||
* [pnpm](https://pnpm.js.org/)
|
||||
* [Storybook](https://storybook.js.org/)
|
||||
* [Mozilla Neutrino](https://neutrinojs.org/)
|
||||
* [create-react-app](https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md#contributing-to-e2e-end-to-end-tests)
|
||||
* [Gatsby](https://github.com/gatsbyjs/gatsby)
|
||||
* [Apollo GraphQL](https://github.com/apollographql)
|
||||
* [Uppy](https://github.com/transloadit/uppy)
|
||||
* [Aurelia Framework](https://github.com/aurelia/framework)
|
||||
* [bit](https://github.com/teambit/bit)
|
||||
* [Wix Yoshi](https://github.com/wix/yoshi)
|
||||
* [The AWS Cloud Development Kit](https://github.com/awslabs/aws-cdk)
|
||||
* [Hyperledger Caliper](https://github.com/hyperledger/caliper)
|
||||
- [pnpm](https://pnpm.js.org/)
|
||||
- [Storybook](https://storybook.js.org/)
|
||||
- [Mozilla Neutrino](https://neutrinojs.org/)
|
||||
- [create-react-app](https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md#contributing-to-e2e-end-to-end-tests)
|
||||
- [Gatsby](https://github.com/gatsbyjs/gatsby)
|
||||
- [Apollo GraphQL](https://github.com/apollographql)
|
||||
- [Uppy](https://github.com/transloadit/uppy)
|
||||
- [Aurelia Framework](https://github.com/aurelia/framework)
|
||||
- [bit](https://github.com/teambit/bit)
|
||||
- [Wix Yoshi](https://github.com/wix/yoshi)
|
||||
- [The AWS Cloud Development Kit](https://github.com/awslabs/aws-cdk)
|
||||
- [Hyperledger Caliper](https://github.com/hyperledger/caliper)
|
||||
|
||||
#### Readme Recommendations {#readme-recommendations}
|
||||
|
||||
* [react-native-cli](https://github.com/react-native-community/react-native-cli/blob/master/CONTRIBUTING.md)
|
||||
|
||||
|
||||
- [react-native-cli](https://github.com/react-native-community/react-native-cli/blob/master/CONTRIBUTING.md)
|
||||
|
@ -1,15 +1,15 @@
|
||||
---
|
||||
id: windows
|
||||
title: "Installing As a Windows Service"
|
||||
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:
|
||||
|
||||
1. Create a directory for verdaccio
|
||||
* mkdir `c:\verdaccio`
|
||||
* cd `c:\verdaccio`
|
||||
- mkdir `c:\verdaccio`
|
||||
- cd `c:\verdaccio`
|
||||
2. Install verdaccio locally (I ran into npm issues with global installs)
|
||||
* npm install verdaccio
|
||||
- npm install verdaccio
|
||||
3. Create your `config.yaml` file in this location `(c:\verdaccio\config.yaml)`
|
||||
4. Windows Service Setup
|
||||
|
||||
@ -17,41 +17,39 @@ Loosely based upon the instructions found [here](http://asysadmin.tumblr.com/pos
|
||||
|
||||
ALTERNATIVE METHOD: (WinSW package was missing when I tried to download it)
|
||||
|
||||
* Download [NSSM](https://www.nssm.cc/download/) and extract
|
||||
- Download [NSSM](https://www.nssm.cc/download/) and extract
|
||||
|
||||
* Add the path that contains nssm.exe to the PATH
|
||||
- Add the path that contains nssm.exe to the PATH
|
||||
|
||||
* Open an administrative command
|
||||
- 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
|
||||
location of c:\verdaccio the below values will work:
|
||||
* Path: `node`
|
||||
* Startup directory: `c:\verdaccio`
|
||||
* Arguments: `c:\verdaccio\node_modules\verdaccio\build\lib\cli.js -c c:\verdaccio\config.yaml`
|
||||
- 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\build\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
|
||||
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
|
||||
- Start the service sc start verdaccio
|
||||
|
||||
## Using WinSW {#using-winsw}
|
||||
|
||||
* 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`
|
||||
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`
|
||||
- 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`
|
||||
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.
|
||||
|
||||
|
||||
## Repositories {#repositories}
|
||||
|
||||
* [verdaccio-deamon-windows](https://github.com/davidenke/verdaccio-deamon-windows)
|
||||
- [verdaccio-deamon-windows](https://github.com/davidenke/verdaccio-deamon-windows)
|
||||
|
@ -7,7 +7,7 @@ const lgnMapping = {
|
||||
'pl-PL': 'pl',
|
||||
'cs-CZ': 'cs',
|
||||
'fr-FR': 'fr',
|
||||
'it-IT': 'it' ,
|
||||
'it-IT': 'it',
|
||||
'ru-RU': 'ru',
|
||||
'vi-VN': 'vi',
|
||||
'yo-NG': 'yo',
|
||||
@ -16,67 +16,73 @@ const lgnMapping = {
|
||||
// @ts-ignore
|
||||
const progress = translations;
|
||||
const limitLngIncluded = 19;
|
||||
console.log('limit translation is on %s%', limitLngIncluded)
|
||||
const isDeployPreview = process.env.CONTEXT === "deploy-preview";
|
||||
const isProductionDeployment = process.env.CONTEXT === "production";
|
||||
console.log('limit translation is on %s%', limitLngIncluded);
|
||||
const isDeployPreview = process.env.CONTEXT === 'deploy-preview';
|
||||
const isProductionDeployment = process.env.CONTEXT === 'production';
|
||||
const filterByProgress = (items) => {
|
||||
const originLng = Object.keys(translations);
|
||||
return items.filter((lgn => {
|
||||
if(lgn === 'en') {
|
||||
return items.filter((lgn) => {
|
||||
if (lgn === 'en') {
|
||||
return true;
|
||||
}
|
||||
const _lgn = lgnMapping[lgn] ? lgnMapping[lgn] : lgn;
|
||||
if(!originLng.includes(_lgn)) {
|
||||
if (!originLng.includes(_lgn)) {
|
||||
console.log(`language ${_lgn} excluded, does not exist in origin`);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (translations[_lgn].approvalProgress <= limitLngIncluded) {
|
||||
console.log('language %s is being excluded due does not met limit of translation, current: %s%', _lgn, translations[_lgn].approvalProgress);
|
||||
console.log(
|
||||
'language %s is being excluded due does not met limit of translation, current: %s%',
|
||||
_lgn,
|
||||
translations[_lgn].approvalProgress
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}))
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const i18nConfig = {
|
||||
defaultLocale: 'en',
|
||||
locales: isDeployPreview ? ['en'] : filterByProgress([
|
||||
"en",
|
||||
"cs-CZ",
|
||||
"de-DE",
|
||||
"es-ES",
|
||||
"fr-FR",
|
||||
"it-IT",
|
||||
"pl-PL",
|
||||
"pt-BR",
|
||||
"ru-RU",
|
||||
"sr-CS",
|
||||
"vi-VN",
|
||||
"yo-NG",
|
||||
"zh-TW",
|
||||
"zh-CN"
|
||||
]),
|
||||
locales: isDeployPreview
|
||||
? ['en']
|
||||
: filterByProgress([
|
||||
'en',
|
||||
'cs-CZ',
|
||||
'de-DE',
|
||||
'es-ES',
|
||||
'fr-FR',
|
||||
'it-IT',
|
||||
'pl-PL',
|
||||
'pt-BR',
|
||||
'ru-RU',
|
||||
'sr-CS',
|
||||
'vi-VN',
|
||||
'yo-NG',
|
||||
'zh-TW',
|
||||
'zh-CN',
|
||||
]),
|
||||
localeConfigs: {
|
||||
en: { label: "English" },
|
||||
'it-IT': { label: `Italiano (${progress["it"].translationProgress}%)` },
|
||||
'es-ES': { label: `Español (${progress["es-ES"].translationProgress}%)` },
|
||||
'de-DE': { label: `Deutsch (${progress["de"].translationProgress}%)` },
|
||||
'cs-CZ': { label: `Čeština (Česko) (${progress["cs"].translationProgress}%)` },
|
||||
'fr-FR': { label: `Français (${progress["fr"].translationProgress}%)` },
|
||||
'pl-PL': { label: `Polski (Polska) (${progress["pl"].translationProgress}%)` },
|
||||
'pt-BR': { label: `Português (Brasil) (${progress["pt-BR"].translationProgress}%)` },
|
||||
'ru-RU': { label: `Русский (Россия) (${progress["ru"].translationProgress}%)` },
|
||||
'zh-CN': { label: `中文(中国)(${progress["zh-CN"].translationProgress}%)` },
|
||||
'zh-TW': { label: `中文(台灣)(${progress["zh-TW"].translationProgress}%)` },
|
||||
'yo-NG': { label: `Èdè Yorùbá (Nàìjíríà) (${progress["yo"].translationProgress}%)` },
|
||||
'sr-CS': { label: `Српски (Србија) (${progress["sr-CS"].translationProgress}%)` },
|
||||
'vi-VN': { label: `Tiếng Việt (Việt Nam) (${progress["vi"].translationProgress}%)` },
|
||||
}
|
||||
}
|
||||
en: { label: 'English' },
|
||||
'it-IT': { label: `Italiano (${progress['it'].translationProgress}%)` },
|
||||
'es-ES': { label: `Español (${progress['es-ES'].translationProgress}%)` },
|
||||
'de-DE': { label: `Deutsch (${progress['de'].translationProgress}%)` },
|
||||
'cs-CZ': { label: `Čeština (Česko) (${progress['cs'].translationProgress}%)` },
|
||||
'fr-FR': { label: `Français (${progress['fr'].translationProgress}%)` },
|
||||
'pl-PL': { label: `Polski (Polska) (${progress['pl'].translationProgress}%)` },
|
||||
'pt-BR': { label: `Português (Brasil) (${progress['pt-BR'].translationProgress}%)` },
|
||||
'ru-RU': { label: `Русский (Россия) (${progress['ru'].translationProgress}%)` },
|
||||
'zh-CN': { label: `中文(中国)(${progress['zh-CN'].translationProgress}%)` },
|
||||
'zh-TW': { label: `中文(台灣)(${progress['zh-TW'].translationProgress}%)` },
|
||||
'yo-NG': { label: `Èdè Yorùbá (Nàìjíríà) (${progress['yo'].translationProgress}%)` },
|
||||
'sr-CS': { label: `Српски (Србија) (${progress['sr-CS'].translationProgress}%)` },
|
||||
'vi-VN': { label: `Tiếng Việt (Việt Nam) (${progress['vi'].translationProgress}%)` },
|
||||
},
|
||||
};
|
||||
|
||||
const pkgJson = require('./package.json')
|
||||
const pkgJson = require('./package.json');
|
||||
|
||||
/** @type {import('@docusaurus/types').DocusaurusConfig} */
|
||||
module.exports = {
|
||||
@ -88,15 +94,17 @@ module.exports = {
|
||||
baseUrl: '/',
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
favicon: "img/logo/uk/verdaccio-tiny-uk-no-bg.svg",
|
||||
favicon: 'img/logo/uk/verdaccio-tiny-uk-no-bg.svg',
|
||||
i18n: i18nConfig,
|
||||
scripts: [
|
||||
"https://buttons.github.io/buttons.js",
|
||||
],
|
||||
scripts: ['https://buttons.github.io/buttons.js'],
|
||||
plugins: [
|
||||
'docusaurus-plugin-sass',
|
||||
'docusaurus-plugin-contributors',
|
||||
isProductionDeployment && typeof process.env.SENTRY_KEY === 'string' && ['docusaurus-plugin-sentry', { DSN: process.env.SENTRY_KEY }],
|
||||
isProductionDeployment &&
|
||||
typeof process.env.SENTRY_KEY === 'string' && [
|
||||
'docusaurus-plugin-sentry',
|
||||
{ DSN: process.env.SENTRY_KEY },
|
||||
],
|
||||
[
|
||||
'docusaurus-plugin-typedoc',
|
||||
{
|
||||
@ -112,29 +120,39 @@ module.exports = {
|
||||
sidebar: {
|
||||
categoryLabel: '@verdaccio/node-api',
|
||||
// position: 1,
|
||||
fullNames: true
|
||||
fullNames: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
'content-docs',
|
||||
({
|
||||
{
|
||||
id: 'community',
|
||||
path: 'community',
|
||||
routeBasePath: 'community',
|
||||
sidebarPath: require.resolve('./sidebarsCommunity.js'),
|
||||
showLastUpdateTime: true,
|
||||
}),
|
||||
},
|
||||
],
|
||||
[
|
||||
'content-docs',
|
||||
({
|
||||
{
|
||||
id: 'dev',
|
||||
path: 'dev',
|
||||
routeBasePath: 'dev',
|
||||
sidebarPath: require.resolve('./sidebarsDev.js'),
|
||||
showLastUpdateTime: true,
|
||||
},
|
||||
],
|
||||
[
|
||||
'content-docs',
|
||||
{
|
||||
id: 'talks',
|
||||
path: 'talks',
|
||||
routeBasePath: 'talks',
|
||||
sidebarPath: require.resolve('./sidebarsTalk.js'),
|
||||
showLastUpdateTime: true,
|
||||
}),
|
||||
},
|
||||
],
|
||||
[
|
||||
'docusaurus-plugin-typedoc',
|
||||
@ -145,7 +163,7 @@ module.exports = {
|
||||
out: 'api/config',
|
||||
sidebar: {
|
||||
categoryLabel: '@verdaccio/config',
|
||||
fullNames: true
|
||||
fullNames: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
@ -158,7 +176,7 @@ module.exports = {
|
||||
out: 'api/core',
|
||||
sidebar: {
|
||||
categoryLabel: '@verdaccio/core',
|
||||
fullNames: true
|
||||
fullNames: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
@ -173,11 +191,11 @@ module.exports = {
|
||||
includeVersion: true,
|
||||
sidebar: {
|
||||
categoryLabel: '@verdaccio/types',
|
||||
fullNames: true
|
||||
fullNames: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
],
|
||||
markdown: {
|
||||
mermaid: true,
|
||||
},
|
||||
@ -193,25 +211,25 @@ module.exports = {
|
||||
}),
|
||||
},
|
||||
customFields: {
|
||||
description: 'A lightweight Node.js private proxy registry'
|
||||
description: 'A lightweight Node.js private proxy registry',
|
||||
},
|
||||
themeConfig: {
|
||||
mermaid: {
|
||||
theme: {light: 'neutral', dark: 'forest'},
|
||||
theme: { light: 'neutral', dark: 'forest' },
|
||||
},
|
||||
announcementBar: {
|
||||
id: 'announcementBar',
|
||||
content:
|
||||
'<a target="_blank" rel="noopener noreferrer" href="https://www.wfp.org/support-us/stories/ukraine-appeal">Help provide humanitarian support to Ukraine refugees</a>!',
|
||||
isCloseable: false,
|
||||
backgroundColor: '#1595de',
|
||||
textColor: '#ffffff',
|
||||
isCloseable: false,
|
||||
backgroundColor: '#1595de',
|
||||
textColor: '#ffffff',
|
||||
},
|
||||
algolia: {
|
||||
appId: 'B3TG5CBF5H',
|
||||
apiKey: 'ed054733cb03418e9af25b7beb82c924',
|
||||
indexName: 'verdaccio',
|
||||
contextualSearch: true
|
||||
contextualSearch: true,
|
||||
},
|
||||
docs: {
|
||||
sidebar: {
|
||||
@ -223,7 +241,7 @@ module.exports = {
|
||||
title: `Verdaccio - v${pkgJson.version}`,
|
||||
logo: {
|
||||
alt: 'Verdaccio Logo',
|
||||
src: "img/logo/uk/verdaccio-tiny-uk-no-bg.svg",
|
||||
src: 'img/logo/uk/verdaccio-tiny-uk-no-bg.svg',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
@ -236,13 +254,13 @@ module.exports = {
|
||||
type: 'doc',
|
||||
docId: 'api/node-api/index',
|
||||
position: 'left',
|
||||
label: 'API'
|
||||
label: 'API',
|
||||
},
|
||||
{ to: '/blog', label: 'Blog', position: 'left' },
|
||||
{
|
||||
type: 'docsVersionDropdown',
|
||||
"position": "right",
|
||||
},
|
||||
position: 'right',
|
||||
},
|
||||
{
|
||||
href: 'https://opencollective.com/verdaccio',
|
||||
label: 'Sponsor us',
|
||||
@ -281,7 +299,7 @@ module.exports = {
|
||||
'aria-label': 'Follow us at Fosstodon',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
@ -352,7 +370,7 @@ module.exports = {
|
||||
},
|
||||
],
|
||||
copyright: `Copyright © ${new Date().getFullYear()} Verdaccio community. Built with Docusaurus.`,
|
||||
},
|
||||
},
|
||||
colorMode: {
|
||||
defaultMode: 'light',
|
||||
disableSwitch: false,
|
||||
@ -372,32 +390,30 @@ module.exports = {
|
||||
showLastUpdateAuthor: true,
|
||||
showLastUpdateTime: true,
|
||||
sidebarCollapsible: true,
|
||||
remarkPlugins: [
|
||||
[require('@docusaurus/remark-plugin-npm2yarn'), {sync: true}],
|
||||
],
|
||||
remarkPlugins: [[require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }]],
|
||||
editUrl: ({ locale, docPath }) => {
|
||||
if (locale !== 'en') {
|
||||
return `https://crowdin.com/project/verdaccio/${locale}`;
|
||||
}
|
||||
return `https://github.com/verdaccio/verdaccio/edit/master/website/docs/${docPath}`;
|
||||
},
|
||||
lastVersion : '5.x',
|
||||
lastVersion: '5.x',
|
||||
versions: {
|
||||
current: {
|
||||
label: `6.x`,
|
||||
label: `6.x`,
|
||||
},
|
||||
'5.x': {
|
||||
label: `5.x (Latest)`,
|
||||
label: `5.x (Latest)`,
|
||||
},
|
||||
},
|
||||
},
|
||||
googleAnalytics: {
|
||||
// trackingID: 'UA-2527438-21'
|
||||
trackingID: 'G-PCYM9FYJZT'
|
||||
trackingID: 'G-PCYM9FYJZT',
|
||||
},
|
||||
gtag: {
|
||||
trackingID: 'G-PCYM9FYJZT'
|
||||
},
|
||||
trackingID: 'G-PCYM9FYJZT',
|
||||
},
|
||||
blog: {
|
||||
blogTitle: 'Verdaccio Official Blog',
|
||||
blogDescription: 'The official Verdaccio Node.js proxy registry blog',
|
||||
@ -417,7 +433,7 @@ module.exports = {
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve('./src/css/custom.scss'),
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
|
@ -29,21 +29,29 @@
|
||||
"@docusaurus/theme-common": "2.2.0",
|
||||
"@docusaurus/theme-mermaid": "2.2.0",
|
||||
"@docusaurus/theme-search-algolia": "2.2.0",
|
||||
"@emotion/cache": "11.10.5",
|
||||
"@emotion/css": "11.10.5",
|
||||
"@emotion/jest": "11.10.5",
|
||||
"@emotion/react": "11.10.5",
|
||||
"@emotion/styled": "11.10.5",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@mui/icons-material": "5.10.14",
|
||||
"@mui/material": "5.10.14",
|
||||
"@mui/styles": "5.10.14",
|
||||
"@mui/icons-material": "5.11.0",
|
||||
"@mui/material": "5.11.1",
|
||||
"@mui/styles": "5.11.1",
|
||||
"@lyrasearch/lyra": "^0.3.1",
|
||||
"@verdaccio/ui-components": "workspace:1.0.0",
|
||||
"dompurify": "2.4.1",
|
||||
"classnames": "2.3.2",
|
||||
"clsx": "1.2.1",
|
||||
"copy-text-to-clipboard": "3.0.1",
|
||||
"docusaurus-plugin-contributors": "workspace:1.0.1-6-next.0",
|
||||
"docusaurus-plugin-sentry": "1.0.0",
|
||||
"docusaurus-plugin-typedoc": "latest",
|
||||
"react": "17.0.2",
|
||||
"p-cancelable": "2.1.1",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"react-player": "2.11.0",
|
||||
"react-iframe": "1.8.5",
|
||||
"react-player": "2.11.0",
|
||||
"react-twitter-widgets": "^1.10.0",
|
||||
"typedoc": "0.23.21",
|
||||
"typedoc-plugin-markdown": "3.13.6",
|
||||
|
@ -3,95 +3,94 @@ module.exports = {
|
||||
// By default, Docusaurus generates a sidebar from the docs folder structure
|
||||
docs: [
|
||||
{
|
||||
type: "category",
|
||||
label: "Introduction",
|
||||
type: 'category',
|
||||
label: 'Introduction',
|
||||
items: [
|
||||
"installation",
|
||||
"what-is-verdaccio",
|
||||
"cli",
|
||||
'installation',
|
||||
'what-is-verdaccio',
|
||||
'cli',
|
||||
{
|
||||
type: "category",
|
||||
label: "Setting up Verdaccio",
|
||||
items: ["cli-registry", "setup-npm", "setup-yarn", "setup-pnpm"]
|
||||
type: 'category',
|
||||
label: 'Setting up Verdaccio',
|
||||
items: ['cli-registry', 'setup-npm', 'setup-yarn', 'setup-pnpm'],
|
||||
},
|
||||
"who-is-using",
|
||||
"best",
|
||||
"docker",
|
||||
"protect-your-dependencies",
|
||||
"e2e",
|
||||
"verdaccio-programmatically",
|
||||
"security-policy",
|
||||
"logo",
|
||||
"third-party",
|
||||
'who-is-using',
|
||||
'best',
|
||||
'docker',
|
||||
'protect-your-dependencies',
|
||||
'e2e',
|
||||
'verdaccio-programmatically',
|
||||
'security-policy',
|
||||
'logo',
|
||||
'third-party',
|
||||
{
|
||||
type: "category",
|
||||
label: "Uses Cases",
|
||||
items: ["caching", "linking-remote-registry"]
|
||||
type: 'category',
|
||||
label: 'Uses Cases',
|
||||
items: ['caching', 'linking-remote-registry'],
|
||||
},
|
||||
"articles"
|
||||
]
|
||||
'articles',
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Features",
|
||||
type: 'category',
|
||||
label: 'Features',
|
||||
items: [
|
||||
"configuration",
|
||||
"uplinks",
|
||||
"packages",
|
||||
"authentication",
|
||||
"notifications",
|
||||
"logger",
|
||||
"webui"
|
||||
]
|
||||
'configuration',
|
||||
'uplinks',
|
||||
'packages',
|
||||
'authentication',
|
||||
'notifications',
|
||||
'logger',
|
||||
'webui',
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Server",
|
||||
type: 'category',
|
||||
label: 'Server',
|
||||
items: ['server-configuration', 'reverse-proxy', 'ssl', 'windows', 'iss-server'],
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Development',
|
||||
items: [
|
||||
"server-configuration",
|
||||
"reverse-proxy",
|
||||
"ssl",
|
||||
"windows",
|
||||
"iss-server"
|
||||
]
|
||||
'plugins',
|
||||
'dev-plugins',
|
||||
{
|
||||
type: 'link',
|
||||
label: 'Search Plugins',
|
||||
href: '/dev/plugins-search',
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Dev Guides',
|
||||
items: ['plugin-generator', 'plugin-auth', 'plugin-middleware', 'plugin-storage'],
|
||||
},
|
||||
'node-api',
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Development",
|
||||
type: 'category',
|
||||
label: 'DevOps',
|
||||
items: [
|
||||
"plugins",
|
||||
"dev-plugins",
|
||||
'kubernetes',
|
||||
'ci',
|
||||
{
|
||||
type: "category",
|
||||
label: "Dev Guides",
|
||||
items: ["plugin-generator", "plugin-auth", "plugin-middleware", "plugin-storage"]
|
||||
type: 'category',
|
||||
label: 'Cloud',
|
||||
items: ['amazon'],
|
||||
},
|
||||
"node-api"
|
||||
]
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Tools',
|
||||
items: ['ansible', 'puppet', 'chef'],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "DevOps",
|
||||
items: [
|
||||
"kubernetes",
|
||||
"ci",
|
||||
{
|
||||
type: "category",
|
||||
label: "Cloud",
|
||||
items: ["amazon"]
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Tools",
|
||||
items: ["ansible", "puppet", "chef"]
|
||||
},
|
||||
]
|
||||
type: 'category',
|
||||
label: 'Guides',
|
||||
items: ['aws'],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Guides",
|
||||
items: ["aws"]
|
||||
}
|
||||
],
|
||||
api: [
|
||||
{
|
||||
@ -100,9 +99,9 @@ module.exports = {
|
||||
items: [
|
||||
{
|
||||
type: 'autogenerated',
|
||||
dirName: 'api'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
dirName: 'api',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -18,7 +18,7 @@ module.exports = {
|
||||
type: 'link',
|
||||
label: 'Watch us on YouTube',
|
||||
href: 'https://www.youtube.com/channel/UC5i20v6o7lSjXzAHOvatt0w',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'link',
|
||||
label: 'Chat on Discord',
|
||||
@ -38,6 +38,6 @@ module.exports = {
|
||||
type: 'link',
|
||||
label: 'LICENSE',
|
||||
href: 'https://github.com/verdaccio/verdaccio/blob/master/LICENSE',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
8
website/sidebarsDev.js
Normal file
8
website/sidebarsDev.js
Normal file
@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
community: [
|
||||
{
|
||||
type: 'autogenerated',
|
||||
dirName: '.',
|
||||
},
|
||||
],
|
||||
};
|
@ -8,6 +8,6 @@ module.exports = {
|
||||
type: 'link',
|
||||
label: 'Follow us on YouTube',
|
||||
href: 'https://www.youtube.com/channel/UC5i20v6o7lSjXzAHOvatt0w',
|
||||
}
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -1,6 +1,7 @@
|
||||
import Translate from '@docusaurus/Translate';
|
||||
import Tooltip from '@mui/material/Tooltip';
|
||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
||||
import EmojiEventsIcon from '@mui/icons-material/EmojiEvents';
|
||||
import MergeTypeIcon from '@mui/icons-material/MergeType';
|
||||
import StarIcon from '@mui/icons-material/Star';
|
||||
import Badge from '@mui/material/Badge';
|
||||
import Chip from '@mui/material/Chip';
|
||||
import Dialog from '@mui/material/Dialog';
|
||||
@ -11,13 +12,12 @@ import IconButton from '@mui/material/IconButton';
|
||||
import List from '@mui/material/List';
|
||||
import ListItem from '@mui/material/ListItem';
|
||||
import ListItemIcon from '@mui/material/ListItemIcon';
|
||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
||||
import ListItemText from '@mui/material/ListItemText';
|
||||
import Tooltip from '@mui/material/Tooltip';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import { makeStyles, withStyles } from '@mui/styles';
|
||||
import { ThemeProvider, createTheme } from '@mui/material/styles';
|
||||
import EmojiEventsIcon from '@mui/icons-material/EmojiEvents';
|
||||
import MergeTypeIcon from '@mui/icons-material/MergeType';
|
||||
import StarIcon from '@mui/icons-material/Star';
|
||||
import { makeStyles, withStyles } from '@mui/styles';
|
||||
import Layout from '@theme/Layout';
|
||||
import React from 'react';
|
||||
|
||||
@ -34,38 +34,8 @@ const theme = createTheme({
|
||||
},
|
||||
});
|
||||
|
||||
const useStyles = makeStyles(({ theme }: { theme: any }) =>({
|
||||
'@global': {
|
||||
// small: {
|
||||
// width: theme.spacing(3),
|
||||
// height: theme.spacing(3),
|
||||
// },
|
||||
// medium: {
|
||||
// width: theme.spacing(6),
|
||||
// height: theme.spacing(6),
|
||||
// },
|
||||
// large: {
|
||||
// width: theme.spacing(12),
|
||||
// height: theme.spacing(12),
|
||||
// },
|
||||
// root: {
|
||||
// width: '100%',
|
||||
// maxWidth: 360,
|
||||
// backgroundColor: theme.palette.background.paper,
|
||||
// },
|
||||
// inline: {
|
||||
// display: 'inline',
|
||||
// },
|
||||
// starColor: {
|
||||
// color: yellow[500],
|
||||
// },
|
||||
// archived: {
|
||||
// opacity: `0.4`,
|
||||
// },
|
||||
// emojiEvent: {
|
||||
// color: green[800],
|
||||
// },
|
||||
},
|
||||
const useStyles = makeStyles(({ theme }: { theme: any }) => ({
|
||||
'@global': {},
|
||||
}));
|
||||
|
||||
const StyledBadge = withStyles(() => ({
|
||||
@ -100,7 +70,7 @@ const Contributors: React.FC<ContributorsProps> = ({ data }): React.ReactElement
|
||||
const [user, setUser] = React.useState(null);
|
||||
const [open, setOpen] = React.useState(false);
|
||||
const classes = useStyles();
|
||||
const {contributors, repositories} = data;
|
||||
const { contributors, repositories } = data;
|
||||
|
||||
const handleClickOpen = (item) => {
|
||||
setUser(item);
|
||||
@ -160,7 +130,7 @@ const Contributors: React.FC<ContributorsProps> = ({ data }): React.ReactElement
|
||||
src={generateImage(userItem.node.userId)}
|
||||
alt={userItem.node.url}
|
||||
width="40px"
|
||||
style={{borderRadius: '10px'}}
|
||||
style={{ borderRadius: '10px' }}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
@ -181,7 +151,7 @@ const Contributors: React.FC<ContributorsProps> = ({ data }): React.ReactElement
|
||||
alt={user.node.url}
|
||||
className={classes.medium}
|
||||
width="40px"
|
||||
style={{borderRadius: '10px'}}
|
||||
style={{ borderRadius: '10px' }}
|
||||
/>
|
||||
</a>
|
||||
</Grid>
|
||||
@ -201,7 +171,7 @@ const Contributors: React.FC<ContributorsProps> = ({ data }): React.ReactElement
|
||||
<DialogContent>
|
||||
<div className={classes.root}>
|
||||
<List component="nav" aria-label="main mailbox folders">
|
||||
{user.node.repositories.map(({name, contributions}) => {
|
||||
{user.node.repositories.map(({ name, contributions }) => {
|
||||
const repo = repositories.find((repo) => repo.name === name);
|
||||
if (!repo) {
|
||||
return null;
|
||||
@ -221,7 +191,7 @@ const Contributors: React.FC<ContributorsProps> = ({ data }): React.ReactElement
|
||||
<Badge
|
||||
badgeContent={contributions}
|
||||
color="primary"
|
||||
max={9999}
|
||||
max={9999}
|
||||
anchorOrigin={{
|
||||
vertical: 'top',
|
||||
horizontal: 'right',
|
||||
|
107
website/src/components/EcosystemSearch/AddonCard.tsx
Normal file
107
website/src/components/EcosystemSearch/AddonCard.tsx
Normal file
@ -0,0 +1,107 @@
|
||||
import Translate from '@docusaurus/Translate';
|
||||
import styled from '@emotion/styled';
|
||||
import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
|
||||
import Avatar from '@mui/material/Avatar';
|
||||
import Button from '@mui/material/Button';
|
||||
import Card from '@mui/material/Card';
|
||||
import CardActions from '@mui/material/CardActions';
|
||||
import CardContent from '@mui/material/CardContent';
|
||||
import CardHeader from '@mui/material/CardHeader';
|
||||
import Chip from '@mui/material/Chip';
|
||||
import Tooltip from '@mui/material/Tooltip';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Grid from '@mui/material/Unstable_Grid2';
|
||||
import { green, red } from '@mui/material/colors';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import useMediaQuery from '@mui/material/useMediaQuery';
|
||||
import * as React from 'react';
|
||||
import { FC } from 'react';
|
||||
|
||||
import Icon from './Icon';
|
||||
import { Addon } from './types';
|
||||
|
||||
const Content = styled(Typography)({
|
||||
display: 'inline-block',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'break-spaces',
|
||||
fontSize: '1rem',
|
||||
});
|
||||
|
||||
const AddonCard: FC<Addon> = ({
|
||||
url,
|
||||
name,
|
||||
category,
|
||||
description,
|
||||
downloads,
|
||||
latest,
|
||||
origin,
|
||||
}): React.ReactElement => {
|
||||
const theme = useTheme();
|
||||
const matches = useMediaQuery('(min-width:600px)');
|
||||
return (
|
||||
<div>
|
||||
<Card sx={{ minWidth: 300 }}>
|
||||
<CardHeader
|
||||
title={name}
|
||||
disableTypography={false}
|
||||
titleTypographyProps={{ variants: 'outline' }}
|
||||
avatar={
|
||||
<Avatar
|
||||
alt={name}
|
||||
sx={{ bgcolor: origin === 'core' ? green[200] : red[200], width: 40, height: 40 }}
|
||||
>
|
||||
<Icon category={category} />
|
||||
</Avatar>
|
||||
}
|
||||
/>
|
||||
<CardContent>
|
||||
<Grid container>
|
||||
<Grid xs={12} sx={{ padding: theme.spacing(1) }}>
|
||||
<Content sx={{ minHeight: '100px' }}>
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
{description}
|
||||
</Typography>
|
||||
</Content>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</CardContent>
|
||||
<CardActions>
|
||||
<Grid
|
||||
container
|
||||
spacing={{ xs: 3, md: 1 }}
|
||||
justifyContent={{ sm: 'flex-end', xl: 'space-between' }}
|
||||
width="100%"
|
||||
>
|
||||
<Grid>
|
||||
<Chip
|
||||
label={new Intl.NumberFormat().format(downloads)}
|
||||
avatar={
|
||||
<Avatar sizes="small">
|
||||
<ArrowDownwardIcon />
|
||||
</Avatar>
|
||||
}
|
||||
variant="outlined"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Chip label={`v${latest}`} variant="outlined" />
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Button
|
||||
variant="text"
|
||||
onClick={() => {
|
||||
window.open(url, '_blank');
|
||||
}}
|
||||
>
|
||||
<Translate>Visit</Translate>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</CardActions>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default AddonCard;
|
54
website/src/components/EcosystemSearch/EcosystemSearch.tsx
Normal file
54
website/src/components/EcosystemSearch/EcosystemSearch.tsx
Normal file
@ -0,0 +1,54 @@
|
||||
import { ThemeProvider, createTheme } from '@mui/material/styles';
|
||||
import React from 'react';
|
||||
import { useState } from 'react';
|
||||
|
||||
import FilterControl from './FilterControl';
|
||||
import ToolList from './ToolList';
|
||||
import data from './addons.json';
|
||||
import { Filters } from './types';
|
||||
|
||||
const theme = createTheme({
|
||||
breakpoints: {
|
||||
values: {
|
||||
xs: 0,
|
||||
sm: 450,
|
||||
md: 996,
|
||||
lg: 1600,
|
||||
xl: 1800,
|
||||
},
|
||||
},
|
||||
palette: {
|
||||
primary: {
|
||||
main: '#4B5E40',
|
||||
},
|
||||
secondary: {
|
||||
main: '#808a79',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const EcosystemSearch = (): React.ReactElement => {
|
||||
const { addons, categories, origin } = data as any;
|
||||
|
||||
const [filters, setFilters] = useState<Filters>({
|
||||
bundled: true,
|
||||
core: true,
|
||||
community: true,
|
||||
middleware: true,
|
||||
storage: true,
|
||||
tool: true,
|
||||
ui: true,
|
||||
authentication: true,
|
||||
filter: true,
|
||||
keyword: '',
|
||||
});
|
||||
|
||||
return (
|
||||
<ThemeProvider theme={theme}>
|
||||
<FilterControl categories={categories} origins={origin} onChange={setFilters} />
|
||||
<ToolList addons={addons} filters={filters} />
|
||||
</ThemeProvider>
|
||||
);
|
||||
};
|
||||
|
||||
export default EcosystemSearch;
|
145
website/src/components/EcosystemSearch/FilterControl.tsx
Normal file
145
website/src/components/EcosystemSearch/FilterControl.tsx
Normal file
@ -0,0 +1,145 @@
|
||||
import Translate, { translate } from '@docusaurus/Translate';
|
||||
import Alert from '@mui/material/Alert';
|
||||
import Card from '@mui/material/Card';
|
||||
import Checkbox from '@mui/material/Checkbox';
|
||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||
import FormGroup from '@mui/material/FormGroup';
|
||||
import Switch from '@mui/material/Switch';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Grid from '@mui/material/Unstable_Grid2';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import React, { ReactElement, useState } from 'react';
|
||||
import { FC } from 'react';
|
||||
|
||||
import { Category, Filters, Origin } from './types';
|
||||
|
||||
type Props = {
|
||||
categories: Category[];
|
||||
origins: Origin[];
|
||||
onChange: (filters) => void;
|
||||
};
|
||||
|
||||
const FilterControl: FC<Props> = ({ categories, origins, onChange }): ReactElement => {
|
||||
const theme = useTheme();
|
||||
const [filters, setFilters] = useState<Filters>({
|
||||
bundled: true,
|
||||
core: true,
|
||||
community: true,
|
||||
middleware: true,
|
||||
storage: true,
|
||||
tool: true,
|
||||
ui: true,
|
||||
authentication: true,
|
||||
filter: true,
|
||||
keyword: '',
|
||||
});
|
||||
|
||||
const handleOnChange = (event) => {
|
||||
const { name } = event.target;
|
||||
let _filters = { ...filters };
|
||||
const validation = [...origins, ...categories, 'bundled', 'keyword'];
|
||||
if (!validation.includes(name)) {
|
||||
return;
|
||||
}
|
||||
if (name !== 'keyword') {
|
||||
_filters = { ..._filters, [name]: event.target.checked };
|
||||
} else {
|
||||
_filters = { ..._filters, keyword: event.target.value };
|
||||
}
|
||||
|
||||
onChange(_filters);
|
||||
setFilters(_filters);
|
||||
};
|
||||
|
||||
return (
|
||||
<Card sx={{ marginBottom: theme.spacing(2), padding: theme.spacing(2) }}>
|
||||
<Typography
|
||||
variant="h6"
|
||||
fontSize="lg"
|
||||
fontWeight="lg"
|
||||
sx={{ marginBottom: theme.spacing(1) }}
|
||||
>
|
||||
<Translate>Search Plugins / Tools</Translate>
|
||||
</Typography>
|
||||
<Alert severity="info" sx={{ marginBottom: theme.spacing(1) }}>
|
||||
<Translate>Items qualified as core are maintained actively by the verdaccio team</Translate>
|
||||
</Alert>
|
||||
<Grid container spacing={2}>
|
||||
<Grid xs={12}>
|
||||
<TextField
|
||||
name="keyword"
|
||||
fullWidth
|
||||
value={filters.keyword}
|
||||
label={translate({ message: 'Filter' })}
|
||||
onChange={handleOnChange}
|
||||
size="small"
|
||||
variant="outlined"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid xs={12} sx={{ display: 'none' }}>
|
||||
<Typography fontSize="lg" fontWeight="lg">
|
||||
Origin
|
||||
</Typography>
|
||||
<FormGroup row>
|
||||
{Object.values(origins).map((name) => (
|
||||
<FormControlLabel
|
||||
key={name}
|
||||
control={
|
||||
<Checkbox
|
||||
name={name}
|
||||
onChange={handleOnChange}
|
||||
checked={filters[name]}
|
||||
size="small"
|
||||
/>
|
||||
}
|
||||
label={name}
|
||||
/>
|
||||
))}
|
||||
</FormGroup>
|
||||
</Grid>
|
||||
<Grid xs={12} sx={{ display: 'none' }}>
|
||||
<Typography fontSize="lg" fontWeight="lg">
|
||||
Categories
|
||||
</Typography>
|
||||
<FormGroup row>
|
||||
{Object.values(categories).map((name) => (
|
||||
<FormControlLabel
|
||||
key={name}
|
||||
control={
|
||||
<Checkbox
|
||||
name={name}
|
||||
onChange={handleOnChange}
|
||||
checked={filters[name]}
|
||||
size="small"
|
||||
/>
|
||||
}
|
||||
label={name}
|
||||
/>
|
||||
))}
|
||||
</FormGroup>
|
||||
</Grid>
|
||||
<Grid xs={12} sx={{ display: 'none' }}>
|
||||
<Typography fontSize="lg" fontWeight="lg">
|
||||
Options
|
||||
</Typography>
|
||||
<FormGroup row>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
name="bundled"
|
||||
checked={filters.bundled}
|
||||
size="small"
|
||||
onChange={handleOnChange}
|
||||
/>
|
||||
}
|
||||
label="Bundled"
|
||||
/>
|
||||
</FormGroup>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default FilterControl;
|
29
website/src/components/EcosystemSearch/Icon.tsx
Normal file
29
website/src/components/EcosystemSearch/Icon.tsx
Normal file
@ -0,0 +1,29 @@
|
||||
import AltRouteIcon from '@mui/icons-material/AltRoute';
|
||||
import ColorLensIcon from '@mui/icons-material/ColorLens';
|
||||
import FilterAltIcon from '@mui/icons-material/FilterAlt';
|
||||
import HandymanIcon from '@mui/icons-material/Handyman';
|
||||
import HubIcon from '@mui/icons-material/Hub';
|
||||
import SecurityIcon from '@mui/icons-material/Security';
|
||||
import StorageIcon from '@mui/icons-material/Storage';
|
||||
import * as React from 'react';
|
||||
import { FC } from 'react';
|
||||
|
||||
const Icon: FC<{ category: string }> = ({ category }): React.ReactElement => {
|
||||
if (category === 'middleware') {
|
||||
return <AltRouteIcon />;
|
||||
} else if (category === 'storage') {
|
||||
return <StorageIcon />;
|
||||
} else if (category === 'tool') {
|
||||
return <HandymanIcon />;
|
||||
} else if (category === 'filter') {
|
||||
return <FilterAltIcon />;
|
||||
} else if (category === 'authentication') {
|
||||
return <SecurityIcon />;
|
||||
} else if (category === 'ui') {
|
||||
return <ColorLensIcon />;
|
||||
}
|
||||
|
||||
return <HubIcon />;
|
||||
};
|
||||
|
||||
export default Icon;
|
101
website/src/components/EcosystemSearch/ToolList.tsx
Normal file
101
website/src/components/EcosystemSearch/ToolList.tsx
Normal file
@ -0,0 +1,101 @@
|
||||
import Translate, { translate } from '@docusaurus/Translate';
|
||||
import { create, insertBatch, search } from '@lyrasearch/lyra';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Grid from '@mui/material/Unstable_Grid2';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import * as React from 'react';
|
||||
import { useState } from 'react';
|
||||
import { useEffect } from 'react';
|
||||
import { FC } from 'react';
|
||||
|
||||
import AddonCard from './AddonCard';
|
||||
import { Addon, Filters } from './types';
|
||||
|
||||
type Props = {
|
||||
addons: Addon[];
|
||||
filters: Filters;
|
||||
};
|
||||
|
||||
const db = create({
|
||||
schema: {
|
||||
name: 'string',
|
||||
url: 'string',
|
||||
category: 'string',
|
||||
bundled: 'boolean',
|
||||
origin: 'string',
|
||||
latest: 'string',
|
||||
downloads: 'number',
|
||||
description: 'string',
|
||||
},
|
||||
});
|
||||
|
||||
const normalizeResults = (hits) => {
|
||||
return hits.reduce((acc, item) => {
|
||||
acc.push(item.document);
|
||||
return acc;
|
||||
}, []);
|
||||
};
|
||||
|
||||
const filterByProperty = (addsOns: Addon[], filters: Filters) => {
|
||||
console.log('filters', filters);
|
||||
const filtered = addsOns.filter((item) => {
|
||||
console.log('item', item.name);
|
||||
|
||||
return (
|
||||
(item.origin === 'core' && filters.core) ||
|
||||
(item.origin === 'community' && filters.community) ||
|
||||
(item.category === 'authentication' && filters.authentication) ||
|
||||
(item.category === 'filter' && filters.filter) ||
|
||||
(item.category === 'ui' && filters.ui) ||
|
||||
(item.category === 'middleware' && filters.middleware) ||
|
||||
(item.category === 'tool' && filters.tool) ||
|
||||
(item.category === 'storage' && filters.storage) ||
|
||||
(item.bundled && filters.bundled)
|
||||
);
|
||||
});
|
||||
return filtered;
|
||||
};
|
||||
|
||||
const ToolList: FC<Props> = ({ addons = [], filters }): React.ReactElement => {
|
||||
const theme = useTheme();
|
||||
const [filteredAddsOn, setFilteredAddsOn] = useState(addons);
|
||||
useEffect(() => {
|
||||
insertBatch(db, addons);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
let results: Addon[] = addons;
|
||||
if (filters.keyword !== '') {
|
||||
const dbResults = search(db, {
|
||||
term: filters.keyword,
|
||||
});
|
||||
results = [...normalizeResults(dbResults.hits)];
|
||||
}
|
||||
// TODO: apply advanced filters later
|
||||
// setFilteredAddsOn(filterByProperty(results, filters));
|
||||
setFilteredAddsOn(results);
|
||||
}, [filters, addons]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Typography
|
||||
fontSize="lg"
|
||||
fontWeight="lg"
|
||||
sx={{ marginTop: theme.spacing(1), marginBottom: theme.spacing(1) }}
|
||||
>
|
||||
<Translate>Total results:</Translate> {filteredAddsOn.length}
|
||||
</Typography>
|
||||
<Grid container rowSpacing={4} columnSpacing={{ xs: 1, sm: 2, md: 3, xl: 4 }}>
|
||||
{filteredAddsOn.map((item) => {
|
||||
return (
|
||||
<Grid xs={12} md={12} lg={6} xl={4} key={item.name}>
|
||||
<AddonCard {...item} />
|
||||
</Grid>
|
||||
);
|
||||
})}
|
||||
</Grid>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ToolList;
|
1193
website/src/components/EcosystemSearch/addons.json
Normal file
1193
website/src/components/EcosystemSearch/addons.json
Normal file
File diff suppressed because it is too large
Load Diff
3
website/src/components/EcosystemSearch/index.ts
Normal file
3
website/src/components/EcosystemSearch/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import EcosystemSearch from './EcosystemSearch';
|
||||
|
||||
export { EcosystemSearch as default };
|
26
website/src/components/EcosystemSearch/types.ts
Normal file
26
website/src/components/EcosystemSearch/types.ts
Normal file
@ -0,0 +1,26 @@
|
||||
export type Origin = 'core' | 'community';
|
||||
export type Category = 'middleware' | 'authentication' | 'filter' | 'storage' | 'ui' | 'tool';
|
||||
|
||||
export type Addon = {
|
||||
name: string;
|
||||
url: string;
|
||||
category: Category;
|
||||
bundled: boolean;
|
||||
origin: Origin;
|
||||
latest: string;
|
||||
downloads: number;
|
||||
description: string;
|
||||
};
|
||||
|
||||
export type Filters = {
|
||||
bundled: boolean;
|
||||
core: boolean;
|
||||
community: boolean;
|
||||
middleware: boolean;
|
||||
storage: boolean;
|
||||
tool: boolean;
|
||||
ui: boolean;
|
||||
authentication: boolean;
|
||||
filter: boolean;
|
||||
keyword: string;
|
||||
};
|
8
website/src/components/EcosystemSearch/utils.ts
Normal file
8
website/src/components/EcosystemSearch/utils.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import * as DOMPurify from 'dompurify';
|
||||
|
||||
export function parseDescription(description: string): string | void {
|
||||
if (typeof description === 'string') {
|
||||
return DOMPurify.sanitize(description);
|
||||
}
|
||||
return '';
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import Translate, { translate } from '@docusaurus/Translate';
|
||||
import Link from '@docusaurus/Link';
|
||||
import Translate, { translate } from '@docusaurus/Translate';
|
||||
import { useBaseUrlUtils } from '@docusaurus/useBaseUrl';
|
||||
import React from 'react';
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import Translate, { translate } from '@docusaurus/Translate';
|
||||
import Link from '@docusaurus/Link';
|
||||
import Translate, { translate } from '@docusaurus/Translate';
|
||||
import useBaseUrl from '@docusaurus/useBaseUrl';
|
||||
import React from 'react';
|
||||
import cx from 'classnames';
|
||||
import React from 'react';
|
||||
|
||||
import Command from './Command';
|
||||
import styles from './Header.module.scss';
|
||||
@ -22,13 +22,15 @@ const Header = (): React.ReactElement => {
|
||||
<Translate>A lightweight Node.js private proxy registry</Translate>
|
||||
</p>
|
||||
<iframe
|
||||
src={"https://ghbtns.com/github-btn.html?user=verdaccio&repo=verdaccio&type=star&count=true&size=large"}
|
||||
frameBorder="0"
|
||||
scrolling="0"
|
||||
width="160px"
|
||||
height="30px"
|
||||
style={{ marginTop: '8px' }}
|
||||
/>
|
||||
src={
|
||||
'https://ghbtns.com/github-btn.html?user=verdaccio&repo=verdaccio&type=star&count=true&size=large'
|
||||
}
|
||||
frameBorder="0"
|
||||
scrolling="0"
|
||||
width="160px"
|
||||
height="30px"
|
||||
style={{ marginTop: '8px' }}
|
||||
/>
|
||||
<div className={styles['header--links']}>
|
||||
<a href="/Talks" className="link-secondary">
|
||||
WATCH
|
||||
@ -48,8 +50,8 @@ const Header = (): React.ReactElement => {
|
||||
<Command
|
||||
command="npm install --global verdaccio"
|
||||
alt={translate({ message: 'NPM command to install Verdaccio' })}
|
||||
/>
|
||||
</div>
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@ -8,7 +8,7 @@ import styles from './UsedBy.module.scss';
|
||||
|
||||
const UsedBy = (): React.ReactElement => (
|
||||
<section className={styles.usedBy}>
|
||||
<div className={styles['usedBy--main']}>
|
||||
<div className={styles['usedBy--main']}>
|
||||
<b>
|
||||
<Translate>USED BY</Translate>
|
||||
</b>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Translate from '@docusaurus/Translate';
|
||||
import Link from '@docusaurus/Link';
|
||||
import Translate from '@docusaurus/Translate';
|
||||
import useBaseUrl from '@docusaurus/useBaseUrl';
|
||||
import React from 'react';
|
||||
|
||||
|
@ -17,10 +17,10 @@ const Home = (): React.ReactElement => {
|
||||
<Layout title={siteConfig.tagline} description={siteConfig.customFields.description}>
|
||||
<header className={styles.header}>
|
||||
<Wave />
|
||||
<Header />
|
||||
<Header />
|
||||
</header>
|
||||
<main className={styles.main}>
|
||||
<UsedBy />
|
||||
<UsedBy />
|
||||
<WhatIsVerdaccio />
|
||||
<Feature />
|
||||
<PackageManagers />
|
||||
|
@ -28,7 +28,6 @@ import ReactPlayer from 'react-player/youtube'
|
||||
|
||||
### Slides
|
||||
|
||||
|
||||
```mdx-code-block
|
||||
import Iframe from 'react-iframe'
|
||||
|
||||
@ -39,4 +38,3 @@ import Iframe from 'react-iframe'
|
||||
scrolling={false}
|
||||
position="relative"/>
|
||||
```
|
||||
|
||||
|
@ -37,7 +37,6 @@ import ReactPlayer from 'react-player/youtube'
|
||||
<ReactPlayer url='https://youtube.com/playlist?list=PLP8UI_MhLljIDZOFHd7YlvUVhV89caeyu' height="600px" width="100%" pip controls/>
|
||||
```
|
||||
|
||||
|
||||
## Contributors Tutorials
|
||||
|
||||
```mdx-code-block
|
||||
@ -45,7 +44,6 @@ import ReactPlayer from 'react-player/youtube'
|
||||
<ReactPlayer url='https://youtube.com/playlist?list=PLP8UI_MhLljIkGcN-czMCR3ET82prbs0O' height="600px" width="100%" pip controls/>
|
||||
```
|
||||
|
||||
|
||||
## Tutoriales en Español
|
||||
|
||||
```mdx-code-block
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: amazon
|
||||
title: "Amazon Web Services"
|
||||
title: 'Amazon Web Services'
|
||||
---
|
||||
|
||||
This document describes several approaches for deploying Verdaccio in the AWS cloud.
|
||||
@ -29,19 +29,21 @@ Elastic File System
|
||||
```
|
||||
|
||||
Architecture notes:
|
||||
* Deploy this stack into the region closest to your users for maximum performance.
|
||||
* We use an auto scaling group primarily for self-healing. The system requirements of Verdaccio are pretty low, so it's unlikely you'll need multiple instances to handle traffic load.
|
||||
* Because Amazon Linux 2 doesn't include Node, we run Verdaccio as a Docker image rather than natively on the instance. This is faster and more secure than relying on third party package sources for Node.
|
||||
* Elastic File System is cheap and stateful, and works across AZs. An alternative would be the [third-party S3 storage plugin](https://github.com/remitly/verdaccio-s3-storage).
|
||||
* For backup, use AWS Backup
|
||||
|
||||
- Deploy this stack into the region closest to your users for maximum performance.
|
||||
- We use an auto scaling group primarily for self-healing. The system requirements of Verdaccio are pretty low, so it's unlikely you'll need multiple instances to handle traffic load.
|
||||
- Because Amazon Linux 2 doesn't include Node, we run Verdaccio as a Docker image rather than natively on the instance. This is faster and more secure than relying on third party package sources for Node.
|
||||
- Elastic File System is cheap and stateful, and works across AZs. An alternative would be the [third-party S3 storage plugin](https://github.com/remitly/verdaccio-s3-storage).
|
||||
- For backup, use AWS Backup
|
||||
|
||||
Estimated monthly cost for a small installation (in us-east-1):
|
||||
* ALB (1 LCU average): $22.265/mo
|
||||
* EC2 (t3.nano): $3.796/mo
|
||||
* EBS (8gb): $0.80/mo
|
||||
* EFS (5gb): $1.5/mo
|
||||
* Data transfer: (10gb): $0.9/mo
|
||||
* **TOTAL:** Under $30/mo
|
||||
|
||||
- ALB (1 LCU average): $22.265/mo
|
||||
- EC2 (t3.nano): $3.796/mo
|
||||
- EBS (8gb): $0.80/mo
|
||||
- EFS (5gb): $1.5/mo
|
||||
- Data transfer: (10gb): $0.9/mo
|
||||
- **TOTAL:** Under $30/mo
|
||||
|
||||
## ECS {#ecs}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: ansible
|
||||
title: "Ansible"
|
||||
title: 'Ansible'
|
||||
---
|
||||
|
||||
We have a customised solution for `verdaccio` in our organization.
|
||||
@ -9,10 +9,9 @@ We have a customised solution for `verdaccio` in our organization.
|
||||
|
||||
#### Other options {#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-verdaccio-role [https://github.com/refinery29/ansible-verdaccio-role](https://github.com/refinery29/ansible-verdaccio-role)
|
||||
|
||||
- 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-verdaccio-role [https://github.com/refinery29/ansible-verdaccio-role](https://github.com/refinery29/ansible-verdaccio-role)
|
||||
|
||||
#### Related talks {#related-talks}
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
# 5.x API
|
||||
|
||||
Go to [Node-API](https://verdaccio.org/docs/verdaccio-programmatically).
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: articles
|
||||
title: "Articles"
|
||||
title: 'Articles'
|
||||
---
|
||||
|
||||
Below is a list of articles about Verdaccio. If you have written a blog post or tutorial that mentions Verdaccio, feel free to add it here!
|
||||
@ -9,92 +9,87 @@ Below is a list of articles about Verdaccio. If you have written a blog post or
|
||||
|
||||
## Maintainer Articles {#maintainers-articles}
|
||||
|
||||
* [An Introduction to Verdaccio](https://medium.com/@jotadeveloper/an-introduction-to-verdaccio-f6c72e865425)
|
||||
* [Five use cases where a npm private proxy fits in your workflow](https://medium.com/@jotadeveloper/five-use-cases-where-a-npm-private-proxy-fits-in-your-workflow-632a81779c14)
|
||||
* [An Introduction to Verdaccio](https://medium.com/@jotadeveloper/an-introduction-to-verdaccio-f6c72e865425)
|
||||
* [NPM Registry for your organisation](https://medium.com/@ayusharma.in/npm-registry-for-your-organisation-aeb8ea76144)
|
||||
* [Verdaccio 3 released 🎉!!](https://medium.com/verdaccio/verdaccio-3-released-feb06ef38558)
|
||||
* [The crazy story of Verdaccio](https://medium.com/verdaccio/the-crazy-story-of-verdaccio-d35d924728bc)
|
||||
* [Verdaccio 4 alpha release 🚀](https://medium.com/verdaccio/verdaccio-4-alpha-release-400c7ed4884d)
|
||||
* [Verdaccio and deterministic lock files](https://medium.com/verdaccio/verdaccio-and-deterministic-lock-files-5339d82d611e)
|
||||
* [Setting up Verdaccio on DigitalOcean](https://medium.com/verdaccio/setting-up-verdaccio-on-digitalocean-61b5d08e4f0d)
|
||||
* [How I learned React Js and how you can…](https://medium.com/verdaccio/how-i-learned-react-js-and-how-you-can-8663f938426c)
|
||||
* [How did I fall in the open source world…and that was a nice thing!](https://medium.com/@priscilawebdev/how-do-i-fall-in-the-open-source-world-and-that-was-a-nice-thing-b0e85d05490d)
|
||||
|
||||
|
||||
- [An Introduction to Verdaccio](https://medium.com/@jotadeveloper/an-introduction-to-verdaccio-f6c72e865425)
|
||||
- [Five use cases where a npm private proxy fits in your workflow](https://medium.com/@jotadeveloper/five-use-cases-where-a-npm-private-proxy-fits-in-your-workflow-632a81779c14)
|
||||
- [An Introduction to Verdaccio](https://medium.com/@jotadeveloper/an-introduction-to-verdaccio-f6c72e865425)
|
||||
- [NPM Registry for your organisation](https://medium.com/@ayusharma.in/npm-registry-for-your-organisation-aeb8ea76144)
|
||||
- [Verdaccio 3 released 🎉!!](https://medium.com/verdaccio/verdaccio-3-released-feb06ef38558)
|
||||
- [The crazy story of Verdaccio](https://medium.com/verdaccio/the-crazy-story-of-verdaccio-d35d924728bc)
|
||||
- [Verdaccio 4 alpha release 🚀](https://medium.com/verdaccio/verdaccio-4-alpha-release-400c7ed4884d)
|
||||
- [Verdaccio and deterministic lock files](https://medium.com/verdaccio/verdaccio-and-deterministic-lock-files-5339d82d611e)
|
||||
- [Setting up Verdaccio on DigitalOcean](https://medium.com/verdaccio/setting-up-verdaccio-on-digitalocean-61b5d08e4f0d)
|
||||
- [How I learned React Js and how you can…](https://medium.com/verdaccio/how-i-learned-react-js-and-how-you-can-8663f938426c)
|
||||
- [How did I fall in the open source world…and that was a nice thing!](https://medium.com/@priscilawebdev/how-do-i-fall-in-the-open-source-world-and-that-was-a-nice-thing-b0e85d05490d)
|
||||
|
||||
# Articles / Blogs / Tutorials (by Language)
|
||||
|
||||
### Remarkable Articles {#remarkable-articles}
|
||||
|
||||
* [Why Private Npm Registries Matter and How Verdaccio Makes It Easy](https://fusebit.io/blog/private-npm-verdaccio/?utm_source=verdaccio.org&utm_medium=referral)
|
||||
* [Automating package publishing in JavaScript projects](https://blog.codecentric.de/en/2021/02/automating-package-publishing-in-javascript-projects/)
|
||||
* [10 npm Security Best Practices](https://snyk.io/blog/ten-npm-security-best-practices/)
|
||||
* [Cover Your Apps While Still Using npm](https://nodesource.com/blog/cover-your-apps-while-still-using-npm/)
|
||||
* [Containerizing Node.js Applications with Docker](https://nodesource.com/blog/containerizing-node-js-applications-with-docker)
|
||||
* [Verdaccio - A lightweight npm proxy registry - Interview with Juan Picado](https://survivejs.com/blog/verdaccio-interview/)
|
||||
* [Host, Publish and Manage Private npm Packages with Verdaccio](https://www.sitepoint.com/private-npm-packages-verdaccio/)
|
||||
* [Free Private NPM with Verdaccio and AWS](https://medium.com/@odahcam/free-private-npm-with-verdaccio-and-aws-a88e6f0f4beb)
|
||||
* [Run your own Unity Package Server!](https://medium.com/@markushofer/run-your-own-unity-package-server-b4fe9995704e)
|
||||
* [Ways to have your private npm registry — and a final DIY solution](https://medium.com/engenharia-noalvo/ways-to-have-your-private-npm-registry-and-a-final-diy-solution-eed001a88e74)
|
||||
* [How to set up a free private npm registry… for Windows](https://medium.com/@Anderson7301/how-to-set-up-a-free-private-npm-registry-for-windows-f532c6a381ce)
|
||||
* [Setup a Private NPM Server on Azure in 45 Seconds](https://edi.wang/post/2020/7/7/setup-a-private-npm-server-on-azure-in-45-seconds)
|
||||
- [Why Private Npm Registries Matter and How Verdaccio Makes It Easy](https://fusebit.io/blog/private-npm-verdaccio/?utm_source=verdaccio.org&utm_medium=referral)
|
||||
- [Automating package publishing in JavaScript projects](https://blog.codecentric.de/en/2021/02/automating-package-publishing-in-javascript-projects/)
|
||||
- [10 npm Security Best Practices](https://snyk.io/blog/ten-npm-security-best-practices/)
|
||||
- [Cover Your Apps While Still Using npm](https://nodesource.com/blog/cover-your-apps-while-still-using-npm/)
|
||||
- [Containerizing Node.js Applications with Docker](https://nodesource.com/blog/containerizing-node-js-applications-with-docker)
|
||||
- [Verdaccio - A lightweight npm proxy registry - Interview with Juan Picado](https://survivejs.com/blog/verdaccio-interview/)
|
||||
- [Host, Publish and Manage Private npm Packages with Verdaccio](https://www.sitepoint.com/private-npm-packages-verdaccio/)
|
||||
- [Free Private NPM with Verdaccio and AWS](https://medium.com/@odahcam/free-private-npm-with-verdaccio-and-aws-a88e6f0f4beb)
|
||||
- [Run your own Unity Package Server!](https://medium.com/@markushofer/run-your-own-unity-package-server-b4fe9995704e)
|
||||
- [Ways to have your private npm registry — and a final DIY solution](https://medium.com/engenharia-noalvo/ways-to-have-your-private-npm-registry-and-a-final-diy-solution-eed001a88e74)
|
||||
- [How to set up a free private npm registry… for Windows](https://medium.com/@Anderson7301/how-to-set-up-a-free-private-npm-registry-for-windows-f532c6a381ce)
|
||||
- [Setup a Private NPM Server on Azure in 45 Seconds](https://edi.wang/post/2020/7/7/setup-a-private-npm-server-on-azure-in-45-seconds)
|
||||
|
||||
### English {#english}
|
||||
|
||||
* [Testing your npm package before releasing it using Verdaccio + ngrok](https://medium.com/strapi/testing-your-npm-package-before-releasing-it-using-verdaccio-ngrok-28e2832c850a)
|
||||
* [Host your own private NPM repository with Verdaccio](https://medium.com/devopslinks/host-your-own-private-npm-repository-with-verdaccio-e8a3202b97c5)
|
||||
* [Local npm private registry with zero configuration](https://dev.to/iriskatastic/local-npm-private-registry-with-zero-configuration-njo)
|
||||
* [It depends. On the registry](https://blog.softwaremill.com/it-depends-on-the-registry-8fa9d9c5a3b)
|
||||
* [Host, Publish and Manage Private npm Packages with Verdaccio](http://allprowebdesigns.com/2017/01/host-publish-and-manage-private-npm-packages-with-verdaccio/)
|
||||
* [Setting Up a Private NPM Registry](https://gir.me.uk/posts/private-npm-registry.html)
|
||||
* [Testing NPM alpha / beta / rc packages](https://medium.com/@the1mills/testing-npm-alpha-beta-rc-packages-108b65eb03d2)
|
||||
* [Running a local npm repository on Windows Server using Verdaccio](https://robertwray.co.uk/blog/running-a-local-npm-repository-on-windows-server-using-verdaccio)
|
||||
* [Kubernetes private NPM registry](https://medium.com/@tompape/kubernetes-private-npm-registry-fb5f450fa611)
|
||||
* [Verdaccio examples for Google Cloud and K8s setups. https://github.com/papezt/verdaccio-examples](https://github.com/papezt/verdaccio-examples)
|
||||
* [Setting up a private NPM Registry Is Easier Than You Think](https://medium.com/@902Labs/setting-up-a-private-npm-registry-is-easier-than-you-think-455e1bd438f2)
|
||||
- [Testing your npm package before releasing it using Verdaccio + ngrok](https://medium.com/strapi/testing-your-npm-package-before-releasing-it-using-verdaccio-ngrok-28e2832c850a)
|
||||
- [Host your own private NPM repository with Verdaccio](https://medium.com/devopslinks/host-your-own-private-npm-repository-with-verdaccio-e8a3202b97c5)
|
||||
- [Local npm private registry with zero configuration](https://dev.to/iriskatastic/local-npm-private-registry-with-zero-configuration-njo)
|
||||
- [It depends. On the registry](https://blog.softwaremill.com/it-depends-on-the-registry-8fa9d9c5a3b)
|
||||
- [Host, Publish and Manage Private npm Packages with Verdaccio](http://allprowebdesigns.com/2017/01/host-publish-and-manage-private-npm-packages-with-verdaccio/)
|
||||
- [Setting Up a Private NPM Registry](https://gir.me.uk/posts/private-npm-registry.html)
|
||||
- [Testing NPM alpha / beta / rc packages](https://medium.com/@the1mills/testing-npm-alpha-beta-rc-packages-108b65eb03d2)
|
||||
- [Running a local npm repository on Windows Server using Verdaccio](https://robertwray.co.uk/blog/running-a-local-npm-repository-on-windows-server-using-verdaccio)
|
||||
- [Kubernetes private NPM registry](https://medium.com/@tompape/kubernetes-private-npm-registry-fb5f450fa611)
|
||||
- [Verdaccio examples for Google Cloud and K8s setups. https://github.com/papezt/verdaccio-examples](https://github.com/papezt/verdaccio-examples)
|
||||
- [Setting up a private NPM Registry Is Easier Than You Think](https://medium.com/@902Labs/setting-up-a-private-npm-registry-is-easier-than-you-think-455e1bd438f2)
|
||||
|
||||
### Japanese {#japanese}
|
||||
|
||||
* [Verdaccio でプライベート npm リポジトリをサクッと立てる](http://neos21.hatenablog.com/entry/2017/09/08/080000)
|
||||
* [verdaccioでprivateなnpmリポジトリを作成](https://qiita.com/mtokiwa/items/1bc22a2270e4408d4cdd)
|
||||
* [Version control of my own UnityPackage with Unity × Verdaccio / Unity×Verdaccioで自作UnityPackageをバージョン管理する](https://synamon.hatenablog.com/entry/2018/08/15/185607)
|
||||
- [Verdaccio でプライベート npm リポジトリをサクッと立てる](http://neos21.hatenablog.com/entry/2017/09/08/080000)
|
||||
- [verdaccio で private な npm リポジトリを作成](https://qiita.com/mtokiwa/items/1bc22a2270e4408d4cdd)
|
||||
- [Version control of my own UnityPackage with Unity × Verdaccio / Unity×Verdaccio で自作 UnityPackage をバージョン管理する](https://synamon.hatenablog.com/entry/2018/08/15/185607)
|
||||
|
||||
### Chinese {#chinese}
|
||||
|
||||
* [使用 verdaccio 搭建 npm 私有仓储](https://blog.sigoden.com/verdaccio--private-npm-registry/)
|
||||
* [Verdaccio:一个轻量级的私有npm代理注册表(sinopia fork)](https://www.ctolib.com/verdaccio-verdaccio.html)
|
||||
* [npm 私服工具verdaccio 安装配置试用](http://www.cnblogs.com/rongfengliang/p/7811838.html)
|
||||
* [搭建私有npm镜像](http://www.blackcater.win/2018/03/01/%E6%90%AD%E5%BB%BA%E7%A7%81%E6%9C%89npm%E9%95%9C%E5%83%8F/)
|
||||
* [搭建离线npm私库——verdaccio](https://www.jishux.com/plus/view-765581-1.html)
|
||||
* [[筆記] 建立自己的 npm, 以npm Orgs跟Verdaccio為例](https://medium.com/@ceall8650/%E7%AD%86%E8%A8%98-%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E7%9A%84-npm-%E4%BB%A5npm-orgs%E8%B7%9Fverdaccio%E7%82%BA%E4%BE%8B-cfb83b2307e6)
|
||||
|
||||
- [使用 verdaccio 搭建 npm 私有仓储](https://blog.sigoden.com/verdaccio--private-npm-registry/)
|
||||
- [Verdaccio:一个轻量级的私有 npm 代理注册表(sinopia fork)](https://www.ctolib.com/verdaccio-verdaccio.html)
|
||||
- [npm 私服工具 verdaccio 安装配置试用](http://www.cnblogs.com/rongfengliang/p/7811838.html)
|
||||
- [搭建私有 npm 镜像](http://www.blackcater.win/2018/03/01/%E6%90%AD%E5%BB%BA%E7%A7%81%E6%9C%89npm%E9%95%9C%E5%83%8F/)
|
||||
- [搭建离线 npm 私库——verdaccio](https://www.jishux.com/plus/view-765581-1.html)
|
||||
- [[筆記] 建立自己的 npm, 以 npm Orgs 跟 Verdaccio 為例](https://medium.com/@ceall8650/%E7%AD%86%E8%A8%98-%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E7%9A%84-npm-%E4%BB%A5npm-orgs%E8%B7%9Fverdaccio%E7%82%BA%E4%BE%8B-cfb83b2307e6)
|
||||
|
||||
### French {#french}
|
||||
|
||||
* [Installer un registre NPM](https://allons-y.io/wiki/installer-un-registre-npm)
|
||||
* [Verdaccio - Un registre de paquets npm](https://blog.yoannfleury.dev/verdaccio-un-registre-de-paquets-npm/)
|
||||
|
||||
- [Installer un registre NPM](https://allons-y.io/wiki/installer-un-registre-npm)
|
||||
- [Verdaccio - Un registre de paquets npm](https://blog.yoannfleury.dev/verdaccio-un-registre-de-paquets-npm/)
|
||||
|
||||
### Spanish {#spanish}
|
||||
* [NPM privado: instalar y configurar Verdaccio](https://www.todojs.com/npm-privado-con-verdaccio/)
|
||||
* [NPM privado: 5 razones y 7 recomendaciones para utilizarlo](https://www.todojs.com/npm-privado-5-razones-y-7-recomendaciones/)
|
||||
|
||||
- [NPM privado: instalar y configurar Verdaccio](https://www.todojs.com/npm-privado-con-verdaccio/)
|
||||
- [NPM privado: 5 razones y 7 recomendaciones para utilizarlo](https://www.todojs.com/npm-privado-5-razones-y-7-recomendaciones/)
|
||||
|
||||
### Portuguese-BR {#portuguese-BR}
|
||||
|
||||
* [Problemas com pacotes do npm? Verdaccio pode ser a solução](https://dev.to/dxwebster/pt-br-problemas-com-pacotes-do-npm-verdaccio-pode-ser-a-solucao-2966)
|
||||
|
||||
- [Problemas com pacotes do npm? Verdaccio pode ser a solução](https://dev.to/dxwebster/pt-br-problemas-com-pacotes-do-npm-verdaccio-pode-ser-a-solucao-2966)
|
||||
|
||||
### German {#german}
|
||||
|
||||
* [Struktur für große Angular-Anwendungen: Microservices, Module, MonoRepo?](https://jaxenter.de/struktur-angular-anwendungen-67467)
|
||||
* [Angular in einer Microservices-Welt](https://jaxenter.de/angular-microservices-66445)
|
||||
* [Privates NPM Repository mit Verdaccio (SSL & Docker)](https://blog.zotorn.de/privates-npm-repository-mit-verdaccio-ssl-docker-1/)
|
||||
- [Struktur für große Angular-Anwendungen: Microservices, Module, MonoRepo?](https://jaxenter.de/struktur-angular-anwendungen-67467)
|
||||
- [Angular in einer Microservices-Welt](https://jaxenter.de/angular-microservices-66445)
|
||||
- [Privates NPM Repository mit Verdaccio (SSL & Docker)](https://blog.zotorn.de/privates-npm-repository-mit-verdaccio-ssl-docker-1/)
|
||||
|
||||
## Slides {#slides}
|
||||
|
||||
* [Introduction to Verdaccio VueJS Meetup 2018](https://www.slideshare.net/juancarlospicado/introduction-to-verdaccio)
|
||||
* [Introduction Verdaccio Vienna JS Meetup 2019](https://docs.google.com/presentation/d/1eam_OtXCQh5IVYyia2GHhxVD8tb37B0yIadVa8wxQSk/edit?usp=sharing)
|
||||
* [Cover Your Apps While Still Using npm](https://www.slideshare.net/TierneyCoren/cover-your-apps-while-still-using-npm)
|
||||
* [Unity 2018-2019を見据えたDeNAのUnity開発のこれから [DeNA TechCon 2019]](https://www.slideshare.net/dena_tech/unity-20182019denaunity-dena-techcon-2019)
|
||||
- [Introduction to Verdaccio VueJS Meetup 2018](https://www.slideshare.net/juancarlospicado/introduction-to-verdaccio)
|
||||
- [Introduction Verdaccio Vienna JS Meetup 2019](https://docs.google.com/presentation/d/1eam_OtXCQh5IVYyia2GHhxVD8tb37B0yIadVa8wxQSk/edit?usp=sharing)
|
||||
- [Cover Your Apps While Still Using npm](https://www.slideshare.net/TierneyCoren/cover-your-apps-while-still-using-npm)
|
||||
- [Unity 2018-2019 を見据えた DeNA の Unity 開発のこれから [DeNA TechCon 2019]](https://www.slideshare.net/dena_tech/unity-20182019denaunity-dena-techcon-2019)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user