Compare commits
510 Commits
@verdaccio
...
@verdaccio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73d545b812 | ||
|
|
a828a5f6c0 | ||
|
|
aa61d256de | ||
|
|
7a99b11be3 | ||
|
|
353aa62fff | ||
|
|
278eaa409b | ||
|
|
49b3120ded | ||
|
|
2cc65d2503 | ||
|
|
2aef5203a4 | ||
|
|
a022b4a337 | ||
|
|
02e11e929a | ||
|
|
9fea291ebc | ||
|
|
27899ab9d8 | ||
|
|
47ec52d03f | ||
|
|
0e74d5ea52 | ||
|
|
a6be85ac3a | ||
|
|
8fdfacdbf7 | ||
|
|
28b97ec16b | ||
|
|
aea3b9ddaf | ||
|
|
6d8aa9817c | ||
|
|
1916dbc1a5 | ||
|
|
2b9882643d | ||
|
|
853489896c | ||
|
|
99c3960f74 | ||
|
|
fd4be1a21a | ||
|
|
a6491dcd7c | ||
|
|
1c077c32d7 | ||
|
|
d7db93b143 | ||
|
|
c306a2f1cb | ||
|
|
a6d9743c06 | ||
|
|
b48edd980c | ||
|
|
b8981136b0 | ||
|
|
ef793182d5 | ||
|
|
3f98448566 | ||
|
|
bcffca15ac | ||
|
|
52ec6b41e3 | ||
|
|
cfba19d622 | ||
|
|
b055c193b8 | ||
|
|
cbb8adc075 | ||
|
|
840aa9fe39 | ||
|
|
f591a71d74 | ||
|
|
c98bc8dc3e | ||
|
|
d3ce9c1b0a | ||
|
|
11bff60610 | ||
|
|
a75f5c97dd | ||
|
|
e3184ed185 | ||
|
|
6d00f3ed2c | ||
|
|
06d6c82d61 | ||
|
|
ff49f7df03 | ||
|
|
1cfb52d414 | ||
|
|
fe11b334fc | ||
|
|
321703512a | ||
|
|
e9d1e82666 | ||
|
|
f8a7fc94a8 | ||
|
|
1a605054a8 | ||
|
|
f9a58dce98 | ||
|
|
0d1dd136eb | ||
|
|
a4eedfe070 | ||
|
|
a11f8aa0d4 | ||
|
|
23fb97b2e1 | ||
|
|
4cf3687d0f | ||
|
|
1ebddae402 | ||
|
|
9127082cff | ||
|
|
174250449d | ||
|
|
c5750b51b4 | ||
|
|
91a8b13442 | ||
|
|
d675ce1fba | ||
|
|
55f74373f2 | ||
|
|
d43894e8f6 | ||
|
|
8ea712935e | ||
|
|
d08fe29d97 | ||
|
|
d65db96ff0 | ||
|
|
1fafb266bd | ||
|
|
6de8d61527 | ||
|
|
5401fd7635 | ||
|
|
8eee286b01 | ||
|
|
44be7b94b7 | ||
|
|
bbbb42b8fe | ||
|
|
fae5093d96 | ||
|
|
8c5ae96f79 | ||
|
|
d78c8b5153 | ||
|
|
966d9fad1d | ||
|
|
c40eae41de | ||
|
|
6c50f8569c | ||
|
|
82cb0f2bff | ||
|
|
4088cdef6d | ||
|
|
5167bb528f | ||
|
|
80df591e8f | ||
|
|
a2c3fa9ea7 | ||
|
|
a5019d89f3 | ||
|
|
24fbba1c6c | ||
|
|
c77d03018e | ||
|
|
5a6bf953a7 | ||
|
|
a57ba5f655 | ||
|
|
20a5e571d1 | ||
|
|
5b3903963a | ||
|
|
274910ca8d | ||
|
|
98a40887f5 | ||
|
|
5199775a06 | ||
|
|
9fb5429d18 | ||
|
|
3e4498ccdc | ||
|
|
a709357db6 | ||
|
|
4bee336945 | ||
|
|
20f244222b | ||
|
|
4311afea53 | ||
|
|
f00cfb4f97 | ||
|
|
4fc14eab02 | ||
|
|
a2b69a08e2 | ||
|
|
6eea70a6dd | ||
|
|
e533f1d500 | ||
|
|
45cc559f47 | ||
|
|
ce81b3e96d | ||
|
|
31d661c7bd | ||
|
|
b69333778d | ||
|
|
4dcc250fdb | ||
|
|
756a47aee0 | ||
|
|
2c45bc6e82 | ||
|
|
31050ee369 | ||
|
|
9652472780 | ||
|
|
87f903d530 | ||
|
|
8d625d25d2 | ||
|
|
a179f1fd43 | ||
|
|
a049eaa38f | ||
|
|
d2dd76260b | ||
|
|
f38c759cb2 | ||
|
|
28c3aad443 | ||
|
|
a020d4f580 | ||
|
|
160c25ddc5 | ||
|
|
1debee3e9d | ||
|
|
76d78b0328 | ||
|
|
61bbede301 | ||
|
|
635ca3f924 | ||
|
|
aeff267d94 | ||
|
|
a0dca6e927 | ||
|
|
71e5fb0221 | ||
|
|
aa0b2aa9df | ||
|
|
498afcd222 | ||
|
|
83561bc52d | ||
|
|
67b4681ce7 | ||
|
|
df53f61c64 | ||
|
|
64c8221d35 | ||
|
|
c908963132 | ||
|
|
46db10fc4f | ||
|
|
fadba40a9f | ||
|
|
02023afd74 | ||
|
|
f130817828 | ||
|
|
d2f9013ece | ||
|
|
b8554c8935 | ||
|
|
8ea24df16a | ||
|
|
67bbd93379 | ||
|
|
d09ea21bc9 | ||
|
|
0b72c32400 | ||
|
|
2d137274c4 | ||
|
|
cc30a85d3d | ||
|
|
85a01746a5 | ||
|
|
94f5e765a8 | ||
|
|
4cd71c6409 | ||
|
|
be71d77511 | ||
|
|
92a6f9a3fd | ||
|
|
b9a947aa2f | ||
|
|
110d90d888 | ||
|
|
6bed458925 | ||
|
|
73b3479a3a | ||
|
|
459af1cd39 | ||
|
|
e0d639a1a6 | ||
|
|
b78f35257e | ||
|
|
06e400cb34 | ||
|
|
dd380c5a5e | ||
|
|
ad3151c3f3 | ||
|
|
cca1f7f32a | ||
|
|
3d86b836c3 | ||
|
|
7f48edc254 | ||
|
|
9245b4d39b | ||
|
|
3b363fb531 | ||
|
|
5b39aeb623 | ||
|
|
edc7a538f3 | ||
|
|
d585216153 | ||
|
|
1367beae51 | ||
|
|
944ecf6874 | ||
|
|
2bd10d6010 | ||
|
|
7ff4808be6 | ||
|
|
7bb3c2bf0e | ||
|
|
736e7de600 | ||
|
|
048ac95e8b | ||
|
|
91fff48cb1 | ||
|
|
de3eb0fbf3 | ||
|
|
531e8d0fd1 | ||
|
|
f38cc44694 | ||
|
|
bc7f8668a8 | ||
|
|
cbd12c8f7c | ||
|
|
50968398f9 | ||
|
|
aca6ee3d92 | ||
|
|
85eaa8b043 | ||
|
|
19e5599692 | ||
|
|
96f324e9ed | ||
|
|
0a269d37b7 | ||
|
|
136a251cb6 | ||
|
|
9b8d0bb458 | ||
|
|
59435a9f46 | ||
|
|
ff6d6f4755 | ||
|
|
0847b7f99d | ||
|
|
10bd9bd5a3 | ||
|
|
02be97fc3a | ||
|
|
7ada36f5f6 | ||
|
|
0e7b266adc | ||
|
|
9c10955988 | ||
|
|
9aa77d92c8 | ||
|
|
937bbd0454 | ||
|
|
ce92b87305 | ||
|
|
5be1475204 | ||
|
|
563d65c9ea | ||
|
|
299f9cbf0f | ||
|
|
c85f98ce4d | ||
|
|
b5887ba3f5 | ||
|
|
0cde4e8e98 | ||
|
|
b1b6a94e3c | ||
|
|
84201b43b5 | ||
|
|
070f9477a7 | ||
|
|
935b4ff583 | ||
|
|
7cf4abb99d | ||
|
|
df39b4624a | ||
|
|
68c65f418a | ||
|
|
4b7d0b0c0c | ||
|
|
f8740598a3 | ||
|
|
730b5d8cc0 | ||
|
|
dd54d82000 | ||
|
|
c847a8b61d | ||
|
|
22093ebffe | ||
|
|
7ec9c8772b | ||
|
|
926e519dd3 | ||
|
|
5106fcb287 | ||
|
|
52d3442856 | ||
|
|
4fd84f589b | ||
|
|
ab61e1adc9 | ||
|
|
5983625ff7 | ||
|
|
fe6fcb9950 | ||
|
|
d3ab11a6f0 | ||
|
|
508247ce70 | ||
|
|
dd65119454 | ||
|
|
a87364b839 | ||
|
|
57743e7150 | ||
|
|
80f498c037 | ||
|
|
d13408b4fc | ||
|
|
493fdebea3 | ||
|
|
85675d6fed | ||
|
|
8592ebb5f1 | ||
|
|
a40f39d7ec | ||
|
|
c070bfcd73 | ||
|
|
a32b0a6c06 | ||
|
|
d778f2cd18 | ||
|
|
d36beaf650 | ||
|
|
0634d90f05 | ||
|
|
1a3b0db563 | ||
|
|
fc05d3bfb2 | ||
|
|
8ec8ba5758 | ||
|
|
2def2ca635 | ||
|
|
89cbc06151 | ||
|
|
d2c68f2195 | ||
|
|
b260feafee | ||
|
|
49ebe86dd5 | ||
|
|
8177f81780 | ||
|
|
ebcafd2739 | ||
|
|
651092d08e | ||
|
|
47f36463a8 | ||
|
|
f7e4e5c196 | ||
|
|
2cf0371c0e | ||
|
|
b60e20037d | ||
|
|
18601f0fe0 | ||
|
|
6fc5464e6e | ||
|
|
02c5e76eec | ||
|
|
128cd6898d | ||
|
|
ccbfaad0da | ||
|
|
094879d884 | ||
|
|
4735c06320 | ||
|
|
a828271d63 | ||
|
|
5bb049a79b | ||
|
|
545afc26d2 | ||
|
|
646caddbc3 | ||
|
|
2d41073f56 | ||
|
|
fd29a9aa94 | ||
|
|
ad5650300f | ||
|
|
e8b3ada53c | ||
|
|
56a9f5723b | ||
|
|
955c93e2c9 | ||
|
|
f5a2c8c5b7 | ||
|
|
2a86a46b85 | ||
|
|
8e17d19c92 | ||
|
|
bf0beff656 | ||
|
|
ee3b4486de | ||
|
|
c9ee1bbefb | ||
|
|
38e955ebd3 | ||
|
|
7346876680 | ||
|
|
9430e9fc0d | ||
|
|
d04153a8e5 | ||
|
|
d0ebfa68eb | ||
|
|
db2c8bc8a1 | ||
|
|
d65c74c0b1 | ||
|
|
4723b325bd | ||
|
|
4a6476c824 | ||
|
|
82f6886ded | ||
|
|
21ddd12166 | ||
|
|
980b09e40c | ||
|
|
a15c915b17 | ||
|
|
810eb5f33a | ||
|
|
8c8f0e1600 | ||
|
|
5c36ec5f8f | ||
|
|
2b4f8a1b63 | ||
|
|
af754f88ca | ||
|
|
d6febce1d9 | ||
|
|
36590e5246 | ||
|
|
7cf5dfd11c | ||
|
|
4571d32a83 | ||
|
|
1f59ff68d6 | ||
|
|
02b92bd13b | ||
|
|
29b1d59b56 | ||
|
|
24b9be0202 | ||
|
|
418bf0d8fa | ||
|
|
6822ab9fe2 | ||
|
|
7a45f4e244 | ||
|
|
be3f74e528 | ||
|
|
2533cb5813 | ||
|
|
06448be421 | ||
|
|
cf8d691c95 | ||
|
|
6021d05f41 | ||
|
|
0399c4cdd2 | ||
|
|
dbceee5a8f | ||
|
|
5bac4634d7 | ||
|
|
98e5e3d452 | ||
|
|
5d9d05eb24 | ||
|
|
c8f342d4eb | ||
|
|
6f2be136fa | ||
|
|
0de7dcf146 | ||
|
|
e75c0a3b95 | ||
|
|
7632edd0e1 | ||
|
|
8246bb69b2 | ||
|
|
a88c72d0b2 | ||
|
|
b13a3fefd3 | ||
|
|
d8cd1ca887 | ||
|
|
b98475e185 | ||
|
|
000d437463 | ||
|
|
33a5c5a179 | ||
|
|
e8491f42e3 | ||
|
|
47deac7ead | ||
|
|
4d1e1ec8a0 | ||
|
|
a73b0a9d1c | ||
|
|
59209ca9c5 | ||
|
|
ccdb8c7176 | ||
|
|
136771eb39 | ||
|
|
0285bf2432 | ||
|
|
21d9f2b6e3 | ||
|
|
fa3d878286 | ||
|
|
20c9e43edc | ||
|
|
18dc5f1f2f | ||
|
|
b7d319c5be | ||
|
|
f86c31ed0e | ||
|
|
076f0f85e8 | ||
|
|
c2a1f4a73a | ||
|
|
41475949ba | ||
|
|
d390a66158 | ||
|
|
7041a4381e | ||
|
|
14d973c552 | ||
|
|
13310814da | ||
|
|
16458f801e | ||
|
|
1322ffc2c4 | ||
|
|
2091f268d3 | ||
|
|
28331ff07a | ||
|
|
1ad1214c5e | ||
|
|
cf4489abb1 | ||
|
|
d7bf5453b1 | ||
|
|
3184ed41d8 | ||
|
|
0525ebfda3 | ||
|
|
6c1eb021ba | ||
|
|
1016fc0ff1 | ||
|
|
30875acc70 | ||
|
|
3dc5b5045f | ||
|
|
0f21053e04 | ||
|
|
a264faba47 | ||
|
|
d7005e6029 | ||
|
|
36b5ecd2dc | ||
|
|
9c03e11cfa | ||
|
|
640b92667f | ||
|
|
8478bd97b8 | ||
|
|
3836595506 | ||
|
|
7bac933b81 | ||
|
|
5cb4e6dc2f | ||
|
|
57d26af661 | ||
|
|
497c640fc3 | ||
|
|
47415298c9 | ||
|
|
453bfadba0 | ||
|
|
a0ee7c102a | ||
|
|
785da5a5b3 | ||
|
|
ae08b22730 | ||
|
|
b81417d774 | ||
|
|
500b25015d | ||
|
|
71fb7d1223 | ||
|
|
162d64e053 | ||
|
|
5776015058 | ||
|
|
f345fefd99 | ||
|
|
f6ffddbb5b | ||
|
|
98fbff4e1d | ||
|
|
d1aa663553 | ||
|
|
7fc26bf026 | ||
|
|
255e41ffce | ||
|
|
9ae112e129 | ||
|
|
ed32c53af8 | ||
|
|
49dfeed37d | ||
|
|
b56d5cec39 | ||
|
|
70d66eb473 | ||
|
|
ffb087887a | ||
|
|
120dbd98ad | ||
|
|
f31e1b4643 | ||
|
|
5f8e886d3f | ||
|
|
7a37508b96 | ||
|
|
c4a3be5557 | ||
|
|
90bd8eb75a | ||
|
|
c179a8afee | ||
|
|
9f0468de48 | ||
|
|
ef93beb986 | ||
|
|
2dedb56b38 | ||
|
|
9b978c6a5f | ||
|
|
d102fe5ba0 | ||
|
|
353a283b40 | ||
|
|
e85ed294d7 | ||
|
|
58f35350fa | ||
|
|
a3e7dd69d6 | ||
|
|
4813595e40 | ||
|
|
ea86dde011 | ||
|
|
d0d4d0fd8f | ||
|
|
cfdd2ae698 | ||
|
|
f2ab24943d | ||
|
|
e6bc577379 | ||
|
|
c4fc24f38e | ||
|
|
066cc819a8 | ||
|
|
81ea129d80 | ||
|
|
af174f0c8c | ||
|
|
c11a5958a6 | ||
|
|
0e1c078ecd | ||
|
|
836a8702cc | ||
|
|
0d8ecab1ba | ||
|
|
ccf92cabdc | ||
|
|
7f0b4db9f8 | ||
|
|
76e62134a3 | ||
|
|
31f5a94098 | ||
|
|
a22300afcf | ||
|
|
717e42b383 | ||
|
|
91e043addc | ||
|
|
dd9726957f | ||
|
|
9230779af1 | ||
|
|
6bef6d879a | ||
|
|
ef6c7d9f0e | ||
|
|
4cc5411056 | ||
|
|
9d96fa7e53 | ||
|
|
b970102bfc | ||
|
|
b702ea3631 | ||
|
|
794af76c50 | ||
|
|
6218d7723d | ||
|
|
b261741ef6 | ||
|
|
61add32bff | ||
|
|
b753b4010f | ||
|
|
c168b4e47a | ||
|
|
3a7f81ab0c | ||
|
|
154b2ecd34 | ||
|
|
cd7947adbc | ||
|
|
5fed1955a9 | ||
|
|
9dbf73e955 | ||
|
|
2c594910d8 | ||
|
|
90818700a3 | ||
|
|
7af1e6cc84 | ||
|
|
757bded72e | ||
|
|
1b9bf35c87 | ||
|
|
eb2afc4d6d | ||
|
|
5be013a059 | ||
|
|
8d6d6097c6 | ||
|
|
531289f59d | ||
|
|
5e784d1188 | ||
|
|
7dde848d0c | ||
|
|
71874de027 | ||
|
|
f13dacef9c | ||
|
|
761f1696f2 | ||
|
|
f412e8f8d6 | ||
|
|
f5fd7bf5bf | ||
|
|
3d26a8190c | ||
|
|
e50410a875 | ||
|
|
60d7b35d88 | ||
|
|
1042f9bf76 | ||
|
|
e10637f0f3 | ||
|
|
459b6fa72b | ||
|
|
10868ed434 | ||
|
|
ada8165f98 | ||
|
|
57755f31ba | ||
|
|
9e29bf8890 | ||
|
|
e2a67bafbe | ||
|
|
7c9561b019 | ||
|
|
ed3677a5b6 | ||
|
|
055544238a | ||
|
|
4937dba06e | ||
|
|
3e65791564 | ||
|
|
cf1b6cdb04 | ||
|
|
ca86082e08 | ||
|
|
ef60e83d6c | ||
|
|
ff1822c961 | ||
|
|
df0da3d699 | ||
|
|
af035e4f87 | ||
|
|
99dad7759e | ||
|
|
2e3b9552cc | ||
|
|
b6e8554764 | ||
|
|
b51892cb9a | ||
|
|
7e4d5615a4 | ||
|
|
d21279b35c | ||
|
|
5941edcf38 |
30
.babelrc
30
.babelrc
@@ -1,26 +1,14 @@
|
||||
{
|
||||
"presets": [ [
|
||||
"@babel/env",
|
||||
{
|
||||
"useBuiltIns": "usage",
|
||||
"corejs": {
|
||||
"version": 3, "proposals": true
|
||||
},
|
||||
"targets": {
|
||||
"node": 12
|
||||
"presets": [
|
||||
[
|
||||
"@babel/env",
|
||||
{
|
||||
"targets": {
|
||||
"node": 16
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
],
|
||||
"@babel/typescript"
|
||||
],
|
||||
"plugins": [
|
||||
"babel-plugin-dynamic-import-node",
|
||||
"@babel/proposal-class-properties",
|
||||
"@babel/proposal-object-rest-spread",
|
||||
"@babel/plugin-proposal-optional-chaining",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator"
|
||||
],
|
||||
"ignore": [
|
||||
"**/*.d.ts"
|
||||
]
|
||||
"ignore": ["**/*.d.ts"]
|
||||
}
|
||||
|
||||
37
.changeset/bright-poems-obey.md
Normal file
37
.changeset/bright-poems-obey.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
'@verdaccio/api': major
|
||||
'@verdaccio/fastify-migration': major
|
||||
'@verdaccio/tarball': major
|
||||
'@verdaccio/local-storage': major
|
||||
'verdaccio-memory': major
|
||||
'@verdaccio/server': major
|
||||
'@verdaccio/store': major
|
||||
'@verdaccio/utils': major
|
||||
---
|
||||
|
||||
refactor: download manifest endpoint and integrate fastify
|
||||
|
||||
Much simpler API for fetching a package
|
||||
|
||||
```
|
||||
const manifest = await storage.getPackageNext({
|
||||
name,
|
||||
uplinksLook: true,
|
||||
req,
|
||||
version: queryVersion,
|
||||
requestOptions,
|
||||
});
|
||||
```
|
||||
|
||||
> not perfect, the `req` still is being passed to the proxy (this has to be refactored at proxy package) and then removed from here, in proxy we pass the request instance to the `request` library.
|
||||
|
||||
### Details
|
||||
|
||||
- `async/await` sugar for getPackage()
|
||||
- Improve and reuse code between current implementation and new fastify endpoint (add scaffolding for request manifest)
|
||||
- Improve performance
|
||||
- Add new tests
|
||||
|
||||
### Breaking changes
|
||||
|
||||
All storage plugins will stop to work since the storage uses `getPackageNext` method which is Promise based, I won't replace this now because will force me to update all plugins, I'll follow up in another PR. Currently will throw http 500
|
||||
5
.changeset/brown-cycles-laugh.md
Normal file
5
.changeset/brown-cycles-laugh.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/cli': patch
|
||||
---
|
||||
|
||||
chore: improve error logger message
|
||||
5
.changeset/brown-pandas-wink.md
Normal file
5
.changeset/brown-pandas-wink.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-theme': patch
|
||||
---
|
||||
|
||||
add banner support ukraine
|
||||
5
.changeset/chilled-ways-fetch.md
Normal file
5
.changeset/chilled-ways-fetch.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'verdaccio-memory': patch
|
||||
---
|
||||
|
||||
Fix storing tarballs with identical names from different packages in memory plugin
|
||||
59
.changeset/dry-planes-tap.md
Normal file
59
.changeset/dry-planes-tap.md
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
'@verdaccio/api': major
|
||||
'@verdaccio/auth': major
|
||||
'@verdaccio/cli': major
|
||||
'@verdaccio/config': major
|
||||
'@verdaccio/commons-api': major
|
||||
'@verdaccio/core': major
|
||||
'@verdaccio/local-storage': major
|
||||
'@verdaccio/fastify-migration': major
|
||||
'@verdaccio/streams': major
|
||||
'@verdaccio/types': major
|
||||
'@verdaccio/hooks': major
|
||||
'verdaccio-audit': major
|
||||
'verdaccio-aws-s3-storage': major
|
||||
'verdaccio-google-cloud': major
|
||||
'verdaccio-memory': major
|
||||
'@verdaccio/ui-theme': major
|
||||
'@verdaccio/proxy': major
|
||||
'@verdaccio/server': major
|
||||
'@verdaccio/store': major
|
||||
'@verdaccio/eslint-config': major
|
||||
'@verdaccio/dev-types': major
|
||||
'@verdaccio/utils': major
|
||||
'verdaccio': major
|
||||
'@verdaccio/web': major
|
||||
---
|
||||
|
||||
refactor: search v1 endpoint and local-database
|
||||
|
||||
- refactor search `api v1` endpoint, improve performance
|
||||
- remove usage of `async` dependency https://github.com/verdaccio/verdaccio/issues/1225
|
||||
- refactor method storage class
|
||||
- create new module `core` to reduce the ammount of modules with utilities
|
||||
- use `undici` instead `node-fetch`
|
||||
- use `fastify` instead `express` for functional test
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- plugin storage API changes
|
||||
- remove old search endpoint (return 404)
|
||||
- filter local private packages at plugin level
|
||||
|
||||
The storage api changes for methods `get`, `add`, `remove` as promise base. The `search` methods also changes and recieves a `query` object that contains all query params from the client.
|
||||
|
||||
```ts
|
||||
export interface IPluginStorage<T> extends IPlugin {
|
||||
add(name: string): Promise<void>;
|
||||
remove(name: string): Promise<void>;
|
||||
get(): Promise<any>;
|
||||
init(): Promise<void>;
|
||||
getSecret(): Promise<string>;
|
||||
setSecret(secret: string): Promise<any>;
|
||||
getPackageStorage(packageInfo: string): IPackageStorage;
|
||||
search(query: searchUtils.SearchQuery): Promise<searchUtils.SearchItem[]>;
|
||||
saveToken(token: Token): Promise<any>;
|
||||
deleteToken(user: string, tokenKey: string): Promise<any>;
|
||||
readTokens(filter: TokenFilter): Promise<Token[]>;
|
||||
}
|
||||
```
|
||||
5
.changeset/dull-monkeys-search.md
Normal file
5
.changeset/dull-monkeys-search.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-theme': patch
|
||||
---
|
||||
|
||||
show verdaccio logo in the footer even when custom brand is set
|
||||
11
.changeset/eleven-brooms-hunt.md
Normal file
11
.changeset/eleven-brooms-hunt.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
'@verdaccio/api': minor
|
||||
'@verdaccio/core': minor
|
||||
'@verdaccio/tarball': minor
|
||||
'@verdaccio/middleware': minor
|
||||
'verdaccio-audit': minor
|
||||
'@verdaccio/utils': minor
|
||||
'@verdaccio/web': minor
|
||||
---
|
||||
|
||||
refactor: improve docker image build with strict dependencies and prod build
|
||||
39
.changeset/eleven-spoons-matter.md
Normal file
39
.changeset/eleven-spoons-matter.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
'@verdaccio/api': major
|
||||
'@verdaccio/auth': major
|
||||
'@verdaccio/cli': major
|
||||
'@verdaccio/config': major
|
||||
'@verdaccio/core': major
|
||||
'@verdaccio/file-locking': major
|
||||
'verdaccio-htpasswd': major
|
||||
'@verdaccio/readme': major
|
||||
'@verdaccio/fastify-migration': major
|
||||
'@verdaccio/streams': major
|
||||
'@verdaccio/tarball': major
|
||||
'@verdaccio/types': major
|
||||
'@verdaccio/url': major
|
||||
'@verdaccio/hooks': major
|
||||
'@verdaccio/loaders': major
|
||||
'@verdaccio/logger': major
|
||||
'@verdaccio/middleware': major
|
||||
'@verdaccio/mock': major
|
||||
'@verdaccio/node-api': major
|
||||
'@verdaccio/active-directory': major
|
||||
'verdaccio-audit': major
|
||||
'verdaccio-auth-memory': major
|
||||
'verdaccio-aws-s3-storage': major
|
||||
'verdaccio-google-cloud': major
|
||||
'verdaccio-memory': major
|
||||
'@verdaccio/ui-theme': major
|
||||
'@verdaccio/server': major
|
||||
'@verdaccio/cli-standalone': major
|
||||
'@verdaccio/store': major
|
||||
'@verdaccio/dev-types': major
|
||||
'@verdaccio/utils': major
|
||||
'verdaccio': major
|
||||
'@verdaccio/web': major
|
||||
---
|
||||
|
||||
Remove Node 12 support
|
||||
|
||||
- We need move to the new `undici` and does not support Node.js 12
|
||||
6
.changeset/fair-lemons-beam.md
Normal file
6
.changeset/fair-lemons-beam.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@verdaccio/logger-prettify': minor
|
||||
'@verdaccio/logger': patch
|
||||
---
|
||||
|
||||
hydrate template placeholders in log messages when format is set to 'json'
|
||||
5
.changeset/fuzzy-drinks-taste.md
Normal file
5
.changeset/fuzzy-drinks-taste.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-theme': minor
|
||||
---
|
||||
|
||||
fix: remove engines from ui-theme
|
||||
10
.changeset/fuzzy-onions-draw.md
Normal file
10
.changeset/fuzzy-onions-draw.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
'@verdaccio/api': minor
|
||||
'@verdaccio/fastify-migration': minor
|
||||
'@verdaccio/hooks': minor
|
||||
'@verdaccio/logger-prettify': minor
|
||||
'@verdaccio/proxy': minor
|
||||
'@verdaccio/store': minor
|
||||
---
|
||||
|
||||
abort search request support for proxy
|
||||
7
.changeset/healthy-pants-smash.md
Normal file
7
.changeset/healthy-pants-smash.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@verdaccio/ui-theme': patch
|
||||
'@verdaccio/test-helper': patch
|
||||
'@verdaccio/web': patch
|
||||
---
|
||||
|
||||
fix: #3174 set correctly ui values to html render
|
||||
5
.changeset/kind-bears-nail.md
Normal file
5
.changeset/kind-bears-nail.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-theme': patch
|
||||
---
|
||||
|
||||
feat: add types and package module icons on sidebar
|
||||
7
.changeset/light-walls-begin.md
Normal file
7
.changeset/light-walls-begin.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@verdaccio/ui-theme': minor
|
||||
'@verdaccio/server': minor
|
||||
'@verdaccio/web': minor
|
||||
---
|
||||
|
||||
feat: align with v5 ui endpoints and ui small bugfix
|
||||
5
.changeset/loud-shoes-jog.md
Normal file
5
.changeset/loud-shoes-jog.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-theme': patch
|
||||
---
|
||||
|
||||
chore: force publish
|
||||
5
.changeset/lovely-drinks-argue.md
Normal file
5
.changeset/lovely-drinks-argue.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/loaders': patch
|
||||
---
|
||||
|
||||
always create plugin instance with new
|
||||
5
.changeset/neat-toys-float.md
Normal file
5
.changeset/neat-toys-float.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-theme': patch
|
||||
---
|
||||
|
||||
fix: replace ts icon by td and fix commonjs icon
|
||||
5
.changeset/olive-candles-speak.md
Normal file
5
.changeset/olive-candles-speak.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-theme': minor
|
||||
---
|
||||
|
||||
feat: integrate rematch for ui state storage
|
||||
43
.changeset/orange-flowers-cover.md
Normal file
43
.changeset/orange-flowers-cover.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
'@verdaccio/config': minor
|
||||
'@verdaccio/types': minor
|
||||
'@verdaccio/ui-theme': minor
|
||||
---
|
||||
|
||||
feat: rework web header for mobile, add new settings and raw manifest button
|
||||
|
||||
### New set of variables to hide features
|
||||
|
||||
Add set of new variables that allow hide different parts of the UI, buttons, footer or download tarballs. _All are
|
||||
enabled by default_.
|
||||
|
||||
```yaml
|
||||
# login: true <-- already exist but worth the reminder
|
||||
# showInfo: true
|
||||
# showSettings: true
|
||||
# In combination with darkMode you can force specific theme
|
||||
# showThemeSwitch: true
|
||||
# showFooter: true
|
||||
# showSearch: true
|
||||
# showDownloadTarball: true
|
||||
```
|
||||
|
||||
> If you disable `showThemeSwitch` and force `darkMode: true` the local storage settings would be
|
||||
> ignored and force all themes to the one in the configuration file.
|
||||
|
||||
Future could be extended to
|
||||
|
||||
### Raw button to display manifest package
|
||||
|
||||
A new experimental feature (enabled by default), button named RAW to be able navigate on the package manifest directly on the ui, kudos to [react-json-view](https://www.npmjs.com/package/react-json-view) that allows an easy integration, not configurable yet until get more feedback.
|
||||
|
||||
```yaml
|
||||
showRaw: true
|
||||
```
|
||||
|
||||
#### Rework header buttons
|
||||
|
||||
- The header has been rework, the mobile was not looking broken.
|
||||
- Removed info button in the header and moved to a dialog
|
||||
- Info dialog now contains more information about the project, license and the aid content for Ukrania now is inside of the info modal.
|
||||
- Separate settings and info to avoid collapse too much info (for mobile still need some work)
|
||||
35
.changeset/perfect-candles-clap.md
Normal file
35
.changeset/perfect-candles-clap.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
'@verdaccio/api': minor
|
||||
'@verdaccio/auth': minor
|
||||
'@verdaccio/cli': minor
|
||||
'@verdaccio/config': minor
|
||||
'@verdaccio/core': minor
|
||||
'verdaccio-htpasswd': minor
|
||||
'@verdaccio/local-storage': minor
|
||||
'@verdaccio/fastify-migration': minor
|
||||
'@verdaccio/tarball': minor
|
||||
'@verdaccio/types': minor
|
||||
'@verdaccio/url': minor
|
||||
'@verdaccio/hooks': minor
|
||||
'@verdaccio/loaders': minor
|
||||
'@verdaccio/logger': minor
|
||||
'@verdaccio/middleware': minor
|
||||
'@verdaccio/mock': minor
|
||||
'@verdaccio/node-api': minor
|
||||
'@verdaccio/active-directory': minor
|
||||
'verdaccio-auth-memory': minor
|
||||
'verdaccio-aws-s3-storage': minor
|
||||
'verdaccio-google-cloud': minor
|
||||
'verdaccio-memory': minor
|
||||
'@verdaccio/ui-theme': minor
|
||||
'@verdaccio/proxy': minor
|
||||
'@verdaccio/server': minor
|
||||
'@verdaccio/cli-standalone': minor
|
||||
'@verdaccio/store': minor
|
||||
'@verdaccio/utils': minor
|
||||
'verdaccio': minor
|
||||
'@verdaccio/web': minor
|
||||
'@verdaccio/e2e-ui': minor
|
||||
---
|
||||
|
||||
refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplications
|
||||
5
.changeset/perfect-emus-clean.md
Normal file
5
.changeset/perfect-emus-clean.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/cli': major
|
||||
---
|
||||
|
||||
feat: node 14 as minimum for running cli
|
||||
@@ -6,7 +6,6 @@
|
||||
"@verdaccio/auth": "6.0.0-alpha.0",
|
||||
"@verdaccio/cli": "6.0.0-alpha.0",
|
||||
"@verdaccio/config": "6.0.0-alpha.0",
|
||||
"@verdaccio/commons-api": "11.0.0-alpha.0",
|
||||
"@verdaccio/file-locking": "11.0.0-alpha.0",
|
||||
"verdaccio-htpasswd": "11.0.0-alpha.0",
|
||||
"@verdaccio/local-storage": "11.0.0-alpha.0",
|
||||
@@ -42,39 +41,79 @@
|
||||
"@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"
|
||||
"@verdaccio/core": "6.0.0-next.0",
|
||||
"@verdaccio/test-helper": "1.0.0",
|
||||
"docusaurus-plugin-contributors": "1.0.0",
|
||||
"@verdaccio/website": "5.4.0"
|
||||
},
|
||||
"changesets": [
|
||||
"afraid-mice-obey",
|
||||
"big-lobsters-sin",
|
||||
"bright-poems-obey",
|
||||
"brown-cycles-laugh",
|
||||
"brown-pandas-wink",
|
||||
"calm-pants-impress",
|
||||
"chilled-ways-fetch",
|
||||
"dry-planes-tap",
|
||||
"dull-monkeys-search",
|
||||
"eleven-brooms-hunt",
|
||||
"eleven-spoons-matter",
|
||||
"fair-lemons-beam",
|
||||
"few-cooks-destroy",
|
||||
"few-mangos-grow",
|
||||
"fifty-jars-rest",
|
||||
"fuzzy-drinks-taste",
|
||||
"fuzzy-onions-draw",
|
||||
"gentle-parrots-lay",
|
||||
"gentle-trains-switch",
|
||||
"gold-vans-tease",
|
||||
"healthy-bikes-behave",
|
||||
"healthy-pants-smash",
|
||||
"healthy-poets-compare",
|
||||
"heavy-ravens-lay",
|
||||
"hip-hounds-destroy",
|
||||
"kind-bears-nail",
|
||||
"late-adults-love",
|
||||
"late-parents-act",
|
||||
"light-walls-begin",
|
||||
"little-stingrays-rule",
|
||||
"loud-shoes-jog",
|
||||
"lovely-drinks-argue",
|
||||
"many-vans-care",
|
||||
"modern-spies-tell",
|
||||
"neat-toes-report",
|
||||
"neat-toys-float",
|
||||
"olive-candles-speak",
|
||||
"orange-flowers-cover",
|
||||
"perfect-candles-clap",
|
||||
"perfect-emus-clean",
|
||||
"perfect-kangaroos-agree",
|
||||
"plenty-news-remember",
|
||||
"plenty-spiders-melt",
|
||||
"plenty-tables-refuse",
|
||||
"pretty-hounds-tap",
|
||||
"proud-jeans-walk",
|
||||
"proud-jobs-hope",
|
||||
"red-chefs-float",
|
||||
"red-yaks-sell",
|
||||
"rich-ghosts-rule",
|
||||
"shaggy-carrots-unite",
|
||||
"shaggy-parrots-smash",
|
||||
"shiny-chefs-heal",
|
||||
"slow-carrots-relate",
|
||||
"smart-apricots-kneel",
|
||||
"smart-beds-cross",
|
||||
"sour-buses-shout",
|
||||
"spicy-frogs-press",
|
||||
"spicy-snakes-sip",
|
||||
"swift-pumpkins-knock",
|
||||
"ten-parents-breathe",
|
||||
"tender-bags-call",
|
||||
"thick-countries-move",
|
||||
"thick-readers-hang",
|
||||
"three-moles-drop",
|
||||
"three-pots-sit",
|
||||
"tiny-seals-join",
|
||||
"two-dolls-check",
|
||||
"wild-jokes-beam"
|
||||
]
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
'@verdaccio/logger': patch
|
||||
'@verdaccio/logger-prettify': patch
|
||||
'@verdaccio/middleware': patch
|
||||
'@verdaccio/mock': patch
|
||||
'@verdaccio/node-api': patch
|
||||
'@verdaccio/proxy': patch
|
||||
'@verdaccio/server': patch
|
||||
|
||||
10
.changeset/proud-jeans-walk.md
Normal file
10
.changeset/proud-jeans-walk.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
'verdaccio-htpasswd': patch
|
||||
'@verdaccio/local-storage': patch
|
||||
'@verdaccio/fastify-migration': patch
|
||||
'@verdaccio/hooks': patch
|
||||
'@verdaccio/mock': patch
|
||||
'@verdaccio/node-api': patch
|
||||
---
|
||||
|
||||
Added core-js missing from dependencies though referenced in .js sources
|
||||
45
.changeset/proud-jobs-hope.md
Normal file
45
.changeset/proud-jobs-hope.md
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
'@verdaccio/api': major
|
||||
'@verdaccio/cli': major
|
||||
'@verdaccio/config': major
|
||||
'@verdaccio/core': major
|
||||
'@verdaccio/types': major
|
||||
'@verdaccio/logger': major
|
||||
'@verdaccio/node-api': major
|
||||
'verdaccio-aws-s3-storage': major
|
||||
'verdaccio-google-cloud': major
|
||||
'verdaccio-htpasswd': major
|
||||
'@verdaccio/local-storage': major
|
||||
'verdaccio-memory': major
|
||||
'@verdaccio/ui-theme': major
|
||||
'@verdaccio/proxy': major
|
||||
'@verdaccio/server': major
|
||||
'@verdaccio/mock': major
|
||||
'verdaccio': major
|
||||
'@verdaccio/web': major
|
||||
'@verdaccio/e2e-cli': major
|
||||
'@verdaccio/website': major
|
||||
---
|
||||
|
||||
feat!: config.logs throw an error, logging config not longer accept array or logs property
|
||||
|
||||
### 💥 Breaking change
|
||||
|
||||
This is valid
|
||||
|
||||
```yaml
|
||||
log: { type: stdout, format: pretty, level: http }
|
||||
```
|
||||
|
||||
This is invalid
|
||||
|
||||
```yaml
|
||||
logs: { type: stdout, format: pretty, level: http }
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```yaml
|
||||
logs:
|
||||
- [{ type: stdout, format: pretty, level: http }]
|
||||
```
|
||||
5
.changeset/red-yaks-sell.md
Normal file
5
.changeset/red-yaks-sell.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/logger': patch
|
||||
---
|
||||
|
||||
Fix re-opening log files using SIGUSR2
|
||||
10
.changeset/rich-ghosts-rule.md
Normal file
10
.changeset/rich-ghosts-rule.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
'@verdaccio/types': major
|
||||
'@verdaccio/ui-theme': major
|
||||
'@verdaccio/dev-types': major
|
||||
'@verdaccio/web': major
|
||||
'@verdaccio/e2e-ui': major
|
||||
'@verdaccio/website': major
|
||||
---
|
||||
|
||||
feat: upgrade to material ui 5
|
||||
5
.changeset/shaggy-carrots-unite.md
Normal file
5
.changeset/shaggy-carrots-unite.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/logger': patch
|
||||
---
|
||||
|
||||
do not show deprecation warning on default logger config
|
||||
8
.changeset/shaggy-parrots-smash.md
Normal file
8
.changeset/shaggy-parrots-smash.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
'@verdaccio/cli': minor
|
||||
'@verdaccio/core': minor
|
||||
'@verdaccio/logger': minor
|
||||
'@verdaccio/node-api': minor
|
||||
---
|
||||
|
||||
feat: use warning codes for deprecation warnings
|
||||
6
.changeset/slow-carrots-relate.md
Normal file
6
.changeset/slow-carrots-relate.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@verdaccio/config': minor
|
||||
'@verdaccio/web': minor
|
||||
---
|
||||
|
||||
feat(web): add a config item to web,let the developer can select whet……her enable the html cache
|
||||
20
.changeset/smart-beds-cross.md
Normal file
20
.changeset/smart-beds-cross.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
'@verdaccio/api': minor
|
||||
'@verdaccio/config': minor
|
||||
'@verdaccio/core': minor
|
||||
'@verdaccio/types': minor
|
||||
'@verdaccio/local-storage': minor
|
||||
'@verdaccio/ui-theme': minor
|
||||
'@verdaccio/proxy': minor
|
||||
'@verdaccio/server': minor
|
||||
'@verdaccio/store': minor
|
||||
'@verdaccio/test-helper': minor
|
||||
'@verdaccio/web': minor
|
||||
---
|
||||
|
||||
feat: ui search support for remote, local and private packages
|
||||
|
||||
The command `npm search` search globally and return all matches, with this improvement the user interface
|
||||
is powered with the same capabilities.
|
||||
|
||||
The UI also tag where is the origin the package with a tag, also provide the latest version and description of the package.
|
||||
11
.changeset/sour-buses-shout.md
Normal file
11
.changeset/sour-buses-shout.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
'@verdaccio/fastify-migration': minor
|
||||
'@verdaccio/store': minor
|
||||
'@verdaccio/utils': minor
|
||||
'@verdaccio/web': minor
|
||||
'@verdaccio/website': minor
|
||||
---
|
||||
|
||||
feat: migrate web sidebar endpoint to fastify
|
||||
|
||||
reuse utils methods between packages
|
||||
5
.changeset/spicy-snakes-sip.md
Normal file
5
.changeset/spicy-snakes-sip.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-theme': patch
|
||||
---
|
||||
|
||||
fix: specific version package detail page not showing
|
||||
6
.changeset/swift-pumpkins-knock.md
Normal file
6
.changeset/swift-pumpkins-knock.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@verdaccio/auth': patch
|
||||
'verdaccio-htpasswd': patch
|
||||
---
|
||||
|
||||
Refactor htpasswd plugin to use the bcryptjs 'compare' api call instead of 'comparSync'. Add a new configuration value named 'slow_verify_ms' to the htpasswd plugin that when exceeded during password verification will log a warning message.
|
||||
7
.changeset/ten-parents-breathe.md
Normal file
7
.changeset/ten-parents-breathe.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@verdaccio/auth': minor
|
||||
'@verdaccio/fastify-migration': minor
|
||||
'@verdaccio/web': minor
|
||||
---
|
||||
|
||||
dist tags Implementation on Fastify
|
||||
6
.changeset/thick-countries-move.md
Normal file
6
.changeset/thick-countries-move.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@verdaccio/logger': major
|
||||
'@verdaccio/logger-prettify': major
|
||||
---
|
||||
|
||||
feat: upgrade to pino v7
|
||||
5
.changeset/thick-readers-hang.md
Normal file
5
.changeset/thick-readers-hang.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-theme': patch
|
||||
---
|
||||
|
||||
fix: fixes some style issues on mobile, particularly related to the Ukraine support message - [@s-h-a-d-o-w](https://github.com/s-h-a-d-o-w)
|
||||
7
.changeset/three-moles-drop.md
Normal file
7
.changeset/three-moles-drop.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@verdaccio/api': minor
|
||||
'@verdaccio/store': minor
|
||||
'@verdaccio/utils': minor
|
||||
---
|
||||
|
||||
refactor: improve versions and dist-tag filters
|
||||
5
.changeset/tiny-seals-join.md
Normal file
5
.changeset/tiny-seals-join.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-theme': minor
|
||||
---
|
||||
|
||||
feat: improve registry info dialog and language switch
|
||||
@@ -9,3 +9,6 @@ static/
|
||||
website/
|
||||
wiki/
|
||||
dist/
|
||||
docs/
|
||||
test/functional/store/*
|
||||
docker-examples/**/lib/**/*.js
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/config.yml
vendored
2
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -7,7 +7,7 @@ contact_links:
|
||||
url: https://github.com/verdaccio/verdaccio/security/policy
|
||||
about: I want to report a security vulnerability
|
||||
- name: Chat 🏘
|
||||
url: http://chat.verdaccio.org
|
||||
url: https://discord.gg/7qWJxBf
|
||||
about: For a quick question you should do it through our community chat
|
||||
- name: User Interface Report 👩🏼🎨👨🏼🎨
|
||||
url: https://github.com/verdaccio/ui/issues/new/choose
|
||||
|
||||
@@ -2,24 +2,28 @@
|
||||
name: ci - benchmark
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# 3 times day
|
||||
# 1 time peer week
|
||||
# collecting enough data to draw some graphics
|
||||
- cron: '0 1 * * *'
|
||||
- cron: '0 1 * * 1'
|
||||
# push:
|
||||
# branches:
|
||||
# - master
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
name: Prepare build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 14.x
|
||||
node-version: 16.x
|
||||
- name: install pnpm
|
||||
run: sudo npm i pnpm@6.6.1 -g
|
||||
run: sudo npm i pnpm@latest-6 -g
|
||||
- name: set store
|
||||
run: |
|
||||
mkdir ~/.pnpm-store
|
||||
@@ -29,7 +33,7 @@ jobs:
|
||||
- name: install dependencies
|
||||
run: pnpm install
|
||||
- name: Cache .pnpm-store
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -40,7 +44,7 @@ jobs:
|
||||
- name: tar packages
|
||||
run: |
|
||||
tar -czvf ${{ github.workspace }}/pkg.tar.gz -C ${{ github.workspace }}/packages .
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: verdaccio-artifact
|
||||
path: pkg.tar.gz
|
||||
@@ -56,23 +60,24 @@ jobs:
|
||||
# - local
|
||||
- 3.13.1
|
||||
- 4.12.2
|
||||
- 5.1.2
|
||||
- 5.10.2
|
||||
- 6.0.0-6-next.40
|
||||
name: Benchmark autocannon
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 14.x
|
||||
- uses: actions/download-artifact@v2
|
||||
node-version: 16.x
|
||||
- uses: actions/download-artifact@v3
|
||||
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
|
||||
run: sudo npm i pnpm@latest-6 -g
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -85,7 +90,7 @@ jobs:
|
||||
shell: bash
|
||||
env:
|
||||
DEBUG: metrics*
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: verdaccio-metrics-api
|
||||
path: ./api-results-${{matrix.verdaccioVersion}}-${{matrix.benchmark}}.json
|
||||
@@ -116,23 +121,24 @@ jobs:
|
||||
# old versions to compare same test along previous releases
|
||||
- 3.13.1
|
||||
- 4.12.2
|
||||
- 5.1.2
|
||||
- 5.10.2
|
||||
- 6.0.0-6-next.40
|
||||
name: Benchmark hyperfine
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 14.x
|
||||
- uses: actions/download-artifact@v2
|
||||
node-version: 16.x
|
||||
- uses: actions/download-artifact@v3
|
||||
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
|
||||
run: sudo npm i pnpm@latest-6 -g
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -150,7 +156,7 @@ jobs:
|
||||
shell: bash
|
||||
- name: rename
|
||||
run: mv ./hyper-results.json ./hyper-results-${{matrix.verdaccioVersion}}-${{matrix.benchmark}}.json
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: verdaccio-metrics
|
||||
path: ./hyper-results-${{matrix.verdaccioVersion}}-${{matrix.benchmark}}.json
|
||||
28
.github/workflows/changesets.yml
vendored
28
.github/workflows/changesets.yml
vendored
@@ -20,33 +20,38 @@ jobs:
|
||||
if: github.ref == 'refs/heads/master' && github.repository == 'verdaccio/verdaccio'
|
||||
steps:
|
||||
- name: checkout code repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 14
|
||||
registry-url: 'https://registry.verdaccio.org'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
||||
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
|
||||
|
||||
- name: install pnpm
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
run: npm i pnpm@6.32.15 -g
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
||||
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
|
||||
|
||||
- name: setup pnpm config
|
||||
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
|
||||
- name: setup pnpm config registry
|
||||
run: pnpm config set registry https://registry.verdaccio.org
|
||||
run: pnpm config set registry https://registry.npmjs.org
|
||||
|
||||
- name: install dependencies
|
||||
run: pnpm install
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
||||
|
||||
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
|
||||
- name: crowdin download
|
||||
env:
|
||||
CROWDIN_VERDACCIO_PROJECT_ID: ${{ secrets.CROWDIN_VERDACCIO_PROJECT_ID }}
|
||||
CROWDIN_VERDACCIO_API_KEY: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
|
||||
CONTEXT: production
|
||||
run: pnpm crowdin:download
|
||||
- name: build
|
||||
run: pnpm build
|
||||
|
||||
@@ -59,5 +64,6 @@ jobs:
|
||||
publish: pnpm ci:publish
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
||||
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
|
||||
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
|
||||
NPM_CONFIG_REGISTRY: https://registry.npmjs.org
|
||||
|
||||
230
.github/workflows/ci.yml
vendored
230
.github/workflows/ci.yml
vendored
@@ -10,34 +10,38 @@ on:
|
||||
- .changeset/**
|
||||
- .github/workflows/ci.yml
|
||||
- 'packages/**'
|
||||
- 'docker-examples/**'
|
||||
- 'jest/**'
|
||||
- 'package.json'
|
||||
- 'pnpm-workspace.yaml'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
runs-on: ubuntu-latest
|
||||
name: setup verdaccio
|
||||
services:
|
||||
verdaccio:
|
||||
image: verdaccio/verdaccio:5
|
||||
image: verdaccio/verdaccio:nightly-master
|
||||
ports:
|
||||
- 4873:4873
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Use Node 14
|
||||
uses: actions/setup-node@v1
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node 16
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 14
|
||||
node-version: 16
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
run: npm i pnpm@6.32.15 -g
|
||||
- name: set store
|
||||
run: |
|
||||
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
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -48,17 +52,17 @@ jobs:
|
||||
name: Lint
|
||||
needs: prepare
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node 16
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
- uses: actions/cache@v2
|
||||
run: npm i pnpm@6.32.15 -g
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
- name: Lint
|
||||
@@ -68,150 +72,126 @@ jobs:
|
||||
name: Format
|
||||
needs: prepare
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node 16
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
- uses: actions/cache@v2
|
||||
run: npm i pnpm@6.32.15 -g
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
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]
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
## Node 16 breaks UI test, jest issue
|
||||
node_version: [16, 17]
|
||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Use Node 16
|
||||
uses: actions/setup-node@v1
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: ${{ matrix.node_version }}
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
- uses: actions/cache@v2
|
||||
run: npm i pnpm@6.32.15 -g
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
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: true
|
||||
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 }}
|
||||
- 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
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
- name: Test
|
||||
run: pnpm test
|
||||
ci-e2e-ui:
|
||||
needs: build
|
||||
needs: [format, lint]
|
||||
runs-on: ubuntu-latest
|
||||
name: UI Test E2E Node 14
|
||||
name: UI Test E2E Node 16
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- uses: actions/setup-node@v1
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
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
|
||||
node-version: 16
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.10.3 -g
|
||||
- uses: actions/cache@v2
|
||||
run: npm i pnpm@6.32.15 -g
|
||||
- uses: actions/cache@v3
|
||||
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') }}
|
||||
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
|
||||
- name: Test UI
|
||||
run: pnpm test:e2e:ui
|
||||
# env:
|
||||
# DEBUG: verdaccio:e2e*
|
||||
# FIXME verify why fails on Node 16 (locally works fine)
|
||||
# ci-e2e-cli:
|
||||
# needs: [format, lint]
|
||||
# runs-on: ubuntu-latest
|
||||
# # TODO: fails on migrate to node 16, we need to check why
|
||||
# name: CLI Test E2E Node 16
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# - uses: actions/setup-node@v3
|
||||
# with:
|
||||
# node-version: 16
|
||||
# - name: Install pnpm
|
||||
# run: npm i pnpm@latest -g
|
||||
# - uses: actions/cache@v3
|
||||
# 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: build
|
||||
# run: pnpm build
|
||||
# - name: Test CLI
|
||||
# run: pnpm test:e2e:cli
|
||||
# env:
|
||||
# DEBUG: verdaccio*
|
||||
sync-translations:
|
||||
# needs: [ci-e2e-cli, ci-e2e-ui]
|
||||
needs: [ci-e2e-ui]
|
||||
runs-on: ubuntu-latest
|
||||
name: synchronize translations
|
||||
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.32.15 -g
|
||||
- uses: actions/cache@v3
|
||||
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: build
|
||||
run: pnpm build
|
||||
- name: generate website translations
|
||||
run: pnpm write-translations --filter ...@verdaccio/website
|
||||
- name: sync
|
||||
env:
|
||||
CROWDIN_VERDACCIO_PROJECT_ID: ${{ secrets.CROWDIN_VERDACCIO_PROJECT_ID }}
|
||||
CROWDIN_VERDACCIO_API_KEY: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
|
||||
CONTEXT: production
|
||||
run: pnpm crowdin:sync
|
||||
|
||||
15
.github/workflows/codeql-analysis.yml
vendored
15
.github/workflows/codeql-analysis.yml
vendored
@@ -8,13 +8,20 @@ on:
|
||||
schedule:
|
||||
- cron: '0 2 * * 4'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
CodeQL-Build:
|
||||
permissions:
|
||||
actions: read # for github/codeql-action/init to get workflow details
|
||||
contents: read # for actions/checkout to fetch code
|
||||
security-events: write # for github/codeql-action/autobuild to send a status report
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2.3.1
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
@@ -27,7 +34,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
uses: github/codeql-action/init@v2
|
||||
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
# with:
|
||||
@@ -35,7 +42,7 @@ jobs:
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -49,4 +56,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
||||
48
.github/workflows/contributors.yml
vendored
Normal file
48
.github/workflows/contributors.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
name: contributors
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# twice peer week
|
||||
- cron: '0 0 * * 1,4'
|
||||
# for now, scheduled, we can enable on push master but not make much sense now
|
||||
# push:
|
||||
# branches:
|
||||
# - master
|
||||
jobs:
|
||||
prepare:
|
||||
name: Run script
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 17.x
|
||||
- name: install pnpm
|
||||
run: sudo npm i pnpm@latest-6 -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: update contributors
|
||||
run: pnpm run contributors
|
||||
env:
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: format
|
||||
run: pnpm format
|
||||
- name: Commit & Push changes
|
||||
uses: actions-js/push@v1.3
|
||||
with:
|
||||
github_token: ${{ secrets.TOKEN_VERDACCIOBOT_GITHUB }}
|
||||
message: "chore: updated contributors list"
|
||||
branch: master
|
||||
author_email: verdaccio.npm@gmail.com
|
||||
author_name: verdacciobot
|
||||
2
.github/workflows/docker-publish.yml
vendored
2
.github/workflows/docker-publish.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
|
||||
46
.github/workflows/website.yml
vendored
46
.github/workflows/website.yml
vendored
@@ -3,13 +3,6 @@ name: Verdaccio Website CI
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
paths:
|
||||
- 'website/**'
|
||||
- 'package.json'
|
||||
- './.github/workflows/website.yml'
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
@@ -24,15 +17,15 @@ jobs:
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node 14
|
||||
uses: actions/setup-node@v2
|
||||
- name: Use Node 16
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 14
|
||||
node-version: 16
|
||||
|
||||
- name: Cache pnpm modules
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: cache-pnpm-modules
|
||||
with:
|
||||
@@ -41,20 +34,16 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
|
||||
|
||||
- uses: pnpm/action-setup@v2.0.1
|
||||
- uses: pnpm/action-setup@v2.2.2
|
||||
with:
|
||||
version: 6.10.2
|
||||
version: 6.32.15
|
||||
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: Build Plugins
|
||||
run: pnpm build --filter "docusaurus-plugin-contributors"
|
||||
- name: Cache Docusaurus Build
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: website/node_modules/.cache/webpack
|
||||
key: cache/webpack-${{github.ref}}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
@@ -82,13 +71,12 @@ jobs:
|
||||
|
||||
# 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'
|
||||
if: github.repository == 'verdaccio/verdaccio'
|
||||
uses: semoal/action-netlify-deploy@master
|
||||
id: netlify_preview
|
||||
with:
|
||||
@@ -102,9 +90,9 @@ jobs:
|
||||
build-dir: './website/build'
|
||||
|
||||
- name: Audit preview URL with Lighthouse
|
||||
if: github.event_name == 'pull_request' && github.ref != 'refs/heads/master'
|
||||
if: github.repository == 'verdaccio/verdaccio'
|
||||
id: lighthouse_audit
|
||||
uses: treosh/lighthouse-ci-action@v3
|
||||
uses: treosh/lighthouse-ci-action@9.3.0
|
||||
with:
|
||||
urls: |
|
||||
${{ steps.netlify_preview.outputs.preview-url }}
|
||||
@@ -112,9 +100,8 @@ jobs:
|
||||
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
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
@@ -137,12 +124,13 @@ jobs:
|
||||
core.setOutput("comment", comment);
|
||||
|
||||
- name: Add comment to PR
|
||||
if: github.event_name == 'pull_request' && github.ref != 'refs/heads/master'
|
||||
if: github.repository == 'verdaccio/verdaccio'
|
||||
id: comment_to_pr
|
||||
uses: marocchino/sticky-pull-request-comment@v1
|
||||
uses: marocchino/sticky-pull-request-comment@v2
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
number: ${{ github.event.issue.number }}
|
||||
delete: true
|
||||
header: lighthouse
|
||||
message: |
|
||||
${{ steps.format_lighthouse_score.outputs.comment }}
|
||||
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -34,6 +34,9 @@ packages/standalone/dist/
|
||||
|
||||
## ui
|
||||
packages/plugins/ui-theme/static
|
||||
/packages/plugins/ui-theme/src/i18n/download_translations/
|
||||
!/packages/plugins/ui-theme/src/i18n/crowdin/ui.json
|
||||
|
||||
|
||||
# CI Pnpm cache
|
||||
.pnpm-store/
|
||||
@@ -43,3 +46,7 @@ api-results.json
|
||||
hyper-results.json
|
||||
hyper-results*.json
|
||||
api-results*.json
|
||||
|
||||
#docs
|
||||
./api
|
||||
packages/core/core/docs
|
||||
|
||||
5
.husky/pre-commit
Executable file
5
.husky/pre-commit
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
#./node_modules/.bin/lint-staged
|
||||
npm run husky:pre-commit
|
||||
2
.npmrc
2
.npmrc
@@ -1,5 +1,5 @@
|
||||
always-auth = true
|
||||
recursive-install = true
|
||||
registry = https://registry.verdaccio.org
|
||||
loglevel=warn
|
||||
loglevel=info
|
||||
fetch-retries="10"
|
||||
|
||||
@@ -17,10 +17,17 @@ node_modules/
|
||||
**/static/*.js
|
||||
**/build/*.js
|
||||
packages/core/local-storage/_storage/**
|
||||
packages/partials/storage_default_storage/
|
||||
packages/standalone/dist/bundle.js
|
||||
packages/verdaccio/dist/bundle.js
|
||||
docker-examples/v5/reverse_proxy/nginx/relative_path/storage/*
|
||||
docker-examples/
|
||||
build/
|
||||
.vscode/
|
||||
.github/
|
||||
.netlify/
|
||||
packages/**/docs/**
|
||||
packages/mock/mock-store/**
|
||||
api/**
|
||||
packages/core/local-storage/tests/__fixtures__/test-storage/
|
||||
packages/plugins/ui-theme/static/
|
||||
.verdaccio-db.json
|
||||
|
||||
11
.prettierrc
11
.prettierrc
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"endOfLine": "lf",
|
||||
"useTabs": false,
|
||||
"printWidth": 100,
|
||||
"tabWidth": 2,
|
||||
"singleQuote": true,
|
||||
"bracketSpacing": true,
|
||||
"jsxBracketSameLine": true,
|
||||
"trailingComma": "es5",
|
||||
"semi": true
|
||||
}
|
||||
10
.vscode/launch.json
vendored
10
.vscode/launch.json
vendored
@@ -4,6 +4,16 @@
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
|
||||
{
|
||||
"name": "Attach",
|
||||
"port": 9229,
|
||||
"request": "attach",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "pwa-node"
|
||||
},
|
||||
{
|
||||
"name": "Verdaccio Debug",
|
||||
"port": 9229,
|
||||
|
||||
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"files.exclude": {
|
||||
"**/.nyc_output": true,
|
||||
"**/build": true,
|
||||
"**/build": false,
|
||||
"**/coverage": true,
|
||||
".idea": true,
|
||||
"storage_default_storage": true,
|
||||
|
||||
1985
CHANGELOG.md
1985
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@@ -19,6 +19,7 @@ guidelines for you:
|
||||
- [What's is not considered a bug?](#whats-is-not-considered-a-bug)
|
||||
- [Issue Search](#issue-search)
|
||||
- [Chat](#chat)
|
||||
- [Translations](#translations)
|
||||
- [Request Features](#request-features)
|
||||
- [Contributing Guidelines](#contributing-guidelines)
|
||||
- [Submitting a Pull Request](#submitting-a-pull-request)
|
||||
@@ -69,7 +70,7 @@ This setting would cause the `pnpm install` command to install incorrect version
|
||||
To begin your development setup, please install the latest version of pnpm globally:
|
||||
|
||||
```
|
||||
npm i -g pnpm
|
||||
npm i -g pnpm@latest-6
|
||||
```
|
||||
|
||||
With pnpm installed, the first step is installing all dependencies:
|
||||
@@ -128,9 +129,21 @@ More details in the debug section
|
||||
|
||||
### Running and debugging
|
||||
|
||||
> Check the debugging guidelines [here](https://github.com/verdaccio/verdaccio/wiki/Debugging-Verdaccio)
|
||||
|
||||
We use [`debug`](https://www.npmjs.com/package/debug) to add helpful debugging
|
||||
output to the code. Each package has it owns namespace.
|
||||
|
||||
#### Useful Scripts
|
||||
|
||||
To run the application from the source code, ensure the project has been built with `pnpm build`, once this is done, there are few commands that helps to run server:
|
||||
|
||||
- `pnpm start`: Runs server on port `8000` and UI on port `4873`. This is particularly useful if you want to contribute to the UI, since it runs with hot reload.
|
||||
- `pnpm debug`: Run the server in debug mode `--inspect`. UI runs too but without hot reload. For automatic break use `pnpm debug:break`.
|
||||
- `pnpm debug:fastify`: To contribute on the [fastify migration](https://github.com/verdaccio/verdaccio/discussions/2155) this is a temporary command for such purpose.
|
||||
- `pnpm website`: Build the website, for more commands to run the _website_, run `cd website` and then `pnpm serve`, website will run on port `3000`.
|
||||
- `pnpm docker`: Build the docker image. Requires `docker` command available in your system.
|
||||
|
||||
#### Debugging compiled code
|
||||
|
||||
Currently you can only run pre-compiled packages in debug mode. To enable debug
|
||||
@@ -190,10 +203,28 @@ affecting multiple people.
|
||||
|
||||
### Chat
|
||||
|
||||
Questions can be asked via [Discord](http://chat.verdaccio.org/)
|
||||
Questions can be asked via [Discord](https://discord.gg/7qWJxBf)
|
||||
|
||||
**Please use the `#help` channel.**
|
||||
|
||||
## Translations
|
||||
|
||||
All translations are provided by the `crowdin` platform:
|
||||
[https://translate.verdaccio.org/](https://translate.verdaccio.org/)
|
||||
|
||||
If you want to contribute by adding translations, create an account (GitHub could be used as fast alternative), in the platform you can contribute to two areas, the website or improve User Interface translations.
|
||||
|
||||
If a language is not listed, ask for it in the [Discord](https://discord.gg/7qWJxBf) channel #contribute channel.
|
||||
|
||||
For adding a new **language** on the UI follow these steps:
|
||||
|
||||
1. Ensure the **language** has been enabled, must be visible in the `crowdin` platform.
|
||||
2. Find in the explorer the file `en.US.json` in the path `packages/plugins/ui-theme/src/i18n/crowdin/ui.json` and complete the translations, **not need to find approval on this**.
|
||||
3. Into the project, add a new field into `packages/plugins/ui-theme/src/i18n/crowdin/ui.json` file, in the section `lng`, the new language, eg: `{ lng: {korean:"Korean"}}`. (This file is English based, once the PR has been merged, this string will be available in crowdin for translate to the targeted language).
|
||||
4. Add the language, [flag icon](https://www.npmjs.com/package/country-flag-icons), and the menu key fort he new language eg: `menuKey: 'lng.korean'` to the file `packages/plugins/ui-theme/src/i18n/enabledLanguages.ts`.
|
||||
5. For local testing, read `packages/plugins/ui-theme/src/i18n/ABOUT_TRANSLATIONS.md`.
|
||||
6. Add a `changeset` file, see more info below.
|
||||
|
||||
## Request Features
|
||||
|
||||
New feature requests are welcome. Analyse whether the idea fits within scope of
|
||||
@@ -300,8 +331,8 @@ We use [changesets](https://github.com/atlassian/changesets) in order to
|
||||
generate a detailed Changelog as possible.
|
||||
|
||||
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
|
||||
contribution to get merged (unless it does not affect functionality or
|
||||
user-facing content, eg: docs, readme, adding test or typo/lint fixes). To
|
||||
create a changeset please run:
|
||||
|
||||
```
|
||||
|
||||
13
Dockerfile
13
Dockerfile
@@ -1,25 +1,26 @@
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:14.17.6-alpine as builder
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:16.15.0-alpine as builder
|
||||
|
||||
ENV NODE_ENV=development \
|
||||
VERDACCIO_BUILD_REGISTRY=https://registry.verdaccio.org
|
||||
|
||||
RUN apk --no-cache add openssl ca-certificates wget && \
|
||||
apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python && \
|
||||
apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python2 && \
|
||||
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
|
||||
wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-2.25-r0.apk && \
|
||||
apk add glibc-2.25-r0.apk
|
||||
|
||||
WORKDIR /opt/verdaccio-build
|
||||
COPY . .
|
||||
|
||||
RUN npm -g i pnpm@6.10.3 && \
|
||||
RUN npm -g i pnpm@6.32.15 && \
|
||||
pnpm config set registry $VERDACCIO_BUILD_REGISTRY && \
|
||||
pnpm recursive install --frozen-lockfile --ignore-scripts && \
|
||||
pnpm run build
|
||||
rm -Rf test && \
|
||||
pnpm run build && \
|
||||
pnpm install -P
|
||||
# FIXME: need to remove devDependencies from the build
|
||||
# RUN pnpm install --prod --ignore-scripts
|
||||
|
||||
FROM node:14.17.6-alpine
|
||||
FROM node:16.15.0-alpine
|
||||
LABEL maintainer="https://github.com/verdaccio/verdaccio"
|
||||
|
||||
ENV VERDACCIO_APPDIR=/opt/verdaccio \
|
||||
|
||||
107
README.md
107
README.md
@@ -1,10 +1,19 @@
|
||||
[](https://donate.redcrossredcrescent.org/ua/donate/~my-donation?_cv=1)
|
||||
|
||||
> Verdaccio stands for **peace**, stop the war, we will be yellow / blue 🇺🇦 until that happens.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
# Version 6 (Development branch)
|
||||
|
||||
> Looking for Verdaccio 5? Check branch `5.x`.
|
||||
> Looking for Verdaccio 5 version? Check the branch `5.x`
|
||||
> The plugins for the `v5.x` that are hosted within this organization are located
|
||||
> at the [`verdaccio/monorepo`](https://github.com/verdaccio/monorepo) repository, while for the v6.x
|
||||
> are hosted on this project `./packages/plugins`, keep on mind `v6.x` plugins will eventually would be
|
||||
> incompatible with `v5.x` versions.
|
||||
> Note that contributing guidelines might be different based on the branch.
|
||||
|
||||
[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
|
||||
@@ -26,20 +35,48 @@ Google Cloud Storage** or create your own plugin.
|
||||
|
||||
[](https://twitter.com/verdaccio_npm)
|
||||
[](https://github.com/verdaccio/verdaccio/stargazers)
|
||||
[](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
|
||||
|
||||
## Install
|
||||
|
||||
> Latest Node.js v16 required
|
||||
|
||||
Install with npm:
|
||||
|
||||
```bash
|
||||
npm install --global verdaccio@6-next --registry https://registry.verdaccio.org/
|
||||
npm install --global verdaccio@6-next
|
||||
```
|
||||
|
||||
> Published on a temporary registry while setup is ready to publish on npmjs
|
||||
or
|
||||
|
||||
```bash
|
||||
docker pull verdaccio/verdaccio:nightly-master
|
||||
```
|
||||
|
||||
or with _helm_ [official chart](https://github.com/verdaccio/charts).
|
||||
|
||||
```bash
|
||||
helm repo add verdaccio https://charts.verdaccio.org
|
||||
helm repo update
|
||||
helm install verdaccio/verdaccio
|
||||
```
|
||||
|
||||
Furthermore, you can read the [**Debugging Guidelines**](https://github.com/verdaccio/verdaccio/wiki/Debugging-Verdaccio) and the [**Docker Examples**](https://github.com/verdaccio/verdaccio/tree/master/docker-examples) for more advanced development.
|
||||
|
||||
## Plugins
|
||||
|
||||
You can develop your own [plugins](https://verdaccio.org/docs/plugins) with the [verdaccio generator](https://github.com/verdaccio/generator-verdaccio-plugin). Installing [Yeoman](https://yeoman.io/) is required.
|
||||
|
||||
```
|
||||
npm install -g yo
|
||||
npm install -g generator-verdaccio-plugin
|
||||
```
|
||||
|
||||
Learn more [here](https://verdaccio.org/docs/dev-plugins) how to develop plugins. Share your plugins with the community.
|
||||
|
||||
## 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.** 😉
|
||||
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 do a long support donation - **and your logo will be on this section of the readme.**
|
||||
|
||||
**[Donate](https://github.com/sponsors/verdaccio)** 💵👍🏻 starting from _$1/month_ or just one single contribution.
|
||||
|
||||
@@ -65,19 +102,31 @@ If you want to use a modified version of some 3rd-party package (for example, yo
|
||||
### 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.
|
||||
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**, **babel.js**, **angular-cli** or **docusaurus**. You can read more in [here](https://verdaccio.org/docs/e2e).
|
||||
|
||||
## Talks
|
||||
Furthermore, here few examples how to start:
|
||||
|
||||
### **Testing the integrity of your React components by publishing in a private registry - React Finland 2021**.
|
||||
- [e2e-ci-example-gh-actions](https://github.com/juanpicado/e2e-ci-example-gh-actions)
|
||||
- [verdaccio-end-to-end-tests](https://github.com/juanpicado/verdaccio-end-to-end-tests)
|
||||
- [verdaccio-fork](https://github.com/juanpicado/verdaccio-fork)
|
||||
|
||||
[](https://react-finland.fi/schedule/#testing-the-integrity-of-your-react-components-by-publishing-in-a-private-registry)
|
||||
## Watch our Videos
|
||||
|
||||
**Node Congress 2022, February 2022, Online Free**
|
||||
|
||||
<div>
|
||||
<a href="https://portal.gitnation.org/contents/five-ways-of-taking-advantage-of-verdaccio-your-private-and-proxy-nodejs-registry">
|
||||
<img src="https://cdn.verdaccio.dev/readme/nodejscongress2022.jpg" alt="nodejs" width="200"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
You might want to check out as well our previous talks:
|
||||
|
||||
- [Using Docker and Verdaccio to make Integration Testing Easy - **Docker All Hands #4 December - 2021**](https://www.youtube.com/watch?v=zRI0skF1f8I)
|
||||
- [**Juan Picado** – Testing the integrity of React components by publishing in a private registry - React Finland - 2021](https://www.youtube.com/watch?v=bRKZbrlQqLY&t=16s&ab_channel=ReactFinland)
|
||||
- [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)
|
||||
- [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)
|
||||
@@ -94,7 +143,7 @@ verdaccio
|
||||
You would need set some npm configuration, this is optional.
|
||||
|
||||
```bash
|
||||
$ npm set registry http://localhost:4873/
|
||||
npm set registry http://localhost:4873/
|
||||
```
|
||||
|
||||
For one-off commands or to avoid setting the registry globally:
|
||||
@@ -118,7 +167,7 @@ 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
|
||||
npm set ca null
|
||||
```
|
||||
|
||||
#### 2. publish your package
|
||||
@@ -148,7 +197,7 @@ To run the docker container:
|
||||
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
|
||||
```
|
||||
|
||||
Docker examples are available [in this repository](https://github.com/verdaccio/docker-examples).
|
||||
Docker examples are available [in this repository](https://github.com/verdaccio/verdaccio/tree/master/docker-examples).
|
||||
|
||||
## Compatibility
|
||||
|
||||
@@ -186,7 +235,20 @@ Verdaccio aims to support all features of a standard npm client that make sense
|
||||
|
||||
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
|
||||
## Special Thanks
|
||||
|
||||
Thanks to the following companies to help us to achieve our goals providing free open source licenses. Every company provides enough resources to move this project forward.
|
||||
|
||||
| Company | Logo | License |
|
||||
| ------------ | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
||||
| JetBrains | [](https://www.jetbrains.com/) | JetBrains provides licenses for products for active maintainers, renewable yearly |
|
||||
| Crowdin | [](https://crowdin.com/) | Crowdin provides platform for translations |
|
||||
| BrowserStack | [](https://www.browserstack.com/) | BrowserStack provides plan to run End to End testing for the UI |
|
||||
| Netlify | [](https://www.netlify.com/) | Netlify provides pro plan for website deployment |
|
||||
| Algolia | [](https://algolia.com/) | Algolia provides search services for the website |
|
||||
| Docker | [](https://www.docker.com/community/open-source/application) | Docker offers unlimited pulls and unlimited egress to any and all users |
|
||||
|
||||
## Maintainers
|
||||
|
||||
| [Juan Picado](https://github.com/juanpicado) | [Ayush Sharma](https://github.com/ayusharma) | [Sergio Hg](https://github.com/sergiohgz) |
|
||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
|
||||
@@ -203,6 +265,7 @@ You can find and chat with then over Discord, click [here](http://chat.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 ⭐️)_
|
||||
- [Docusaurus](https://github.com/facebook/docusaurus) _(+34k ⭐️)_
|
||||
- [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 ⭐️)_
|
||||
@@ -217,7 +280,7 @@ You can find and chat with then over Discord, click [here](http://chat.verdaccio
|
||||
- [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).
|
||||
🤓 Don't be shy, add yourself to this readme.
|
||||
|
||||
## Open Collective Sponsors
|
||||
|
||||
@@ -240,18 +303,6 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com
|
||||
|
||||
[](https://opencollective.com/verdaccio#backers)
|
||||
|
||||
## Special Thanks
|
||||
|
||||
Thanks to the following companies to help us to achieve our goals providing free open source licenses.
|
||||
|
||||
[](https://www.jetbrains.com/)
|
||||
[](https://crowdin.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
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
||||
@@ -266,7 +317,7 @@ If you have any issue you can try the following options, do no desist to ask or
|
||||
- [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/)
|
||||
- [Chat](https://discord.gg/7qWJxBf)
|
||||
- [Logos](https://verdaccio.org/docs/en/logo)
|
||||
- [Docker Examples](https://github.com/verdaccio/verdaccio/tree/master/docker-examples)
|
||||
- [FAQ](https://github.com/verdaccio/verdaccio/discussions/categories/q-a)
|
||||
|
||||
@@ -5,6 +5,10 @@ preserve_hierarchy: true
|
||||
|
||||
files:
|
||||
[
|
||||
{
|
||||
source: 'packages/plugins/ui-theme/src/i18n/crowdin/**/*',
|
||||
translation: '/packages/plugins/ui-theme/src/i18n/download_translations/%locale%/**/%original_file_name%',
|
||||
},
|
||||
{
|
||||
source: '/website/i18n/en/**/*',
|
||||
translation: '/website/i18n/%locale%/**/%original_file_name%',
|
||||
@@ -13,4 +17,4 @@ files:
|
||||
source: '/website/docs/**/*',
|
||||
translation: '/website/i18n/%locale%/docusaurus-plugin-content-docs/current/**/%original_file_name%',
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
@@ -8,12 +8,14 @@ The following examples aim to be demonstrative and can be either improved or upd
|
||||
|
||||
- [v4 examples](v4/README.md)
|
||||
- [v5 examples](v5/README.md)
|
||||
- [v6 examples](v6/README.md)
|
||||
|
||||
## Aditional data
|
||||
|
||||
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)
|
||||
|
||||
@@ -4,6 +4,9 @@ Verdaccio running with [Localstack](https://github.com/localstack/localstack) pr
|
||||
|
||||
## Usage
|
||||
|
||||
> You might need to create bucket manually here
|
||||
> aws --endpoint-url=http://localhost:4572 s3 mb s3://localstack.s3.plugin.test
|
||||
|
||||
```
|
||||
docker-compose up --force-recreate --build --always-recreate-deps
|
||||
```
|
||||
|
||||
@@ -13,7 +13,6 @@ uplinks:
|
||||
|
||||
packages:
|
||||
'@*/*':
|
||||
# scoped packages
|
||||
access: $all
|
||||
publish: $all
|
||||
proxy: npmjs
|
||||
|
||||
@@ -14,7 +14,7 @@ services:
|
||||
links:
|
||||
- localstack-s3
|
||||
localstack-s3:
|
||||
image: localstack/localstack:latest
|
||||
image: localstack/localstack:0.10.9
|
||||
container_name: localstack-s3-1
|
||||
environment:
|
||||
- DEBUG=0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM python:2.7
|
||||
FROM python:3.7-alpine
|
||||
|
||||
ENV AWS_ACCESS_KEY_ID='[something]'
|
||||
ENV AWS_SECRET_ACCESS_KEY='[something]'
|
||||
@@ -7,4 +7,4 @@ ENV AWS_S3_ENDPOINT='http://localstack-s3:4572'
|
||||
RUN pip install awscli
|
||||
COPY entry.sh /entry.sh
|
||||
RUN chmod +x /entry.sh
|
||||
ENTRYPOINT ["/entry.sh"]
|
||||
ENTRYPOINT ["/entry.sh"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
aws --endpoint-url http://localstack-s3:4572 s3 mb s3://localstack.s3.plugin.test --region eu-west-2
|
||||
aws --endpoint-url http://localstack-s3:4572 s3 mb s3://localstack.s3.plugin.test --region eu-west-2
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
|
||||
#
|
||||
# Look here for more config file examples:
|
||||
# https://github.com/verdaccio/verdaccio/tree/master/conf
|
||||
# https://github.com/verdaccio/verdaccio/tree/master/packages/config/src/conf
|
||||
#
|
||||
|
||||
# path to a directory with all packages
|
||||
|
||||
@@ -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));
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
|
||||
#
|
||||
# Look here for more config file examples:
|
||||
# https://github.com/verdaccio/verdaccio/tree/master/conf
|
||||
# https://github.com/verdaccio/verdaccio/tree/master/packages/config/src/conf
|
||||
#
|
||||
|
||||
# path to a directory with all packages
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
|
||||
#
|
||||
# Look here for more config file examples:
|
||||
# https://github.com/verdaccio/verdaccio/tree/master/conf
|
||||
# https://github.com/verdaccio/verdaccio/tree/master/packages/config/src/conf
|
||||
#
|
||||
|
||||
# path to a directory with all packages
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
|
||||
#
|
||||
# Look here for more config file examples:
|
||||
# https://github.com/verdaccio/verdaccio/tree/master/conf
|
||||
# https://github.com/verdaccio/verdaccio/tree/master/packages/config/src/conf
|
||||
#
|
||||
|
||||
# path to a directory with all packages
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
|
||||
#
|
||||
# Look here for more config file examples:
|
||||
# https://github.com/verdaccio/verdaccio/tree/master/conf
|
||||
# https://github.com/verdaccio/verdaccio/tree/master/packages/config/src/conf
|
||||
#
|
||||
|
||||
# path to a directory with all packages
|
||||
|
||||
@@ -19,7 +19,7 @@ security:
|
||||
expiresIn: 7d
|
||||
|
||||
## IMPORTANT
|
||||
## This setup is required for relative path
|
||||
## This setup is required for relative path
|
||||
url_prefix: /verdaccio/
|
||||
server:
|
||||
behindProxy: true
|
||||
|
||||
2
docker-examples/v4/reverse_proxy/nginx/relative_path/nginx_ssl/Dockerfile
Executable file → Normal file
2
docker-examples/v4/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
|
||||
|
||||
@@ -55919,7 +55919,6 @@
|
||||
"@babel/plugin-transform-async-to-generator": "7.2.0",
|
||||
"@babel/plugin-transform-classes": "7.2.2",
|
||||
"@babel/plugin-transform-runtime": "7.2.0",
|
||||
"@babel/polyfill": "7.2.3",
|
||||
"@babel/preset-env": "7.2.3",
|
||||
"@babel/preset-flow": "7.0.0",
|
||||
"@babel/preset-react": "7.0.0",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# Verdaccio 5
|
||||
|
||||
> Before run examples, build the local image by running `pnpm docker`.
|
||||
> Before run examples, build the local image by running `pnpm docker`.
|
||||
|
||||
- [Docker + Nginx + Verdaccio](reverse_proxy/nginx/README.md)
|
||||
|
||||
## Using Plugins with Docker
|
||||
|
||||
List of different approaches
|
||||
|
||||
> Note these options could be improved, feel free to submit upgrades
|
||||
|
||||
- [Docker + Install plugins from a registry](plugins/docker-build-install-plugin/README.md)
|
||||
- [Docker + Install local plugin](plugins/docker-local-plugin/README.md)
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# Docs based on https://github.com/xlts-dev/verdaccio-prometheus-middleware#installation
|
||||
|
||||
# Docker multi-stage build - https://docs.docker.com/develop/develop-images/multistage-build/
|
||||
# Use an alpine node image to install the plugin
|
||||
FROM node:lts-alpine as builder
|
||||
|
||||
# Install the metrics middleware plugin
|
||||
# npm docs
|
||||
# --global-style https://docs.npmjs.com/cli/v7/commands/npm-install#global-style
|
||||
# --no-bin-links https://docs.npmjs.com/cli/v7/commands/npm-install#bin-links
|
||||
# --omit=optional
|
||||
RUN mkdir -p /verdaccio/plugins \
|
||||
&& cd /verdaccio/plugins \
|
||||
&& npm install --global-style --no-bin-links --omit=optional verdaccio-auth-memory@latest
|
||||
|
||||
# The final built image will be based on the standard Verdaccio docker image.
|
||||
FROM verdaccio/verdaccio:5
|
||||
|
||||
# Copy the plugin files over from the 'builder' node image.
|
||||
# The `$VERDACCIO_USER_UID` env variable is defined in the base `verdaccio/verdaccio` image.
|
||||
# Refer to: https://github.com/verdaccio/verdaccio/blob/v5.2.0/Dockerfile#L32
|
||||
ADD docker.yaml /verdaccio/conf/config.yaml
|
||||
COPY --chown=$VERDACCIO_USER_UID:root --from=builder \
|
||||
/verdaccio/plugins/node_modules/verdaccio-auth-memory \
|
||||
/verdaccio/plugins/verdaccio-auth-memory
|
||||
@@ -0,0 +1,46 @@
|
||||
# Installing a plugin with Docker build
|
||||
|
||||
On this small tutorial (based on [`verdaccio-prometheus-middleware`](https://github.com/xlts-dev/verdaccio-prometheus-middleware) example) you will be able to use a published package in any random registry (npmjs by default) and use it withing a docker image without mapping need it.
|
||||
|
||||
> Since verdaccio:5 uses `yarn@2` to run the application, this tutorial is a workaround but future prove since verdaccio 6 uses `pnpm` to build the docker image.
|
||||
|
||||
There are two main steps to highlight:
|
||||
|
||||
- `docker.yaml`: This is a copy of the original configuration file for docker and with small modifications to use the plugin [`verdaccio-auth-memory`](https://www.npmjs.com/package/verdaccio-auth-memory) and custom web title for demonstration.
|
||||
- The `Dockerfile` take advance of the docker multi-stage build to install the plugin into the `verdaccio/plugins` folder withing the image, then we apply the right permissions `--chown=$VERDACCIO_USER_UID:root` so the plugin is recognized.
|
||||
|
||||
## Run it
|
||||
|
||||
Build this image.
|
||||
|
||||
```bash
|
||||
docker build -t verdaccio/verdaccio:local .
|
||||
```
|
||||
|
||||
and to run it
|
||||
|
||||
```bash
|
||||
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio:local
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```dockerfile
|
||||
# Docker multi-stage build - https://docs.docker.com/develop/develop-images/multistage-build/
|
||||
# Use an alpine node image to install the plugin
|
||||
FROM node:lts-alpine as builder
|
||||
|
||||
RUN mkdir -p /verdaccio/plugins \
|
||||
&& cd /verdaccio/plugins \
|
||||
&& npm install --global-style --no-bin-links --omit=optional verdaccio-auth-memory@latest
|
||||
|
||||
FROM verdaccio/verdaccio:5
|
||||
|
||||
# copy your modified config.yaml into the image
|
||||
ADD docker.yaml /verdaccio/conf/config.yaml
|
||||
|
||||
COPY --chown=$VERDACCIO_USER_UID:root --from=builder \
|
||||
/verdaccio/plugins/node_modules/verdaccio-auth-memory \
|
||||
/verdaccio/plugins/verdaccio-auth-memory
|
||||
|
||||
```
|
||||
@@ -0,0 +1,197 @@
|
||||
#
|
||||
# This is the default configuration file. It allows all users to do anything,
|
||||
# please read carefully the documentation and best practices to
|
||||
# improve security.
|
||||
#
|
||||
# Do not configure host and port under `listen` in this file
|
||||
# as it will be ignored when using docker.
|
||||
# see https://verdaccio.org/docs/en/docker#docker-and-custom-port-configuration
|
||||
#
|
||||
# Look here for more config file examples:
|
||||
# https://github.com/verdaccio/verdaccio/tree/5.x/conf
|
||||
#
|
||||
# Read about the best practices
|
||||
# https://verdaccio.org/docs/best
|
||||
|
||||
# path to a directory with all packages
|
||||
storage: /verdaccio/storage/data
|
||||
# path to a directory with plugins to include
|
||||
plugins: /verdaccio/plugins
|
||||
|
||||
# https://verdaccio.org/docs/webui
|
||||
web:
|
||||
title: Verdaccio Publish Config Test
|
||||
# comment out to disable gravatar support
|
||||
# gravatar: false
|
||||
# by default packages are ordercer ascendant (asc|desc)
|
||||
# sort_packages: asc
|
||||
# convert your UI to the dark side
|
||||
# darkMode: true
|
||||
# html_cache: true
|
||||
# by default all features are displayed
|
||||
# login: true
|
||||
# showInfo: true
|
||||
# showSettings: true
|
||||
# In combination with darkMode you can force specific theme
|
||||
# showThemeSwitch: true
|
||||
# showFooter: true
|
||||
# showSearch: true
|
||||
# showRaw: true
|
||||
# showDownloadTarball: true
|
||||
# HTML tags injected after manifest <scripts/>
|
||||
# scriptsBodyAfter:
|
||||
# - '<script type="text/javascript" src="https://my.company.com/customJS.min.js"></script>'
|
||||
# HTML tags injected before ends </head>
|
||||
# metaScripts:
|
||||
# - '<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>'
|
||||
# - '<script type="text/javascript" src="https://browser.sentry-cdn.com/5.15.5/bundle.min.js"></script>'
|
||||
# - '<meta name="robots" content="noindex" />'
|
||||
# HTML tags injected first child at <body/>
|
||||
# bodyBefore:
|
||||
# - '<div id="myId">html before webpack scripts</div>'
|
||||
# Public path for template manifest scripts (only manifest)
|
||||
# publicPath: http://somedomain.org/
|
||||
|
||||
# https://verdaccio.org/docs/configuration#authentication
|
||||
auth:
|
||||
auth-memory:
|
||||
users:
|
||||
foo:
|
||||
name: foo
|
||||
password: s3cret
|
||||
bar:
|
||||
name: bar
|
||||
password: s3cret
|
||||
|
||||
# https://verdaccio.org/docs/configuration#uplinks
|
||||
# a list of other known repositories we can talk to
|
||||
uplinks:
|
||||
npmjs:
|
||||
url: https://registry.npmjs.org/
|
||||
|
||||
# Learn how to protect your packages
|
||||
# https://verdaccio.org/docs/protect-your-dependencies/
|
||||
# https://verdaccio.org/docs/configuration#packages
|
||||
packages:
|
||||
'@*/*':
|
||||
# scoped packages
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
unpublish: $authenticated
|
||||
proxy: npmjs
|
||||
|
||||
'**':
|
||||
# allow all users (including non-authenticated users) to read and
|
||||
# publish all packages
|
||||
#
|
||||
# you can specify usernames/groupnames (depending on your auth plugin)
|
||||
# and three keywords: "$all", "$anonymous", "$authenticated"
|
||||
access: $all
|
||||
|
||||
# allow all known users to publish/publish packages
|
||||
# (anyone can register by default, remember?)
|
||||
publish: $authenticated
|
||||
unpublish: $authenticated
|
||||
|
||||
# if package is not available locally, proxy requests to 'npmjs' registry
|
||||
proxy: npmjs
|
||||
|
||||
# To improve your security configuration and avoid dependency confusion
|
||||
# consider removing the proxy property for private packages
|
||||
# https://verdaccio.org/docs/best#remove-proxy-to-increase-security-at-private-packages
|
||||
|
||||
# https://verdaccio.org/docs/configuration#server
|
||||
# You can specify HTTP/1.1 server keep alive timeout in seconds for incoming connections.
|
||||
# A value of 0 makes the http server behave similarly to Node.js versions prior to 8.0.0, which did not have a keep-alive timeout.
|
||||
# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
|
||||
server:
|
||||
keepAliveTimeout: 60
|
||||
|
||||
# https://verdaccio.org/docs/configuration#offline-publish
|
||||
# publish:
|
||||
# allow_offline: false
|
||||
|
||||
# https://verdaccio.org/docs/configuration#url-prefix
|
||||
# url_prefix: /verdaccio/
|
||||
# VERDACCIO_PUBLIC_URL='https://somedomain.org';
|
||||
# url_prefix: '/my_prefix'
|
||||
# // url -> https://somedomain.org/my_prefix/
|
||||
# VERDACCIO_PUBLIC_URL='https://somedomain.org';
|
||||
# url_prefix: '/'
|
||||
# // url -> https://somedomain.org/
|
||||
# VERDACCIO_PUBLIC_URL='https://somedomain.org/first_prefix';
|
||||
# url_prefix: '/second_prefix'
|
||||
# // url -> https://somedomain.org/second_prefix/'
|
||||
|
||||
# https://verdaccio.org/docs/configuration#security
|
||||
# security:
|
||||
# api:
|
||||
# legacy: true
|
||||
# jwt:
|
||||
# sign:
|
||||
# expiresIn: 29d
|
||||
# verify:
|
||||
# someProp: [value]
|
||||
# web:
|
||||
# sign:
|
||||
# expiresIn: 1h # 1 hour by default
|
||||
# verify:
|
||||
# someProp: [value]
|
||||
|
||||
# https://verdaccio.org/docs/configuration#user-rate-limit
|
||||
# userRateLimit:
|
||||
# windowMs: 50000
|
||||
# max: 1000
|
||||
|
||||
# https://verdaccio.org/docs/configuration#max-body-size
|
||||
# max_body_size: 10mb
|
||||
|
||||
# https://verdaccio.org/docs/configuration#listen-port
|
||||
# listen:
|
||||
# - localhost:4873 # default value
|
||||
# - http://localhost:4873 # same thing
|
||||
# - 0.0.0.0:4873 # listen on all addresses (INADDR_ANY)
|
||||
# - https://example.org:4873 # if you want to use https
|
||||
# - "[::1]:4873" # ipv6
|
||||
# - unix:/tmp/verdaccio.sock # unix socket
|
||||
|
||||
# The HTTPS configuration is useful if you do not consider use a HTTP Proxy
|
||||
# https://verdaccio.org/docs/configuration#https
|
||||
# https:
|
||||
# key: ./path/verdaccio-key.pem
|
||||
# cert: ./path/verdaccio-cert.pem
|
||||
# ca: ./path/verdaccio-csr.pem
|
||||
|
||||
# https://verdaccio.org/docs/configuration#proxy
|
||||
# http_proxy: http://something.local/
|
||||
# https_proxy: https://something.local/
|
||||
|
||||
# https://verdaccio.org/docs/configuration#notifications
|
||||
# notify:
|
||||
# method: POST
|
||||
# headers: [{ "Content-Type": "application/json" }]
|
||||
# endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken
|
||||
# content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
|
||||
|
||||
middlewares:
|
||||
audit:
|
||||
enabled: true
|
||||
|
||||
# https://verdaccio.org/docs/logger
|
||||
# log settings
|
||||
logs: { type: stdout, format: pretty, level: http }
|
||||
#experiments:
|
||||
# # support for npm token command
|
||||
# token: false
|
||||
# # enable tarball URL redirect for hosting tarball with a different server, the tarball_url_redirect can be a template string
|
||||
# tarball_url_redirect: 'https://mycdn.com/verdaccio/${packageName}/${filename}'
|
||||
# # the tarball_url_redirect can be a function, takes packageName and filename and returns the url, when working with a js configuration file
|
||||
# tarball_url_redirect(packageName, filename) {
|
||||
# const signedUrl = // generate a signed url
|
||||
# return signedUrl;
|
||||
# }
|
||||
|
||||
# translate your registry, api i18n not available yet
|
||||
# i18n:
|
||||
# list of the available translations https://github.com/verdaccio/verdaccio/blob/master/packages/plugins/ui-theme/src/i18n/ABOUT_TRANSLATIONS.md
|
||||
# web: en-US
|
||||
26
docker-examples/v5/plugins/docker-local-plugin/Dockerfile
Normal file
26
docker-examples/v5/plugins/docker-local-plugin/Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
# Docs based on https://github.com/xlts-dev/verdaccio-prometheus-middleware#installation
|
||||
# Docker multi-stage build - https://docs.docker.com/develop/develop-images/multistage-build/
|
||||
# Use an alpine node image to install the plugin
|
||||
FROM node:lts-alpine as builder
|
||||
|
||||
RUN mkdir -p /verdaccio/plugins
|
||||
|
||||
# Copy the local plugin into the docker image
|
||||
ADD plugins/verdaccio-docker-memory /verdaccio/plugins/verdaccio-docker-memory
|
||||
# Install the production dependencies (be careful install devDependencies here)
|
||||
RUN cd /verdaccio/plugins/verdaccio-docker-memory \
|
||||
&& npm install --production
|
||||
|
||||
# The final built image will be based on the standard Verdaccio docker image.
|
||||
FROM verdaccio/verdaccio:5
|
||||
|
||||
# Copy the plugin files over from the 'builder' node image.
|
||||
# The `$VERDACCIO_USER_UID` env variable is defined in the base `verdaccio/verdaccio` image.
|
||||
# Refer to: https://github.com/verdaccio/verdaccio/blob/v5.2.0/Dockerfile#L32
|
||||
# The local verdaccio-docker-memory is setup as storage
|
||||
ADD docker.yaml /verdaccio/conf/config.yaml
|
||||
|
||||
# Copy the plugin into the /verdaccio/plugins
|
||||
COPY --chown=$VERDACCIO_USER_UID:root --from=builder \
|
||||
/verdaccio/plugins/verdaccio-docker-memory \
|
||||
/verdaccio/plugins/verdaccio-docker-memory
|
||||
42
docker-examples/v5/plugins/docker-local-plugin/README.md
Normal file
42
docker-examples/v5/plugins/docker-local-plugin/README.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Installing a local plugin with Docker build
|
||||
|
||||
On this small tutorial (based on [`verdaccio-prometheus-middleware`](https://github.com/xlts-dev/verdaccio-prometheus-middleware) example) you will be able to use a published package in any random registry (npmjs by default) and use it withing a docker image without mapping need it.
|
||||
|
||||
> Since verdaccio:5 uses `yarn@2` to run the application, this tutorial is a workaround but future prove since verdaccio 6 uses `pnpm` to build the docker image.
|
||||
|
||||
There are three main steps to highlight:
|
||||
|
||||
- Note the custom plugin at `plugins/verdaccio-docker-memory` under the name `verdaccio-docker-memory`.
|
||||
- Install the _production_ dependencies for the plugin `verdaccio-docker-memory`
|
||||
- `docker.yaml`: This is a copy of the original configuration file for docker and with small modifications to use the local plugin `verdaccio-docker-memory`.
|
||||
- The `Dockerfile` take advance of the docker multi-stage build to copy the local plugin into the `verdaccio/plugins` folder withing the image, then we apply the right permissions `--chown=$VERDACCIO_USER_UID:root` so the plugin is recognized.
|
||||
|
||||
## Run it
|
||||
|
||||
Build this image.
|
||||
|
||||
```bash
|
||||
docker build -t verdaccio/verdaccio:local .
|
||||
```
|
||||
|
||||
and to run it
|
||||
|
||||
```bash
|
||||
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio:local
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```dockerfile
|
||||
FROM node:lts-alpine as builder
|
||||
RUN mkdir -p /verdaccio/plugins
|
||||
ADD plugins/verdaccio-docker-memory /verdaccio/plugins/verdaccio-docker-memory
|
||||
RUN cd /verdaccio/plugins/verdaccio-docker-memory \
|
||||
&& ls -ls \
|
||||
&& npm install --production
|
||||
FROM verdaccio/verdaccio:5
|
||||
ADD docker.yaml /verdaccio/conf/config.yaml
|
||||
COPY --chown=$VERDACCIO_USER_UID:root --from=builder \
|
||||
/verdaccio/plugins/verdaccio-docker-memory \
|
||||
/verdaccio/plugins/verdaccio-docker-memory
|
||||
```
|
||||
199
docker-examples/v5/plugins/docker-local-plugin/docker.yaml
Normal file
199
docker-examples/v5/plugins/docker-local-plugin/docker.yaml
Normal file
@@ -0,0 +1,199 @@
|
||||
#
|
||||
# This is the default configuration file. It allows all users to do anything,
|
||||
# please read carefully the documentation and best practices to
|
||||
# improve security.
|
||||
#
|
||||
# Do not configure host and port under `listen` in this file
|
||||
# as it will be ignored when using docker.
|
||||
# see https://verdaccio.org/docs/en/docker#docker-and-custom-port-configuration
|
||||
#
|
||||
# Look here for more config file examples:
|
||||
# https://github.com/verdaccio/verdaccio/tree/5.x/conf
|
||||
#
|
||||
# Read about the best practices
|
||||
# https://verdaccio.org/docs/best
|
||||
|
||||
# path to a directory with all packages
|
||||
storage: /verdaccio/storage/data
|
||||
|
||||
store:
|
||||
# dummy copy of https://www.npmjs.com/package/verdaccio-memory
|
||||
docker-memory:
|
||||
limit: 1000
|
||||
|
||||
# path to a directory with plugins to include
|
||||
plugins: /verdaccio/plugins
|
||||
|
||||
# https://verdaccio.org/docs/webui
|
||||
web:
|
||||
title: Verdaccio This is a Test
|
||||
# comment out to disable gravatar support
|
||||
# gravatar: false
|
||||
# by default packages are ordercer ascendant (asc|desc)
|
||||
# sort_packages: asc
|
||||
# convert your UI to the dark side
|
||||
# darkMode: true
|
||||
# html_cache: true
|
||||
# by default all features are displayed
|
||||
# login: true
|
||||
# showInfo: true
|
||||
# showSettings: true
|
||||
# In combination with darkMode you can force specific theme
|
||||
# showThemeSwitch: true
|
||||
# showFooter: true
|
||||
# showSearch: true
|
||||
# showRaw: true
|
||||
# showDownloadTarball: true
|
||||
# HTML tags injected after manifest <scripts/>
|
||||
# scriptsBodyAfter:
|
||||
# - '<script type="text/javascript" src="https://my.company.com/customJS.min.js"></script>'
|
||||
# HTML tags injected before ends </head>
|
||||
# metaScripts:
|
||||
# - '<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>'
|
||||
# - '<script type="text/javascript" src="https://browser.sentry-cdn.com/5.15.5/bundle.min.js"></script>'
|
||||
# - '<meta name="robots" content="noindex" />'
|
||||
# HTML tags injected first child at <body/>
|
||||
# bodyBefore:
|
||||
# - '<div id="myId">html before webpack scripts</div>'
|
||||
# Public path for template manifest scripts (only manifest)
|
||||
# publicPath: http://somedomain.org/
|
||||
|
||||
auth:
|
||||
htpasswd:
|
||||
file: ./htpasswd
|
||||
# Maximum amount of users allowed to register, defaults to "+inf".
|
||||
# You can set this to -1 to disable registration.
|
||||
# max_users: 1000
|
||||
|
||||
# https://verdaccio.org/docs/configuration#uplinks
|
||||
# a list of other known repositories we can talk to
|
||||
uplinks:
|
||||
npmjs:
|
||||
url: https://registry.npmjs.org/
|
||||
|
||||
# Learn how to protect your packages
|
||||
# https://verdaccio.org/docs/protect-your-dependencies/
|
||||
# https://verdaccio.org/docs/configuration#packages
|
||||
packages:
|
||||
'@*/*':
|
||||
# scoped packages
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
unpublish: $authenticated
|
||||
proxy: npmjs
|
||||
|
||||
'**':
|
||||
# allow all users (including non-authenticated users) to read and
|
||||
# publish all packages
|
||||
#
|
||||
# you can specify usernames/groupnames (depending on your auth plugin)
|
||||
# and three keywords: "$all", "$anonymous", "$authenticated"
|
||||
access: $all
|
||||
|
||||
# allow all known users to publish/publish packages
|
||||
# (anyone can register by default, remember?)
|
||||
publish: $authenticated
|
||||
unpublish: $authenticated
|
||||
|
||||
# if package is not available locally, proxy requests to 'npmjs' registry
|
||||
proxy: npmjs
|
||||
|
||||
# To improve your security configuration and avoid dependency confusion
|
||||
# consider removing the proxy property for private packages
|
||||
# https://verdaccio.org/docs/best#remove-proxy-to-increase-security-at-private-packages
|
||||
|
||||
# https://verdaccio.org/docs/configuration#server
|
||||
# You can specify HTTP/1.1 server keep alive timeout in seconds for incoming connections.
|
||||
# A value of 0 makes the http server behave similarly to Node.js versions prior to 8.0.0, which did not have a keep-alive timeout.
|
||||
# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
|
||||
server:
|
||||
keepAliveTimeout: 60
|
||||
|
||||
# https://verdaccio.org/docs/configuration#offline-publish
|
||||
# publish:
|
||||
# allow_offline: false
|
||||
|
||||
# https://verdaccio.org/docs/configuration#url-prefix
|
||||
# url_prefix: /verdaccio/
|
||||
# VERDACCIO_PUBLIC_URL='https://somedomain.org';
|
||||
# url_prefix: '/my_prefix'
|
||||
# // url -> https://somedomain.org/my_prefix/
|
||||
# VERDACCIO_PUBLIC_URL='https://somedomain.org';
|
||||
# url_prefix: '/'
|
||||
# // url -> https://somedomain.org/
|
||||
# VERDACCIO_PUBLIC_URL='https://somedomain.org/first_prefix';
|
||||
# url_prefix: '/second_prefix'
|
||||
# // url -> https://somedomain.org/second_prefix/'
|
||||
|
||||
# https://verdaccio.org/docs/configuration#security
|
||||
# security:
|
||||
# api:
|
||||
# legacy: true
|
||||
# jwt:
|
||||
# sign:
|
||||
# expiresIn: 29d
|
||||
# verify:
|
||||
# someProp: [value]
|
||||
# web:
|
||||
# sign:
|
||||
# expiresIn: 1h # 1 hour by default
|
||||
# verify:
|
||||
# someProp: [value]
|
||||
|
||||
# https://verdaccio.org/docs/configuration#user-rate-limit
|
||||
# userRateLimit:
|
||||
# windowMs: 50000
|
||||
# max: 1000
|
||||
|
||||
# https://verdaccio.org/docs/configuration#max-body-size
|
||||
# max_body_size: 10mb
|
||||
|
||||
# https://verdaccio.org/docs/configuration#listen-port
|
||||
# listen:
|
||||
# - localhost:4873 # default value
|
||||
# - http://localhost:4873 # same thing
|
||||
# - 0.0.0.0:4873 # listen on all addresses (INADDR_ANY)
|
||||
# - https://example.org:4873 # if you want to use https
|
||||
# - "[::1]:4873" # ipv6
|
||||
# - unix:/tmp/verdaccio.sock # unix socket
|
||||
|
||||
# The HTTPS configuration is useful if you do not consider use a HTTP Proxy
|
||||
# https://verdaccio.org/docs/configuration#https
|
||||
# https:
|
||||
# key: ./path/verdaccio-key.pem
|
||||
# cert: ./path/verdaccio-cert.pem
|
||||
# ca: ./path/verdaccio-csr.pem
|
||||
|
||||
# https://verdaccio.org/docs/configuration#proxy
|
||||
# http_proxy: http://something.local/
|
||||
# https_proxy: https://something.local/
|
||||
|
||||
# https://verdaccio.org/docs/configuration#notifications
|
||||
# notify:
|
||||
# method: POST
|
||||
# headers: [{ "Content-Type": "application/json" }]
|
||||
# endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken
|
||||
# content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
|
||||
|
||||
middlewares:
|
||||
audit:
|
||||
enabled: true
|
||||
|
||||
# https://verdaccio.org/docs/logger
|
||||
# log settings
|
||||
logs: { type: stdout, format: pretty, level: http }
|
||||
#experiments:
|
||||
# # support for npm token command
|
||||
# token: false
|
||||
# # enable tarball URL redirect for hosting tarball with a different server, the tarball_url_redirect can be a template string
|
||||
# tarball_url_redirect: 'https://mycdn.com/verdaccio/${packageName}/${filename}'
|
||||
# # the tarball_url_redirect can be a function, takes packageName and filename and returns the url, when working with a js configuration file
|
||||
# tarball_url_redirect(packageName, filename) {
|
||||
# const signedUrl = // generate a signed url
|
||||
# return signedUrl;
|
||||
# }
|
||||
|
||||
# translate your registry, api i18n not available yet
|
||||
# i18n:
|
||||
# list of the available translations https://github.com/verdaccio/verdaccio/blob/master/packages/plugins/ui-theme/src/i18n/ABOUT_TRANSLATIONS.md
|
||||
# web: en-US
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"rules": {
|
||||
"max-len": 0,
|
||||
"@typescript-eslint/prefer-optional-chain": 0,
|
||||
"@typescript-eslint/no-unused-vars": 0,
|
||||
"@typescript-eslint/explicit-member-accessibility": 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true,
|
||||
});
|
||||
exports.LocalMemory = undefined;
|
||||
|
||||
let _localMemory = require('./local-memory');
|
||||
|
||||
let _localMemory2 = _interopRequireDefault(_localMemory);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : { default: obj };
|
||||
}
|
||||
|
||||
exports.LocalMemory = _localMemory2.default;
|
||||
exports.default = _localMemory2.default;
|
||||
@@ -0,0 +1,96 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true,
|
||||
});
|
||||
|
||||
let _memoryHandler = require('./memory-handler');
|
||||
|
||||
let _memoryHandler2 = _interopRequireDefault(_memoryHandler);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : { default: obj };
|
||||
}
|
||||
|
||||
const DEFAULT_LIMIT = 1000;
|
||||
|
||||
class LocalMemory {
|
||||
constructor(config, options) {
|
||||
this.config = config;
|
||||
this.limit = config.limit || DEFAULT_LIMIT;
|
||||
this.logger = options.logger;
|
||||
this.data = this._createEmtpyDatabase();
|
||||
}
|
||||
|
||||
getSecret() {
|
||||
return Promise.resolve(this.data.secret);
|
||||
}
|
||||
|
||||
setSecret(secret) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.data.secret = secret;
|
||||
resolve(null);
|
||||
});
|
||||
}
|
||||
|
||||
add(name, cb) {
|
||||
const list = this.data.list;
|
||||
|
||||
if (list.length < this.limit) {
|
||||
if (list.indexOf(name) === -1) {
|
||||
list.push(name);
|
||||
}
|
||||
cb(null);
|
||||
} else {
|
||||
this.logger.info(
|
||||
{ limit: this.limit },
|
||||
'Storage memory has reached limit of @{limit} packages'
|
||||
);
|
||||
cb(new Error('Storage memory has reached limit of limit packages'));
|
||||
}
|
||||
}
|
||||
|
||||
search(onPackage, onEnd, validateName) {
|
||||
// TODO: pending to implement
|
||||
onEnd();
|
||||
}
|
||||
|
||||
remove(name, cb) {
|
||||
const list = this.data.list;
|
||||
|
||||
const item = list.indexOf(name);
|
||||
|
||||
if (item !== -1) {
|
||||
list.splice(item, 1);
|
||||
}
|
||||
|
||||
cb(null);
|
||||
}
|
||||
|
||||
get(cb) {
|
||||
cb(null, this.data.list);
|
||||
}
|
||||
|
||||
sync() {
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
getPackageStorage(packageInfo) {
|
||||
// eslint-disable-next-line new-cap
|
||||
return new _memoryHandler2.default(packageInfo, this.data.files, this.logger);
|
||||
}
|
||||
|
||||
_createEmtpyDatabase() {
|
||||
const list = [];
|
||||
const files = {};
|
||||
const emptyDatabase = {
|
||||
list,
|
||||
files,
|
||||
secret: '',
|
||||
};
|
||||
|
||||
return emptyDatabase;
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = LocalMemory;
|
||||
@@ -0,0 +1,182 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true,
|
||||
});
|
||||
exports.fileExist = exports.noSuchFile = undefined;
|
||||
|
||||
let _httpErrors = require('http-errors');
|
||||
|
||||
let _httpErrors2 = _interopRequireDefault(_httpErrors);
|
||||
|
||||
let _memoryFs = require('memory-fs');
|
||||
|
||||
let _memoryFs2 = _interopRequireDefault(_memoryFs);
|
||||
|
||||
let _streams = require('@verdaccio/streams');
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : { default: obj };
|
||||
}
|
||||
|
||||
// $FlowFixMe
|
||||
const noSuchFile = (exports.noSuchFile = 'ENOENT');
|
||||
|
||||
const fileExist = (exports.fileExist = 'EEXISTS');
|
||||
|
||||
const fSError = function fSError(message, code = 404) {
|
||||
const err = (0, _httpErrors2.default)(code, message);
|
||||
// $FlowFixMe
|
||||
err.code = message;
|
||||
|
||||
return err;
|
||||
};
|
||||
|
||||
const noPackageFoundError = function noPackageFoundError(message = 'no such package') {
|
||||
const err = (0, _httpErrors2.default)(404, message);
|
||||
// $FlowFixMe
|
||||
err.code = noSuchFile;
|
||||
return err;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line new-cap
|
||||
const fs = new _memoryFs2.default();
|
||||
|
||||
class MemoryHandler {
|
||||
constructor(packageName, data, logger) {
|
||||
// this is not need it
|
||||
this.data = data;
|
||||
this.name = packageName;
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
updatePackage(pkgFileName, updateHandler, onWrite, transformPackage, onEnd) {
|
||||
let json = this._getStorage(pkgFileName);
|
||||
|
||||
try {
|
||||
json = JSON.parse(json);
|
||||
} catch (err) {
|
||||
return onEnd(err);
|
||||
}
|
||||
|
||||
updateHandler(json, (err) => {
|
||||
if (err) {
|
||||
return onEnd(err);
|
||||
}
|
||||
try {
|
||||
onWrite(pkgFileName, transformPackage(json), onEnd);
|
||||
} catch (err) {
|
||||
return onEnd(fSError('error on parse', 500));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
deletePackage(pkgName, callback) {
|
||||
delete this.data[pkgName];
|
||||
callback(null);
|
||||
}
|
||||
|
||||
removePackage(callback) {
|
||||
callback(null);
|
||||
}
|
||||
|
||||
createPackage(name, value, cb) {
|
||||
this.savePackage(name, value, cb);
|
||||
}
|
||||
|
||||
savePackage(name, value, cb) {
|
||||
try {
|
||||
const json = JSON.stringify(value, null, '\t');
|
||||
|
||||
this.data[name] = json;
|
||||
} catch (err) {
|
||||
cb(fSError(err.message, 500));
|
||||
}
|
||||
|
||||
cb(null);
|
||||
}
|
||||
|
||||
readPackage(name, cb) {
|
||||
const json = this._getStorage(name);
|
||||
const isJson = typeof json === 'undefined';
|
||||
|
||||
try {
|
||||
cb(isJson ? noPackageFoundError() : null, JSON.parse(json));
|
||||
} catch (err) {
|
||||
cb(noPackageFoundError());
|
||||
}
|
||||
}
|
||||
|
||||
writeTarball(name) {
|
||||
const uploadStream = new _streams.UploadTarball();
|
||||
const temporalName = `/${name}`;
|
||||
|
||||
process.nextTick(function () {
|
||||
fs.exists(temporalName, function (exists) {
|
||||
if (exists) {
|
||||
return uploadStream.emit('error', fSError(fileExist));
|
||||
}
|
||||
|
||||
try {
|
||||
const file = fs.createWriteStream(temporalName);
|
||||
|
||||
uploadStream.pipe(file);
|
||||
|
||||
uploadStream.done = function () {
|
||||
const onEnd = function onEnd() {
|
||||
uploadStream.emit('success');
|
||||
};
|
||||
|
||||
uploadStream.on('end', onEnd);
|
||||
};
|
||||
|
||||
uploadStream.abort = function () {
|
||||
uploadStream.emit('error', fSError('transmision aborted', 400));
|
||||
file.end();
|
||||
};
|
||||
|
||||
uploadStream.emit('open');
|
||||
} catch (err) {
|
||||
uploadStream.emit('error', err);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return uploadStream;
|
||||
}
|
||||
|
||||
readTarball(name) {
|
||||
const pathName = `/${name}`;
|
||||
|
||||
const readTarballStream = new _streams.ReadTarball();
|
||||
|
||||
process.nextTick(function () {
|
||||
fs.exists(pathName, function (exists) {
|
||||
if (!exists) {
|
||||
readTarballStream.emit('error', noPackageFoundError());
|
||||
} else {
|
||||
const readStream = fs.createReadStream(pathName);
|
||||
|
||||
readTarballStream.emit('content-length', fs.data[name].length);
|
||||
readTarballStream.emit('open');
|
||||
readStream.pipe(readTarballStream);
|
||||
readStream.on('error', (error) => {
|
||||
readTarballStream.emit('error', error);
|
||||
});
|
||||
|
||||
readTarballStream.abort = function () {
|
||||
readStream.destroy(fSError('read has been aborted', 400));
|
||||
};
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return readTarballStream;
|
||||
}
|
||||
|
||||
_getStorage(name = '') {
|
||||
return this.data[name];
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = MemoryHandler;
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "verdaccio-docker-memory",
|
||||
"version": "1.0.3",
|
||||
"description": "storage implementation in memory",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@verdaccio/streams": "1.0.0",
|
||||
"http-errors": "1.6.3",
|
||||
"memory-fs": "0.4.1"
|
||||
},
|
||||
"keywords": [
|
||||
"verdaccio",
|
||||
"plugin",
|
||||
"storage"
|
||||
],
|
||||
"author": "Juan Picado <juanpicado19@gmail.com>",
|
||||
"private": true,
|
||||
"license": "MIT"
|
||||
}
|
||||
@@ -14,7 +14,7 @@ services:
|
||||
- verdaccio
|
||||
- verdaccio-root
|
||||
verdaccio:
|
||||
image: verdaccio/verdaccio:local
|
||||
image: verdaccio/verdaccio:5
|
||||
container_name: 'verdaccio_relative_path_v5'
|
||||
networks:
|
||||
- node-network
|
||||
@@ -27,7 +27,7 @@ services:
|
||||
- './storage:/verdaccio/storage'
|
||||
- './conf/v5:/verdaccio/conf'
|
||||
verdaccio-root:
|
||||
image: verdaccio/verdaccio:local
|
||||
image: verdaccio/verdaccio:5
|
||||
container_name: 'verdaccio_relative_path_v5_root'
|
||||
networks:
|
||||
- node-network
|
||||
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
- verdaccio
|
||||
- verdaccio-root
|
||||
verdaccio:
|
||||
image: verdaccio/verdaccio:local
|
||||
image: verdaccio/verdaccio:5
|
||||
container_name: 'verdaccio_relative_path_v5'
|
||||
networks:
|
||||
- node-network
|
||||
@@ -29,7 +29,7 @@ services:
|
||||
- './storage:/verdaccio/storage'
|
||||
- './conf/v5:/verdaccio/conf'
|
||||
verdaccio-root:
|
||||
image: verdaccio/verdaccio:local
|
||||
image: verdaccio/verdaccio:5
|
||||
container_name: 'verdaccio_relative_path_v5_root'
|
||||
networks:
|
||||
- node-network
|
||||
|
||||
@@ -2,7 +2,7 @@ version: '2'
|
||||
|
||||
services:
|
||||
verdaccio:
|
||||
image: verdaccio/verdaccio:local
|
||||
image: verdaccio/verdaccio:5
|
||||
container_name: verdaccio_root_path
|
||||
ports:
|
||||
- '4873:4873'
|
||||
|
||||
2
docker-examples/v5/reverse_proxy/nginx_relative/nginx_ssl/Dockerfile
Executable file → Normal file
2
docker-examples/v5/reverse_proxy/nginx_relative/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
|
||||
|
||||
22
docker-examples/v6/README.md
Normal file
22
docker-examples/v6/README.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Verdaccio 6 Examples
|
||||
|
||||
> We recommend to have installed [docker-compose >= 1.29.0](https://github.com/docker/compose/releases/tag/1.29.2)
|
||||
|
||||
## Mapping Volumes
|
||||
|
||||
- [Docker + Local Storage Volume + Verdaccio](docker-local-storage-volume/README.md)
|
||||
|
||||
## Proxy
|
||||
|
||||
- [Docker + Nginx + Verdaccio](proxy/reverse_proxy/nginx/README.md)
|
||||
- [Docker + Apache + Verdaccio](proxy/apache-verdaccio/README.md)
|
||||
- [Docker + HTTPS Portal + Verdaccio](proxy/https-portal-example/README.md)
|
||||
|
||||
> Looking forward more examples with proxies.
|
||||
|
||||
## Plugins
|
||||
|
||||
Using plugins without `docker-compose` mapping volumes, all withing the `Dockerfile`.
|
||||
|
||||
- [Docker + Local Build Auth Plugin (local development)](plugins/docker-build-install-plugin/README.md)
|
||||
- [Docker + Auth Plugin (from a registry)](plugins/docker-local-plugin/README.md)
|
||||
@@ -0,0 +1,71 @@
|
||||
#
|
||||
# This is the config file used for the docker images.
|
||||
# It allows all users to do anything, so don't use it on production systems.
|
||||
#
|
||||
# Do not configure host and port under `listen` in this file
|
||||
# as it will be ignored when using docker.
|
||||
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
|
||||
#
|
||||
# Look here for more config file examples:
|
||||
# https://github.com/verdaccio/verdaccio/tree/master/packages/config/src/conf
|
||||
#
|
||||
|
||||
# path to a directory with all packages
|
||||
storage: /verdaccio/storage
|
||||
|
||||
auth:
|
||||
htpasswd:
|
||||
file: /verdaccio/conf/htpasswd
|
||||
# Maximum amount of users allowed to register, defaults to "+inf".
|
||||
# You can set this to -1 to disable registration.
|
||||
#max_users: 1000
|
||||
security:
|
||||
api:
|
||||
jwt:
|
||||
sign:
|
||||
expiresIn: 60d
|
||||
notBefore: 1
|
||||
web:
|
||||
sign:
|
||||
expiresIn: 7d
|
||||
|
||||
# a list of other known repositories we can talk to
|
||||
uplinks:
|
||||
npmjs:
|
||||
url: https://registry.npmjs.org/
|
||||
|
||||
packages:
|
||||
'@jota/*':
|
||||
access: $all
|
||||
publish: $all
|
||||
|
||||
'@*/*':
|
||||
# scoped packages
|
||||
access: $all
|
||||
publish: $all
|
||||
proxy: npmjs
|
||||
|
||||
'**':
|
||||
# allow all users (including non-authenticated users) to read and
|
||||
# publish all packages
|
||||
#
|
||||
# you can specify usernames/groupnames (depending on your auth plugin)
|
||||
# and three keywords: "$all", "$anonymous", "$authenticated"
|
||||
access: $all
|
||||
|
||||
# allow all known users to publish packages
|
||||
# (anyone can register by default, remember?)
|
||||
publish: $all
|
||||
|
||||
# if package is not available locally, proxy requests to 'npmjs' registry
|
||||
proxy: npmjs
|
||||
|
||||
# To use `npm audit` uncomment the following section
|
||||
middlewares:
|
||||
audit:
|
||||
enabled: true
|
||||
|
||||
# log settings
|
||||
logs:
|
||||
- { type: stdout, format: pretty, level: trace }
|
||||
#- {type: file, path: verdaccio.log, level: info}
|
||||
@@ -0,0 +1 @@
|
||||
jpicado:$6vkdNgRX2npc:autocreated 2017-07-11T18:48:38.003Z
|
||||
@@ -0,0 +1,12 @@
|
||||
services:
|
||||
verdaccio:
|
||||
image: verdaccio/verdaccio:nightly-master
|
||||
container_name: verdaccio-docker-local-storage-vol
|
||||
ports:
|
||||
- '4873:4873'
|
||||
volumes:
|
||||
- './storage:/verdaccio/storage'
|
||||
- './conf:/verdaccio/conf'
|
||||
volumes:
|
||||
verdaccio:
|
||||
driver: local
|
||||
31
docker-examples/v6/docker-local-storage-volume/readme.md
Normal file
31
docker-examples/v6/docker-local-storage-volume/readme.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Verdaccio and simple local storage
|
||||
|
||||
This example shows a simple configuration for `verdaccio` plus the default local storage with the minimum configuration required using `docker-compose`.
|
||||
|
||||
Contains
|
||||
|
||||
- conf: Configuration file and default user httpasswd
|
||||
- storage: A published default package with 2 versions.
|
||||
|
||||
```bash
|
||||
$> docker-compose up
|
||||
```
|
||||
|
||||
## Login
|
||||
|
||||
If you want to login into the Verdaccio instance created via these Docker Examples, please try:
|
||||
|
||||
Username: jpicado
|
||||
Password: jpicado
|
||||
|
||||
## Running in Dokku
|
||||
|
||||
If you use Dokku, an open-source alternative for Heroku, you can run this example using the following steps:
|
||||
|
||||
1. Create a new application `dokku apps:create verdaccio`
|
||||
2. Pull the verdaccio image `docker pull verdaccio/verdaccio:`
|
||||
3. Tag the docker image for the app: `docker tag verdaccio/verdaccio:nightly-master dokku/verdaccio:v1`
|
||||
4. Create the directories for persistent storage `mkdir -p /var/lib/dokku/data/storage/verdaccio/storage`, `mkdir -p /var/lib/dokku/data/storage/verdaccio/storage`
|
||||
5. Mount the volumes: `dokku storage:mount verdaccio /var/lib/dokku/data/storage/verdaccio/storage:/verdaccio/storage` and `dokku storage:mount verdaccio /var/lib/dokku/data/storage/verdaccio/conf:/verdaccio/conf`
|
||||
6. Deploy the docker image `dokku tags:deploy verdaccio v1`
|
||||
7. Enjoy the application
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user