Compare commits
312 Commits
@verdaccio
...
@verdaccio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6bbc8ecc6 | ||
|
|
3763b9f285 | ||
|
|
f96b147ea1 | ||
|
|
1117dd347b | ||
|
|
78486b87e8 | ||
|
|
b121e3662f | ||
|
|
2e51c931dd | ||
|
|
4b0eaff5f7 | ||
|
|
15d5e969c4 | ||
|
|
9805298893 | ||
|
|
e0e39540c5 | ||
|
|
7c75776c84 | ||
|
|
586f1b0684 | ||
|
|
d036190aff | ||
|
|
988ff72081 | ||
|
|
b6495d5b6c | ||
|
|
2f033888e4 | ||
|
|
8a8f2b6774 | ||
|
|
3fe8cb0406 | ||
|
|
13710ba371 | ||
|
|
e39fbfee5f | ||
|
|
14671d8a10 | ||
|
|
be2626fcd5 | ||
|
|
717175567c | ||
|
|
65e077a926 | ||
|
|
b704689309 | ||
|
|
f625c114bb | ||
|
|
42d08eb423 | ||
|
|
668bbd0955 | ||
|
|
2ce7c7dfad | ||
|
|
a2877ab03c | ||
|
|
12d4b1ffc2 | ||
|
|
0fb5d31596 | ||
|
|
b315d4e113 | ||
|
|
6ab1faa25e | ||
|
|
2808cc268f | ||
|
|
d1d820f8b2 | ||
|
|
25a4601594 | ||
|
|
28ce2a99da | ||
|
|
7521a59f19 | ||
|
|
1ca89d923e | ||
|
|
386e47c34b | ||
|
|
fc185335a3 | ||
|
|
a6b0d63afb | ||
|
|
b8c7b771ad | ||
|
|
2645ae2e48 | ||
|
|
66c6df4ae9 | ||
|
|
feb385c8fd | ||
|
|
bd9b170090 | ||
|
|
30c5c19d5f | ||
|
|
9e419a99fc | ||
|
|
9faf6cb209 | ||
|
|
90b8bc242c | ||
|
|
c45711ade5 | ||
|
|
625f529fe9 | ||
|
|
0165ac1cd1 | ||
|
|
d753f02f91 | ||
|
|
456c78b4a7 | ||
|
|
cf9d2d50aa | ||
|
|
843328f73c | ||
|
|
65d7392b3a | ||
|
|
e7ef249b1d | ||
|
|
669f0a63e8 | ||
|
|
35677db1f1 | ||
|
|
d278f1b259 | ||
|
|
0f0cbf2b2f | ||
|
|
f74a6a39e8 | ||
|
|
cd3b702aa6 | ||
|
|
960ebc67a5 | ||
|
|
dd442f192f | ||
|
|
b549a0de59 | ||
|
|
f9c90dd3f5 | ||
|
|
135d21c9db | ||
|
|
a8b7fb0e8d | ||
|
|
05ed10811f | ||
|
|
4c40fa6664 | ||
|
|
3d45cecf04 | ||
|
|
aad7707268 | ||
|
|
73e6863426 | ||
|
|
54b17f4442 | ||
|
|
7aff3dcb9c | ||
|
|
a9144021d4 | ||
|
|
77e2e50943 | ||
|
|
09a7cf3456 | ||
|
|
8ca5fe6d26 | ||
|
|
73d34bf9c4 | ||
|
|
67406082ed | ||
|
|
d6e44a4c18 | ||
|
|
2197d08e42 | ||
|
|
15c694156a | ||
|
|
59ac312c21 | ||
|
|
8f16dcfdee | ||
|
|
95ed3db43c | ||
|
|
cb8991f3d5 | ||
|
|
3d1d5071ed | ||
|
|
8682af5628 | ||
|
|
1d8910a8cd | ||
|
|
1ef60915e6 | ||
|
|
55ee3fdd97 | ||
|
|
4ebf18816a | ||
|
|
276a0a63a7 | ||
|
|
f3f00052d8 | ||
|
|
d2c65da9c7 | ||
|
|
2924ffa235 | ||
|
|
6b1a28deb8 | ||
|
|
a54c18c02a | ||
|
|
52b47868e3 | ||
|
|
8582548559 | ||
|
|
32f66cc2c7 | ||
|
|
6a01bdbcc9 | ||
|
|
5ddfa5264c | ||
|
|
1cc00cf2ab | ||
|
|
086c4a7c3c | ||
|
|
babe5c3f6c | ||
|
|
0da7031e77 | ||
|
|
393125baa1 | ||
|
|
7fb5c45243 | ||
|
|
aecbd226de | ||
|
|
9ffa205076 | ||
|
|
1b217fd346 | ||
|
|
84373c4669 | ||
|
|
c17ee46519 | ||
|
|
6791c2bcfa | ||
|
|
9a2f4a4667 | ||
|
|
629cbdd6b5 | ||
|
|
19d272d10e | ||
|
|
6e21bee204 | ||
|
|
4932d1f47e | ||
|
|
cbdccf7177 | ||
|
|
64c6cbfe9d | ||
|
|
1810ed0d81 | ||
|
|
04931c968e | ||
|
|
648575aa41 | ||
|
|
9ddce9dec7 | ||
|
|
211da6054c | ||
|
|
8339b34adb | ||
|
|
4372d27222 | ||
|
|
52d1e6537e | ||
|
|
7f5c8796be | ||
|
|
b02dab1c2f | ||
|
|
9f73472985 | ||
|
|
9b12c14543 | ||
|
|
e6a5ce9a02 | ||
|
|
7c0a0c106d | ||
|
|
64f0921477 | ||
|
|
8020936758 | ||
|
|
40e125fd2d | ||
|
|
01f9b3c3b4 | ||
|
|
aa310e4af0 | ||
|
|
d0bd58049d | ||
|
|
0e18842be5 | ||
|
|
cab90a54d9 | ||
|
|
0778eebae5 | ||
|
|
0f18f10b52 | ||
|
|
8f43bf17df | ||
|
|
9886b93e85 | ||
|
|
e8cc4232af | ||
|
|
3b0002632d | ||
|
|
b4f73b6d0f | ||
|
|
b79c6e5273 | ||
|
|
58e4ee54d1 | ||
|
|
08da6881db | ||
|
|
13f1c6efca | ||
|
|
5becf3f257 | ||
|
|
4a3e11d072 | ||
|
|
5ccb2bad16 | ||
|
|
dc05edfe60 | ||
|
|
f837e6cc61 | ||
|
|
e6c5aaaa06 | ||
|
|
8f578f88f5 | ||
|
|
23346155c6 | ||
|
|
3ba55e6199 | ||
|
|
9561bd9e82 | ||
|
|
6b6eaf6b67 | ||
|
|
558d78f32a | ||
|
|
505aa612ef | ||
|
|
d5eacc218b | ||
|
|
e2a4477c8f | ||
|
|
9433796093 | ||
|
|
856da934b8 | ||
|
|
785763738d | ||
|
|
6b8806ee71 | ||
|
|
24c14ce583 | ||
|
|
14159b31e1 | ||
|
|
71fbb410e6 | ||
|
|
c8a040e69e | ||
|
|
31d5828f46 | ||
|
|
e676d1bf1c | ||
|
|
061bfcc8d4 | ||
|
|
eab3007939 | ||
|
|
96ba927917 | ||
|
|
ca171790cf | ||
|
|
b5465751a9 | ||
|
|
8dae1f4adb | ||
|
|
c3f8d88ecc | ||
|
|
1d78376506 | ||
|
|
a610ef26b9 | ||
|
|
7cc2fe20af | ||
|
|
b61f762d6c | ||
|
|
a78ff7550a | ||
|
|
e54ec4b5d0 | ||
|
|
c3565f7157 | ||
|
|
8992b22eb3 | ||
|
|
c26ff2e768 | ||
|
|
df33fa3d79 | ||
|
|
e64f8ee294 | ||
|
|
f2bcdb91f9 | ||
|
|
dabb358e64 | ||
|
|
83677e31a2 | ||
|
|
5871760aaa | ||
|
|
821bd776f3 | ||
|
|
e9e4552658 | ||
|
|
fe60eab99c | ||
|
|
57cb03cdb7 | ||
|
|
e2152606dc | ||
|
|
7c68edfce4 | ||
|
|
3c30997072 | ||
|
|
c2621ac386 | ||
|
|
db4afeaff9 | ||
|
|
5f3eee5eaf | ||
|
|
1153a8d92f | ||
|
|
b3e8438f64 | ||
|
|
ab87898c19 | ||
|
|
10aeb4f134 | ||
|
|
1d0fc016d8 | ||
|
|
a9ba3d0649 | ||
|
|
39570af086 | ||
|
|
04b19262d0 | ||
|
|
e83e500b80 | ||
|
|
3a93da454f | ||
|
|
c5f2b07364 | ||
|
|
6384fbd0f6 | ||
|
|
68ea21214a | ||
|
|
eb686fbcaf | ||
|
|
4024205829 | ||
|
|
1f02ac53bb | ||
|
|
827376e85c | ||
|
|
1d11128051 | ||
|
|
e367c3f1e0 | ||
|
|
82c2f4e03a | ||
|
|
fbd761c8ee | ||
|
|
5f3072a819 | ||
|
|
65cb26cf31 | ||
|
|
8c730c0694 | ||
|
|
1e48f1c077 | ||
|
|
d460a2c5da | ||
|
|
8632c3a6d6 | ||
|
|
aa763baec1 | ||
|
|
ddb42431d1 | ||
|
|
8efc6feab2 | ||
|
|
168833d857 | ||
|
|
5e28d40f77 | ||
|
|
d981c1d435 | ||
|
|
8f9467ce3d | ||
|
|
c103a8252e | ||
|
|
f07a9d0c54 | ||
|
|
a280340e09 | ||
|
|
00fa01f470 | ||
|
|
8e5390d97c | ||
|
|
6823c66b87 | ||
|
|
91838002b3 | ||
|
|
5a439a791f | ||
|
|
ace64e2ea3 | ||
|
|
34e1261354 | ||
|
|
34f0f11012 | ||
|
|
716734c83c | ||
|
|
7cd1187f45 | ||
|
|
be9e23da47 | ||
|
|
4fcd6457be | ||
|
|
3838d3d212 | ||
|
|
33f8b00080 | ||
|
|
c707aee713 | ||
|
|
9ed932e589 | ||
|
|
e61bd6c78f | ||
|
|
a13e57586c | ||
|
|
49c2a66342 | ||
|
|
9f2a29a275 | ||
|
|
eb0dae5fa7 | ||
|
|
48fa727cc6 | ||
|
|
a7ba76423e | ||
|
|
d3f78e5b34 | ||
|
|
8b9a1a3372 | ||
|
|
3ad519f0c2 | ||
|
|
9946ea8bea | ||
|
|
9bb5b50c80 | ||
|
|
958a5d886f | ||
|
|
4023269866 | ||
|
|
b92935ea45 | ||
|
|
4ecf3eca4f | ||
|
|
eaf5671b92 | ||
|
|
889e267106 | ||
|
|
644d42564d | ||
|
|
fa230117a1 | ||
|
|
f414f710d6 | ||
|
|
463888165d | ||
|
|
7739e6f4a2 | ||
|
|
5fcc5d493b | ||
|
|
6e70b5c9e9 | ||
|
|
58e89dd1db | ||
|
|
a70454c7b2 | ||
|
|
73585f0262 | ||
|
|
38c40ed304 | ||
|
|
4a8551dcf2 | ||
|
|
82c5c4eb32 | ||
|
|
6c1e46b694 | ||
|
|
f49ca06c68 | ||
|
|
6ab31639fa | ||
|
|
65a1e56f56 | ||
|
|
507e55a9a5 | ||
|
|
80d669e6eb | ||
|
|
81d95ef425 | ||
|
|
6fef45f9ef |
@@ -1,245 +0,0 @@
|
||||
{
|
||||
"projectName": "verdaccio",
|
||||
"projectOwner": "verdaccio",
|
||||
"repoType": "github",
|
||||
"repoHost": "https://github.com",
|
||||
"commitConvention": "none",
|
||||
"files": [
|
||||
"CONTRIBUTORS.md"
|
||||
],
|
||||
"contributors": [
|
||||
{
|
||||
"login": "juanpicado",
|
||||
"name": "Juan Picado",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/558752?v=4",
|
||||
"profile": "https://www.linkedin.com/in/jotadeveloper/",
|
||||
"contributions": [
|
||||
"doc",
|
||||
"code",
|
||||
"infra",
|
||||
"eventOrganizing",
|
||||
"blog",
|
||||
"maintenance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "sergiohgz",
|
||||
"name": "Sergio Herrera",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/14012309?v=4",
|
||||
"profile": "https://github.com/sergiohgz",
|
||||
"contributions": [
|
||||
"infra",
|
||||
"maintenance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "DanielRuf",
|
||||
"name": "Daniel Ruf",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/827205?v=4",
|
||||
"profile": "https://daniel-ruf.de/",
|
||||
"contributions": [
|
||||
"security",
|
||||
"infra",
|
||||
"maintenance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "priscilawebdev",
|
||||
"name": "Priscila Oliveira",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/29228205?v=4",
|
||||
"profile": "https://priscilawebdev.github.io/priscilaoliveira/",
|
||||
"contributions": [
|
||||
"design",
|
||||
"code",
|
||||
"maintenance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ayusharma",
|
||||
"name": "Ayush Sharma",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/6918450?v=4",
|
||||
"profile": "http://ayusharma.github.io/",
|
||||
"contributions": [
|
||||
"infra",
|
||||
"code",
|
||||
"design"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "trentearl",
|
||||
"name": "Trent Earl",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/802857?v=4",
|
||||
"profile": "https://github.com/trentearl",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jmwilkinson",
|
||||
"name": "jmwilkinson",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/17836030?v=4",
|
||||
"profile": "https://github.com/jmwilkinson",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "bufferoverflow",
|
||||
"name": "Roger Meier",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/378909?v=4",
|
||||
"profile": "https://github.com/bufferoverflow",
|
||||
"contributions": [
|
||||
"plugin"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jamesgeorge007",
|
||||
"name": "James George",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/25279263?v=4",
|
||||
"profile": "https://ghuser.io/jamesgeorge007",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "AvailCat",
|
||||
"name": "AvailCat",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/19658647?v=4",
|
||||
"profile": "https://github.com/AvailCat",
|
||||
"contributions": [
|
||||
"code",
|
||||
"infra",
|
||||
"maintenance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "lgaitan",
|
||||
"name": "Lucius Gaitán",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/5970350?v=4",
|
||||
"profile": "https://www.luciusgaitan.com/",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ramonornela",
|
||||
"name": "Ramon Henrique Ornelas",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/187946?v=4",
|
||||
"profile": "https://github.com/ramonornela",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "UnitedMarsupials-zz",
|
||||
"name": "UnitedMarsupials-zz",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/1486340?v=4",
|
||||
"profile": "https://people.freebsd.org/~mi/resume/",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ryan-codingintrigue",
|
||||
"name": "Ryan Graham",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/9048902?v=4",
|
||||
"profile": "http://www.codingintrigue.co.uk/",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "coolsp",
|
||||
"name": "coolsp",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/1246647?v=4",
|
||||
"profile": "https://github.com/coolsp",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ashishsurana",
|
||||
"name": "Ashish Surana",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/5610944?v=4",
|
||||
"profile": "http://ashishsurana.in/",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "buffaybu",
|
||||
"name": "Wang Yifei",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/2025661?v=4",
|
||||
"profile": "https://github.com/buffaybu",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "lirantal",
|
||||
"name": "Liran Tal",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/316371?v=4",
|
||||
"profile": "https://twitter.com/liran_tal",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "brenordr",
|
||||
"name": "Breno Rodrigues",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/19731692?v=4",
|
||||
"profile": "https://github.com/brenordr",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jachstet-sea",
|
||||
"name": "jachstet-sea",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/7993508?v=4",
|
||||
"profile": "https://github.com/jachstet-sea",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Vrtak-CZ",
|
||||
"name": "Patrik Votoček",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/112567?v=4",
|
||||
"profile": "https://patrik.votocek.cz/",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "monkeywithacupcake",
|
||||
"name": "jess",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/7316730?v=4",
|
||||
"profile": "https://github.com/monkeywithacupcake",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "toolsofraj",
|
||||
"name": "toolsofraj",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/2507152?v=4",
|
||||
"profile": "https://github.com/toolsofraj",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ddhp",
|
||||
"name": "Jian-Chen Chen (jesse)",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/1715380?v=4",
|
||||
"profile": "https://github.com/ddhp",
|
||||
"contributions": [
|
||||
"translation",
|
||||
"code"
|
||||
]
|
||||
}
|
||||
],
|
||||
"skipCi": true,
|
||||
"contributorsPerLine": 7
|
||||
}
|
||||
15
.changeset/afraid-mice-obey.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
'@verdaccio/types': minor
|
||||
'@verdaccio/ui-theme': minor
|
||||
'@verdaccio/web': minor
|
||||
---
|
||||
|
||||
allow disable login on ui and endpoints
|
||||
|
||||
To be able disable the login, set `login: false`, anything else would enable login. This flag will disable access via UI and web endpoints.
|
||||
|
||||
```yml
|
||||
web:
|
||||
title: verdaccio
|
||||
login: false
|
||||
```
|
||||
5
.changeset/calm-pants-impress.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'verdaccio-aws-s3-storage': patch
|
||||
---
|
||||
|
||||
Fix the prefix used to delete from s3 when unpublishing packages
|
||||
@@ -4,7 +4,7 @@
|
||||
"commit": false,
|
||||
"linked": [],
|
||||
"access": "public",
|
||||
"baseBranch": "6.x",
|
||||
"baseBranch": "master",
|
||||
"updateInternalDependencies": "patch",
|
||||
"ignore": []
|
||||
}
|
||||
|
||||
5
.changeset/few-mangos-grow.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-theme': minor
|
||||
---
|
||||
|
||||
upgrade to react@17 and other dependencies
|
||||
11
.changeset/gentle-parrots-lay.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
'@verdaccio/config': minor
|
||||
'@verdaccio/local-storage': minor
|
||||
'@verdaccio/e2e-ui': minor
|
||||
---
|
||||
|
||||
Some verdaccio modules depend on 'mkdirp' library which provides recursive directory creation functionality.
|
||||
NodeJS can do this out of the box since v.10.12. The last commit in 'mkdirp' was made in early 2016, and it's mid 2021 now.
|
||||
Time to stick with a built-in library solution!
|
||||
|
||||
- All 'mkdirp' calls are replaced with appropriate 'fs' calls.
|
||||
5
.changeset/gold-vans-tease.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/utils': patch
|
||||
---
|
||||
|
||||
Fixed the validation of the name when searching for a tarball that have scoped package name
|
||||
21
.changeset/healthy-bikes-behave.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
'@verdaccio/cli': patch
|
||||
'@verdaccio/types': patch
|
||||
'@verdaccio/node-api': patch
|
||||
'@verdaccio/server': patch
|
||||
---
|
||||
|
||||
fix: restore logger on init
|
||||
|
||||
Enable logger after parse configuration and log the very first step on startup phase.
|
||||
|
||||
```bash
|
||||
warn --- experiments are enabled, it is recommended do not use experiments in production comment out this section to disable it
|
||||
info --- support for experiment [token] is disabled
|
||||
info --- support for experiment [search] is disabled
|
||||
(node:50831) Warning: config.logs is deprecated, rename configuration to "config.log"
|
||||
(Use `node --trace-warnings ...` to show where the warning was created)
|
||||
info --- http address http://localhost:4873/
|
||||
info --- version: 6.0.0-6-next.11
|
||||
info --- server started
|
||||
```
|
||||
11
.changeset/healthy-poets-compare.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
'@verdaccio/config': patch
|
||||
---
|
||||
|
||||
Feature
|
||||
|
||||
- add option to set storage from environment variable VERDACCIO_STORAGE_PATH
|
||||
|
||||
#### Related tickets
|
||||
|
||||
https://github.com/verdaccio/verdaccio/issues/1681
|
||||
6
.changeset/heavy-ravens-lay.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@verdaccio/cli': minor
|
||||
'@verdaccio/fastify-migration': minor
|
||||
---
|
||||
|
||||
[Fastify] Add ping endpoint
|
||||
5
.changeset/little-stingrays-rule.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'verdaccio-audit': patch
|
||||
---
|
||||
|
||||
fix: several issues which caused the audit to fail (#2335)
|
||||
16
.changeset/many-vans-care.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
'@verdaccio/tarball': patch
|
||||
'@verdaccio/mock': patch
|
||||
'@verdaccio/ui-theme': patch
|
||||
'@verdaccio/server': patch
|
||||
'@verdaccio/utils': patch
|
||||
'verdaccio': patch
|
||||
---
|
||||
|
||||
Bug Fixes
|
||||
|
||||
- fix escaped slash in namespaced packages
|
||||
|
||||
#### Related tickets
|
||||
|
||||
https://github.com/verdaccio/verdaccio/pull/2193
|
||||
@@ -33,23 +33,35 @@
|
||||
"verdaccio-aws-s3-storage": "11.0.0-alpha.0",
|
||||
"verdaccio-google-cloud": "11.0.0-alpha.0",
|
||||
"verdaccio-memory": "11.0.0-alpha.0",
|
||||
"@verdaccio/website": "0.0.1",
|
||||
"@verdaccio/ui-theme": "6.0.0-alpha.1",
|
||||
"@verdaccio/e2e-cli": "1.0.0",
|
||||
"@verdaccio/e2e-ui": "1.0.0",
|
||||
"@verdaccio/cli-standalone": "6.0.0-alpha.3",
|
||||
"@verdaccio/cli-ui": "6.0.0-alpha.3",
|
||||
"@verdaccio/tarball": "11.0.0-alpha.3",
|
||||
"@verdaccio/url": "11.0.0-alpha.3"
|
||||
"@verdaccio/url": "11.0.0-alpha.3",
|
||||
"@verdaccio/fastify-migration": "6.0.0-6-next.9",
|
||||
"@verdaccio/eslint-config": "1.0.0",
|
||||
"@verdaccio/benchmark": "1.0.0",
|
||||
"@verdaccio/website": "5.1.3"
|
||||
},
|
||||
"changesets": [
|
||||
"afraid-mice-obey",
|
||||
"big-lobsters-sin",
|
||||
"calm-pants-impress",
|
||||
"few-cooks-destroy",
|
||||
"few-mangos-grow",
|
||||
"fifty-jars-rest",
|
||||
"gentle-parrots-lay",
|
||||
"gentle-trains-switch",
|
||||
"gold-vans-tease",
|
||||
"healthy-bikes-behave",
|
||||
"healthy-poets-compare",
|
||||
"heavy-ravens-lay",
|
||||
"hip-hounds-destroy",
|
||||
"late-adults-love",
|
||||
"late-parents-act",
|
||||
"little-stingrays-rule",
|
||||
"many-vans-care",
|
||||
"modern-spies-tell",
|
||||
"neat-toes-report",
|
||||
"perfect-kangaroos-agree",
|
||||
@@ -57,10 +69,13 @@
|
||||
"plenty-spiders-melt",
|
||||
"plenty-tables-refuse",
|
||||
"pretty-hounds-tap",
|
||||
"red-chefs-float",
|
||||
"shiny-chefs-heal",
|
||||
"smart-apricots-kneel",
|
||||
"spicy-frogs-press",
|
||||
"tender-bags-call",
|
||||
"three-pots-sit"
|
||||
"three-pots-sit",
|
||||
"two-dolls-check",
|
||||
"wild-jokes-beam"
|
||||
]
|
||||
}
|
||||
|
||||
11
.changeset/red-chefs-float.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
'@verdaccio/store': patch
|
||||
'@verdaccio/web': patch
|
||||
---
|
||||
|
||||
Fix the search by exact name of the package
|
||||
|
||||
Full package name queries was not finding anithing. It was happening
|
||||
becouse of stemmer of [lunr.js](https://lunrjs.com/).
|
||||
|
||||
To fix this, the stemmer of [lunr.js](https://lunrjs.com/) was removed from search pipeline.
|
||||
28
.changeset/two-dolls-check.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
'@verdaccio/cli': major
|
||||
'@verdaccio/config': major
|
||||
'@verdaccio/types': major
|
||||
'@verdaccio/logger': major
|
||||
'@verdaccio/node-api': major
|
||||
'verdaccio-google-cloud': major
|
||||
'verdaccio': major
|
||||
---
|
||||
|
||||
feat: node api new structure based on promise
|
||||
|
||||
```js
|
||||
import { runServer } from '@verdaccio/node-api';
|
||||
// or
|
||||
import { runServer } from 'verdaccio';
|
||||
|
||||
const app = await runServer(); // default configuration
|
||||
const app = await runServer('./config/config.yaml');
|
||||
const app = await runServer({ configuration });
|
||||
app.listen(4000, (event) => {
|
||||
// do something
|
||||
});
|
||||
```
|
||||
|
||||
### Breaking Change
|
||||
|
||||
If you are using the node-api, the new structure is Promise based and less arguments.
|
||||
32
.changeset/wild-jokes-beam.md
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
'@verdaccio/types': minor
|
||||
'@verdaccio/ui-theme': minor
|
||||
'@verdaccio/web': minor
|
||||
---
|
||||
|
||||
web: allow ui hide package managers on sidebar
|
||||
|
||||
If there is a package manager of preference over others, you can define the package managers to be displayed on the detail page and sidebar, just define in the `config.yaml` and web section the list of package managers to be displayed.
|
||||
|
||||
```
|
||||
web:
|
||||
title: Verdaccio
|
||||
sort_packages: asc
|
||||
primary_color: #cccccc
|
||||
pkgManagers:
|
||||
- pnpm
|
||||
- yarn
|
||||
# - npm
|
||||
```
|
||||
|
||||
To disable all package managers, just define empty:
|
||||
|
||||
```
|
||||
web:
|
||||
title: Verdaccio
|
||||
sort_packages: asc
|
||||
primary_color: #cccccc
|
||||
pkgManagers:
|
||||
```
|
||||
|
||||
and the section would be hidden.
|
||||
@@ -4,8 +4,8 @@
|
||||
**/types/custom.d.ts
|
||||
build/
|
||||
coverage/
|
||||
flow-typed/
|
||||
node_modules/
|
||||
static/
|
||||
website/
|
||||
wiki/
|
||||
dist/
|
||||
|
||||
102
.eslintrc
@@ -1,102 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"google",
|
||||
"plugin:react/recommended",
|
||||
"plugin:jest/recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:import/typescript",
|
||||
"plugin:jsx-a11y/recommended",
|
||||
"prettier"
|
||||
],
|
||||
"plugins": ["import", "jest", "jsx-a11y", "react-hooks"],
|
||||
"env": {
|
||||
"es6": true,
|
||||
"node": true,
|
||||
"jest": true
|
||||
},
|
||||
"globals": {
|
||||
"__APP_VERSION__": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"allowImportExportEverywhere": true,
|
||||
"sourceType": "module",
|
||||
"ecmaVersion": 11,
|
||||
"ecmaFeatures": {
|
||||
"impliedStrict": true,
|
||||
"jsx": true
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
"node": {
|
||||
"extensions": [".js", ".jsx", ".ts", ".tsx"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"rules": {
|
||||
"curly": ["error", "all"],
|
||||
"react/prop-types": 0,
|
||||
"jest/no-export": 0,
|
||||
"jest/no-test-callback": 0,
|
||||
"jest/expect-expect": 0,
|
||||
"jest/no-try-expect": 0,
|
||||
"jest/no-done-callback": "off",
|
||||
"jest/no-conditional-expect": "off",
|
||||
"keyword-spacing": "off",
|
||||
"no-tabs": "off",
|
||||
"no-useless-escape": "off",
|
||||
"padded-blocks": "off",
|
||||
"require-jsdoc": "off",
|
||||
"valid-jsdoc": "off",
|
||||
"import/order": ["error"],
|
||||
"eol-last": "error",
|
||||
"no-irregular-whitespace": "error",
|
||||
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
|
||||
"no-trailing-spaces": "error",
|
||||
"camelcase": "off",
|
||||
"guard-for-in": "error",
|
||||
"new-cap": "error",
|
||||
"max-len": ["error", 100],
|
||||
"no-console": ["error", { "allow": ["warn"] }],
|
||||
"no-constant-condition": "error",
|
||||
"no-debugger": "error",
|
||||
"no-empty": "error",
|
||||
"no-fallthrough": "error",
|
||||
"no-invalid-this": "error",
|
||||
"no-new-require": "error",
|
||||
"no-undef": "error",
|
||||
"no-unreachable": "error",
|
||||
"no-var": "error",
|
||||
"one-var": "error",
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error",
|
||||
"handle-callback-err": 0,
|
||||
"prefer-const": 0,
|
||||
"@typescript-eslint/camelcase": 0,
|
||||
"@typescript-eslint/ban-ts-ignore": 0,
|
||||
"@typescript-eslint/no-var-requires": 0,
|
||||
"@typescript-eslint/no-inferrable-types": 0,
|
||||
"@typescript-eslint/no-empty-function": 0,
|
||||
"@typescript-eslint/no-this-alias": 0,
|
||||
"@typescript-eslint/no-use-before-define": 0,
|
||||
"@typescript-eslint/array-type": ["error"],
|
||||
"@typescript-eslint/no-explicit-any": 0,
|
||||
"@typescript-eslint/indent": 0,
|
||||
"@typescript-eslint/ban-ts-comment": 0,
|
||||
"@typescript-eslint/ban-types": 0,
|
||||
"@typescript-eslint/explicit-module-boundary-types": 0,
|
||||
|
||||
// rules to fix
|
||||
"no-unused-vars": ["warn", { "vars": "all", "args": "none" }],
|
||||
"jest/no-identical-title": ["warn"],
|
||||
"prefer-promise-reject-errors": ["warn"],
|
||||
"jest/no-disabled-tests": ["warn"],
|
||||
"jest/no-commented-out-tests": ["warn"],
|
||||
"@typescript-eslint/prefer-optional-chain": ["warn"],
|
||||
"@typescript-eslint/explicit-member-accessibility": ["warn"],
|
||||
"@typescript-eslint/no-unused-vars": ["warn"]
|
||||
}
|
||||
}
|
||||
3
.eslintrc.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
extends: ['@verdaccio/eslint-config'],
|
||||
};
|
||||
27
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -6,6 +6,25 @@ title: ''
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
<!-- PLEASE READ THIS:
|
||||
- If you are not sure is a bug, OPEN a DISCUSSION, if is a legitimate bug, is easy to create a bug from a discussion.
|
||||
- Empty reports won't be considered and eventually be closed by a bot.
|
||||
- Include debugging notes will help to fix it faster, HOW TO: https://github.com/verdaccio/verdaccio/wiki/Debugging-Verdaccio
|
||||
- If you remove this template, ticket will be closed immediately.
|
||||
- No English perfect is required, use public translators if is need it, we will do our best to help you.
|
||||
- Extra bonus: The most complete this report is delivered, the faster you will get a response.
|
||||
- Extra bonus: include screenshots, logs (remove sensitive data).
|
||||
- If you are willing to fix it, there is a checkbox at the bottom.
|
||||
-->
|
||||
|
||||
**Your Environment**
|
||||
<!-- bug below the version 5.x will be closed, see SECURITY.md for more details -->
|
||||
* **verdaccio version**: 5.x.x
|
||||
* **node version** [12.x.x, 14.x.x]:
|
||||
* **package manager**: [npm@7, pnpm@6, yarn@2]
|
||||
* **os**: [mac, windows@10, linux]
|
||||
* **platform**: [npm, docker, helm, other]
|
||||
|
||||
**Describe the bug**
|
||||
|
||||
<!-- A clear and concise description of what the bug is. -->
|
||||
@@ -23,7 +42,7 @@ Be aware, the lack of reproducible steps the issue might cause your ticket to be
|
||||
|
||||
<!-- A clear and concise description of what you expected to happen. -->
|
||||
|
||||
**Screenshots**
|
||||
**Screenshots, server logs, package manager log**
|
||||
|
||||
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||
|
||||
@@ -38,10 +57,14 @@ Be aware, the lack of reproducible steps the issue might cause your ticket to be
|
||||
**Debugging output**
|
||||
|
||||
- `$ NODE_DEBUG=request verdaccio` display request calls (verdaccio <--> uplinks)
|
||||
- `$ DEBUG=express:* verdaccio` enable extreme verdaccio debug mode (verdaccio api)
|
||||
- `$ DEBUG=verdaccio* verdaccio` enable extreme verdaccio debug mode (verdaccio api)
|
||||
- `$ npm -ddd` prints:
|
||||
- `$ npm config get registry` prints:
|
||||
|
||||
**Contribute to Verdaccio**
|
||||
|
||||
- [ ] I'm willing to fix this bug 🥇
|
||||
|
||||
<!--
|
||||
|
||||
IMPORTANT: please do not attach external files, all content should be visible from any device.
|
||||
|
||||
10
.github/ISSUE_TEMPLATE/feature.md
vendored
@@ -7,14 +7,18 @@ assignees: ''
|
||||
---
|
||||
|
||||
<!--
|
||||
IMPORTANT: If you don't have an action plan, please consider create a DISCUSSION (idea) instead for an open a feature request issue.
|
||||
|
||||
https://github.com/verdaccio/verdaccio/discussions/new
|
||||
|
||||
Verdaccio is a project addressed for voluntaries, if you appreciate this project consider to donate.
|
||||
1$/5$ or custom amount single contribution
|
||||
|
||||
or monthly
|
||||
1$/month - minimal contribution
|
||||
5$/month - nice contribution
|
||||
500$ - help to promote this project, marketing, stickers.
|
||||
2000$/year - sponsor status, your company logo will be in our readme, meetups talks and your request will have high priority
|
||||
|
||||
https://opencollective.com/verdaccio
|
||||
https://github.com/sponsors/verdaccio
|
||||
|
||||
As reminder, the Open Source must be sustainable.
|
||||
-->
|
||||
|
||||
6
.github/stale.yml
vendored
@@ -1,7 +1,7 @@
|
||||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 15
|
||||
daysUntilStale: 365
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 10
|
||||
daysUntilClose: 500
|
||||
# Issues with these labels will never be considered stale
|
||||
exemptLabels:
|
||||
- dev: high priority
|
||||
@@ -17,7 +17,7 @@ markComment: >
|
||||
|
||||
This issue has gone quiet 😶.
|
||||
|
||||
We get a lot of issues, so we currently close issues after 25 days of inactivity. It’s been at least 15 days since the last update here.
|
||||
We get a lot of issues, so we currently close issues after 180 days of inactivity. It’s been at least 90c days since the last update here.
|
||||
If we missed this issue or if you want to keep it open, please reply here. You can also add/suggest the label "discuss" to keep this issue open!
|
||||
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out [https://github.com/verdaccio/contributing](https://github.com/verdaccio/contributing) for more information about opening PRs, triaging issues, and contributing!
|
||||
|
||||
|
||||
168
.github/workflows/benckmark.yml
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
---
|
||||
name: ci - benchmark
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# 3 times day
|
||||
# collecting enough data to draw some graphics
|
||||
- cron: '0 1 * * *'
|
||||
# push:
|
||||
# branches:
|
||||
# - master
|
||||
jobs:
|
||||
prepare:
|
||||
name: Prepare build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
- name: install pnpm
|
||||
run: sudo npm i pnpm@6.6.1 -g
|
||||
- name: set store
|
||||
run: |
|
||||
mkdir ~/.pnpm-store
|
||||
pnpm config set store-dir ~/.pnpm-store
|
||||
- name: setup pnpm config registry
|
||||
run: pnpm config set registry https://registry.verdaccio.org
|
||||
- name: install dependencies
|
||||
run: pnpm install
|
||||
- name: Cache .pnpm-store
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
pnpm-
|
||||
- name: build
|
||||
run: pnpm build
|
||||
- name: tar packages
|
||||
run: |
|
||||
tar -czvf ${{ github.workspace }}/pkg.tar.gz -C ${{ github.workspace }}/packages .
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: verdaccio-artifact
|
||||
path: pkg.tar.gz
|
||||
benchmark-autocannon:
|
||||
needs: prepare
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
benchmark:
|
||||
- info
|
||||
- tarball
|
||||
verdaccioVersion:
|
||||
# - local
|
||||
- 3.13.1
|
||||
- 4.12.2
|
||||
- 5.1.2
|
||||
name: Benchmark autocannon
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: verdaccio-artifact
|
||||
- name: untar packages
|
||||
run: tar -xzvf pkg.tar.gz -C ${{ github.workspace }}/packages
|
||||
- name: install pnpm
|
||||
# require fixed version
|
||||
run: sudo npm i pnpm@6.6.1 -g
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: install dependencies
|
||||
run: pnpm install
|
||||
- name: start registry
|
||||
run: ./scripts/benchmark-prepare.sh ${{matrix.verdaccioVersion}}
|
||||
- name: benchmark
|
||||
run: pnpm benchmark:api -- -v ${{matrix.verdaccioVersion}} -f ${{matrix.benchmark}}
|
||||
shell: bash
|
||||
env:
|
||||
DEBUG: metrics*
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: verdaccio-metrics-api
|
||||
path: ./api-results-${{matrix.verdaccioVersion}}-${{matrix.benchmark}}.json
|
||||
if-no-files-found: error
|
||||
retention-days: 10
|
||||
- name: submit metrics
|
||||
run: pnpm benchmark:submit
|
||||
env:
|
||||
DEBUG: metrics
|
||||
METRICS_SOURCE: autocannon
|
||||
METRICS_URL: ${{ secrets.METRICS_URL }}
|
||||
METRICS_TOKEN: ${{ secrets.METRICS_TOKEN }}
|
||||
METRICS_BENCHMARK: ${{matrix.benchmark}}
|
||||
METRICS_VERSION: ${{matrix.verdaccioVersion}}
|
||||
METRICS_COMMIT_HASH: ${{ github.sha }}
|
||||
METRICS_FILE_NAME: 'api-results'
|
||||
benchmark:
|
||||
needs: prepare
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
benchmark:
|
||||
- info
|
||||
- tarball
|
||||
verdaccioVersion:
|
||||
# future 6.x (wip)
|
||||
# - local (master branch)
|
||||
# old versions to compare same test along previous releases
|
||||
- 3.13.1
|
||||
- 4.12.2
|
||||
- 5.1.2
|
||||
name: Benchmark hyperfine
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: verdaccio-artifact
|
||||
- name: untar packages
|
||||
run: tar -xzvf pkg.tar.gz -C ${{ github.workspace }}/packages
|
||||
- name: install pnpm
|
||||
# require fixed version
|
||||
run: sudo npm i pnpm@6.6.1 -g
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: install dependencies
|
||||
run: pnpm install
|
||||
- name: install hyperfine
|
||||
run: |
|
||||
wget https://github.com/sharkdp/hyperfine/releases/download/v1.11.0/hyperfine_1.11.0_amd64.deb
|
||||
sudo dpkg -i hyperfine_1.11.0_amd64.deb
|
||||
- name: start registry
|
||||
run: ./scripts/benchmark-prepare.sh ${{matrix.verdaccioVersion}}
|
||||
- name: benchmark
|
||||
run: ./scripts/benchmark-run.sh ${{matrix.benchmark}}
|
||||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
|
||||
shell: bash
|
||||
- name: rename
|
||||
run: mv ./hyper-results.json ./hyper-results-${{matrix.verdaccioVersion}}-${{matrix.benchmark}}.json
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: verdaccio-metrics
|
||||
path: ./hyper-results-${{matrix.verdaccioVersion}}-${{matrix.benchmark}}.json
|
||||
if-no-files-found: error
|
||||
retention-days: 10
|
||||
- name: submit metrics
|
||||
run: pnpm benchmark:submit
|
||||
env:
|
||||
DEBUG: metrics
|
||||
METRICS_SOURCE: hyperfine
|
||||
METRICS_URL: ${{ secrets.METRICS_URL }}
|
||||
METRICS_TOKEN: ${{ secrets.METRICS_TOKEN }}
|
||||
METRICS_BENCHMARK: ${{matrix.benchmark}}
|
||||
METRICS_VERSION: ${{matrix.verdaccioVersion}}
|
||||
METRICS_COMMIT_HASH: ${{ github.sha }}
|
||||
8
.github/workflows/changesets.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
|
||||
push:
|
||||
branches:
|
||||
- 6.x
|
||||
- master
|
||||
|
||||
env:
|
||||
CI: true
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
version:
|
||||
timeout-minutes: 14
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/6.x' && github.repository == 'verdaccio/verdaccio'
|
||||
if: github.ref == 'refs/heads/master' && github.repository == 'verdaccio/verdaccio'
|
||||
steps:
|
||||
- name: checkout code repository
|
||||
uses: actions/checkout@v2
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
||||
|
||||
- name: install pnpm
|
||||
run: npm i pnpm@latest -g
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
||||
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
run: pnpm build
|
||||
|
||||
- name: create versions
|
||||
uses: changesets/action@master
|
||||
uses: verdaccio/changeset-action@master
|
||||
with:
|
||||
version: pnpm ci:version
|
||||
commit: 'chore: update versions'
|
||||
|
||||
45
.github/workflows/ci-e2e-ui.yml
vendored
@@ -1,45 +0,0 @@
|
||||
name: E2E UI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 6.x
|
||||
- 'changeset-release/6.x'
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/ci.yml
|
||||
- 'packages/**'
|
||||
- 'jest/**'
|
||||
- 'package.json'
|
||||
- 'pnpm-workspace.yaml'
|
||||
- 'test/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
node_version: [14]
|
||||
|
||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Use Node ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
- name: Install pnpm
|
||||
run: npm i -g pnpm@latest
|
||||
- name: Install
|
||||
run: pnpm recursive install
|
||||
- name: Clean
|
||||
run: pnpm clean
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
- name: Test UI
|
||||
run: pnpm test:e2e:ui
|
||||
env:
|
||||
DEBUG: verdaccio:e2e*
|
||||
45
.github/workflows/ci-e2e.yml
vendored
@@ -1,45 +0,0 @@
|
||||
name: E2E CLI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 5.x
|
||||
- 'changeset-release/6.x'
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/ci.yml
|
||||
- 'packages/**'
|
||||
- 'jest/**'
|
||||
- 'package.json'
|
||||
- 'pnpm-workspace.yaml'
|
||||
- 'test/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
node_version: [14]
|
||||
|
||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Use Node ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
- name: Install pnpm
|
||||
run: npm i -g pnpm@latest
|
||||
- name: Install
|
||||
run: pnpm recursive install
|
||||
- name: Clean
|
||||
run: pnpm clean
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
- name: Test CLI
|
||||
run: pnpm test:e2e:cli
|
||||
env:
|
||||
DEBUG: verdaccio:e2e*
|
||||
49
.github/workflows/ci-pnpm-dev.yml
vendored
@@ -1,49 +0,0 @@
|
||||
name: CI with pnpm 6
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 5.x
|
||||
- 'changeset-release/6.x'
|
||||
pull_request:
|
||||
paths:
|
||||
- .changeset/**
|
||||
- .github/workflows/ci.yml
|
||||
- 'packages/**'
|
||||
- 'jest/**'
|
||||
- 'package.json'
|
||||
- 'pnpm-workspace.yaml'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
node_version: [12, 15]
|
||||
|
||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Use Node ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node_version: ${{ matrix.node_version }}
|
||||
- name: Install pnpm
|
||||
run: sudo npm i pnpm@dev -g
|
||||
- name: Install
|
||||
run: pnpm recursive install
|
||||
- name: Format
|
||||
run: pnpm format:check
|
||||
- name: Lint
|
||||
run: pnpm lint
|
||||
- name: Clean
|
||||
run: pnpm clean
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
- name: Test
|
||||
run: pnpm test
|
||||
env:
|
||||
DEBUG: verdaccio:web:*
|
||||
39
.github/workflows/ci-website.yml
vendored
@@ -1,39 +0,0 @@
|
||||
name: CI Website
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/ci-website.yml
|
||||
- 'website/**'
|
||||
jobs:
|
||||
ci:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
node_version: [14]
|
||||
|
||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Use Node ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node_version: ${{ matrix.node_version }}
|
||||
- name: Install pnpm
|
||||
run: npm i -g pnpm
|
||||
- name: Install
|
||||
run: pnpm recursive install
|
||||
- name: Format
|
||||
run: pnpm format:check
|
||||
- name: Lint
|
||||
run: pnpm lint
|
||||
- name: Build website
|
||||
run: |
|
||||
cd website
|
||||
pnpm build
|
||||
208
.github/workflows/ci.yml
vendored
@@ -3,8 +3,8 @@ name: CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 6.x
|
||||
- 'changeset-release/6.x'
|
||||
- master
|
||||
- 'changeset-release/master'
|
||||
pull_request:
|
||||
paths:
|
||||
- .changeset/**
|
||||
@@ -13,37 +13,205 @@ on:
|
||||
- 'jest/**'
|
||||
- 'package.json'
|
||||
- 'pnpm-workspace.yaml'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
prepare:
|
||||
runs-on: ubuntu-latest
|
||||
name: setup verdaccio
|
||||
services:
|
||||
verdaccio:
|
||||
image: verdaccio/verdaccio:5
|
||||
ports:
|
||||
- 4873:4873
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Use Node 14
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
- name: set store
|
||||
run: |
|
||||
mkdir ~/.pnpm-store
|
||||
pnpm config set store-dir ~/.pnpm-store
|
||||
- name: Install
|
||||
run: pnpm recursive install --frozen-lockfile --registry http://localhost:4873
|
||||
- name: Cache .pnpm-store
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
pnpm-
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
name: Lint
|
||||
needs: prepare
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Use Node 16
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
- name: Lint
|
||||
run: pnpm lint
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
name: Format
|
||||
needs: prepare
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Use Node 16
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
- name: Lint
|
||||
run: pnpm format:check
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: build
|
||||
needs: [format, lint]
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Use Node 16
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
- name: build
|
||||
run: pnpm build
|
||||
- name: tar packages
|
||||
run: |
|
||||
tar -czvf ${{ github.workspace }}/pkg.tar.gz -C ${{ github.workspace }}/packages .
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: verdaccio-artifact
|
||||
path: pkg.tar.gz
|
||||
test:
|
||||
needs: build
|
||||
strategy:
|
||||
fail-fast: false
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
node_version: [12, 14]
|
||||
|
||||
os: [ubuntu-latest]
|
||||
node_version: [14]
|
||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Use Node ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: verdaccio-artifact
|
||||
- name: untar packages
|
||||
run: tar -xzvf pkg.tar.gz -C ${{ github.workspace }}/packages
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@latest -g
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
run: pnpm recursive install
|
||||
- name: Format
|
||||
run: pnpm format:check
|
||||
- name: Lint
|
||||
run: pnpm lint
|
||||
- name: Clean
|
||||
run: pnpm clean
|
||||
- name: Build
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
- name: Test
|
||||
run: pnpm test
|
||||
ci-e2e-ui:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
name: UI Test E2E Node 14
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: verdaccio-artifact
|
||||
- name: untar packages
|
||||
run: tar -xzvf pkg.tar.gz -C ${{ github.workspace }}/packages
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
## we need scripts, pupetter downloads aditional content
|
||||
run: pnpm recursive install --frozen-lockfile
|
||||
- name: Test UI
|
||||
run: pnpm test:e2e:ui
|
||||
env:
|
||||
DEBUG: verdaccio:e2e*
|
||||
ci-e2e-cli:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
name: CLI Test E2E Node 14
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: verdaccio-artifact
|
||||
- name: untar packages
|
||||
run: tar -xzvf pkg.tar.gz -C ${{ github.workspace }}/packages
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
## we need scripts, pupetter downloads aditional content
|
||||
run: pnpm recursive install --frozen-lockfile
|
||||
- name: Test CLI
|
||||
run: pnpm test:e2e:cli
|
||||
test-windows:
|
||||
needs: [format, lint]
|
||||
runs-on: windows-latest
|
||||
name: windows test node 14
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Use Node 14
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
# pnpm cache is not working for windows (we need a solution)
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
- name: build
|
||||
run: pnpm build
|
||||
- name: Test
|
||||
run: pnpm test
|
||||
env:
|
||||
DEBUG: verdaccio:web:*
|
||||
|
||||
7
.github/workflows/codeql-analysis.yml
vendored
@@ -1,14 +1,9 @@
|
||||
name: 'Code scanning - action'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 5.x
|
||||
- 'changeset-release/6.x'
|
||||
- 'dev/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/ci.yml
|
||||
- .github/workflows/codeql-analysis.yml
|
||||
- 'packages/**'
|
||||
schedule:
|
||||
- cron: '0 2 * * 4'
|
||||
|
||||
30
.github/workflows/docker-publish-pre-check.yml
vendored
@@ -1,30 +0,0 @@
|
||||
name: Docker & Publish Pre-check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/docker-publish-pre-check.yml
|
||||
- 'packages/**'
|
||||
- 'docker-bin/**'
|
||||
- 'package.json'
|
||||
- 'lerna.json'
|
||||
|
||||
jobs:
|
||||
testDocker:
|
||||
name: Test Docker Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Build
|
||||
run: npm run docker
|
||||
env:
|
||||
VERDACCIO_BUILD_REGISTRY: https://registry.verdaccio.org
|
||||
# testVerdaccio:
|
||||
# name: Test Verdaccio Publish
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v1
|
||||
# - name: Publish
|
||||
# uses: verdaccio/github-actions/publish@v0.4.0
|
||||
# with:
|
||||
# args: -d
|
||||
6
.github/workflows/docker-publish.yml
vendored
@@ -12,7 +12,7 @@ on:
|
||||
- 'Dockerfile'
|
||||
- '.dockerignore'
|
||||
branches:
|
||||
- '6.x'
|
||||
- 'master'
|
||||
tags:
|
||||
- 'v*'
|
||||
jobs:
|
||||
@@ -34,8 +34,8 @@ jobs:
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
images: ${{ github.repository }}
|
||||
tag-custom: 6.x-next
|
||||
tag-custom-only: ${{ github.ref == 'refs/heads/6.x' }}
|
||||
tag-custom: nightly-master
|
||||
tag-custom-only: ${{ github.ref == 'refs/heads/master' }}
|
||||
tag-semver: |
|
||||
{{version}}
|
||||
{{major}}
|
||||
|
||||
148
.github/workflows/website.yml
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
name: Verdaccio Website CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
paths:
|
||||
- 'website/**'
|
||||
- 'package.json'
|
||||
- './.github/workflows/website.yml'
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- 'website/**'
|
||||
- 'package.json'
|
||||
- './.github/workflows/website.yml'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
|
||||
- name: Use Node 14
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14
|
||||
|
||||
- name: Cache pnpm modules
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-pnpm-modules
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
|
||||
|
||||
- uses: pnpm/action-setup@v2.0.1
|
||||
with:
|
||||
version: 6.10.2
|
||||
run_install: |
|
||||
- recursive: true
|
||||
args: [--frozen-lockfile]
|
||||
|
||||
- name: Lint And Pretty
|
||||
run: |
|
||||
pnpm eslint:check --filter ...@verdaccio/website
|
||||
pnpm prettier:check --filter ...@verdaccio/website
|
||||
|
||||
- name: Cache Docusaurus Build
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: website/node_modules/.cache/webpack
|
||||
key: cache/webpack-${{github.ref}}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: cache/webpack-${{github.ref}}
|
||||
|
||||
# Will deploy to production on:
|
||||
# 1st: When a push occurs on master branch
|
||||
# 2nd: When we force the worflow dispatch through the UI
|
||||
- name: Build Production
|
||||
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
|
||||
env:
|
||||
CROWDIN_VERDACCIO_PROJECT_ID: ${{ secrets.CROWDIN_VERDACCIO_PROJECT_ID }}
|
||||
CROWDIN_VERDACCIO_API_KEY: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
|
||||
CONTEXT: production
|
||||
run: pnpm netlify:build:production --filter ...@verdaccio/website
|
||||
|
||||
- name: 🔥 Deploy Production Netlify
|
||||
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
|
||||
uses: semoal/action-netlify-deploy@master
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }}
|
||||
build-dir: './website/build'
|
||||
|
||||
# Will deploy to Preview URL, only when a pull request is open with changes on the website
|
||||
- name: Build Deployment Preview
|
||||
if: github.event_name == 'pull_request' && github.ref != 'refs/heads/master'
|
||||
env:
|
||||
CONTEXT: deploy-preview
|
||||
run: pnpm netlify:build:deployPreview --filter ...@verdaccio/website
|
||||
|
||||
- name: 🤖 Deploy Preview Netlify
|
||||
if: github.event_name == 'pull_request' && github.ref != 'refs/heads/master'
|
||||
uses: semoal/action-netlify-deploy@master
|
||||
id: netlify_preview
|
||||
with:
|
||||
draft: true
|
||||
comment-on-pull-request: true
|
||||
github-deployment-is-production: false
|
||||
github-deployment-is-transient: true
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }}
|
||||
build-dir: './website/build'
|
||||
|
||||
- name: Audit preview URL with Lighthouse
|
||||
if: github.event_name == 'pull_request' && github.ref != 'refs/heads/master'
|
||||
id: lighthouse_audit
|
||||
uses: treosh/lighthouse-ci-action@v3
|
||||
with:
|
||||
urls: |
|
||||
${{ steps.netlify_preview.outputs.preview-url }}
|
||||
uploadArtifacts: true
|
||||
temporaryPublicStorage: true
|
||||
|
||||
- name: Format lighthouse score
|
||||
if: github.event_name == 'pull_request' && github.ref != 'refs/heads/master'
|
||||
id: format_lighthouse_score
|
||||
uses: actions/github-script@v3
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
const result = ${{ steps.lighthouse_audit.outputs.manifest }}[0].summary
|
||||
const links = ${{ steps.lighthouse_audit.outputs.links }}
|
||||
const formatResult = (res) => Math.round((res * 100))
|
||||
Object.keys(result).forEach(key => result[key] = formatResult(result[key]))
|
||||
const score = res => res >= 90 ? '🟢' : res >= 50 ? '🟠' : '🔴'
|
||||
const comment = [
|
||||
`⚡️ [Lighthouse report](${Object.values(links)[0]}) for the changes in this PR:`,
|
||||
'| Category | Score |',
|
||||
'| --- | --- |',
|
||||
`| ${score(result.performance)} Performance | ${result.performance} |`,
|
||||
`| ${score(result.accessibility)} Accessibility | ${result.accessibility} |`,
|
||||
`| ${score(result['best-practices'])} Best practices | ${result['best-practices']} |`,
|
||||
`| ${score(result.seo)} SEO | ${result.seo} |`,
|
||||
' ',
|
||||
`*Lighthouse ran on [${Object.keys(links)[0]}](${Object.keys(links)[0]})*`
|
||||
].join('\n')
|
||||
core.setOutput("comment", comment);
|
||||
|
||||
- name: Add comment to PR
|
||||
if: github.event_name == 'pull_request' && github.ref != 'refs/heads/master'
|
||||
id: comment_to_pr
|
||||
uses: marocchino/sticky-pull-request-comment@v1
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
number: ${{ github.event.issue.number }}
|
||||
header: lighthouse
|
||||
message: |
|
||||
${{ steps.format_lighthouse_score.outputs.comment }}
|
||||
24
.gitignore
vendored
@@ -2,22 +2,17 @@
|
||||
verdaccio-*.tgz
|
||||
.DS_Store
|
||||
build/
|
||||
dist/
|
||||
.eslintcache
|
||||
./dist
|
||||
|
||||
### Test
|
||||
node_modules
|
||||
|
||||
### database
|
||||
.verdaccio-db.json
|
||||
.sinopia-db.json
|
||||
|
||||
###
|
||||
### test
|
||||
test-storage*
|
||||
.verdaccio_test_env
|
||||
node_modules
|
||||
package-lock.json
|
||||
yarn-error.log
|
||||
yarn.lock
|
||||
|
||||
|
||||
# docker examples
|
||||
docker-examples/v5/reverse_proxy/nginx/relative_path/storage/*
|
||||
@@ -36,12 +31,15 @@ tsconfig.tsbuildinfo
|
||||
|
||||
## bundle files
|
||||
packages/standalone/dist/
|
||||
|
||||
## ui
|
||||
packages/plugins/ui-theme/static
|
||||
|
||||
# website
|
||||
website/public
|
||||
website/.cache
|
||||
|
||||
# CI Pnpm cache
|
||||
.pnpm-store/
|
||||
|
||||
# benchmark
|
||||
api-results.json
|
||||
hyper-results.json
|
||||
hyper-results*.json
|
||||
api-results*.json
|
||||
|
||||
10
.netlify/netlify-plugin-pnpm/index.js
Normal file
@@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
onPreBuild: async ({ utils: { build, run } }) => {
|
||||
try {
|
||||
await run.command("npm install -g pnpm")
|
||||
await run.command("pnpm install --ignore-scripts --frozen-lockfile")
|
||||
} catch (error) {
|
||||
return build.failBuild(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
2
.netlify/netlify-plugin-pnpm/manifest.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
name: netlify-plugin-pnpm
|
||||
inputs: []
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
## npm
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
@@ -23,7 +22,6 @@ docs/
|
||||
wiki/
|
||||
|
||||
## flow
|
||||
flow-typed/
|
||||
types/
|
||||
|
||||
# jest
|
||||
|
||||
1
.npmrc
@@ -2,3 +2,4 @@ always-auth = true
|
||||
recursive-install = true
|
||||
registry = https://registry.verdaccio.org
|
||||
loglevel=warn
|
||||
fetch-retries="10"
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
**/pnpm-lock.yaml
|
||||
**/verdaccio-corrupted.db.json
|
||||
**/wrong.package.json
|
||||
/website/.cache/
|
||||
/website/crowdin/
|
||||
/website/public/
|
||||
/website/src/dictionaries/
|
||||
crowdin.yaml
|
||||
/docs/website
|
||||
/website/*
|
||||
/website/translated_docs/
|
||||
CHANGELOG.md
|
||||
CONTRIBUTORS.md
|
||||
node_modules/
|
||||
@@ -22,4 +22,5 @@ docker-examples/v5/reverse_proxy/nginx/relative_path/storage/*
|
||||
docker-examples/
|
||||
build/
|
||||
.vscode/
|
||||
.github/
|
||||
.github/
|
||||
.netlify/
|
||||
|
||||
22
.project
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>verdaccio-dev</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1630305579538</id>
|
||||
<name></name>
|
||||
<type>26</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-true-false-node_modules</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
2
.vscode/settings.json
vendored
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"files.exclude": {
|
||||
"**/.nyc_output": true,
|
||||
"**/build": false,
|
||||
"**/build": true,
|
||||
"**/coverage": true,
|
||||
".idea": true,
|
||||
"storage_default_storage": true,
|
||||
|
||||
19
CHANGELOG.md
@@ -2,6 +2,25 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
## [5.0.0](https://github.com/verdaccio/verdaccio/compare/v5.0.0-alpha.7...v5.0.0) (2021-04-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* prepare release for v5 ([#2175](https://github.com/verdaccio/verdaccio/issues/2175)) ([82c5c4e](https://github.com/verdaccio/verdaccio/commit/82c5c4eb32bfcbf9aec7c96340b226b626526b45))
|
||||
|
||||
## [5.0.0-alpha.7](https://github.com/verdaccio/verdaccio/compare/v5.0.0-alpha.6...v5.0.0-alpha.7) (2021-04-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* ui readme missing css ([#2174](https://github.com/verdaccio/verdaccio/issues/2174)) ([f49ca06](https://github.com/verdaccio/verdaccio/commit/f49ca06c68919f920e10f4f5878c34d5886b2e02))
|
||||
* Upgrade Node from 14.16 to 14.16.1 for security fixes ([#2172](https://github.com/verdaccio/verdaccio/issues/2172)) ([6ab3163](https://github.com/verdaccio/verdaccio/commit/6ab31639fab97b1b3e6323c4da862a1cae3ae1c6)), closes [/github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V14.md#14](https://github.com/verdaccio//github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V14.md/issues/14)
|
||||
|
||||
## [5.0.0-alpha.6](https://github.com/verdaccio/verdaccio/compare/v5.0.0-alpha.5...v5.0.0-alpha.6) (2021-04-06)
|
||||
|
||||
## [5.0.0-alpha.5](https://github.com/verdaccio/verdaccio/compare/v5.0.0-alpha.4...v5.0.0-alpha.5) (2021-04-03)
|
||||
|
||||
## [5.0.0-alpha.4](https://github.com/verdaccio/verdaccio/compare/v5.0.0-alpha.3...v5.0.0-alpha.4) (2021-04-03)
|
||||
|
||||
|
||||
|
||||
186
CONTRIBUTING.md
@@ -2,8 +2,8 @@
|
||||
|
||||
> Any change matters, whatever the size, just do it.
|
||||
|
||||
We are happy that you are willing to contribute. For that reason, we
|
||||
have prepared these guidelines for you:
|
||||
We're happy that you're considering contributing! To help, we've prepared these
|
||||
guidelines for you:
|
||||
|
||||
**Table of Contents**
|
||||
|
||||
@@ -32,34 +32,47 @@ have prepared these guidelines for you:
|
||||
|
||||
## How Do I Contribute?
|
||||
|
||||
There are different ways to contribute, each comes with a different levels
|
||||
of tasks, such as:
|
||||
There are many ways to contribute:
|
||||
|
||||
- Report a bug.
|
||||
- Request a feature you think would be great for verdaccio.
|
||||
- Fix bugs.
|
||||
- Test and triage reported bugs by others.
|
||||
- Work on requested/approved features.
|
||||
- Improve the codebase (lint, naming, comments, test descriptions, etc...)
|
||||
- Report a bug
|
||||
- Request a feature you think would be great for Verdaccio
|
||||
- Fix bugs
|
||||
- Test and triage bugs reported by others
|
||||
- Work on requested/approved features
|
||||
- Improve the codebase (linting, naming, comments, test descriptions, etc...)
|
||||
|
||||
Verdaccio has several areas of involvement, which might fit you better, eg:
|
||||
The Verdaccio project is split into several areas:
|
||||
|
||||
- **Core**: The [core](https://github.com/verdaccio/verdaccio) is the main repository, built with **Node.js**.
|
||||
- **Website**: we uses **Gatsby.js** for the **website** and if you are familiar with this technology, you might become the official webmaster.
|
||||
- **Website**: we use [**Docusaurus**](https://docusaurus.io/) for the **website** and if you are familiar with this technology, you might become the official webmaster.
|
||||
- **User Interface**: The [user Interface](https://github.com/verdaccio/ui) is based in **react** and **material-ui** and looking for front-end contributors.
|
||||
- **Kubernetes and Helm**: Ts the official repository for the [**Helm chart**](https://github.com/verdaccio/charts).
|
||||
|
||||
> There are other areas to contribute, like documentation, translation which are not hosted on this repo but check the last section of this notes for further information.
|
||||
> There are other areas to contribute, like documentation, translation which are
|
||||
> not hosted on this repo but check the last section of this notes for further
|
||||
> information.
|
||||
|
||||
## Development Setup
|
||||
|
||||
Verdaccio uses [_pnpm_](https://pnpm.js.org/) as package manager for development in this repository. Please install the latest one:
|
||||
Verdaccio uses [pnpm](https://pnpm.io) as the package manager for development in this repository.
|
||||
|
||||
If you are using pnpm for the first time the [pnpm configuration documentation](https://pnpm.io/configuring) may be useful to avoid any potential problems with the following steps.
|
||||
|
||||
**Note**: pnpm uses npm's configuration formats so check that your global `.npmrc` file does not inadvertently disable package locks. In other words, your `.npmrc` file **should not** contain
|
||||
|
||||
```
|
||||
package-lock=false
|
||||
```
|
||||
|
||||
This setting would cause the `pnpm install` command to install incorrect versions of package dependencies and the subsequent `pnpm build` step would likely fail.
|
||||
|
||||
To begin your development setup, please install the latest version of pnpm globally:
|
||||
|
||||
```
|
||||
npm i -g pnpm
|
||||
```
|
||||
|
||||
First step is installing all dependencies:
|
||||
With pnpm installed, the first step is installing all dependencies:
|
||||
|
||||
```
|
||||
pnpm install
|
||||
@@ -79,62 +92,69 @@ pnpm build
|
||||
pnpm test
|
||||
```
|
||||
|
||||
Verdaccio is a mono repository, for running an specific test or package go the specific package eg:
|
||||
Verdaccio is a mono repository. To run the tests for for a specific package:
|
||||
|
||||
```
|
||||
cd packages/store
|
||||
pnpm test
|
||||
```
|
||||
|
||||
or an specific test in that package
|
||||
or an specific test in that package:
|
||||
|
||||
```
|
||||
pnpm test test/merge.dist.tags.spec.ts
|
||||
```
|
||||
|
||||
or a single test unit
|
||||
or a single test unit:
|
||||
|
||||
```
|
||||
pnpm test test/merge.dist.tags.spec.ts -- -t 'simple'
|
||||
```
|
||||
|
||||
The coverage is enabled by default, to speed up test running
|
||||
Coverage reporting is enabled by default, but you can turn it off to speed up
|
||||
test runs:
|
||||
|
||||
```
|
||||
pnpm test test/merge.dist.tags.spec.ts -- -t 'simple' --coverage=false
|
||||
```
|
||||
|
||||
To increase debug output, we use `debug`, to enable it in your test just add
|
||||
You can enable increased [`debug`](https://www.npmjs.com/package/debug) output:
|
||||
|
||||
```
|
||||
DEBUG=verdaccio* pnpm test
|
||||
DEBUG=verdaccio:* pnpm test
|
||||
```
|
||||
|
||||
More details in the debug section
|
||||
|
||||
### Running and debugging
|
||||
|
||||
We uses [`debug`](https://www.npmjs.com/package/debug) for debug outcome. Each package has it owns namespace.
|
||||
We use [`debug`](https://www.npmjs.com/package/debug) to add helpful debugging
|
||||
output to the code. Each package has it owns namespace.
|
||||
|
||||
### Debugging compiled code
|
||||
#### Debugging compiled code
|
||||
|
||||
Currently you can only run in debug mode pre-compiled packages, to enable debug while running add the `verdaccio` namespace using the `DEBUG` environment variable, like this:
|
||||
Currently you can only run pre-compiled packages in debug mode. To enable debug
|
||||
while running add the `verdaccio` namespace using the `DEBUG` environment
|
||||
variable, like this:
|
||||
|
||||
```
|
||||
DEBUG=verdaccio:* node packages/verdaccio/debug/bootstrap.js
|
||||
```
|
||||
|
||||
On this way can be reviewed every package, but if you need to filter out and display more specific output, increase the name space filter.
|
||||
You can filter this output to just the packages you're interested in using
|
||||
namespaces:
|
||||
|
||||
```
|
||||
DEBUG=verdaccio:plugin:* node packages/verdaccio/debug/bootstrap.js
|
||||
```
|
||||
|
||||
The debug code is intended to analyze what is happening under the hood and none of the output is gathered with the logger module.
|
||||
The debug code is intended to analyze what is happening under the hood and none
|
||||
of the output is sent to the logger module.
|
||||
|
||||
## Reporting Bugs
|
||||
|
||||
**Bugs are considered features that are not working as described in documentation.**
|
||||
**Bugs are considered features that are not working as described in
|
||||
documentation.**
|
||||
|
||||
If you've found a bug in Verdaccio **that isn't a security risk**, please file
|
||||
a report in our [issue tracker](https://github.com/verdaccio/verdaccio/issues).
|
||||
@@ -142,28 +162,31 @@ a report in our [issue tracker](https://github.com/verdaccio/verdaccio/issues).
|
||||
> **NOTE: Verdaccio still does not support all npm commands. Some were not
|
||||
> considered important and others have not been requested yet.**
|
||||
|
||||
### Read the documentation
|
||||
|
||||
Check whether you are using the software in the way is documented [documentation](http://www.verdaccio.org/docs/en/installation.html).
|
||||
|
||||
### What's is not considered a bug?
|
||||
|
||||
- _Third party integrations_: proxies integrations, external plugins.
|
||||
- _Package managers_: If a package manager does not support a specific command or cannot be reproduced with another package manager.
|
||||
- _Features clearly flagged as not supported_.
|
||||
- _Node.js issues installation in any platform_: If you cannot install the global package ( this is considered external issue)
|
||||
- Any ticket which has the flagged as [external issue](https://github.com/verdaccio/verdaccio/labels/external-issue).
|
||||
- _Third party integrations_: proxies integrations, external plugins
|
||||
- _Package managers_: If a package manager does not support a specific command
|
||||
or cannot be reproduced with another package manager
|
||||
- _Features clearly flagged as not supported_
|
||||
- _Node.js issues installation in any platform_: If you cannot install the
|
||||
global package (this is considered external issue)
|
||||
- Any ticket which has beed flagged as an [external issue
|
||||
](https://github.com/verdaccio/verdaccio/labels/external-issue)
|
||||
|
||||
If you intent to report a **security** issue, please follow our [Security policy guidelines](https://github.com/verdaccio/verdaccio/security/policy).
|
||||
If you intend to report a **security** issue, please follow our [Security policy
|
||||
guidelines](https://github.com/verdaccio/verdaccio/security/policy).
|
||||
|
||||
### Issue Search
|
||||
|
||||
Before consider report a bug, please follow this steps before:
|
||||
Before reporting a bug please:
|
||||
|
||||
- Search if has already been reported via the issue search.
|
||||
- Look for the **question** label: we have labelled questions for easy follow-up as [questions](https://github.com/verdaccio/verdaccio/labels/question).
|
||||
- Search for existing issues to see if it has already been reported
|
||||
- Look for the **question** label: we have labelled questions for easy follow-up
|
||||
as [questions](https://github.com/verdaccio/verdaccio/labels/question)
|
||||
|
||||
In case any of those match with your search, up-vote it (using GitHub reactions) or add additional helpful details to the existing issue to show that it's affecting multiple people.
|
||||
In case any of those match with your search, up-vote it (using GitHub reactions)
|
||||
or add additional helpful details to the existing issue to show that it's
|
||||
affecting multiple people.
|
||||
|
||||
### Chat
|
||||
|
||||
@@ -174,20 +197,24 @@ Questions can be asked via [Discord](http://chat.verdaccio.org/)
|
||||
## Request Features
|
||||
|
||||
New feature requests are welcome. Analyse whether the idea fits within scope of
|
||||
the project. Then, detail your request, ensuring context and use case is provided.
|
||||
the project. Adding in context and the use-case will really help!
|
||||
|
||||
**Please provide:**
|
||||
|
||||
- A detailed description the advantages of your request
|
||||
- Whether or not it's compatible with `npm`, `pnpm` and [_yarn classic_](https://github.com/yarnpkg/yarn) or [_yarn berry_](https://github.com/yarnpkg/berry).
|
||||
- Whether or not it's compatible with `npm`, `pnpm` and [_yarn classic_
|
||||
](https://github.com/yarnpkg/yarn) or [_yarn berry_
|
||||
](https://github.com/yarnpkg/berry).
|
||||
- A potential implementation or design
|
||||
- Whatever else you have in your mind 🤓
|
||||
- Whatever else is on your mind! 🤓
|
||||
|
||||
## Contributing Guidelines
|
||||
|
||||
This is the most exciting part, when you became a Verdaccio contributor 🙌🏼, to ensure a fast code review and merge, please follow the next guidelines:
|
||||
It's very exciting to become a Verdaccio contributor 🙌🏼. To ensure a fast code
|
||||
review and merge, please follow the next guidelines:
|
||||
|
||||
> Any contribution gives you the right to be part of this organization as _collaborator_.
|
||||
> Any contribution gives you the right to be part of this organization as
|
||||
> _collaborator_.
|
||||
|
||||
### Submitting a Pull Request
|
||||
|
||||
@@ -213,14 +240,14 @@ information on [rebasing](https://git-scm.com/book/en/v2/Git-Branching-Rebasing)
|
||||
|
||||
#### Caveats
|
||||
|
||||
Feel free to commit as much times you want in your branch, but keep on mind on this repository we `git squash` on merge by default, any other way is forbidden since we intent to have a clean git history.
|
||||
Feel free to commit as much times you want in your branch, but keep on mind on
|
||||
this repository we `git squash` on merge by default, as we like to maintain a
|
||||
clean git history.
|
||||
|
||||
#### Before Commit
|
||||
|
||||
Before committing, **you must ensure there are no linting errors and
|
||||
all tests pass.**
|
||||
|
||||
To do this, run these commands before create the PR:
|
||||
all tests pass.** To do this, run these commands before create the PR:
|
||||
|
||||
```bash
|
||||
pnpm lint
|
||||
@@ -229,9 +256,10 @@ pnpm build
|
||||
pnpm test
|
||||
```
|
||||
|
||||
> note: eslint and formatting are running separately, keep code formatting before push.
|
||||
> note: eslint and formatting are run separately, keep code formatting
|
||||
> before push.
|
||||
|
||||
All good? perfect, then you should create the pull request.
|
||||
All good? Perfect! You should create the pull request.
|
||||
|
||||
#### Commit Guidelines
|
||||
|
||||
@@ -240,8 +268,8 @@ For example:
|
||||
- `feat: A new feature`
|
||||
- `fix: A bug fix`
|
||||
|
||||
A commit of the type feat introduces a new feature to the codebase
|
||||
(this correlates with MINOR in semantic versioning).
|
||||
A commit of the type feat introduces a new feature to the codebase (this
|
||||
correlates with MINOR in semantic versioning).
|
||||
|
||||
e.g.:
|
||||
|
||||
@@ -249,7 +277,8 @@ e.g.:
|
||||
feat: xxxxxxxxxx
|
||||
```
|
||||
|
||||
A commit of the type fix patches a bug in your codebase (this correlates with PATCH in semantic versioning).
|
||||
A commit of the type fix patches a bug in your codebase (this correlates with
|
||||
PATCH in semantic versioning).
|
||||
|
||||
e.g.:
|
||||
|
||||
@@ -257,24 +286,31 @@ e.g.:
|
||||
fix: xxxxxxxxxxx
|
||||
```
|
||||
|
||||
Commits types such as as `docs:`,`style:`,`refactor:`,`perf:`,`test:`
|
||||
and `chore:` are valid but have no effect on versioning. **It would be great if you use them.**
|
||||
Commits types such as as `docs:`,`style:`,`refactor:`,`perf:`,`test:` and
|
||||
`chore:` are valid but have no effect on versioning: **please use them!**
|
||||
|
||||
All commits message are going to be validated when they are created using husky hooks.
|
||||
All commits message are going to be validated when they are created using
|
||||
_husky_ hooks.
|
||||
|
||||
> Please, try to provide one single commit to help a clean and easy merge process.
|
||||
> Please try to provide one single commit to help a clean and easy merge process
|
||||
|
||||
### Adding a changeset
|
||||
|
||||
We use [changesets](https://github.com/atlassian/changesets) in order to generate a detailed Changelog as possible.
|
||||
We use [changesets](https://github.com/atlassian/changesets) in order to
|
||||
generate a detailed Changelog as possible.
|
||||
|
||||
Add a changeset with your Pull Request is essential if you want your contribution get merged. To create a changeset please run:
|
||||
Adding a changeset with your Pull Request is essential if you want your
|
||||
contribution to get merged (unless is a change that does not affect library
|
||||
functionality, eg: typo, docs, readme, add additional test or linting code). To
|
||||
create a changeset please run:
|
||||
|
||||
```
|
||||
pnpm changeset
|
||||
```
|
||||
|
||||
Then select the packages you want to include in your changeset navigating through them and press the spacebar to check it, on finish press enter to move to the next step.
|
||||
Then select the packages you want to include in your changeset navigating
|
||||
through them and press the spacebar to check it, on finish press enter to move
|
||||
to the next step.
|
||||
|
||||
```
|
||||
🦋 Which packages would you like to include? …
|
||||
@@ -287,7 +323,9 @@ Then select the packages you want to include in your changeset navigating throug
|
||||
✔ @verdaccio/commons-api
|
||||
```
|
||||
|
||||
The next question would be if you want a _major bump_, this is not the usual scenario, most likely would be a patch, in that case press enter 2 times (to skip minor)
|
||||
The next question would be if you want a _major bump_. This is not the usual
|
||||
scenario, most likely you want a patch, and in that case press enter 2 times
|
||||
(to skip minor)
|
||||
|
||||
```
|
||||
🦋 Which packages should have a major bump? …
|
||||
@@ -295,7 +333,8 @@ The next question would be if you want a _major bump_, this is not the usual sce
|
||||
✔ @verdaccio/config@5.0.0-alpha.0
|
||||
```
|
||||
|
||||
Once the desired bump you need, the CLI will ask for a summary, here you have fully freedom what to include.
|
||||
Once you have the desired bump you need, the CLI will ask for a summary. Here
|
||||
you have full freedom on what to include:
|
||||
|
||||
```
|
||||
🦋 Which packages would you like to include? · @verdaccio/config
|
||||
@@ -307,7 +346,7 @@ Once the desired bump you need, the CLI will ask for a summary, here you have fu
|
||||
🦋 Summary ›
|
||||
```
|
||||
|
||||
The last step is confirm your changeset or abort the operation.
|
||||
The last step is to confirm your changeset or abort the operation:
|
||||
|
||||
```
|
||||
🦋 Is this your desired changeset? (Y/n) · true
|
||||
@@ -317,9 +356,13 @@ The last step is confirm your changeset or abort the operation.
|
||||
🦋 info /Users/user/verdaccio.clone/.changeset/light-scissors-smell.md
|
||||
```
|
||||
|
||||
Once the changeset is added (all will have an unique name) you can freely edit using markdown, adding additional information, code snippets or what you consider is relevant.
|
||||
Once the changeset is added (all will have an unique name) you can freely edit
|
||||
using markdown, adding additional information, code snippets or whatever else
|
||||
you consider to be relevant.
|
||||
|
||||
All that information will be part of the **changelog**, be concise but informative. It is considered a good option to add your nickname and GitHub link to your profile.
|
||||
All that information will be part of the **changelog**. Be concise but
|
||||
informative! It's recommended to add your nickname and GitHub link to your
|
||||
profile.
|
||||
|
||||
**PRs that do not follow the commit message guidelines will not be merged.**
|
||||
|
||||
@@ -327,7 +370,8 @@ All that information will be part of the **changelog**, be concise but informati
|
||||
|
||||
**Any change in source code must include test updates**.
|
||||
|
||||
If you need help with how testing works, please [refer to the following guide](https://github.com/verdaccio/verdaccio/wiki/Running-and-Debugging-tests).
|
||||
If you need help with how testing works, please [refer to the following guide
|
||||
](https://github.com/verdaccio/verdaccio/wiki/Running-and-Debugging-tests).
|
||||
|
||||
**If you are introducing new features, you MUST include new tests. PRs for
|
||||
features without tests will not be merged.**
|
||||
@@ -340,6 +384,8 @@ If you want to develop your own plugin:
|
||||
|
||||
1. Check whether there is a legacy Sinopia plugin for the feature that you need
|
||||
via [npmjs](https://www.npmjs.com/search?q=sinopia)
|
||||
2. Keep in mind the [life-cycle to load a plugin](https://verdaccio.org/docs/en/dev-plugins)
|
||||
2. Keep in mind the [life-cycle to load a plugin
|
||||
](https://verdaccio.org/docs/en/dev-plugins)
|
||||
3. You are free to host your plugin in your repository
|
||||
4. Provide a detailed description of your plugin to help users understand how to use it.
|
||||
4. Provide a detailed description of your plugin to help users understand how to
|
||||
use it
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:14.15.1-alpine as builder
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:14.17.6-alpine as builder
|
||||
|
||||
ENV NODE_ENV=development \
|
||||
VERDACCIO_BUILD_REGISTRY=https://registry.verdaccio.org
|
||||
@@ -12,14 +12,14 @@ RUN apk --no-cache add openssl ca-certificates wget && \
|
||||
WORKDIR /opt/verdaccio-build
|
||||
COPY . .
|
||||
|
||||
RUN npm -g i pnpm@latest && \
|
||||
RUN npm -g i pnpm@6.10.3 && \
|
||||
pnpm config set registry $VERDACCIO_BUILD_REGISTRY && \
|
||||
pnpm recursive install --frozen-lockfile --ignore-scripts && \
|
||||
pnpm run build
|
||||
# FIXME: need to remove devDependencies from the build
|
||||
# RUN pnpm install --prod --ignore-scripts
|
||||
|
||||
FROM node:14.15.1-alpine
|
||||
FROM node:14.17.6-alpine
|
||||
LABEL maintainer="https://github.com/verdaccio/verdaccio"
|
||||
|
||||
ENV VERDACCIO_APPDIR=/opt/verdaccio \
|
||||
|
||||
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Verdaccio community
|
||||
Copyright (c) 2021 Verdaccio contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
218
README.md
@@ -1,6 +1,10 @@
|
||||

|
||||
|
||||
# Version 6.x (Under development)
|
||||

|
||||
|
||||
# Version 6 (Development branch)
|
||||
|
||||
> Looking for Verdaccio 5? Check branch `5.x`.
|
||||
|
||||
[Verdaccio](https://verdaccio.org/) is a simple, **zero-config-required local private npm registry**.
|
||||
No need for an entire database just to get started! Verdaccio comes out of the box with
|
||||
@@ -10,43 +14,211 @@ For those looking to extend their storage capabilities, Verdaccio
|
||||
**supports various community-made plugins to hook into services such as Amazon's s3,
|
||||
Google Cloud Storage** or create your own plugin.
|
||||
|
||||
[](https://www.npmjs.com/package/verdaccio)
|
||||
[](https://www.npmjs.com/package/verdaccio)
|
||||
[](https://verdaccio.org/docs/en/docker.html)
|
||||
[](https://opencollective.com/verdaccio)
|
||||
[](https://stackshare.io/verdaccio)
|
||||
|
||||
[](http://chat.verdaccio.org/)
|
||||
[](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)
|
||||
[](https://crowdin.com/project/verdaccio)
|
||||
[](https://www.tickgit.com/browse?repo=github.com/verdaccio/verdaccio)
|
||||
|
||||
[](https://twitter.com/verdaccio_npm)
|
||||
[](https://github.com/verdaccio/verdaccio/stargazers)
|
||||
|
||||
## Install 6.x
|
||||
## Install
|
||||
|
||||
> ⚠️ Not available on npmjs
|
||||
|
||||
With docker
|
||||
Install with npm:
|
||||
|
||||
```bash
|
||||
docker pull verdaccio/verdaccio:6.x-next
|
||||
npm install --global verdaccio@6-next --registry https://registry.verdaccio.org/
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
Please check [docs/development.md](docs/development.md) for further notes.
|
||||
|
||||
## Roadmap
|
||||
|
||||
Please check [the roadmap](https://github.com/verdaccio/verdaccio/discussions/1690) if you are willing to contribute.
|
||||
> Published on a temporary registry while setup is ready to publish on npmjs
|
||||
|
||||
## Donations
|
||||
|
||||
Verdaccio is run by **volunteers**; nobody is working full-time on it. If you find this project to be useful and would like to support its development, consider making a donation - **your logo might end up in this readme.** 😉
|
||||
|
||||
**[Donate](https://opencollective.com/verdaccio)** 💵👍🏻 starting from _\$1/month_ or just one single contribution.
|
||||
**[Donate](https://github.com/sponsors/verdaccio)** 💵👍🏻 starting from _$1/month_ or just one single contribution.
|
||||
|
||||
## What does Verdaccio do for me?
|
||||
|
||||
### Use private packages
|
||||
|
||||
If you want to use all benefits of npm package system in your company without sending all code to the public, and use your private packages just as easy as public ones.
|
||||
|
||||
### Cache npmjs.org registry
|
||||
|
||||
If you have more than one server you want to install packages on, you might want to use this to decrease latency
|
||||
(presumably "slow" npmjs.org will be connected to only once per package/version) and provide limited failover (if npmjs.org is down, we might still find something useful in the cache) or avoid issues like _[How one developer just broke Node, Babel and thousands of projects in 11 lines of JavaScript](https://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/)_, _[Many packages suddenly disappeared](https://github.com/npm/registry-issue-archive/issues/255)_ or _[Registry returns 404 for a package I have installed before](https://github.com/npm/registry-issue-archive/issues/329)_.
|
||||
|
||||
### Link multiple registries
|
||||
|
||||
If you use multiples registries in your organization and need to fetch packages from multiple sources in one single project you might take advance of the uplinks feature with Verdaccio, chaining multiple registries and fetching from one single endpoint.
|
||||
|
||||
### Override public packages
|
||||
|
||||
If you want to use a modified version of some 3rd-party package (for example, you found a bug, but maintainer didn't accept pull request yet), you can publish your version locally under the same name. See in detail [here](https://verdaccio.org/docs/en/best#override-public-packages).
|
||||
|
||||
### E2E Testing
|
||||
|
||||
Verdaccio has proved to be a lightweight registry that can be
|
||||
booted in a couple of seconds, fast enough for any CI. Many open source projects use verdaccio for end to end testing, to mention some examples, **create-react-app**, **mozilla neutrino**, **pnpm**, **storybook**, **alfresco** or **eclipse theia**. You can read more in dedicated article to E2E in our blog.
|
||||
|
||||
## Talks
|
||||
|
||||
### **Testing the integrity of your React components by publishing in a private registry - React Finland 2021**.
|
||||
|
||||
[](https://react-finland.fi/schedule/#testing-the-integrity-of-your-react-components-by-publishing-in-a-private-registry)
|
||||
|
||||
You might want to check out as well our previous talks:
|
||||
|
||||
- [BeerJS Cba Meetup No. 53 May 2021 - **Juan Picado**](https://www.youtube.com/watch?v=6SyjqBmS49Y&ab_channel=BeerJSCba)
|
||||
- [Node.js Dependency Confusion Attacks - April 2021 - **Juan Picado\***](https://www.youtube.com/watch?v=qTRADSp3Hpo)
|
||||
- [**OpenJS World 2020** about \*Cover your Projects with a Multi purpose Lightweight Node.js Registry - **Juan Picado\***](https://www.youtube.com/watch?v=oVCjDWeehAQ)
|
||||
- [ViennaJS Meetup - Introduction to Verdaccio by **Priscila Olivera** and **Juan Picado**](https://www.youtube.com/watch?v=hDIFKzmoCa)
|
||||
- [Open Source? trivago - Verdaccio (**Ayush** and **Juan Picado**) January 2020](https://www.youtube.com/watch?v=A5CWxJC9xzc)
|
||||
- [GitNation Open Source Stage - How we have built a Node.js Registry with React - **Juan Picado** December 2019](https://www.youtube.com/watch?v=gpjC8Qp9B9A)
|
||||
- [Verdaccio - A lightweight Private Proxy Registry built in Node.js | **Juan Picado** at The Destro Dev Show](https://www.youtube.com/watch?reload=9&v=P_hxy7W-IL4&ab_channel=TheDestroDevShow)
|
||||
|
||||
## Get Started
|
||||
|
||||
Run in your terminal
|
||||
|
||||
```bash
|
||||
verdaccio
|
||||
```
|
||||
|
||||
You would need set some npm configuration, this is optional.
|
||||
|
||||
```bash
|
||||
$ npm set registry http://localhost:4873/
|
||||
```
|
||||
|
||||
For one-off commands or to avoid setting the registry globally:
|
||||
|
||||
```bash
|
||||
NPM_CONFIG_REGISTRY=http://localhost:4873 npm i
|
||||
```
|
||||
|
||||
Now you can navigate to [http://localhost:4873/](http://localhost:4873/) where your local packages will be listed and can be searched.
|
||||
|
||||
> Warning: Verdaccio [does not currently support PM2's cluster mode](https://github.com/verdaccio/verdaccio/issues/1301#issuecomment-489302298), running it with cluster mode may cause unknown behavior.
|
||||
|
||||
## Publishing
|
||||
|
||||
#### 1. create a user and log in
|
||||
|
||||
```bash
|
||||
npm adduser --registry http://localhost:4873
|
||||
```
|
||||
|
||||
> if you use HTTPS, add an appropriate CA information ("null" means get CA list from OS)
|
||||
|
||||
```bash
|
||||
$ npm set ca null
|
||||
```
|
||||
|
||||
#### 2. publish your package
|
||||
|
||||
```bash
|
||||
npm publish --registry http://localhost:4873
|
||||
```
|
||||
|
||||
This will prompt you for user credentials which will be saved on the `verdaccio` server.
|
||||
|
||||
## Docker
|
||||
|
||||
Below are the most commonly needed information,
|
||||
every aspect of Docker and verdaccio is [documented separately](https://www.verdaccio.org/docs/en/docker.html)
|
||||
|
||||
```
|
||||
docker pull verdaccio/verdaccio:nightly-master
|
||||
```
|
||||
|
||||
Available as [tags](https://hub.docker.com/r/verdaccio/verdaccio/tags/).
|
||||
|
||||
### Running verdaccio using Docker
|
||||
|
||||
To run the docker container:
|
||||
|
||||
```bash
|
||||
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
|
||||
```
|
||||
|
||||
Docker examples are available [in this repository](https://github.com/verdaccio/docker-examples).
|
||||
|
||||
## Compatibility
|
||||
|
||||
Verdaccio aims to support all features of a standard npm client that make sense to support in private repository. Unfortunately, it isn't always possible.
|
||||
|
||||
### Basic features
|
||||
|
||||
- Installing packages (npm install, npm upgrade, etc.) - **supported**
|
||||
- Publishing packages (npm publish) - **supported**
|
||||
|
||||
### Advanced package control
|
||||
|
||||
- Unpublishing packages (npm unpublish) - **supported**
|
||||
- Tagging (npm tag) - **supported**
|
||||
- Deprecation (npm deprecate) - **supported**
|
||||
|
||||
### User management
|
||||
|
||||
- Registering new users (npm adduser {newuser}) - **supported**
|
||||
- Change password (npm profile set password) - **supported**
|
||||
- Transferring ownership (npm owner add {user} {pkg}) - not supported, _PR-welcome_
|
||||
- Token (npm token) - **supported**
|
||||
|
||||
### Miscellany
|
||||
|
||||
- Searching (npm search) - **supported** (cli / browser)
|
||||
- Ping (npm ping) - **supported**
|
||||
- Starring (npm star, npm unstar, npm stars) - **supported**
|
||||
|
||||
### Security
|
||||
|
||||
- npm/yarn audit - **supported**
|
||||
|
||||
## Report a vulnerability
|
||||
|
||||
If you want to report a security vulnerability, please follow the steps which we have defined for you in our [security policy](https://github.com/verdaccio/verdaccio/security/policy).
|
||||
|
||||
## Core Team
|
||||
|
||||
| [Juan Picado](https://github.com/juanpicado) | [Ayush Sharma](https://github.com/ayusharma) | [Sergio Hg](https://github.com/sergiohgz) |
|
||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
|
||||
|  |  |  |
|
||||
| [@jotadeveloper](https://twitter.com/jotadeveloper) | [@ayusharma\_](https://twitter.com/ayusharma_) | [@sergiohgz](https://twitter.com/sergiohgz) |
|
||||
| [Priscila Oliveria](https://github.com/priscilawebdev) | [Daniel Ruf](https://github.com/DanielRuf) |
|
||||
|  |  |
|
||||
| [@priscilawebdev](https://twitter.com/priscilawebdev) | [@DanielRufde](https://twitter.com/DanielRufde) |
|
||||
|
||||
You can find and chat with then over Discord, click [here](http://chat.verdaccio.org) or follow them at _Twitter_.
|
||||
|
||||
## Who is using Verdaccio?
|
||||
|
||||
- [create-react-app](https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md#customizing-e2e-registry-configuration) _(+86.2k ⭐️)_
|
||||
- [Gatsby](https://github.com/gatsbyjs/gatsby) _(+49.2k ⭐️)_
|
||||
- [Babel.js](https://github.com/babel/babel) _(+38.5k ⭐️)_
|
||||
- [Vue CLI](https://github.com/vuejs/vue-cli) _(+27.4k ⭐️)_
|
||||
- [Angular CLI](https://github.com/angular/angular-cli) _(+24.3k ⭐️)_
|
||||
- [Uppy](https://github.com/transloadit/uppy) _(+23.8k ⭐️)_
|
||||
- [bit](https://github.com/teambit/bit) _(+13k ⭐️)_
|
||||
- [Aurelia Framework](https://github.com/aurelia/framework) _(+11.6k ⭐️)_
|
||||
- [pnpm](https://github.com/pnpm/pnpm) _(+10.1k ⭐️)_
|
||||
- [ethereum/web3.js](https://github.com/ethereum/web3.js) _(+9.8k ⭐️)_
|
||||
- [NX](https://github.com/nrwl/nx) _(+6.1k ⭐️)_
|
||||
- [webiny-js](https://github.com/webiny/webiny-js) _(+4.3k ⭐️)_
|
||||
- [Mozilla Neutrino](https://github.com/neutrinojs/neutrino) _(+3.7k ⭐️)_
|
||||
- [workshopper how to npm](https://github.com/workshopper/how-to-npm) _(+1k ⭐️)_
|
||||
- [Amazon SDK v3](https://github.com/aws/aws-sdk-js-v3)
|
||||
- [Amazon Encryption SDK for Javascript](https://github.com/aws/aws-encryption-sdk-javascript)
|
||||
|
||||
🤓 Don't be shy, you also can be in [the list](https://github.com/verdaccio/website/blob/master/docs/who-is-using.md).
|
||||
|
||||
## Open Collective Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/verdaccio#sponsor)]
|
||||
@@ -74,7 +246,11 @@ Thanks to the following companies to help us to achieve our goals providing free
|
||||
|
||||
[](https://www.jetbrains.com/)
|
||||
[](https://crowdin.com/)
|
||||
[](https://balsamiq.com/)
|
||||
[](https://www.browserstack.com/)
|
||||
[](https://www.netlify.com/)
|
||||
[](https://algolia.com/)
|
||||
|
||||
Verdaccio also is part of to the [Docker Open Source Program](https://www.docker.com/blog/expanded-support-for-open-source-software-projects/).
|
||||
|
||||
## Contributors
|
||||
|
||||
@@ -87,17 +263,17 @@ This project exists thanks to all the people who contribute. [[Contribute](CONTR
|
||||
If you have any issue you can try the following options, do no desist to ask or check our issues database, perhaps someone has asked already what you are looking for.
|
||||
|
||||
- [Blog](https://verdaccio.org/blog/)
|
||||
- [Donations](https://opencollective.com/verdaccio)
|
||||
- [Reporting an issue](https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md#reporting-a-bug)
|
||||
- [Donations](https://github.com/sponsors/verdaccio)
|
||||
- [Reporting an issue](https://github.com/verdaccio/verdaccio/issues/new/choose)
|
||||
- [Running discussions](https://github.com/verdaccio/verdaccio/issues?q=is%3Aissue+is%3Aopen+label%3Adiscuss)
|
||||
- [Chat](http://chat.verdaccio.org/)
|
||||
- [Logos](https://verdaccio.org/docs/en/logo)
|
||||
- [Docker Examples](https://github.com/verdaccio/docker-examples)
|
||||
- [FAQ](https://github.com/verdaccio/verdaccio/issues?utf8=%E2%9C%93&q=is%3Aissue%20label%3Aquestion%20)
|
||||
- [Docker Examples](https://github.com/verdaccio/verdaccio/tree/master/docker-examples)
|
||||
- [FAQ](https://github.com/verdaccio/verdaccio/discussions/categories/q-a)
|
||||
|
||||
### License
|
||||
|
||||
Verdaccio is [MIT licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)
|
||||
|
||||
The Verdaccio documentation and logos (excluding /thanks, e.g., .md, .png, .sketch) files within the /assets folder) is
|
||||
[Creative Commons licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE-docs).
|
||||
[Creative Commons licensed](https://creativecommons.org/licenses/by/4.0/).
|
||||
|
||||
14
SECURITY.md
@@ -4,11 +4,13 @@
|
||||
|
||||
The following table describes the versions of this project that are currently supported with security updates:
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 2.x | :x: |
|
||||
| 3.x | :x: |
|
||||
| 4.x | :white_check_mark: |
|
||||
| Version | Supported |
|
||||
| --------- | ------------------ |
|
||||
| 2.x | :x: |
|
||||
| 3.x | :x: |
|
||||
| 4.x | :x: |
|
||||
| 5.x | :white_check_mark: |
|
||||
| 6.x alpha | :x: |
|
||||
|
||||
## Responsible disclosure security policy
|
||||
|
||||
@@ -30,7 +32,7 @@ If you discover a security vulnerability, please use one of the following means
|
||||
|
||||
Note that time-frame and processes are subject to each program’s own policy.
|
||||
|
||||
- Report the security issue to the project maintainers directly at verdaccio@pm.me. If the report contains highly sensitive information, please be advised to encrypt your findings using our [PGP key](https://verdaccio.nyc3.digitaloceanspaces.com/gpg/publickey.verdaccio@pm.me.asc) which is also available in this document.
|
||||
- Report the security issue to the project maintainers directly at verdaccio@pm.me. If the report contains highly sensitive information, please be advised to encrypt your findings using our [PGP key](https://cdn.verdaccio.dev/gpg/publickey.verdaccio@pm.me.asc) which is also available in this document.
|
||||
|
||||
Your efforts to responsibly disclose your findings are sincerely appreciated and will be taken into account to acknowledge your contributions.
|
||||
|
||||
|
||||
16
crowdin.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
project_id_env: CROWDIN_VERDACCIO_PROJECT_ID
|
||||
api_token_env: CROWDIN_VERDACCIO_API_KEY
|
||||
|
||||
preserve_hierarchy: true
|
||||
|
||||
files:
|
||||
[
|
||||
{
|
||||
source: '/website/i18n/en/**/*',
|
||||
translation: '/website/i18n/%locale%/**/%original_file_name%',
|
||||
},
|
||||
{
|
||||
source: '/website/docs/**/*',
|
||||
translation: '/website/i18n/%locale%/docusaurus-plugin-content-docs/current/**/%original_file_name%',
|
||||
}
|
||||
]
|
||||
@@ -1,44 +1,19 @@
|
||||
# Docker + Kubernetes Examples
|
||||
|
||||
This folder aims to create a collection of Docker and Kubernetes examples.
|
||||
|
||||
For more information about the **Helm** Chart, please check it [owns repo](https://github.com/verdaccio/charts).
|
||||
|
||||
> Feel free to contribute whether you consider any use case is relevant for the public in general.
|
||||
|
||||
## Examples
|
||||
|
||||
The following examples aim to be demonstrative and can be either improved or updated.
|
||||
|
||||
### Verdaccio 5
|
||||
- [v4 examples](v4/README.md)
|
||||
- [v5 examples](v5/README.md)
|
||||
|
||||
- [Docker + Nginx + Verdaccio](v5/reverse_proxy/nginx/README.md)
|
||||
## Aditional data
|
||||
|
||||
### Verdaccio 4
|
||||
|
||||
#### Proxies
|
||||
|
||||
- [Docker + Apache + Verdaccio](v4/apache-verdaccio/README.md)
|
||||
- [Docker + Nginx + Verdaccio](v4/reverse_proxy/nginx/README.md)
|
||||
- [Docker + https-portal Example](v4/https-portal-example/README.md)
|
||||
|
||||
#### Plugins
|
||||
|
||||
- [Docker + Uplinks Multi Registry](v4/multi-registry-uplink/README.md)
|
||||
- [Docker + Local Storage](v4/docker-local-storage-volume/readme.md)
|
||||
- [Docker + External Plugins](v4/docker-plugin-external/README.md)
|
||||
|
||||
#### Auth
|
||||
|
||||
- [Docker + LDAP (OpenLDAP) Server + Verdaccio 4](v4/ldap-verdaccio/readme.md) by **@kopax**
|
||||
- [Docker + Gitlab](gitlab-verdaccio/README.md)
|
||||
- [Docker + Active Directory](https://github.com/Mateus-Oli/verdaccio-ad-docker)
|
||||
|
||||
#### Storage
|
||||
|
||||
- [Docker + AWS S3 Plugin(localstack) + Verdaccio 4](v4/amazon-s3-docker-example/v4/README.md)
|
||||
- [Docker + Minio](https://github.com/barolab/verdaccio-minio/tree/master/example)
|
||||
This folder aims to create a collection of Docker and Kubernetes examples.
|
||||
|
||||
For more information about the **Helm** Chart, please check it [owns repo](https://github.com/verdaccio/charts).
|
||||
### Kubernetes
|
||||
|
||||
- Kubernetes (minikube) + Verdaccio (Basic Configuration)
|
||||
@@ -46,8 +21,7 @@ The following examples aim to be demonstrative and can be either improved or upd
|
||||
|
||||
### External
|
||||
|
||||
- [
|
||||
Verdaccio examples for Google Cloud and K8s setups. https://github.com/papezt/verdaccio-examples](https://github.com/papezt/verdaccio-examples)
|
||||
- [Verdaccio examples for Google Cloud and K8s setups. https://github.com/papezt/verdaccio-examples](https://github.com/papezt/verdaccio-examples)
|
||||
|
||||
### Articles
|
||||
|
||||
|
||||
24
docker-examples/v4/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Verdaccio 4
|
||||
|
||||
#### Proxies
|
||||
|
||||
- [Docker + Apache + Verdaccio](apache-verdaccio/README.md)
|
||||
- [Docker + Nginx + Verdaccio](reverse_proxy/nginx/README.md)
|
||||
- [Docker + https-portal Example](https-portal-example/README.md)
|
||||
|
||||
#### Plugins
|
||||
|
||||
- [Docker + Uplinks Multi Registry](multi-registry-uplink/README.md)
|
||||
- [Docker + Local Storage](docker-local-storage-volume/readme.md)
|
||||
- [Docker + External Plugins](docker-plugin-external/README.md)
|
||||
|
||||
#### Auth
|
||||
|
||||
- [Docker + LDAP (OpenLDAP) Server + Verdaccio 4](ldap-verdaccio/readme.md) by **@kopax**
|
||||
- [Docker + Gitlab](gitlab-verdaccio/README.md)
|
||||
- [Docker + Active Directory](https://github.com/Mateus-Oli/verdaccio-ad-docker)
|
||||
|
||||
#### Storage
|
||||
|
||||
- [Docker + AWS S3 Plugin(localstack) + Verdaccio 4](amazon-s3-docker-example/README.md)
|
||||
- [Docker + Minio](https://github.com/barolab/verdaccio-minio/tree/master/example)
|
||||
@@ -10,7 +10,7 @@ let _localMemory = require('./local-memory');
|
||||
let _localMemory2 = _interopRequireDefault(_localMemory);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : { default: obj };
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
exports.LocalMemory = _localMemory2.default;
|
||||
|
||||
@@ -9,7 +9,7 @@ let _memoryHandler = require('./memory-handler');
|
||||
let _memoryHandler2 = _interopRequireDefault(_memoryHandler);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : { default: obj };
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
const DEFAULT_LIMIT = 1000;
|
||||
@@ -43,8 +43,8 @@ class LocalMemory {
|
||||
cb(null);
|
||||
} else {
|
||||
this.logger.info(
|
||||
{ limit: this.limit },
|
||||
'Storage memory has reached limit of @{limit} packages'
|
||||
{limit: this.limit},
|
||||
'Storage memory has reached limit of @{limit} packages',
|
||||
);
|
||||
cb(new Error('Storage memory has reached limit of limit packages'));
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ let _memoryFs2 = _interopRequireDefault(_memoryFs);
|
||||
let _streams = require('@verdaccio/streams');
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : { default: obj };
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
// $FlowFixMe
|
||||
@@ -111,8 +111,8 @@ class MemoryHandler {
|
||||
const uploadStream = new _streams.UploadTarball();
|
||||
const temporalName = `/${name}`;
|
||||
|
||||
process.nextTick(function () {
|
||||
fs.exists(temporalName, function (exists) {
|
||||
process.nextTick(function() {
|
||||
fs.exists(temporalName, function(exists) {
|
||||
if (exists) {
|
||||
return uploadStream.emit('error', fSError(fileExist));
|
||||
}
|
||||
@@ -122,7 +122,7 @@ class MemoryHandler {
|
||||
|
||||
uploadStream.pipe(file);
|
||||
|
||||
uploadStream.done = function () {
|
||||
uploadStream.done = function() {
|
||||
const onEnd = function onEnd() {
|
||||
uploadStream.emit('success');
|
||||
};
|
||||
@@ -130,7 +130,7 @@ class MemoryHandler {
|
||||
uploadStream.on('end', onEnd);
|
||||
};
|
||||
|
||||
uploadStream.abort = function () {
|
||||
uploadStream.abort = function() {
|
||||
uploadStream.emit('error', fSError('transmision aborted', 400));
|
||||
file.end();
|
||||
};
|
||||
@@ -150,8 +150,8 @@ class MemoryHandler {
|
||||
|
||||
const readTarballStream = new _streams.ReadTarball();
|
||||
|
||||
process.nextTick(function () {
|
||||
fs.exists(pathName, function (exists) {
|
||||
process.nextTick(function() {
|
||||
fs.exists(pathName, function(exists) {
|
||||
if (!exists) {
|
||||
readTarballStream.emit('error', noPackageFoundError());
|
||||
} else {
|
||||
@@ -164,7 +164,7 @@ class MemoryHandler {
|
||||
readTarballStream.emit('error', error);
|
||||
});
|
||||
|
||||
readTarballStream.abort = function () {
|
||||
readTarballStream.abort = function() {
|
||||
readStream.destroy(fSError('read has been aborted', 400));
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
FROM nginx:1.14.2-alpine
|
||||
FROM nginx:1.21-alpine
|
||||
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
5
docker-examples/v5/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Verdaccio 5
|
||||
|
||||
> Before run examples, build the local image by running `pnpm docker`.
|
||||
|
||||
- [Docker + Nginx + Verdaccio](reverse_proxy/nginx/README.md)
|
||||
2
docker-examples/v5/reverse_proxy/nginx/relative_path/nginx/Dockerfile
Executable file → Normal file
@@ -1,2 +1,2 @@
|
||||
FROM nginx:1.14.2-alpine
|
||||
FROM nginx:1.21-alpine
|
||||
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
2
docker-examples/v5/reverse_proxy/nginx/relative_path/nginx_ssl/Dockerfile
Executable file → Normal file
@@ -1,4 +1,4 @@
|
||||
FROM nginx
|
||||
FROM nginx:1
|
||||
|
||||
COPY cert.crt /etc/nginx/cert.crt
|
||||
COPY cert.key /etc/nginx/cert.key
|
||||
|
||||
2
docker-examples/v5/reverse_proxy/nginx_relative/nginx/Dockerfile
Executable file → Normal file
@@ -1,2 +1,2 @@
|
||||
FROM nginx:1.14.2-alpine
|
||||
FROM nginx:1.21-alpine
|
||||
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
@@ -44,3 +44,7 @@ The default header to identify the protocol is `X-Forwarded-Proto`, but there ar
|
||||
```
|
||||
$ VERDACCIO_FORWARDED_PROTO=CloudFront-Forwarded-Proto verdaccio --listen 5000
|
||||
```
|
||||
|
||||
#### VERDACCIO_STORAGE_PATH
|
||||
|
||||
By default, the storage is taken from config file, but using this variable allows to set it from environment variable.
|
||||
|
||||
76
docs/migration-v5-to-v6.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# Migration guide from Verdaccio 5 to Verdaccio 6
|
||||
|
||||
Notes regarding breaking changes for next major release.
|
||||
|
||||
> This list might growth over the development.
|
||||
|
||||
## Breaking changes
|
||||
|
||||
### New node-api interface [#2165](https://github.com/verdaccio/verdaccio/pull/2165)
|
||||
|
||||
If you are using the node-api, the new structure is Promise based and less arguments.
|
||||
|
||||
```js
|
||||
import { runServer } from '@verdaccio/node-api';
|
||||
// or
|
||||
import { runServer } from 'verdaccio';
|
||||
const app = await runServer(); // default configuration
|
||||
const app = await runServer('./config/config.yaml');
|
||||
const app = await runServer({ configuration });
|
||||
app.listen(4000, (event) => {
|
||||
// do something
|
||||
});
|
||||
```
|
||||
|
||||
### allow other password hashing algorithms [#1917](https://github.com/verdaccio/verdaccio/pull/1917)
|
||||
|
||||
The current implementation of the `htpasswd` module supports multiple hash formats on verify, but only `crypt` on sign in.
|
||||
`crypt` is an insecure old format, so to improve the security of the new `verdaccio` release we introduce the support of multiple hash algorithms on sign in step.
|
||||
|
||||
#### New hashing algorithms
|
||||
|
||||
The new possible hash algorithms to use are `bcrypt`, `md5`, `sha1`. `bcrypt` is chosen as a default, because of its customizable complexity and overall reliability. You can read more about them [here](https://httpd.apache.org/docs/2.4/misc/password_encryptions.html).
|
||||
|
||||
Two new properties are added to `auth` section in the configuration file:
|
||||
|
||||
- `algorithm` to choose the way you want to hash passwords.
|
||||
- `rounds` is used to determine `bcrypt` complexity. So one can improve security according to increasing computational power.
|
||||
|
||||
Example of the new `auth` config file section:
|
||||
|
||||
```yaml
|
||||
auth:
|
||||
htpasswd:
|
||||
file: ./htpasswd
|
||||
max_users: 1000
|
||||
# Hash algorithm, possible options are: "bcrypt", "md5", "sha1", "crypt".
|
||||
algorithm: bcrypt
|
||||
# Rounds number for "bcrypt", will be ignored for other algorithms.
|
||||
rounds: 10
|
||||
```
|
||||
|
||||
### Refactor config module, experiments renamed to flags [#1996](https://github.com/verdaccio/verdaccio/pull/1996)
|
||||
|
||||
- The `experiments` configuration is renamed to `flags`. The functionality is exactly the same.
|
||||
|
||||
```js
|
||||
flags: token: false;
|
||||
search: false;
|
||||
```
|
||||
|
||||
- The `self_path` property from the config file is being removed in favor of `config_file` full path.
|
||||
- Refactor `config` module, better types and utilities
|
||||
|
||||
### legacy token signature by removing crypto.createDecipher is deprecated [#1953](https://github.com/verdaccio/verdaccio/pull/1953)
|
||||
|
||||
- Replace signature handler for legacy tokens by removing deprecated crypto.createDecipher by createCipheriv
|
||||
- **The new signature invalidates all previous tokens generated by Verdaccio 5 or previous versions**.
|
||||
- The secret key must have 32 characters long
|
||||
> Remediation, update `.verdaccio-db.json` secret field with a secret key with 32 characters.
|
||||
|
||||
#### New environment variables
|
||||
|
||||
Introduce environment variables for legacy tokens.
|
||||
|
||||
- `VERDACCIO_LEGACY_ALGORITHM`: Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`
|
||||
- `VERDACCIO_LEGACY_ENCRYPTION_KEY`: By default, the token stores in the database, but using this variable allows to get it from memory
|
||||
|
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 244 KiB |
|
Before Width: | Height: | Size: 269 KiB After Width: | Height: | Size: 269 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 3.5 MiB After Width: | Height: | Size: 3.5 MiB |
@@ -1,5 +0,0 @@
|
||||
## Where are the docs now?
|
||||
|
||||
The documentation was relocated to the following website:
|
||||
|
||||
https://github.com/verdaccio/website
|
||||
19
netlify.toml
Normal file
@@ -0,0 +1,19 @@
|
||||
[build]
|
||||
command = "pnpm build"
|
||||
publish = "build/"
|
||||
|
||||
[build.environment]
|
||||
NPM_FLAGS="--prefix=/dev/null"
|
||||
NODE_VERSION = "14"
|
||||
|
||||
[context.production]
|
||||
command = "pnpm netlify:build:production"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "pnpm netlify:build:deployPreview"
|
||||
|
||||
[context.branch-deploy]
|
||||
command = "pnpm netlify:build:deployPreview"
|
||||
|
||||
[[plugins]]
|
||||
package = "../.netlify/netlify-plugin-pnpm"
|
||||
175
package.json
@@ -1,4 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "verdaccio-dev",
|
||||
"author": {
|
||||
"name": "Verdaccio Maintainers",
|
||||
"email": "verdaccio.npm@gmail.com"
|
||||
@@ -8,113 +10,117 @@
|
||||
"url": "https://github.com/verdaccio/verdaccio"
|
||||
},
|
||||
"homepage": "https://verdaccio.org",
|
||||
"private": true,
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/verdaccio"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.12.13",
|
||||
"@babel/core": "7.12.13",
|
||||
"@babel/node": "7.12.13",
|
||||
"@babel/plugin-proposal-class-properties": "7.12.13",
|
||||
"@babel/plugin-proposal-decorators": "7.12.13",
|
||||
"@babel/plugin-proposal-export-namespace-from": "7.12.13",
|
||||
"@babel/plugin-proposal-function-sent": "7.12.13",
|
||||
"@babel/plugin-proposal-json-strings": "7.12.13",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "7.12.13",
|
||||
"@babel/plugin-proposal-numeric-separator": "7.12.13",
|
||||
"@babel/plugin-proposal-object-rest-spread": "7.12.13",
|
||||
"@babel/plugin-proposal-optional-chaining": "7.12.13",
|
||||
"@babel/plugin-proposal-throw-expressions": "7.12.13",
|
||||
"@babel/cli": "7.14.8",
|
||||
"@babel/core": "7.15.0",
|
||||
"@babel/node": "7.14.9",
|
||||
"@babel/plugin-proposal-class-properties": "7.14.5",
|
||||
"@babel/plugin-proposal-decorators": "7.14.5",
|
||||
"@babel/plugin-proposal-export-namespace-from": "7.14.5",
|
||||
"@babel/plugin-proposal-function-sent": "7.14.5",
|
||||
"@babel/plugin-proposal-json-strings": "7.14.5",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "7.14.5",
|
||||
"@babel/plugin-proposal-numeric-separator": "7.14.5",
|
||||
"@babel/plugin-proposal-object-rest-spread": "7.14.7",
|
||||
"@babel/plugin-proposal-optional-chaining": "7.14.5",
|
||||
"@babel/plugin-proposal-throw-expressions": "7.14.5",
|
||||
"@babel/plugin-syntax-dynamic-import": "7.8.3",
|
||||
"@babel/plugin-syntax-import-meta": "7.10.4",
|
||||
"@babel/plugin-transform-async-to-generator": "7.12.13",
|
||||
"@babel/plugin-transform-classes": "7.12.13",
|
||||
"@babel/plugin-transform-runtime": "7.12.15",
|
||||
"@babel/plugin-transform-async-to-generator": "7.14.5",
|
||||
"@babel/plugin-transform-classes": "7.14.9",
|
||||
"@babel/plugin-transform-runtime": "7.15.0",
|
||||
"@babel/polyfill": "7.12.1",
|
||||
"@babel/preset-env": "7.12.13",
|
||||
"@babel/preset-react": "7.12.13",
|
||||
"@babel/preset-typescript": "7.12.13",
|
||||
"@babel/register": "7.12.13",
|
||||
"@babel/runtime": "7.12.13",
|
||||
"@babel/preset-env": "7.15.0",
|
||||
"@babel/preset-react": "7.14.5",
|
||||
"@babel/preset-typescript": "7.15.0",
|
||||
"@babel/register": "7.15.3",
|
||||
"@babel/runtime": "7.15.3",
|
||||
"@changesets/changelog-github": "^0.2.8",
|
||||
"@changesets/cli": "^2.15.0",
|
||||
"@changesets/cli": "2.15.0",
|
||||
"@changesets/get-dependents-graph": "^1.2.0",
|
||||
"@commitlint/cli": "8.3.5",
|
||||
"@commitlint/config-conventional": "8.2.0",
|
||||
"@octokit/rest": "17.0.0",
|
||||
"@types/async": "3.2.5",
|
||||
"@crowdin/cli": "3.6.5",
|
||||
"@types/async": "3.2.7",
|
||||
"@types/autocannon": "4.1.1",
|
||||
"@types/autosuggest-highlight": "3.1.1",
|
||||
"@types/express": "4.17.6",
|
||||
"@types/http-errors": "1.8.0",
|
||||
"@types/jest": "^26.0.20",
|
||||
"@types/js-base64": "3.0.0",
|
||||
"@types/lodash": "4.14.167",
|
||||
"@types/lowdb": "^1.0.9",
|
||||
"@types/mime": "2.0.2",
|
||||
"@types/minimatch": "3.0.3",
|
||||
"@types/node": "^14.14.7",
|
||||
"@types/react": "16.14.2",
|
||||
"@types/react-autosuggest": "10.0.1",
|
||||
"@types/react-dom": "^16.9.10",
|
||||
"@types/react-router-dom": "5.1.6",
|
||||
"@types/react-virtualized": "9.21.10",
|
||||
"@types/request": "2.48.5",
|
||||
"@types/semver": "7.3.4",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/testing-library__jest-dom": "^5.9.5",
|
||||
"@types/validator": "^13.1.3",
|
||||
"@types/webpack": "^4.41.26",
|
||||
"@types/webpack-env": "1.16.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.13.0",
|
||||
"@typescript-eslint/parser": "4.13.0",
|
||||
"@types/express": "4.17.8",
|
||||
"@types/http-errors": "1.8.1",
|
||||
"@types/jest": "27.0.1",
|
||||
"@types/lodash": "4.14.172",
|
||||
"@types/lowdb": "1.0.11",
|
||||
"@types/mime": "2.0.3",
|
||||
"@types/minimatch": "3.0.5",
|
||||
"@types/node": "14.6.0",
|
||||
"@types/react": "17.0.19",
|
||||
"@types/react-autosuggest": "10.1.5",
|
||||
"@types/react-dom": "17.0.9",
|
||||
"@types/react-helmet": "6.1.2",
|
||||
"@types/react-router-dom": "5.1.8",
|
||||
"@types/react-virtualized": "9.21.13",
|
||||
"@types/request": "2.48.7",
|
||||
"@types/semver": "7.3.8",
|
||||
"@types/supertest": "2.0.11",
|
||||
"@types/testing-library__jest-dom": "5.14.1",
|
||||
"@types/validator": "13.6.3",
|
||||
"@types/webpack": "4.41.26",
|
||||
"@types/webpack-env": "1.16.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.30.0",
|
||||
"@typescript-eslint/parser": "4.30.0",
|
||||
"@verdaccio/benchmark": "workspace:*",
|
||||
"@verdaccio/eslint-config": "workspace:*",
|
||||
"@verdaccio/types": "workspace:*",
|
||||
"@verdaccio/ui-theme": "workspace:*",
|
||||
"autocannon": "7.4.0",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-eslint": "10.1.0",
|
||||
"babel-jest": "26.6.3",
|
||||
"babel-jest": "27.1.0",
|
||||
"babel-plugin-dynamic-import-node": "2.3.3",
|
||||
"babel-plugin-emotion": "11.0.0",
|
||||
"codecov": "3.8.1",
|
||||
"concurrently": "^5.3.0",
|
||||
"core-js": "^3.8.3",
|
||||
"babel-plugin-emotion": "10.0.33",
|
||||
"codecov": "3.8.3",
|
||||
"concurrently": "6.2.1",
|
||||
"cross-env": "7.0.3",
|
||||
"debug": "4.3.2",
|
||||
"detect-secrets": "1.0.6",
|
||||
"eslint": "7.19.0",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-google": "0.14.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-config-prettier": "8.3.0",
|
||||
"eslint-plugin-babel": "5.3.1",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"eslint-plugin-jest": "24.1.3",
|
||||
"eslint-plugin-import": "2.24.2",
|
||||
"eslint-plugin-jest": "24.4.0",
|
||||
"eslint-plugin-jsx-a11y": "6.4.1",
|
||||
"eslint-plugin-react": "7.22.0",
|
||||
"eslint-plugin-prettier": "4.0.0",
|
||||
"eslint-plugin-react": "7.25.1",
|
||||
"eslint-plugin-react-hooks": "4.2.0",
|
||||
"eslint-plugin-simple-import-sort": "7.0.0",
|
||||
"eslint-plugin-verdaccio": "9.6.1",
|
||||
"fs-extra": "9.1.0",
|
||||
"get-stdin": "7.0.0",
|
||||
"eslint-plugin-verdaccio": "10.0.0",
|
||||
"fs-extra": "10.0.0",
|
||||
"husky": "2.7.0",
|
||||
"in-publish": "2.0.1",
|
||||
"jest": "26.6.3",
|
||||
"jest-environment-jsdom": "26.6.2",
|
||||
"jest-environment-jsdom-global": "^2.0.4",
|
||||
"jest-environment-node": "26.6.2",
|
||||
"jest": "27.1.0",
|
||||
"jest-environment-jsdom": "27.1.0",
|
||||
"jest-environment-jsdom-global": "3.0.0",
|
||||
"jest-environment-node": "27.1.0",
|
||||
"jest-fetch-mock": "3.0.3",
|
||||
"jest-junit": "11.0.1",
|
||||
"kleur": "4.1.4",
|
||||
"lint-staged": "8.2.1",
|
||||
"jest-junit": "12.2.0",
|
||||
"kleur": "3.0.3",
|
||||
"lint-staged": "9.5.0",
|
||||
"nock": "12.0.3",
|
||||
"nodemon": "^2.0.7",
|
||||
"node-fetch": "3.0.0-beta.6-exportfix",
|
||||
"nodemon": "2.0.12",
|
||||
"npm-run-all": "4.1.5",
|
||||
"prettier": "2.2.1",
|
||||
"prettier": "2.3.2",
|
||||
"rimraf": "3.0.2",
|
||||
"selfsigned": "1.10.8",
|
||||
"standard-version": "8.0.0",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "^9.1.1",
|
||||
"typescript": "^4.1.3",
|
||||
"verdaccio": "next",
|
||||
"selfsigned": "1.10.11",
|
||||
"supertest": "6.1.6",
|
||||
"ts-node": "10.2.1",
|
||||
"typescript": "4.4.2",
|
||||
"update-ts-references": "2.4.0",
|
||||
"verdaccio": "5.1.3",
|
||||
"verdaccio-audit": "workspace:*",
|
||||
"verdaccio-auth-memory": "workspace:*",
|
||||
"verdaccio-htpasswd": "workspace:*",
|
||||
@@ -122,15 +128,18 @@
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "pnpm recursive run clean",
|
||||
"build": "pnpm recursive run build",
|
||||
"build": "pnpm recursive run build --filter=!@verdaccio/website",
|
||||
"docker": "docker build -t verdaccio/verdaccio:local . --no-cache",
|
||||
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md}\"",
|
||||
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md}\"",
|
||||
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\"",
|
||||
"lint": "eslint --max-warnings 49 \"**/*.{js,jsx,ts,tsx}\"",
|
||||
"test": "pnpm recursive test --filter ./packages",
|
||||
"test:e2e:cli": "pnpm test --filter ...@verdaccio/e2e-cli",
|
||||
"test:e2e:ui": "pnpm test --filter ...@verdaccio/e2e-ui",
|
||||
"start": "concurrently --kill-others \"pnpm _start:server\" \"pnpm _start:web\"",
|
||||
"benchmark:hyper": "verdaccio-benchmark hyper -r ./hyper-results.json",
|
||||
"benchmark:api": "verdaccio-benchmark api",
|
||||
"benchmark:submit": "pnpm ts-node ./scripts/submit-metrics.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 packages/verdaccio/debug/bootstrap.js --listen 8000",
|
||||
@@ -139,15 +148,17 @@
|
||||
"start:ts": "ts-node packages/verdaccio/src/start.ts -- --listen 8000",
|
||||
"debug": "node --inspect packages/verdaccio/debug/bootstrap.js",
|
||||
"debug:break": "node --inspect-brk packages/verdaccio/debug/bootstrap.js",
|
||||
"website:lint": "cd website && yarn lint",
|
||||
"website:develop": "cd website && yarn develop",
|
||||
"website:build": "cd website && yarn build",
|
||||
"changeset": "changeset",
|
||||
"changeset:check": "changeset status --since-master",
|
||||
"ci:version": "run-s ci:version:changeset ci:version:install",
|
||||
"ci:version:install": "pnpm install --frozen-lockfile=false",
|
||||
"ci:version:changeset": "changeset version",
|
||||
"ci:publish": "changeset publish"
|
||||
"ci:publish": "changeset publish",
|
||||
"ts:ref": "update-ts-references --discardComments",
|
||||
"website": "pnpm build --filter ...@verdaccio/website",
|
||||
"crowdin:upload": "crowdin upload sources --auto-update --config ./crowdin.yaml",
|
||||
"crowdin:download": "crowdin download --config ./crowdin.yaml",
|
||||
"crowdin:sync": "pnpm crowdin:upload && pnpm crowdin:download --verbose"
|
||||
},
|
||||
"license": "MIT",
|
||||
"commitlint": {
|
||||
|
||||
@@ -1,5 +1,63 @@
|
||||
# @verdaccio/api
|
||||
|
||||
## 6.0.0-6-next.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d2c65da9]
|
||||
- @verdaccio/utils@6.0.0-6-next.5
|
||||
- @verdaccio/auth@6.0.0-6-next.9
|
||||
- @verdaccio/config@6.0.0-6-next.7
|
||||
- @verdaccio/tarball@11.0.0-6-next.6
|
||||
- @verdaccio/middleware@6.0.0-6-next.9
|
||||
- @verdaccio/store@6.0.0-6-next.10
|
||||
- @verdaccio/hooks@6.0.0-6-next.4
|
||||
|
||||
## 6.0.0-6-next.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5ddfa526]
|
||||
- @verdaccio/store@6.0.0-6-next.9
|
||||
|
||||
## 6.0.0-6-next.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1b217fd3]
|
||||
- @verdaccio/config@6.0.0-6-next.6
|
||||
- @verdaccio/auth@6.0.0-6-next.8
|
||||
- @verdaccio/hooks@6.0.0-6-next.4
|
||||
- @verdaccio/store@6.0.0-6-next.8
|
||||
- @verdaccio/middleware@6.0.0-6-next.8
|
||||
|
||||
## 6.0.0-6-next.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1810ed0d]
|
||||
- Updated dependencies [648575aa]
|
||||
- @verdaccio/config@6.0.0-6-next.5
|
||||
- @verdaccio/tarball@11.0.0-6-next.5
|
||||
- @verdaccio/utils@6.0.0-6-next.4
|
||||
- @verdaccio/auth@6.0.0-6-next.7
|
||||
- @verdaccio/hooks@6.0.0-6-next.4
|
||||
- @verdaccio/store@6.0.0-6-next.7
|
||||
- @verdaccio/middleware@6.0.0-6-next.7
|
||||
|
||||
## 6.0.0-6-next.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5c5057fc]
|
||||
- @verdaccio/config@6.0.0-6-next.4
|
||||
- @verdaccio/logger@6.0.0-6-next.4
|
||||
- @verdaccio/auth@6.0.0-6-next.6
|
||||
- @verdaccio/hooks@6.0.0-6-next.4
|
||||
- @verdaccio/store@6.0.0-6-next.6
|
||||
- @verdaccio/tarball@11.0.0-6-next.4
|
||||
- @verdaccio/middleware@6.0.0-6-next.6
|
||||
|
||||
## 6.0.0-6-next.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/api",
|
||||
"version": "6.0.0-6-next.7",
|
||||
"version": "6.0.0-6-next.12",
|
||||
"description": "loaders logic",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -39,28 +39,28 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@verdaccio/auth": "workspace:6.0.0-alpha.5",
|
||||
"@verdaccio/auth": "workspace:6.0.0-6-next.9",
|
||||
"@verdaccio/commons-api": "workspace:11.0.0-alpha.3",
|
||||
"@verdaccio/config": "workspace:6.0.0-alpha.3",
|
||||
"@verdaccio/hooks": "workspace:6.0.0-alpha.3",
|
||||
"@verdaccio/logger": "workspace:6.0.0-alpha.3",
|
||||
"@verdaccio/middleware": "workspace:6.0.0-alpha.5",
|
||||
"@verdaccio/store": "workspace:6.0.0-6-next.5",
|
||||
"@verdaccio/tarball": "workspace:11.0.0-6-next.4",
|
||||
"@verdaccio/utils": "workspace:6.0.0-alpha.3",
|
||||
"@verdaccio/config": "workspace:6.0.0-6-next.7",
|
||||
"@verdaccio/hooks": "workspace:6.0.0-6-next.4",
|
||||
"@verdaccio/logger": "workspace:6.0.0-6-next.4",
|
||||
"@verdaccio/middleware": "workspace:6.0.0-6-next.9",
|
||||
"@verdaccio/store": "workspace:6.0.0-6-next.10",
|
||||
"@verdaccio/tarball": "workspace:11.0.0-6-next.6",
|
||||
"@verdaccio/utils": "workspace:6.0.0-6-next.5",
|
||||
"cookies": "0.8.0",
|
||||
"debug": "^4.1.1",
|
||||
"debug": "4.3.2",
|
||||
"express": "4.17.1",
|
||||
"lodash": "^4.17.20",
|
||||
"mime": "2.4.4",
|
||||
"semver": "7.3.2"
|
||||
"lodash": "4.17.21",
|
||||
"mime": "2.5.2",
|
||||
"semver": "7.3.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/server": "workspace:6.0.0-6-next.8",
|
||||
"@verdaccio/types": "workspace:11.0.0-alpha.3",
|
||||
"@verdaccio/server": "workspace:6.0.0-6-next.17",
|
||||
"@verdaccio/types": "workspace:11.0.0-6-next.7",
|
||||
"body-parser": "1.19.0",
|
||||
"lodash": "^4.17.20",
|
||||
"supertest": "next"
|
||||
"lodash": "4.17.21",
|
||||
"supertest": "6.1.6"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import _ from 'lodash';
|
||||
import express, { Express } from 'express';
|
||||
|
||||
import express, { Router } from 'express';
|
||||
import {
|
||||
match,
|
||||
validateName,
|
||||
@@ -25,11 +23,7 @@ import profile from './v1/profile';
|
||||
import token from './v1/token';
|
||||
import v1Search from './v1/search';
|
||||
|
||||
export default function (
|
||||
config: Config,
|
||||
auth: IAuth,
|
||||
storage: IStorageHandler
|
||||
): Express.Application {
|
||||
export default function (config: Config, auth: IAuth, storage: IStorageHandler): Router {
|
||||
/* eslint new-cap:off */
|
||||
const app = express.Router();
|
||||
/* eslint new-cap:off */
|
||||
|
||||
@@ -269,7 +269,7 @@ export function publishPackage(storage: IStorageHandler, config: Config, auth: I
|
||||
req.remote_user,
|
||||
`${metadataCopy.name}@${versionToPublish}`
|
||||
);
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
debug(
|
||||
'error on notify add a new tag %o',
|
||||
`${metadataCopy.name}@${versionToPublish}`
|
||||
@@ -319,7 +319,7 @@ export function publishPackage(storage: IStorageHandler, config: Config, auth: I
|
||||
afterChange(error, API_MESSAGE.PKG_CREATED, metadata);
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
debug('error on publish, bad package format %o', packageName);
|
||||
logger.error({ packageName }, 'error on publish, bad package data for @{packageName}');
|
||||
return next(ErrorCode.getBadData(API_ERROR.BAD_PACKAGE_DATA));
|
||||
|
||||
@@ -41,7 +41,7 @@ export default function (route, auth, storage): void {
|
||||
route.get('/-/v1/search', (req, res) => {
|
||||
// TODO: implement proper result scoring weighted by quality, popularity and
|
||||
// maintenance query parameters
|
||||
let [text, size, from /* , quality, popularity, maintenance */] = [
|
||||
let [text, size, from] = [
|
||||
'text',
|
||||
'size',
|
||||
'from' /* , 'quality', 'popularity', 'maintenance' */,
|
||||
|
||||
@@ -46,7 +46,7 @@ export default function (
|
||||
next: '', // TODO: pagination?
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
logger.error({ error: error.msg }, 'token list has failed: @{error}');
|
||||
return next(ErrorCode.getCode(HTTP_STATUS.INTERNAL_ERROR, error.message));
|
||||
}
|
||||
@@ -116,7 +116,7 @@ export default function (
|
||||
created: saveToken.created,
|
||||
})
|
||||
);
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
logger.error({ error: error.msg }, 'token creation has failed: @{error}');
|
||||
return next(ErrorCode.getCode(HTTP_STATUS.INTERNAL_ERROR, error.message));
|
||||
}
|
||||
@@ -138,7 +138,7 @@ export default function (
|
||||
await storage.deleteToken(name, tokenKey);
|
||||
logger.info({ tokenKey, name }, 'token id @{tokenKey} was revoked for user @{name}');
|
||||
return next({});
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
logger.error({ error: error.msg }, 'token creation has failed: @{error}');
|
||||
return next(ErrorCode.getCode(HTTP_STATUS.INTERNAL_ERROR, error.message));
|
||||
}
|
||||
|
||||
@@ -5,10 +5,11 @@ import { $ResponseExtend, $RequestExtend } from '../../types/custom';
|
||||
import { initializeServer, publishTaggedVersion, publishVersion } from './_helper';
|
||||
|
||||
const mockApiJWTmiddleware = jest.fn(
|
||||
() => (req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: 'foo', groups: [], real_groups: [] };
|
||||
_next();
|
||||
}
|
||||
() =>
|
||||
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: 'foo', groups: [], real_groups: [] };
|
||||
_next();
|
||||
}
|
||||
);
|
||||
|
||||
jest.mock('@verdaccio/auth', () => ({
|
||||
@@ -33,30 +34,34 @@ describe('package', () => {
|
||||
app = await initializeServer('package.yaml');
|
||||
});
|
||||
|
||||
test('should return a package', async (done) => {
|
||||
test('should return a package', async () => {
|
||||
await publishVersion(app, 'package.yaml', 'foo', '1.0.0');
|
||||
return supertest(app)
|
||||
.get('/foo')
|
||||
.set('Accept', HEADERS.JSON)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.OK)
|
||||
.then((response) => {
|
||||
expect(response.body.name).toEqual('foo');
|
||||
done();
|
||||
});
|
||||
return new Promise((resolve) => {
|
||||
supertest(app)
|
||||
.get('/foo')
|
||||
.set('Accept', HEADERS.JSON)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.OK)
|
||||
.then((response) => {
|
||||
expect(response.body.name).toEqual('foo');
|
||||
resolve(response);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('should return a package by version', async (done) => {
|
||||
test('should return a package by version', async () => {
|
||||
await publishVersion(app, 'package.yaml', 'foo2', '1.0.0');
|
||||
return supertest(app)
|
||||
.get('/foo2/1.0.0')
|
||||
.set('Accept', HEADERS.JSON)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.OK)
|
||||
.then((response) => {
|
||||
expect(response.body.name).toEqual('foo2');
|
||||
done();
|
||||
});
|
||||
return new Promise((resolve) => {
|
||||
supertest(app)
|
||||
.get('/foo2/1.0.0')
|
||||
.set('Accept', HEADERS.JSON)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.OK)
|
||||
.then((response) => {
|
||||
expect(response.body.name).toEqual('foo2');
|
||||
resolve(response);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// TODO: investigate the 404
|
||||
|
||||
@@ -11,14 +11,13 @@ import { $ResponseExtend, $RequestExtend } from '../../types/custom';
|
||||
import { initializeServer, publishVersion } from './_helper';
|
||||
|
||||
const mockApiJWTmiddleware = jest.fn(
|
||||
() => (req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: 'foo', groups: [], real_groups: [] };
|
||||
_next();
|
||||
}
|
||||
() =>
|
||||
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: 'foo', groups: [], real_groups: [] };
|
||||
_next();
|
||||
}
|
||||
);
|
||||
|
||||
jest.setTimeout(50000000);
|
||||
|
||||
jest.mock('@verdaccio/auth', () => ({
|
||||
Auth: class {
|
||||
apiJWTmiddleware() {
|
||||
@@ -85,98 +84,108 @@ describe('publish', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('should fail on publish a bad versions package', async (done) => {
|
||||
test('should fail on publish a bad versions package', async () => {
|
||||
const app = await initializeServer('publish.yaml');
|
||||
return supertest(app)
|
||||
.put(`/${encodeURIComponent(pkgName)}`)
|
||||
.set(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON)
|
||||
.send(
|
||||
JSON.stringify(
|
||||
Object.assign({}, pkgMetadata, {
|
||||
versions: '',
|
||||
})
|
||||
return new Promise((resolve) => {
|
||||
supertest(app)
|
||||
.put(`/${encodeURIComponent(pkgName)}`)
|
||||
.set(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON)
|
||||
.send(
|
||||
JSON.stringify(
|
||||
Object.assign({}, pkgMetadata, {
|
||||
versions: '',
|
||||
})
|
||||
)
|
||||
)
|
||||
)
|
||||
.set('accept', HEADERS.GZIP)
|
||||
.expect(HTTP_STATUS.BAD_REQUEST)
|
||||
.then((response) => {
|
||||
console.log('response.body', response.body);
|
||||
expect(response.body.error).toEqual(API_ERROR.UNSUPORTED_REGISTRY_CALL);
|
||||
done();
|
||||
});
|
||||
.set('accept', HEADERS.GZIP)
|
||||
.expect(HTTP_STATUS.BAD_REQUEST)
|
||||
.then((response) => {
|
||||
console.log('response.body', response.body);
|
||||
expect(response.body.error).toEqual(API_ERROR.UNSUPORTED_REGISTRY_CALL);
|
||||
resolve(response);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('publish a package', () => {
|
||||
test('should publish a package', async (done) => {
|
||||
test('should publish a package', async () => {
|
||||
const app = await initializeServer('publish.yaml');
|
||||
return publishVersion(app, 'publish.yaml', 'foo', '1.0.0')
|
||||
.expect(HTTP_STATUS.CREATED)
|
||||
.then((response) => {
|
||||
expect(response.body.ok).toEqual(API_MESSAGE.PKG_CREATED);
|
||||
done();
|
||||
});
|
||||
return new Promise((resolve) => {
|
||||
publishVersion(app, 'publish.yaml', 'foo', '1.0.0')
|
||||
.expect(HTTP_STATUS.CREATED)
|
||||
.then((response) => {
|
||||
expect(response.body.ok).toEqual(API_MESSAGE.PKG_CREATED);
|
||||
resolve(response);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('should publish a new package', async (done) => {
|
||||
test('should publish a new package', async () => {
|
||||
const pkgName = 'test';
|
||||
const pkgMetadata = generatePackageMetadata(pkgName, '1.0.0');
|
||||
const app = await initializeServer('publish.yaml');
|
||||
return supertest(app)
|
||||
.put(`/${encodeURIComponent(pkgName)}`)
|
||||
.set(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON)
|
||||
.send(
|
||||
JSON.stringify(
|
||||
Object.assign({}, pkgMetadata, {
|
||||
_attachments: null,
|
||||
})
|
||||
return new Promise((resolve) => {
|
||||
supertest(app)
|
||||
.put(`/${encodeURIComponent(pkgName)}`)
|
||||
.set(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON)
|
||||
.send(
|
||||
JSON.stringify(
|
||||
Object.assign({}, pkgMetadata, {
|
||||
_attachments: null,
|
||||
})
|
||||
)
|
||||
)
|
||||
)
|
||||
.set('accept', HEADERS.GZIP)
|
||||
.expect(HTTP_STATUS.CREATED)
|
||||
.then((response) => {
|
||||
expect(response.body.ok).toEqual(API_MESSAGE.PKG_CREATED);
|
||||
done();
|
||||
});
|
||||
.set('accept', HEADERS.GZIP)
|
||||
.expect(HTTP_STATUS.CREATED)
|
||||
.then((response) => {
|
||||
expect(response.body.ok).toEqual(API_MESSAGE.PKG_CREATED);
|
||||
resolve(response);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('should publish a new package with no readme', async (done) => {
|
||||
test('should publish a new package with no readme', async () => {
|
||||
const pkgName = 'test';
|
||||
const pkgMetadata = generatePackageMetadata(pkgName, '1.0.0');
|
||||
const app = await initializeServer('publish.yaml');
|
||||
return supertest(app)
|
||||
.put(`/${encodeURIComponent(pkgName)}`)
|
||||
.set(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON)
|
||||
.send(
|
||||
JSON.stringify(
|
||||
Object.assign({}, pkgMetadata, {
|
||||
versions: {
|
||||
['1.0.0']: {
|
||||
readme: null,
|
||||
return new Promise((resolve) => {
|
||||
supertest(app)
|
||||
.put(`/${encodeURIComponent(pkgName)}`)
|
||||
.set(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON)
|
||||
.send(
|
||||
JSON.stringify(
|
||||
Object.assign({}, pkgMetadata, {
|
||||
versions: {
|
||||
['1.0.0']: {
|
||||
readme: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
)
|
||||
)
|
||||
)
|
||||
.set('accept', HEADERS.GZIP)
|
||||
.expect(HTTP_STATUS.CREATED)
|
||||
.then((response) => {
|
||||
expect(response.body.ok).toEqual(API_MESSAGE.PKG_CREATED);
|
||||
done();
|
||||
});
|
||||
.set('accept', HEADERS.GZIP)
|
||||
.expect(HTTP_STATUS.CREATED)
|
||||
.then((response) => {
|
||||
expect(response.body.ok).toEqual(API_MESSAGE.PKG_CREATED);
|
||||
resolve(response);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('should fails on publish a duplicated package', async (done) => {
|
||||
test('should fails on publish a duplicated package', async () => {
|
||||
const app = await initializeServer('publish.yaml');
|
||||
await publishVersion(app, 'publish.yaml', 'foo', '1.0.0');
|
||||
return publishVersion(app, 'publish.yaml', 'foo', '1.0.0')
|
||||
.expect(HTTP_STATUS.CONFLICT)
|
||||
.then((response) => {
|
||||
console.log('response.body', response.body);
|
||||
expect(response.body.error).toEqual(API_ERROR.PACKAGE_EXIST);
|
||||
done();
|
||||
});
|
||||
return new Promise((resolve) => {
|
||||
publishVersion(app, 'publish.yaml', 'foo', '1.0.0')
|
||||
.expect(HTTP_STATUS.CONFLICT)
|
||||
.then((response) => {
|
||||
console.log('response.body', response.body);
|
||||
expect(response.body.error).toEqual(API_ERROR.PACKAGE_EXIST);
|
||||
resolve(response);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('unpublish a package', () => {
|
||||
|
||||
@@ -16,10 +16,11 @@ import { $RequestExtend, $ResponseExtend } from '../../types/custom';
|
||||
import { initializeServer } from './_helper';
|
||||
|
||||
const mockApiJWTmiddleware = jest.fn(
|
||||
() => (req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: 'test', groups: [], real_groups: [] };
|
||||
_next();
|
||||
}
|
||||
() =>
|
||||
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: 'test', groups: [], real_groups: [] };
|
||||
_next();
|
||||
}
|
||||
);
|
||||
|
||||
const mockAuthenticate = jest.fn(() => (_name, _password, callback): void => {
|
||||
@@ -51,83 +52,95 @@ jest.mock('@verdaccio/auth', () => ({
|
||||
describe('user', () => {
|
||||
const credentials = { name: 'test', password: 'test' };
|
||||
|
||||
test('should test add a new user', async (done) => {
|
||||
test('should test add a new user', async () => {
|
||||
mockApiJWTmiddleware.mockImplementationOnce(
|
||||
() => (req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: undefined };
|
||||
_next();
|
||||
}
|
||||
() =>
|
||||
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: undefined };
|
||||
_next();
|
||||
}
|
||||
);
|
||||
|
||||
mockAddUser.mockImplementationOnce(() => (_name, _password, callback): void => {
|
||||
return callback(null, true);
|
||||
});
|
||||
supertest(await initializeServer('user.yaml'))
|
||||
.put(`/-/user/org.couchdb.user:newUser`)
|
||||
.send({
|
||||
name: 'newUser',
|
||||
password: 'newUser',
|
||||
})
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.CREATED)
|
||||
.end(function (err, res) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
expect(res.body.ok).toBeDefined();
|
||||
expect(res.body.token).toBeDefined();
|
||||
const token = res.body.token;
|
||||
expect(typeof token).toBe('string');
|
||||
expect(res.body.ok).toMatch(`user 'newUser' created`);
|
||||
done();
|
||||
});
|
||||
const app = await initializeServer('user.yaml');
|
||||
return new Promise((resolve, reject) => {
|
||||
supertest(app)
|
||||
.put(`/-/user/org.couchdb.user:newUser`)
|
||||
.send({
|
||||
name: 'newUser',
|
||||
password: 'newUser',
|
||||
})
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.CREATED)
|
||||
.end(function (err, res) {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
expect(res.body.ok).toBeDefined();
|
||||
expect(res.body.token).toBeDefined();
|
||||
const token = res.body.token;
|
||||
expect(typeof token).toBe('string');
|
||||
expect(res.body.ok).toMatch(`user 'newUser' created`);
|
||||
resolve(null);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('should test fails on add a existing user with login', async (done) => {
|
||||
test('should test fails on add a existing user with login', async () => {
|
||||
mockApiJWTmiddleware.mockImplementationOnce(
|
||||
() => (req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: undefined };
|
||||
_next();
|
||||
}
|
||||
() =>
|
||||
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: undefined };
|
||||
_next();
|
||||
}
|
||||
);
|
||||
supertest(await initializeServer('user.yaml'))
|
||||
.put('/-/user/org.couchdb.user:jotaNew')
|
||||
.send(credentials)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.CONFLICT)
|
||||
.end(function (err, res) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
expect(res.body.error).toBeDefined();
|
||||
expect(res.body.error).toMatch(API_ERROR.USERNAME_ALREADY_REGISTERED);
|
||||
done();
|
||||
});
|
||||
const app = await initializeServer('user.yaml');
|
||||
return new Promise((resolve, reject) => {
|
||||
supertest(app)
|
||||
.put('/-/user/org.couchdb.user:jotaNew')
|
||||
.send(credentials)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.CONFLICT)
|
||||
.end(function (err, res) {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
expect(res.body.error).toBeDefined();
|
||||
expect(res.body.error).toMatch(API_ERROR.USERNAME_ALREADY_REGISTERED);
|
||||
resolve(res.body);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('should log in as existing user', async (done) => {
|
||||
supertest(await initializeServer('user.yaml'))
|
||||
.put(`/-/user/org.couchdb.user:${credentials.name}`)
|
||||
.send(credentials)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.CREATED)
|
||||
.end((err, res) => {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
test('should log in as existing user', async () => {
|
||||
const app = await initializeServer('user.yaml');
|
||||
return new Promise((resolve, reject) => {
|
||||
supertest(app)
|
||||
.put(`/-/user/org.couchdb.user:${credentials.name}`)
|
||||
.send(credentials)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.CREATED)
|
||||
.end((err, res) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
expect(res.body).toBeTruthy();
|
||||
expect(res.body.ok).toMatch(`you are authenticated as \'${credentials.name}\'`);
|
||||
done();
|
||||
});
|
||||
expect(res.body).toBeTruthy();
|
||||
expect(res.body.ok).toMatch(`you are authenticated as \'${credentials.name}\'`);
|
||||
resolve(res);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('should test fails add a new user with missing name', async (done) => {
|
||||
test('should test fails add a new user with missing name', async () => {
|
||||
mockApiJWTmiddleware.mockImplementationOnce(
|
||||
() => (req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: undefined };
|
||||
_next();
|
||||
}
|
||||
() =>
|
||||
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: undefined };
|
||||
_next();
|
||||
}
|
||||
);
|
||||
mockAddUser.mockImplementationOnce(() => (_name, _password, callback): void => {
|
||||
return callback(getBadRequest(API_ERROR.USERNAME_PASSWORD_REQUIRED));
|
||||
@@ -135,56 +148,96 @@ describe('user', () => {
|
||||
const credentialsShort = _.cloneDeep(credentials);
|
||||
delete credentialsShort.name;
|
||||
|
||||
supertest(await initializeServer('user.yaml'))
|
||||
.put(`/-/user/org.couchdb.user:${credentials.name}`)
|
||||
.send(credentialsShort)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.BAD_REQUEST)
|
||||
.end(function (err, res) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
const app = await initializeServer('user.yaml');
|
||||
return new Promise((resolve, reject) => {
|
||||
supertest(app)
|
||||
.put(`/-/user/org.couchdb.user:${credentials.name}`)
|
||||
.send(credentialsShort)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.BAD_REQUEST)
|
||||
.end(function (err, res) {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
expect(res.body.error).toBeDefined();
|
||||
expect(res.body.error).toMatch(API_ERROR.USERNAME_PASSWORD_REQUIRED);
|
||||
done();
|
||||
});
|
||||
expect(res.body.error).toBeDefined();
|
||||
expect(res.body.error).toMatch(API_ERROR.USERNAME_PASSWORD_REQUIRED);
|
||||
resolve(app);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('should test fails add a new user with missing password', async (done) => {
|
||||
test('should test fails add a new user with missing password', async () => {
|
||||
mockApiJWTmiddleware.mockImplementationOnce(
|
||||
() => (req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: undefined };
|
||||
_next();
|
||||
}
|
||||
() =>
|
||||
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: undefined };
|
||||
_next();
|
||||
}
|
||||
);
|
||||
const credentialsShort = _.cloneDeep(credentials);
|
||||
delete credentialsShort.password;
|
||||
|
||||
supertest(await initializeServer('user.yaml'))
|
||||
.put(`/-/user/org.couchdb.user:${credentials.name}`)
|
||||
.send(credentialsShort)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.BAD_REQUEST)
|
||||
.end(function (err, res) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
const app = await initializeServer('user.yaml');
|
||||
return new Promise((resolve, reject) => {
|
||||
supertest(app)
|
||||
.put(`/-/user/org.couchdb.user:${credentials.name}`)
|
||||
.send(credentialsShort)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.BAD_REQUEST)
|
||||
.end(function (err, res) {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
expect(res.body.error).toBeDefined();
|
||||
// FIXME: message is not 100% accurate
|
||||
// eslint-disable-next-line new-cap
|
||||
expect(res.body.error).toMatch(API_ERROR.PASSWORD_SHORT());
|
||||
done();
|
||||
});
|
||||
expect(res.body.error).toBeDefined();
|
||||
// FIXME: message is not 100% accurate
|
||||
// eslint-disable-next-line new-cap
|
||||
expect(res.body.error).toMatch(API_ERROR.PASSWORD_SHORT());
|
||||
resolve(res);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('should test fails add a new user with wrong password', async (done) => {
|
||||
test('should test fails add a new user with wrong password', async () => {
|
||||
mockApiJWTmiddleware.mockImplementationOnce(
|
||||
() => (req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: 'test' };
|
||||
_next();
|
||||
}
|
||||
() =>
|
||||
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: 'test' };
|
||||
_next();
|
||||
}
|
||||
);
|
||||
mockAuthenticate.mockImplementationOnce(() => (_name, _password, callback): void => {
|
||||
return callback(getUnauthorized(API_ERROR.BAD_USERNAME_PASSWORD));
|
||||
});
|
||||
const credentialsShort = _.cloneDeep(credentials);
|
||||
credentialsShort.password = 'failPassword';
|
||||
const app = await initializeServer('user.yaml');
|
||||
return new Promise((resolve, reject) => {
|
||||
supertest(app)
|
||||
.put('/-/user/org.couchdb.user:test')
|
||||
.send(credentialsShort)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.UNAUTHORIZED)
|
||||
.end(function (err, res) {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
expect(res.body.error).toBeDefined();
|
||||
expect(res.body.error).toMatch(API_ERROR.BAD_USERNAME_PASSWORD);
|
||||
resolve(res);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('should be able to logout an user', async () => {
|
||||
mockApiJWTmiddleware.mockImplementationOnce(
|
||||
() =>
|
||||
(req: $RequestExtend, _res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: 'test' };
|
||||
_next();
|
||||
}
|
||||
);
|
||||
mockAuthenticate.mockImplementationOnce(() => (_name, _password, callback): void => {
|
||||
return callback(getUnauthorized(API_ERROR.BAD_USERNAME_PASSWORD));
|
||||
@@ -192,47 +245,21 @@ describe('user', () => {
|
||||
const credentialsShort = _.cloneDeep(credentials);
|
||||
credentialsShort.password = 'failPassword';
|
||||
|
||||
supertest(await initializeServer('user.yaml'))
|
||||
.put('/-/user/org.couchdb.user:test')
|
||||
.send(credentialsShort)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.UNAUTHORIZED)
|
||||
.end(function (err, res) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
const app = await initializeServer('user.yaml');
|
||||
return new Promise((resolve, reject) => {
|
||||
supertest(app)
|
||||
.delete('/-/user/token/someSecretToken')
|
||||
.send(credentialsShort)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.OK)
|
||||
.end(function (err, res) {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
expect(res.body.error).toBeDefined();
|
||||
expect(res.body.error).toMatch(API_ERROR.BAD_USERNAME_PASSWORD);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('should be able to logout an user', async (done) => {
|
||||
mockApiJWTmiddleware.mockImplementationOnce(
|
||||
() => (req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: 'test' };
|
||||
_next();
|
||||
}
|
||||
);
|
||||
mockAuthenticate.mockImplementationOnce(() => (_name, _password, callback): void => {
|
||||
return callback(getUnauthorized(API_ERROR.BAD_USERNAME_PASSWORD));
|
||||
expect(res.body.ok).toMatch(API_MESSAGE.LOGGED_OUT);
|
||||
resolve(res);
|
||||
});
|
||||
});
|
||||
const credentialsShort = _.cloneDeep(credentials);
|
||||
credentialsShort.password = 'failPassword';
|
||||
|
||||
supertest(await initializeServer('user.yaml'))
|
||||
.delete('/-/user/token/someSecretToken')
|
||||
.send(credentialsShort)
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.OK)
|
||||
.end(function (err, res) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
|
||||
expect(res.body.ok).toMatch(API_MESSAGE.LOGGED_OUT);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,10 +6,11 @@ import { $RequestExtend, $ResponseExtend } from '../../types/custom';
|
||||
import { initializeServer } from './_helper';
|
||||
|
||||
const mockApiJWTmiddleware = jest.fn(
|
||||
() => (req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: 'foo', groups: [], real_groups: [] };
|
||||
_next();
|
||||
}
|
||||
() =>
|
||||
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||
req.remote_user = { name: 'foo', groups: [], real_groups: [] };
|
||||
_next();
|
||||
}
|
||||
);
|
||||
|
||||
jest.mock('@verdaccio/auth', () => ({
|
||||
|
||||
@@ -7,41 +7,35 @@
|
||||
"include": ["src/**/*.ts", "types/*.d.ts"],
|
||||
"exclude": ["src/**/*.test.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../utils"
|
||||
},
|
||||
{
|
||||
"path": "../config"
|
||||
},
|
||||
{
|
||||
"path": "../commons"
|
||||
},
|
||||
{
|
||||
"path": "../hooks"
|
||||
},
|
||||
{
|
||||
"path": "../store"
|
||||
},
|
||||
{
|
||||
"path": "../middleware"
|
||||
},
|
||||
{
|
||||
"path": "../auth"
|
||||
},
|
||||
{
|
||||
"path": "../server"
|
||||
},
|
||||
{
|
||||
"path": "../loaders"
|
||||
},
|
||||
{
|
||||
"path": "../logger"
|
||||
"path": "../config"
|
||||
},
|
||||
{
|
||||
"path": "../core/commons-api"
|
||||
},
|
||||
{
|
||||
"path": "../core/tarball"
|
||||
},
|
||||
{
|
||||
"path": "../hooks"
|
||||
},
|
||||
{
|
||||
"path": "../logger"
|
||||
},
|
||||
{
|
||||
"path": "../middleware"
|
||||
},
|
||||
{
|
||||
"path": "../server"
|
||||
},
|
||||
{
|
||||
"path": "../store"
|
||||
},
|
||||
{
|
||||
"path": "../utils"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,43 @@
|
||||
# @verdaccio/auth
|
||||
|
||||
## 6.0.0-6-next.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d2c65da9]
|
||||
- @verdaccio/utils@6.0.0-6-next.5
|
||||
- @verdaccio/config@6.0.0-6-next.7
|
||||
- @verdaccio/loaders@6.0.0-6-next.4
|
||||
|
||||
## 6.0.0-6-next.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1b217fd3]
|
||||
- @verdaccio/config@6.0.0-6-next.6
|
||||
- @verdaccio/loaders@6.0.0-6-next.4
|
||||
|
||||
## 6.0.0-6-next.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1810ed0d]
|
||||
- Updated dependencies [648575aa]
|
||||
- @verdaccio/config@6.0.0-6-next.5
|
||||
- @verdaccio/utils@6.0.0-6-next.4
|
||||
- @verdaccio/loaders@6.0.0-6-next.4
|
||||
|
||||
## 6.0.0-6-next.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5c5057fc]
|
||||
- @verdaccio/config@6.0.0-6-next.4
|
||||
- @verdaccio/logger@6.0.0-6-next.4
|
||||
- @verdaccio/auth@6.0.0-6-next.6
|
||||
- @verdaccio/loaders@6.0.0-6-next.4
|
||||
- verdaccio-htpasswd@11.0.0-alpha.6
|
||||
|
||||
## 5.0.0-alpha.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/auth",
|
||||
"version": "6.0.0-alpha.5",
|
||||
"version": "6.0.0-6-next.9",
|
||||
"description": "logger",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -39,21 +39,20 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@verdaccio/auth": "workspace:6.0.0-alpha.5",
|
||||
"@verdaccio/commons-api": "workspace:11.0.0-alpha.3",
|
||||
"@verdaccio/config": "workspace:6.0.0-alpha.3",
|
||||
"@verdaccio/loaders": "workspace:6.0.0-alpha.3",
|
||||
"@verdaccio/logger": "workspace:6.0.0-alpha.3",
|
||||
"@verdaccio/utils": "workspace:6.0.0-alpha.3",
|
||||
"verdaccio-htpasswd": "workspace:11.0.0-alpha.6",
|
||||
"debug": "^4.1.1",
|
||||
"@verdaccio/config": "workspace:6.0.0-6-next.7",
|
||||
"@verdaccio/loaders": "workspace:6.0.0-6-next.4",
|
||||
"@verdaccio/logger": "workspace:6.0.0-6-next.4",
|
||||
"@verdaccio/utils": "workspace:6.0.0-6-next.5",
|
||||
"debug": "4.3.2",
|
||||
"express": "4.17.1",
|
||||
"jsonwebtoken": "8.5.1",
|
||||
"lodash": "4.17.15"
|
||||
"lodash": "4.17.21",
|
||||
"verdaccio-htpasswd": "workspace:11.0.0-alpha.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/mock": "workspace:6.0.0-alpha.3",
|
||||
"@verdaccio/types": "workspace:11.0.0-alpha.3"
|
||||
"@verdaccio/mock": "workspace:6.0.0-6-next.7",
|
||||
"@verdaccio/types": "workspace:11.0.0-6-next.7"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
||||
@@ -116,7 +116,7 @@ class Auth implements IAuth {
|
||||
let authPlugin;
|
||||
try {
|
||||
authPlugin = new HTPasswd(plugingConf, pluginOptions);
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
debug('error on loading auth htpasswd plugin stack: %o', error);
|
||||
return [];
|
||||
}
|
||||
@@ -559,7 +559,7 @@ class Auth implements IAuth {
|
||||
let credentials;
|
||||
try {
|
||||
credentials = verifyJWTPayload(token, this.config.secret);
|
||||
} catch (err) {
|
||||
} catch (err: any) {
|
||||
// FIXME: intended behaviour, do we want it?
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ export function aesDecrypt(value: string, key: string): string | void {
|
||||
decrypted += decipher.final(inputEncoding);
|
||||
debug('token decrypted successfully');
|
||||
return decrypted.toString();
|
||||
} catch (_) {
|
||||
} catch (_: any) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||