@verdaccio/core 8.0.0-next-8.11 → 8.0.0-next-8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +73 -12
- package/build/constants.d.ts +3 -0
- package/build/constants.js +6 -1
- package/build/constants.js.map +1 -1
- package/build/plugin-utils.d.ts +2 -2
- package/build/plugin-utils.js.map +1 -1
- package/package.json +3 -3
- package/.babelrc +0 -14
- package/.eslintignore +0 -6
- package/.eslintrc.json +0 -5
- package/CHANGELOG.md +0 -565
- package/src/constants.ts +0 -134
- package/src/error-utils.ts +0 -106
- package/src/file-utils.ts +0 -31
- package/src/index.ts +0 -46
- package/src/path-utils.ts +0 -0
- package/src/pkg-utils.ts +0 -68
- package/src/plugin-utils.ts +0 -205
- package/src/schemes/publish-manifest.ts +0 -38
- package/src/schemes/unpublish-manifest.ts +0 -69
- package/src/search-utils.ts +0 -81
- package/src/stream-utils.ts +0 -28
- package/src/string-utils.ts +0 -36
- package/src/tarball-utils.ts +0 -43
- package/src/validation-utils.ts +0 -128
- package/src/warning-utils.ts +0 -69
- package/test/errors.spec.ts +0 -109
- package/test/merge.dist.tags.spec.ts +0 -64
- package/test/mystreams.spec.ts +0 -18
- package/test/pkg-utils.spec.ts +0 -28
- package/test/publish-manifest.spec.ts +0 -61
- package/test/string-utils.spec.ts +0 -42
- package/test/tarball-utils.spec.ts +0 -81
- package/test/unpublish-manifest.spec.ts +0 -71
- package/test/validation-utilts.spec.ts +0 -182
- package/tsconfig.build.json +0 -10
- package/tsconfig.json +0 -12
- package/typedoc.json +0 -5
package/CHANGELOG.md
DELETED
|
@@ -1,565 +0,0 @@
|
|
|
1
|
-
# @verdaccio/core
|
|
2
|
-
|
|
3
|
-
## 8.0.0-next-8.11
|
|
4
|
-
|
|
5
|
-
## 8.0.0-next-8.10
|
|
6
|
-
|
|
7
|
-
## 8.0.0-next-8.9
|
|
8
|
-
|
|
9
|
-
## 8.0.0-next-8.8
|
|
10
|
-
|
|
11
|
-
## 8.0.0-next-8.7
|
|
12
|
-
|
|
13
|
-
### Patch Changes
|
|
14
|
-
|
|
15
|
-
- 589ea7f: chore: move tarball utils to core
|
|
16
|
-
|
|
17
|
-
## 8.0.0-next-8.6
|
|
18
|
-
|
|
19
|
-
## 8.0.0-next-8.5
|
|
20
|
-
|
|
21
|
-
### Patch Changes
|
|
22
|
-
|
|
23
|
-
- 64a7fc0: chore(core): typing, naming, and docs of parameters
|
|
24
|
-
- 5cbee6f: fix: unpublish a package on storage package
|
|
25
|
-
- a049bba: chore(tests): temp folder naming
|
|
26
|
-
|
|
27
|
-
## 8.0.0-next-8.4
|
|
28
|
-
|
|
29
|
-
### Patch Changes
|
|
30
|
-
|
|
31
|
-
- 48aa89f: chore: request header constants
|
|
32
|
-
- 58e0d95: fix(middleware): error 404 when getting scoped tarballs
|
|
33
|
-
|
|
34
|
-
## 8.0.0-next-8.3
|
|
35
|
-
|
|
36
|
-
## 8.0.0-next-8.2
|
|
37
|
-
|
|
38
|
-
### Minor Changes
|
|
39
|
-
|
|
40
|
-
- 6a8154c: feat: update logger pino to latest
|
|
41
|
-
|
|
42
|
-
## 8.0.0-next-8.1
|
|
43
|
-
|
|
44
|
-
## 8.0.0-next-8.0
|
|
45
|
-
|
|
46
|
-
### Major Changes
|
|
47
|
-
|
|
48
|
-
- chore: move v7 next to v8 next
|
|
49
|
-
|
|
50
|
-
## 7.0.0
|
|
51
|
-
|
|
52
|
-
### Major Changes
|
|
53
|
-
|
|
54
|
-
- 47f61c6: feat!: bump to v7
|
|
55
|
-
- e7ebccb: update major dependencies, remove old nodejs support
|
|
56
|
-
|
|
57
|
-
### Minor Changes
|
|
58
|
-
|
|
59
|
-
- daceb6d: restore legacy support
|
|
60
|
-
- f047cc8: refactor: auth with legacy sign support
|
|
61
|
-
- bd8703e: feat: add migrateToSecureLegacySignature and remove enhancedLegacySignature property
|
|
62
|
-
|
|
63
|
-
### Patch Changes
|
|
64
|
-
|
|
65
|
-
- 6e764e3: feat: add support for npm owner
|
|
66
|
-
- 7c9f3cf: chore: improve startup logging
|
|
67
|
-
|
|
68
|
-
## 7.0.0-next-8.21
|
|
69
|
-
|
|
70
|
-
### Patch Changes
|
|
71
|
-
|
|
72
|
-
- 7c9f3cf: chore: improve startup logging
|
|
73
|
-
|
|
74
|
-
## 7.0.0-next-7.20
|
|
75
|
-
|
|
76
|
-
## 7.0.0-next-7.19
|
|
77
|
-
|
|
78
|
-
## 7.0.0-next-7.18
|
|
79
|
-
|
|
80
|
-
## 7.0.0-next-7.17
|
|
81
|
-
|
|
82
|
-
### Patch Changes
|
|
83
|
-
|
|
84
|
-
- 6e764e3: feat: add support for npm owner
|
|
85
|
-
|
|
86
|
-
## 7.0.0-next-7.16
|
|
87
|
-
|
|
88
|
-
## 7.0.0-next-7.15
|
|
89
|
-
|
|
90
|
-
### Minor Changes
|
|
91
|
-
|
|
92
|
-
- bd8703e: feat: add migrateToSecureLegacySignature and remove enhancedLegacySignature property
|
|
93
|
-
|
|
94
|
-
## 7.0.0-next-7.14
|
|
95
|
-
|
|
96
|
-
## 7.0.0-next-7.13
|
|
97
|
-
|
|
98
|
-
## 7.0.0-next-7.12
|
|
99
|
-
|
|
100
|
-
## 7.0.0-next-7.11
|
|
101
|
-
|
|
102
|
-
## 7.0.0-next-7.10
|
|
103
|
-
|
|
104
|
-
## 7.0.0-next-7.9
|
|
105
|
-
|
|
106
|
-
## 7.0.0-next-7.8
|
|
107
|
-
|
|
108
|
-
## 7.0.0-next-7.7
|
|
109
|
-
|
|
110
|
-
## 7.0.0-next.6
|
|
111
|
-
|
|
112
|
-
## 7.0.0-next.5
|
|
113
|
-
|
|
114
|
-
### Minor Changes
|
|
115
|
-
|
|
116
|
-
- f047cc8: refactor: auth with legacy sign support
|
|
117
|
-
|
|
118
|
-
## 7.0.0-next.4
|
|
119
|
-
|
|
120
|
-
## 7.0.0-next.3
|
|
121
|
-
|
|
122
|
-
### Major Changes
|
|
123
|
-
|
|
124
|
-
- e7ebccb61: update major dependencies, remove old nodejs support
|
|
125
|
-
|
|
126
|
-
### Minor Changes
|
|
127
|
-
|
|
128
|
-
- daceb6d87: restore legacy support
|
|
129
|
-
|
|
130
|
-
## 7.0.0-next.2
|
|
131
|
-
|
|
132
|
-
## 7.0.0-next.1
|
|
133
|
-
|
|
134
|
-
## 7.0.0-next.0
|
|
135
|
-
|
|
136
|
-
### Major Changes
|
|
137
|
-
|
|
138
|
-
- feat!: bump to v7
|
|
139
|
-
|
|
140
|
-
## 6.0.0
|
|
141
|
-
|
|
142
|
-
### Major Changes
|
|
143
|
-
|
|
144
|
-
- 292c0a37f: feat!: replace deprecated request dependency by got
|
|
145
|
-
|
|
146
|
-
This is a big refactoring of the core, fetching dependencies, improve code, more tests and better stability. This is essential for the next release, will take some time but would allow modularize more the core.
|
|
147
|
-
|
|
148
|
-
## Notes
|
|
149
|
-
|
|
150
|
-
- Remove deprecated `request` by other `got`, retry improved, custom Agent ( got does not include it built-in)
|
|
151
|
-
- Remove `async` dependency from storage (used by core) it was linked with proxy somehow safe to remove now
|
|
152
|
-
- Refactor with promises instead callback wherever is possible
|
|
153
|
-
- ~Document the API~
|
|
154
|
-
- Improve testing, integration tests
|
|
155
|
-
- Bugfix
|
|
156
|
-
- Clean up old validations
|
|
157
|
-
- Improve performance
|
|
158
|
-
|
|
159
|
-
## 💥 Breaking changes
|
|
160
|
-
|
|
161
|
-
- Plugin API methods were callbacks based are returning promises, this will break current storage plugins, check documentation for upgrade.
|
|
162
|
-
- Write Tarball, Read Tarball methods parameters change, a new set of options like `AbortController` signals are being provided to the `addAbortSignal` can be internally used with Streams when a request is aborted. eg: `addAbortSignal(signal, fs.createReadStream(pathName));`
|
|
163
|
-
- `@verdaccio/streams` stream abort support is legacy is being deprecated removed
|
|
164
|
-
- Remove AWS and Google Cloud packages for future refactoring [#2574](https://github.com/verdaccio/verdaccio/pull/2574).
|
|
165
|
-
|
|
166
|
-
- a3a209b5e: feat: migrate to pino.js 8
|
|
167
|
-
- 459b6fa72: refactor: search v1 endpoint and local-database
|
|
168
|
-
|
|
169
|
-
- refactor search `api v1` endpoint, improve performance
|
|
170
|
-
- remove usage of `async` dependency https://github.com/verdaccio/verdaccio/issues/1225
|
|
171
|
-
- refactor method storage class
|
|
172
|
-
- create new module `core` to reduce the ammount of modules with utilities
|
|
173
|
-
- use `undici` instead `node-fetch`
|
|
174
|
-
- use `fastify` instead `express` for functional test
|
|
175
|
-
|
|
176
|
-
### Breaking changes
|
|
177
|
-
|
|
178
|
-
- plugin storage API changes
|
|
179
|
-
- remove old search endpoint (return 404)
|
|
180
|
-
- filter local private packages at plugin level
|
|
181
|
-
|
|
182
|
-
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.
|
|
183
|
-
|
|
184
|
-
```ts
|
|
185
|
-
export interface IPluginStorage<T> extends IPlugin {
|
|
186
|
-
add(name: string): Promise<void>;
|
|
187
|
-
remove(name: string): Promise<void>;
|
|
188
|
-
get(): Promise<any>;
|
|
189
|
-
init(): Promise<void>;
|
|
190
|
-
getSecret(): Promise<string>;
|
|
191
|
-
setSecret(secret: string): Promise<any>;
|
|
192
|
-
getPackageStorage(packageInfo: string): IPackageStorage;
|
|
193
|
-
search(query: searchUtils.SearchQuery): Promise<searchUtils.SearchItem[]>;
|
|
194
|
-
saveToken(token: Token): Promise<any>;
|
|
195
|
-
deleteToken(user: string, tokenKey: string): Promise<any>;
|
|
196
|
-
readTokens(filter: TokenFilter): Promise<Token[]>;
|
|
197
|
-
}
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
- 794af76c5: Remove Node 12 support
|
|
201
|
-
|
|
202
|
-
- We need move to the new `undici` and does not support Node.js 12
|
|
203
|
-
|
|
204
|
-
- 82cb0f2bf: feat!: config.logs throw an error, logging config not longer accept array or logs property
|
|
205
|
-
|
|
206
|
-
### 💥 Breaking change
|
|
207
|
-
|
|
208
|
-
This is valid
|
|
209
|
-
|
|
210
|
-
```yaml
|
|
211
|
-
log: { type: stdout, format: pretty, level: http }
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
This is invalid
|
|
215
|
-
|
|
216
|
-
```yaml
|
|
217
|
-
logs: { type: stdout, format: pretty, level: http }
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
or
|
|
221
|
-
|
|
222
|
-
```yaml
|
|
223
|
-
logs:
|
|
224
|
-
- [{ type: stdout, format: pretty, level: http }]
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### Minor Changes
|
|
228
|
-
|
|
229
|
-
- 974cd8c19: fix: startup messages improved and logs support on types
|
|
230
|
-
- ef88da3b4: feat: improve support for fs promises older nodejs
|
|
231
|
-
- 24b9be020: refactor: improve docker image build with strict dependencies and prod build
|
|
232
|
-
- 00d1d2a17: chore: env variable for launch fastify
|
|
233
|
-
|
|
234
|
-
- Update fastify to major release `v4.3.0`
|
|
235
|
-
- Update CLI launcher
|
|
236
|
-
|
|
237
|
-
via CLI
|
|
238
|
-
|
|
239
|
-
```
|
|
240
|
-
VERDACCIO_SERVER=fastify verdaccio
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
with docker
|
|
244
|
-
|
|
245
|
-
```
|
|
246
|
-
docker run -it --rm --name verdaccio \
|
|
247
|
-
-e "VERDACCIO_SERVER=8080" -p 8080:8080 \
|
|
248
|
-
-e "VERDACCIO_SERVER=fastify" \
|
|
249
|
-
verdaccio/verdaccio
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
- 154b2ecd3: refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplications
|
|
253
|
-
- 16e38df8a: feat: trustProxy property
|
|
254
|
-
- dc571aabd: feat: add forceEnhancedLegacySignature
|
|
255
|
-
- 6c1eb021b: feat: use warning codes for deprecation warnings
|
|
256
|
-
- 62c24b632: feat: add passwordValidationRegex property
|
|
257
|
-
- 5167bb528: feat: ui search support for remote, local and private packages
|
|
258
|
-
|
|
259
|
-
The command `npm search` search globally and return all matches, with this improvement the user interface
|
|
260
|
-
is powered with the same capabilities.
|
|
261
|
-
|
|
262
|
-
The UI also tag where is the origin the package with a tag, also provide the latest version and description of the package.
|
|
263
|
-
|
|
264
|
-
- c9d1af0e5: feat: async bcrypt hash
|
|
265
|
-
- 4b29d715b: chore: move improvements from v5 to v6
|
|
266
|
-
|
|
267
|
-
Migrate improvements form v5 to v6:
|
|
268
|
-
|
|
269
|
-
- https://github.com/verdaccio/verdaccio/pull/3158
|
|
270
|
-
- https://github.com/verdaccio/verdaccio/pull/3151
|
|
271
|
-
- https://github.com/verdaccio/verdaccio/pull/2271
|
|
272
|
-
- https://github.com/verdaccio/verdaccio/pull/2787
|
|
273
|
-
- https://github.com/verdaccio/verdaccio/pull/2791
|
|
274
|
-
- https://github.com/verdaccio/verdaccio/pull/2205
|
|
275
|
-
|
|
276
|
-
### Patch Changes
|
|
277
|
-
|
|
278
|
-
- 43f32687c: fix: abbreviated headers handle quality values
|
|
279
|
-
- 351aeeaa8: fix(deps): @verdaccio/utils should be a prod dep of local-storage
|
|
280
|
-
- 9718e0330: fix: build targets for 5x modules
|
|
281
|
-
- a1da11308: fix: minor typo on warning message
|
|
282
|
-
- 378e907d5: fix(core): fix `isObject` function.`isObject(true)` should return false.
|
|
283
|
-
- f859d2b1a: fix: official package "-" cannot be synced
|
|
284
|
-
- 0a6412ca9: refactor: got instead undici
|
|
285
|
-
- b849128de: fix: handle upload scoped tarball
|
|
286
|
-
|
|
287
|
-
## 6.0.0-6-next.76
|
|
288
|
-
|
|
289
|
-
## 6.0.0-6-next.75
|
|
290
|
-
|
|
291
|
-
### Patch Changes
|
|
292
|
-
|
|
293
|
-
- 0a6412ca9: refactor: got instead undici
|
|
294
|
-
|
|
295
|
-
## 6.0.0-6-next.74
|
|
296
|
-
|
|
297
|
-
## 6.0.0-6-next.73
|
|
298
|
-
|
|
299
|
-
### Patch Changes
|
|
300
|
-
|
|
301
|
-
- f859d2b1a: fix: official package "-" cannot be synced
|
|
302
|
-
|
|
303
|
-
## 6.0.0-6-next.72
|
|
304
|
-
|
|
305
|
-
## 6.0.0-6-next.71
|
|
306
|
-
|
|
307
|
-
## 6.0.0-6-next.70
|
|
308
|
-
|
|
309
|
-
## 6.0.0-6-next.69
|
|
310
|
-
|
|
311
|
-
### Minor Changes
|
|
312
|
-
|
|
313
|
-
- c9d1af0e: feat: async bcrypt hash
|
|
314
|
-
|
|
315
|
-
## 6.0.0-6-next.68
|
|
316
|
-
|
|
317
|
-
## 6.0.0-6-next.67
|
|
318
|
-
|
|
319
|
-
### Minor Changes
|
|
320
|
-
|
|
321
|
-
- 16e38df8: feat: trustProxy property
|
|
322
|
-
|
|
323
|
-
## 6.0.0-6-next.66
|
|
324
|
-
|
|
325
|
-
## 6.0.0-6-next.65
|
|
326
|
-
|
|
327
|
-
### Patch Changes
|
|
328
|
-
|
|
329
|
-
- a1da1130: fix: minor typo on warning message
|
|
330
|
-
|
|
331
|
-
## 6.0.0-6-next.64
|
|
332
|
-
|
|
333
|
-
### Minor Changes
|
|
334
|
-
|
|
335
|
-
- 974cd8c1: fix: startup messages improved and logs support on types
|
|
336
|
-
|
|
337
|
-
## 6.0.0-6-next.63
|
|
338
|
-
|
|
339
|
-
### Minor Changes
|
|
340
|
-
|
|
341
|
-
- dc571aab: feat: add forceEnhancedLegacySignature
|
|
342
|
-
|
|
343
|
-
## 6.0.0-6-next.62
|
|
344
|
-
|
|
345
|
-
### Patch Changes
|
|
346
|
-
|
|
347
|
-
- 378e907d: fix(core): fix `isObject` function.`isObject(true)` should return false.
|
|
348
|
-
|
|
349
|
-
## 6.0.0-6-next.61
|
|
350
|
-
|
|
351
|
-
## 6.0.0-6-next.60
|
|
352
|
-
|
|
353
|
-
## 6.0.0-6-next.59
|
|
354
|
-
|
|
355
|
-
## 6.0.0-6-next.58
|
|
356
|
-
|
|
357
|
-
## 6.0.0-6-next.57
|
|
358
|
-
|
|
359
|
-
## 6.0.0-6-next.56
|
|
360
|
-
|
|
361
|
-
## 6.0.0-6-next.55
|
|
362
|
-
|
|
363
|
-
### Patch Changes
|
|
364
|
-
|
|
365
|
-
- 9718e033: fix: build targets for 5x modules
|
|
366
|
-
|
|
367
|
-
## 6.0.0-6-next.54
|
|
368
|
-
|
|
369
|
-
### Minor Changes
|
|
370
|
-
|
|
371
|
-
- ef88da3b: feat: improve support for fs promises older nodejs
|
|
372
|
-
|
|
373
|
-
## 6.0.0-6-next.53
|
|
374
|
-
|
|
375
|
-
## 6.0.0-6-next.52
|
|
376
|
-
|
|
377
|
-
## 6.0.0-6-next.51
|
|
378
|
-
|
|
379
|
-
### Minor Changes
|
|
380
|
-
|
|
381
|
-
- 4b29d715: chore: move improvements from v5 to v6
|
|
382
|
-
|
|
383
|
-
Migrate improvements form v5 to v6:
|
|
384
|
-
|
|
385
|
-
- https://github.com/verdaccio/verdaccio/pull/3158
|
|
386
|
-
- https://github.com/verdaccio/verdaccio/pull/3151
|
|
387
|
-
- https://github.com/verdaccio/verdaccio/pull/2271
|
|
388
|
-
- https://github.com/verdaccio/verdaccio/pull/2787
|
|
389
|
-
- https://github.com/verdaccio/verdaccio/pull/2791
|
|
390
|
-
- https://github.com/verdaccio/verdaccio/pull/2205
|
|
391
|
-
|
|
392
|
-
## 6.0.0-6-next.50
|
|
393
|
-
|
|
394
|
-
## 6.0.0-6-next.49
|
|
395
|
-
|
|
396
|
-
## 6.0.0-6-next.48
|
|
397
|
-
|
|
398
|
-
### Minor Changes
|
|
399
|
-
|
|
400
|
-
- 62c24b63: feat: add passwordValidationRegex property
|
|
401
|
-
|
|
402
|
-
### Patch Changes
|
|
403
|
-
|
|
404
|
-
- 43f32687: fix: abbreviated headers handle quality values
|
|
405
|
-
|
|
406
|
-
## 6.0.0-6-next.47
|
|
407
|
-
|
|
408
|
-
## 6.0.0-6-next.8
|
|
409
|
-
|
|
410
|
-
### Patch Changes
|
|
411
|
-
|
|
412
|
-
- b849128d: fix: handle upload scoped tarball
|
|
413
|
-
|
|
414
|
-
## 6.0.0-6-next.7
|
|
415
|
-
|
|
416
|
-
### Patch Changes
|
|
417
|
-
|
|
418
|
-
- 351aeeaa: fix(deps): @verdaccio/utils should be a prod dep of local-storage
|
|
419
|
-
|
|
420
|
-
## 6.0.0-6-next.6
|
|
421
|
-
|
|
422
|
-
### Major Changes
|
|
423
|
-
|
|
424
|
-
- 292c0a37: feat!: replace deprecated request dependency by got
|
|
425
|
-
|
|
426
|
-
This is a big refactoring of the core, fetching dependencies, improve code, more tests and better stability. This is essential for the next release, will take some time but would allow modularize more the core.
|
|
427
|
-
|
|
428
|
-
## Notes
|
|
429
|
-
|
|
430
|
-
- Remove deprecated `request` by other `got`, retry improved, custom Agent ( got does not include it built-in)
|
|
431
|
-
- Remove `async` dependency from storage (used by core) it was linked with proxy somehow safe to remove now
|
|
432
|
-
- Refactor with promises instead callback wherever is possible
|
|
433
|
-
- ~Document the API~
|
|
434
|
-
- Improve testing, integration tests
|
|
435
|
-
- Bugfix
|
|
436
|
-
- Clean up old validations
|
|
437
|
-
- Improve performance
|
|
438
|
-
|
|
439
|
-
## 💥 Breaking changes
|
|
440
|
-
|
|
441
|
-
- Plugin API methods were callbacks based are returning promises, this will break current storage plugins, check documentation for upgrade.
|
|
442
|
-
- Write Tarball, Read Tarball methods parameters change, a new set of options like `AbortController` signals are being provided to the `addAbortSignal` can be internally used with Streams when a request is aborted. eg: `addAbortSignal(signal, fs.createReadStream(pathName));`
|
|
443
|
-
- `@verdaccio/streams` stream abort support is legacy is being deprecated removed
|
|
444
|
-
- Remove AWS and Google Cloud packages for future refactoring [#2574](https://github.com/verdaccio/verdaccio/pull/2574).
|
|
445
|
-
|
|
446
|
-
- a3a209b5: feat: migrate to pino.js 8
|
|
447
|
-
|
|
448
|
-
### Minor Changes
|
|
449
|
-
|
|
450
|
-
- 00d1d2a1: chore: env variable for launch fastify
|
|
451
|
-
|
|
452
|
-
- Update fastify to major release `v4.3.0`
|
|
453
|
-
- Update CLI launcher
|
|
454
|
-
|
|
455
|
-
via CLI
|
|
456
|
-
|
|
457
|
-
```
|
|
458
|
-
VERDACCIO_SERVER=fastify verdaccio
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
with docker
|
|
462
|
-
|
|
463
|
-
```
|
|
464
|
-
docker run -it --rm --name verdaccio \
|
|
465
|
-
-e "VERDACCIO_SERVER=8080" -p 8080:8080 \
|
|
466
|
-
-e "VERDACCIO_SERVER=fastify" \
|
|
467
|
-
verdaccio/verdaccio
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
## 6.0.0-6-next.5
|
|
471
|
-
|
|
472
|
-
### Major Changes
|
|
473
|
-
|
|
474
|
-
- 82cb0f2b: feat!: config.logs throw an error, logging config not longer accept array or logs property
|
|
475
|
-
|
|
476
|
-
### 💥 Breaking change
|
|
477
|
-
|
|
478
|
-
This is valid
|
|
479
|
-
|
|
480
|
-
```yaml
|
|
481
|
-
log: { type: stdout, format: pretty, level: http }
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
This is invalid
|
|
485
|
-
|
|
486
|
-
```yaml
|
|
487
|
-
logs: { type: stdout, format: pretty, level: http }
|
|
488
|
-
```
|
|
489
|
-
|
|
490
|
-
or
|
|
491
|
-
|
|
492
|
-
```yaml
|
|
493
|
-
logs:
|
|
494
|
-
- [{ type: stdout, format: pretty, level: http }]
|
|
495
|
-
```
|
|
496
|
-
|
|
497
|
-
### Minor Changes
|
|
498
|
-
|
|
499
|
-
- 5167bb52: feat: ui search support for remote, local and private packages
|
|
500
|
-
|
|
501
|
-
The command `npm search` search globally and return all matches, with this improvement the user interface
|
|
502
|
-
is powered with the same capabilities.
|
|
503
|
-
|
|
504
|
-
The UI also tag where is the origin the package with a tag, also provide the latest version and description of the package.
|
|
505
|
-
|
|
506
|
-
## 6.0.0-6-next.4
|
|
507
|
-
|
|
508
|
-
### Minor Changes
|
|
509
|
-
|
|
510
|
-
- 24b9be02: refactor: improve docker image build with strict dependencies and prod build
|
|
511
|
-
|
|
512
|
-
## 6.0.0-6-next.3
|
|
513
|
-
|
|
514
|
-
### Minor Changes
|
|
515
|
-
|
|
516
|
-
- 6c1eb021: feat: use warning codes for deprecation warnings
|
|
517
|
-
|
|
518
|
-
## 6.0.0-6-next.2
|
|
519
|
-
|
|
520
|
-
### Major Changes
|
|
521
|
-
|
|
522
|
-
- 794af76c: Remove Node 12 support
|
|
523
|
-
|
|
524
|
-
- We need move to the new `undici` and does not support Node.js 12
|
|
525
|
-
|
|
526
|
-
### Minor Changes
|
|
527
|
-
|
|
528
|
-
- 154b2ecd: refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplications
|
|
529
|
-
|
|
530
|
-
## 6.0.0-6-next.1
|
|
531
|
-
|
|
532
|
-
### Major Changes
|
|
533
|
-
|
|
534
|
-
- 459b6fa7: refactor: search v1 endpoint and local-database
|
|
535
|
-
|
|
536
|
-
- refactor search `api v1` endpoint, improve performance
|
|
537
|
-
- remove usage of `async` dependency https://github.com/verdaccio/verdaccio/issues/1225
|
|
538
|
-
- refactor method storage class
|
|
539
|
-
- create new module `core` to reduce the ammount of modules with utilities
|
|
540
|
-
- use `undici` instead `node-fetch`
|
|
541
|
-
- use `fastify` instead `express` for functional test
|
|
542
|
-
|
|
543
|
-
### Breaking changes
|
|
544
|
-
|
|
545
|
-
- plugin storage API changes
|
|
546
|
-
- remove old search endpoint (return 404)
|
|
547
|
-
- filter local private packages at plugin level
|
|
548
|
-
|
|
549
|
-
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.
|
|
550
|
-
|
|
551
|
-
```ts
|
|
552
|
-
export interface IPluginStorage<T> extends IPlugin {
|
|
553
|
-
add(name: string): Promise<void>;
|
|
554
|
-
remove(name: string): Promise<void>;
|
|
555
|
-
get(): Promise<any>;
|
|
556
|
-
init(): Promise<void>;
|
|
557
|
-
getSecret(): Promise<string>;
|
|
558
|
-
setSecret(secret: string): Promise<any>;
|
|
559
|
-
getPackageStorage(packageInfo: string): IPackageStorage;
|
|
560
|
-
search(query: searchUtils.SearchQuery): Promise<searchUtils.SearchItem[]>;
|
|
561
|
-
saveToken(token: Token): Promise<any>;
|
|
562
|
-
deleteToken(user: string, tokenKey: string): Promise<any>;
|
|
563
|
-
readTokens(filter: TokenFilter): Promise<Token[]>;
|
|
564
|
-
}
|
|
565
|
-
```
|
package/src/constants.ts
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import httpCodes from 'http-status-codes';
|
|
2
|
-
|
|
3
|
-
export const DEFAULT_PASSWORD_VALIDATION = /.{3}$/;
|
|
4
|
-
export const TIME_EXPIRATION_24H = '24h';
|
|
5
|
-
export const TIME_EXPIRATION_1H = '1h';
|
|
6
|
-
export const DIST_TAGS = 'dist-tags';
|
|
7
|
-
export const LATEST = 'latest';
|
|
8
|
-
export const USERS = 'users';
|
|
9
|
-
export const MAINTAINERS = 'maintainers';
|
|
10
|
-
export const DEFAULT_USER = 'Anonymous';
|
|
11
|
-
|
|
12
|
-
export const HEADER_TYPE = {
|
|
13
|
-
CONTENT_ENCODING: 'content-encoding',
|
|
14
|
-
CONTENT_TYPE: 'content-type',
|
|
15
|
-
CONTENT_LENGTH: 'content-length',
|
|
16
|
-
ACCEPT_ENCODING: 'accept-encoding',
|
|
17
|
-
AUTHORIZATION: 'authorization',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const CHARACTER_ENCODING = {
|
|
21
|
-
UTF8: 'utf8',
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
// @deprecated use Bearer instead
|
|
25
|
-
export const TOKEN_BASIC = 'Basic';
|
|
26
|
-
export const TOKEN_BEARER = 'Bearer';
|
|
27
|
-
|
|
28
|
-
export const HEADERS = {
|
|
29
|
-
ACCEPT: 'Accept',
|
|
30
|
-
ACCEPT_ENCODING: 'Accept-Encoding',
|
|
31
|
-
USER_AGENT: 'User-Agent',
|
|
32
|
-
JSON: 'application/json',
|
|
33
|
-
CONTENT_TYPE: 'Content-type',
|
|
34
|
-
CONTENT_LENGTH: 'content-length',
|
|
35
|
-
TEXT_PLAIN: 'text/plain',
|
|
36
|
-
TEXT_PLAIN_UTF8: 'text/plain; charset=utf-8',
|
|
37
|
-
TEXT_HTML_UTF8: 'text/html; charset=utf-8',
|
|
38
|
-
TEXT_HTML: 'text/html',
|
|
39
|
-
AUTHORIZATION: 'authorization',
|
|
40
|
-
CACHE_CONTROL: 'Cache-Control',
|
|
41
|
-
// only set with proxy that setup HTTPS
|
|
42
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto
|
|
43
|
-
FORWARDED_PROTO: 'X-Forwarded-Proto',
|
|
44
|
-
FORWARDED_FOR: 'X-Forwarded-For',
|
|
45
|
-
FRAMES_OPTIONS: 'X-Frame-Options',
|
|
46
|
-
CSP: 'Content-Security-Policy',
|
|
47
|
-
CTO: 'X-Content-Type-Options',
|
|
48
|
-
XSS: 'X-XSS-Protection',
|
|
49
|
-
CLIENT: 'X-Client',
|
|
50
|
-
POWERED_BY: 'X-Powered-By',
|
|
51
|
-
RATELIMIT_LIMIT: 'X-RateLimit-Limit',
|
|
52
|
-
RATELIMIT_REMAINING: 'X-RateLimit-Remaining',
|
|
53
|
-
NONE_MATCH: 'If-None-Match',
|
|
54
|
-
ETAG: 'ETag',
|
|
55
|
-
JSON_CHARSET: 'application/json; charset=utf-8',
|
|
56
|
-
JSON_INSTALL_CHARSET: 'application/vnd.npm.install-v1+json; charset=utf-8',
|
|
57
|
-
OCTET_STREAM: 'application/octet-stream; charset=utf-8',
|
|
58
|
-
TEXT_CHARSET: 'text/plain; charset=utf-8',
|
|
59
|
-
WWW_AUTH: 'WWW-Authenticate',
|
|
60
|
-
GZIP: 'gzip',
|
|
61
|
-
HOST: 'host',
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export const HTTP_STATUS = {
|
|
65
|
-
OK: httpCodes.OK,
|
|
66
|
-
CREATED: httpCodes.CREATED,
|
|
67
|
-
MULTIPLE_CHOICES: httpCodes.MULTIPLE_CHOICES,
|
|
68
|
-
NOT_MODIFIED: httpCodes.NOT_MODIFIED,
|
|
69
|
-
BAD_REQUEST: httpCodes.BAD_REQUEST,
|
|
70
|
-
UNAUTHORIZED: httpCodes.UNAUTHORIZED,
|
|
71
|
-
FORBIDDEN: httpCodes.FORBIDDEN,
|
|
72
|
-
NOT_FOUND: httpCodes.NOT_FOUND,
|
|
73
|
-
CONFLICT: httpCodes.CONFLICT,
|
|
74
|
-
NOT_IMPLEMENTED: httpCodes.NOT_IMPLEMENTED,
|
|
75
|
-
UNSUPPORTED_MEDIA: httpCodes.UNSUPPORTED_MEDIA_TYPE,
|
|
76
|
-
BAD_DATA: httpCodes.UNPROCESSABLE_ENTITY,
|
|
77
|
-
INTERNAL_ERROR: httpCodes.INTERNAL_SERVER_ERROR,
|
|
78
|
-
SERVICE_UNAVAILABLE: httpCodes.SERVICE_UNAVAILABLE,
|
|
79
|
-
LOOP_DETECTED: 508,
|
|
80
|
-
CANNOT_HANDLE: 590,
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export const ERROR_CODE = {
|
|
84
|
-
token_required: 'token is required',
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export const API_MESSAGE = {
|
|
88
|
-
PKG_CREATED: 'created new package',
|
|
89
|
-
PKG_CHANGED: 'package changed',
|
|
90
|
-
PKG_REMOVED: 'package removed',
|
|
91
|
-
PKG_PUBLISHED: 'package published',
|
|
92
|
-
TARBALL_UPLOADED: 'tarball uploaded successfully',
|
|
93
|
-
TARBALL_REMOVED: 'tarball removed',
|
|
94
|
-
TAG_UPDATED: 'tags updated',
|
|
95
|
-
TAG_REMOVED: 'tag removed',
|
|
96
|
-
TAG_ADDED: 'package tagged',
|
|
97
|
-
OK: 'ok',
|
|
98
|
-
LOGGED_OUT: 'Logged out',
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export const LOG_STATUS_MESSAGE =
|
|
102
|
-
"@{status}, user: @{user}(@{remoteIP}), req: '@{request.method} @{request.url}'";
|
|
103
|
-
export const LOG_VERDACCIO_ERROR = `${LOG_STATUS_MESSAGE}, error: @{!error}`;
|
|
104
|
-
export const LOG_VERDACCIO_BYTES = `${LOG_STATUS_MESSAGE}, bytes: @{bytes.in}/@{bytes.out}`;
|
|
105
|
-
|
|
106
|
-
export const ROLES = {
|
|
107
|
-
$ALL: '$all',
|
|
108
|
-
ALL: 'all',
|
|
109
|
-
$AUTH: '$authenticated',
|
|
110
|
-
$ANONYMOUS: '$anonymous',
|
|
111
|
-
DEPRECATED_ALL: '@all',
|
|
112
|
-
DEPRECATED_AUTH: '@authenticated',
|
|
113
|
-
DEPRECATED_ANONYMOUS: '@anonymous',
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
export const PACKAGE_ACCESS = {
|
|
117
|
-
SCOPE: '@*/*',
|
|
118
|
-
ALL: '**',
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export enum HtpasswdHashAlgorithm {
|
|
122
|
-
md5 = 'md5',
|
|
123
|
-
sha1 = 'sha1',
|
|
124
|
-
crypt = 'crypt',
|
|
125
|
-
bcrypt = 'bcrypt',
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export const PLUGIN_CATEGORY = {
|
|
129
|
-
AUTHENTICATION: 'authentication',
|
|
130
|
-
MIDDLEWARE: 'middleware',
|
|
131
|
-
STORAGE: 'storage',
|
|
132
|
-
FILTER: 'filter',
|
|
133
|
-
THEME: 'theme',
|
|
134
|
-
};
|