@verdaccio/types 11.0.0-6-next.24 → 12.0.0-next.0
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/CHANGELOG.md +401 -0
- package/package.json +5 -7
- package/src/configuration.ts +2 -3
- package/src/manifest.ts +9 -0
- package/build/commons.d.ts +0 -24
- package/build/configuration.d.ts +0 -253
- package/build/manifest.d.ts +0 -228
- package/build/plugins/index.d.ts +0 -1
- package/build/plugins/storage.d.ts +0 -37
- package/build/search.d.ts +0 -26
- package/build/types.d.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,406 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 12.0.0-next.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- feat!: bump to v7
|
|
8
|
+
|
|
9
|
+
## 11.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- 292c0a37f: feat!: replace deprecated request dependency by got
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## Notes
|
|
18
|
+
|
|
19
|
+
- Remove deprecated `request` by other `got`, retry improved, custom Agent ( got does not include it built-in)
|
|
20
|
+
- Remove `async` dependency from storage (used by core) it was linked with proxy somehow safe to remove now
|
|
21
|
+
- Refactor with promises instead callback wherever is possible
|
|
22
|
+
- ~Document the API~
|
|
23
|
+
- Improve testing, integration tests
|
|
24
|
+
- Bugfix
|
|
25
|
+
- Clean up old validations
|
|
26
|
+
- Improve performance
|
|
27
|
+
|
|
28
|
+
## 💥 Breaking changes
|
|
29
|
+
|
|
30
|
+
- Plugin API methods were callbacks based are returning promises, this will break current storage plugins, check documentation for upgrade.
|
|
31
|
+
- 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));`
|
|
32
|
+
- `@verdaccio/streams` stream abort support is legacy is being deprecated removed
|
|
33
|
+
- Remove AWS and Google Cloud packages for future refactoring [#2574](https://github.com/verdaccio/verdaccio/pull/2574).
|
|
34
|
+
|
|
35
|
+
- a3a209b5e: feat: migrate to pino.js 8
|
|
36
|
+
- 459b6fa72: refactor: search v1 endpoint and local-database
|
|
37
|
+
|
|
38
|
+
- refactor search `api v1` endpoint, improve performance
|
|
39
|
+
- remove usage of `async` dependency https://github.com/verdaccio/verdaccio/issues/1225
|
|
40
|
+
- refactor method storage class
|
|
41
|
+
- create new module `core` to reduce the ammount of modules with utilities
|
|
42
|
+
- use `undici` instead `node-fetch`
|
|
43
|
+
- use `fastify` instead `express` for functional test
|
|
44
|
+
|
|
45
|
+
### Breaking changes
|
|
46
|
+
|
|
47
|
+
- plugin storage API changes
|
|
48
|
+
- remove old search endpoint (return 404)
|
|
49
|
+
- filter local private packages at plugin level
|
|
50
|
+
|
|
51
|
+
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.
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
export interface IPluginStorage<T> extends IPlugin {
|
|
55
|
+
add(name: string): Promise<void>;
|
|
56
|
+
remove(name: string): Promise<void>;
|
|
57
|
+
get(): Promise<any>;
|
|
58
|
+
init(): Promise<void>;
|
|
59
|
+
getSecret(): Promise<string>;
|
|
60
|
+
setSecret(secret: string): Promise<any>;
|
|
61
|
+
getPackageStorage(packageInfo: string): IPackageStorage;
|
|
62
|
+
search(query: searchUtils.SearchQuery): Promise<searchUtils.SearchItem[]>;
|
|
63
|
+
saveToken(token: Token): Promise<any>;
|
|
64
|
+
deleteToken(user: string, tokenKey: string): Promise<any>;
|
|
65
|
+
readTokens(filter: TokenFilter): Promise<Token[]>;
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- 9fc2e7961: feat(plugins): improve plugin loader
|
|
70
|
+
|
|
71
|
+
### Changes
|
|
72
|
+
|
|
73
|
+
- Add scope plugin support to 6.x https://github.com/verdaccio/verdaccio/pull/3227
|
|
74
|
+
- Avoid config collisions https://github.com/verdaccio/verdaccio/issues/928
|
|
75
|
+
- https://github.com/verdaccio/verdaccio/issues/1394
|
|
76
|
+
- `config.plugins` plugin path validations
|
|
77
|
+
- Updated algorithm for plugin loader.
|
|
78
|
+
- improved documentation (included dev)
|
|
79
|
+
|
|
80
|
+
## Features
|
|
81
|
+
|
|
82
|
+
- Add scope plugin support to 6.x https://github.com/verdaccio/verdaccio/pull/3227
|
|
83
|
+
- Custom prefix:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
// config.yaml
|
|
87
|
+
server:
|
|
88
|
+
pluginPrefix: mycompany
|
|
89
|
+
middleware:
|
|
90
|
+
audit:
|
|
91
|
+
foo: 1
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This configuration will look up for `mycompany-audit` instead `Verdaccio-audit`.
|
|
95
|
+
|
|
96
|
+
## Breaking Changes
|
|
97
|
+
|
|
98
|
+
### sinopia plugins
|
|
99
|
+
|
|
100
|
+
- `sinopia` fallback support is removed, but can be restored using `pluginPrefix`
|
|
101
|
+
|
|
102
|
+
### plugin filter
|
|
103
|
+
|
|
104
|
+
- method rename `filter_metadata`->`filterMetadata`
|
|
105
|
+
|
|
106
|
+
### Plugin constructor does not merge configs anymore https://github.com/verdaccio/verdaccio/issues/928
|
|
107
|
+
|
|
108
|
+
The plugin receives as first argument `config`, which represents the config of the plugin. Example:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
// config.yaml
|
|
112
|
+
auth:
|
|
113
|
+
plugin:
|
|
114
|
+
foo: 1
|
|
115
|
+
bar: 2
|
|
116
|
+
|
|
117
|
+
export class Plugin<T> {
|
|
118
|
+
public constructor(config: T, options: PluginOptions) {
|
|
119
|
+
console.log(config);
|
|
120
|
+
// {foo:1, bar: 2}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
- 794af76c5: Remove Node 12 support
|
|
126
|
+
|
|
127
|
+
- We need move to the new `undici` and does not support Node.js 12
|
|
128
|
+
|
|
129
|
+
- 10aeb4f13: feat!: experiments config renamed to flags
|
|
130
|
+
|
|
131
|
+
- The `experiments` configuration is renamed to `flags`. The functionality is exactly the same.
|
|
132
|
+
|
|
133
|
+
```js
|
|
134
|
+
flags: token: false;
|
|
135
|
+
search: false;
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
- The `self_path` property from the config file is being removed in favor of `config_file` full path.
|
|
139
|
+
- Refactor `config` module, better types and utilities
|
|
140
|
+
|
|
141
|
+
- e367c3f1e: - Replace signature handler for legacy tokens by removing deprecated crypto.createDecipher by createCipheriv
|
|
142
|
+
|
|
143
|
+
- Introduce environment variables for legacy tokens
|
|
144
|
+
|
|
145
|
+
### Code Improvements
|
|
146
|
+
|
|
147
|
+
- Add debug library for improve developer experience
|
|
148
|
+
|
|
149
|
+
### Breaking change
|
|
150
|
+
|
|
151
|
+
- The new signature invalidates all previous tokens generated by Verdaccio 4 or previous versions.
|
|
152
|
+
- The secret key must have 32 characters long.
|
|
153
|
+
|
|
154
|
+
### New environment variables
|
|
155
|
+
|
|
156
|
+
- `VERDACCIO_LEGACY_ALGORITHM`: Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`
|
|
157
|
+
- `VERDACCIO_LEGACY_ENCRYPTION_KEY`: By default, the token stores in the database, but using this variable allows to get it from memory
|
|
158
|
+
|
|
159
|
+
- 999787974: feat(web): components for custom user interfaces
|
|
160
|
+
|
|
161
|
+
Provides a package that includes all components from the user interface, instead being embedded at the `@verdaccio/ui-theme` package.
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
npm i -D @verdaccio/ui-components
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The package contains
|
|
168
|
+
|
|
169
|
+
- Components
|
|
170
|
+
- Providers
|
|
171
|
+
- Redux Storage
|
|
172
|
+
- Layouts (precomposed layouts ready to use)
|
|
173
|
+
- Custom Material Theme
|
|
174
|
+
|
|
175
|
+
The `@verdaccio/ui-theme` will consume this package and will use only those are need it.
|
|
176
|
+
|
|
177
|
+
> Prerequisites are using Redux, Material-UI and Translations with `i18next`.
|
|
178
|
+
|
|
179
|
+
Users could have their own Material UI theme and build custom layouts, adding new features without the need to modify the default project.
|
|
180
|
+
|
|
181
|
+
- 82cb0f2bf: feat!: config.logs throw an error, logging config not longer accept array or logs property
|
|
182
|
+
|
|
183
|
+
### 💥 Breaking change
|
|
184
|
+
|
|
185
|
+
This is valid
|
|
186
|
+
|
|
187
|
+
```yaml
|
|
188
|
+
log: { type: stdout, format: pretty, level: http }
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
This is invalid
|
|
192
|
+
|
|
193
|
+
```yaml
|
|
194
|
+
logs: { type: stdout, format: pretty, level: http }
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
or
|
|
198
|
+
|
|
199
|
+
```yaml
|
|
200
|
+
logs:
|
|
201
|
+
- [{ type: stdout, format: pretty, level: http }]
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
- 000d43746: feat: upgrade to material ui 5
|
|
205
|
+
- 8f43bf17d: feat: node api new structure based on promise
|
|
206
|
+
|
|
207
|
+
```js
|
|
208
|
+
import { runServer } from '@verdaccio/node-api';
|
|
209
|
+
// or
|
|
210
|
+
import { runServer } from 'verdaccio';
|
|
211
|
+
|
|
212
|
+
const app = await runServer(); // default configuration
|
|
213
|
+
const app = await runServer('./config/config.yaml');
|
|
214
|
+
const app = await runServer({ configuration });
|
|
215
|
+
app.listen(4000, (event) => {
|
|
216
|
+
// do something
|
|
217
|
+
});
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Breaking Change
|
|
221
|
+
|
|
222
|
+
If you are using the node-api, the new structure is Promise based and less arguments.
|
|
223
|
+
|
|
224
|
+
### Minor Changes
|
|
225
|
+
|
|
226
|
+
- 0da7031e7: allow disable login on ui and endpoints
|
|
227
|
+
|
|
228
|
+
To be able disable the login, set `login: false`, anything else would enable login. This flag will disable access via UI and web endpoints.
|
|
229
|
+
|
|
230
|
+
```yml
|
|
231
|
+
web:
|
|
232
|
+
title: verdaccio
|
|
233
|
+
login: false
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
- 974cd8c19: fix: startup messages improved and logs support on types
|
|
237
|
+
- ef88da3b4: feat: improve support for fs promises older nodejs
|
|
238
|
+
- 631abe1ac: feat: refactor logger
|
|
239
|
+
- b61f762d6: feat: add server rate limit protection to all request
|
|
240
|
+
|
|
241
|
+
To modify custom values, use the server settings property.
|
|
242
|
+
|
|
243
|
+
```markdown
|
|
244
|
+
server:
|
|
245
|
+
|
|
246
|
+
## https://www.npmjs.com/package/express-rate-limit#configuration-options
|
|
247
|
+
|
|
248
|
+
rateLimit:
|
|
249
|
+
windowMs: 1000
|
|
250
|
+
max: 10000
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
The values are intended to be high, if you want to improve security of your server consider
|
|
254
|
+
using different values.
|
|
255
|
+
|
|
256
|
+
- d43894e8f: feat: rework web header for mobile, add new settings and raw manifest button
|
|
257
|
+
|
|
258
|
+
### New set of variables to hide features
|
|
259
|
+
|
|
260
|
+
Add set of new variables that allow hide different parts of the UI, buttons, footer or download tarballs. _All are
|
|
261
|
+
enabled by default_.
|
|
262
|
+
|
|
263
|
+
```yaml
|
|
264
|
+
# login: true <-- already exist but worth the reminder
|
|
265
|
+
# showInfo: true
|
|
266
|
+
# showSettings: true
|
|
267
|
+
# In combination with darkMode you can force specific theme
|
|
268
|
+
# showThemeSwitch: true
|
|
269
|
+
# showFooter: true
|
|
270
|
+
# showSearch: true
|
|
271
|
+
# showDownloadTarball: true
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
> If you disable `showThemeSwitch` and force `darkMode: true` the local storage settings would be
|
|
275
|
+
> ignored and force all themes to the one in the configuration file.
|
|
276
|
+
|
|
277
|
+
Future could be extended to
|
|
278
|
+
|
|
279
|
+
### Raw button to display manifest package
|
|
280
|
+
|
|
281
|
+
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.
|
|
282
|
+
|
|
283
|
+
```yaml
|
|
284
|
+
showRaw: true
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
#### Rework header buttons
|
|
288
|
+
|
|
289
|
+
- The header has been rework, the mobile was not looking broken.
|
|
290
|
+
- Removed info button in the header and moved to a dialog
|
|
291
|
+
- Info dialog now contains more information about the project, license and the aid content for Ukrania now is inside of the info modal.
|
|
292
|
+
- Separate settings and info to avoid collapse too much info (for mobile still need some work)
|
|
293
|
+
|
|
294
|
+
- 154b2ecd3: refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplications
|
|
295
|
+
- aa763baec: feat: add typescript project references settings
|
|
296
|
+
|
|
297
|
+
Reading https://ebaytech.berlin/optimizing-multi-package-apps-with-typescript-project-references-d5c57a3b4440 I realized I can use project references to solve the issue to pre-compile modules on develop mode.
|
|
298
|
+
|
|
299
|
+
It allows to navigate (IDE) trough the packages without need compile the packages.
|
|
300
|
+
|
|
301
|
+
Add two `tsconfig`, one using the previous existing configuration that is able to produce declaration files (`tsconfig.build`) and a new one `tsconfig` which is enables [_projects references_](https://www.typescriptlang.org/docs/handbook/project-references.html).
|
|
302
|
+
|
|
303
|
+
- 16e38df8a: feat: trustProxy property
|
|
304
|
+
- dc571aabd: feat: add forceEnhancedLegacySignature
|
|
305
|
+
- 62c24b632: feat: add passwordValidationRegex property
|
|
306
|
+
- 5167bb528: feat: ui search support for remote, local and private packages
|
|
307
|
+
|
|
308
|
+
The command `npm search` search globally and return all matches, with this improvement the user interface
|
|
309
|
+
is powered with the same capabilities.
|
|
310
|
+
|
|
311
|
+
The UI also tag where is the origin the package with a tag, also provide the latest version and description of the package.
|
|
312
|
+
|
|
313
|
+
- 5cf041a1a: feat: add dist.signatures to core/types
|
|
314
|
+
|
|
315
|
+
According to [`npm`](https://docs.npmjs.com/about-registry-signatures): _"Signatures are provided in the package's `packument` in each published version within the `dist` object"_
|
|
316
|
+
|
|
317
|
+
Here's an [example of a package version from the public npm registry with `dist.signatures`](https://registry.npmjs.org/light-cycle/1.4.3).
|
|
318
|
+
|
|
319
|
+
- 37274e4c8: feat: implement abbreviated manifest
|
|
320
|
+
|
|
321
|
+
Enable abbreviated manifest data by adding the header:
|
|
322
|
+
|
|
323
|
+
```
|
|
324
|
+
curl -H "Accept: application/vnd.npm.install-v1+json" https://registry.npmjs.org/verdaccio
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
It returns a filtered manifest, additionally includes the [time](https://github.com/pnpm/rfcs/pull/2) field by request.
|
|
328
|
+
|
|
329
|
+
Current support for packages managers:
|
|
330
|
+
|
|
331
|
+
- npm: yes
|
|
332
|
+
- pnpm: yes
|
|
333
|
+
- yarn classic: yes
|
|
334
|
+
- yarn modern (+2.x): [no](https://github.com/yarnpkg/berry/pull/3981#issuecomment-1076566096)
|
|
335
|
+
|
|
336
|
+
https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#abbreviated-metadata-format
|
|
337
|
+
|
|
338
|
+
- 45c03819e: refactor: render html middleware
|
|
339
|
+
- aecbd226d: web: allow ui hide package managers on sidebar
|
|
340
|
+
|
|
341
|
+
If there is a package manager of preference over others, you can define the package managers to be displayed on the detail page and sidebar, just define in the `config.yaml` and web section the list of package managers to be displayed.
|
|
342
|
+
|
|
343
|
+
```
|
|
344
|
+
web:
|
|
345
|
+
title: Verdaccio
|
|
346
|
+
sort_packages: asc
|
|
347
|
+
primary_color: #cccccc
|
|
348
|
+
pkgManagers:
|
|
349
|
+
- pnpm
|
|
350
|
+
- yarn
|
|
351
|
+
# - npm
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
To disable all package managers, just define empty:
|
|
355
|
+
|
|
356
|
+
```
|
|
357
|
+
web:
|
|
358
|
+
title: Verdaccio
|
|
359
|
+
sort_packages: asc
|
|
360
|
+
primary_color: #cccccc
|
|
361
|
+
pkgManagers:
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
and the section would be hidden.
|
|
365
|
+
|
|
366
|
+
### Patch Changes
|
|
367
|
+
|
|
368
|
+
- 351aeeaa8: fix(deps): @verdaccio/utils should be a prod dep of local-storage
|
|
369
|
+
- 7ef599cc4: fix: missing version on footer
|
|
370
|
+
- 19d272d10: fix: restore logger on init
|
|
371
|
+
|
|
372
|
+
Enable logger after parse configuration and log the very first step on startup phase.
|
|
373
|
+
|
|
374
|
+
```bash
|
|
375
|
+
warn --- experiments are enabled, it is recommended do not use experiments in production comment out this section to disable it
|
|
376
|
+
info --- support for experiment [token] is disabled
|
|
377
|
+
info --- support for experiment [search] is disabled
|
|
378
|
+
(node:50831) Warning: config.logs is deprecated, rename configuration to "config.log"
|
|
379
|
+
(Use `node --trace-warnings ...` to show where the warning was created)
|
|
380
|
+
info --- http address http://localhost:4873/
|
|
381
|
+
info --- version: 6.0.0-6-next.11
|
|
382
|
+
info --- server started
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
- a610ef26b: chore: add release step to private regisry on merge changeset pr
|
|
386
|
+
- 4fc21146a: fix: missing logo on header
|
|
387
|
+
- 34f0f1101: Enable prerelease mode with **changesets**
|
|
388
|
+
- 68ea21214: ESLint Warnings Fixed
|
|
389
|
+
|
|
390
|
+
Related to issue #1461
|
|
391
|
+
|
|
392
|
+
- max-len: most of the sensible max-len errors are fixed
|
|
393
|
+
- no-unused-vars: most of these types of errors are fixed by deleting not needed declarations
|
|
394
|
+
- @typescript-eslint/no-unused-vars: same as above
|
|
395
|
+
|
|
396
|
+
- b849128de: fix: handle upload scoped tarball
|
|
397
|
+
|
|
398
|
+
## 11.0.0-6-next.25
|
|
399
|
+
|
|
400
|
+
### Minor Changes
|
|
401
|
+
|
|
402
|
+
- 16e38df8: feat: trustProxy property
|
|
403
|
+
|
|
3
404
|
## 11.0.0-6-next.24
|
|
4
405
|
|
|
5
406
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0-next.0",
|
|
4
4
|
"description": "verdaccio types definitions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"private",
|
|
@@ -30,10 +30,9 @@
|
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
|
-
"main": "
|
|
34
|
-
"types": "
|
|
33
|
+
"main": "src/types.ts",
|
|
34
|
+
"types": "src/types.ts",
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@types/node": "16.18.10",
|
|
37
36
|
"typedoc": "0.23.25"
|
|
38
37
|
},
|
|
39
38
|
"typedoc": {
|
|
@@ -50,7 +49,6 @@
|
|
|
50
49
|
"test": "pnpm type-check",
|
|
51
50
|
"build:docs": "typedoc --options ./typedoc.json --tsconfig tsconfig.build.json",
|
|
52
51
|
"type-check": "tsc --noEmit -p tsconfig.build.json",
|
|
53
|
-
"build": "
|
|
54
|
-
}
|
|
55
|
-
"readme": "# @verdaccio/types\n\nTypeScript definitions for Verdaccio plugins and internal code.\n"
|
|
52
|
+
"build": "echo 0"
|
|
53
|
+
}
|
|
56
54
|
}
|
package/src/configuration.ts
CHANGED
|
@@ -18,9 +18,6 @@ export type LoggerLevel = 'http' | 'fatal' | 'warn' | 'info' | 'debug' | 'trace'
|
|
|
18
18
|
|
|
19
19
|
export type LoggerConfigItem = {
|
|
20
20
|
type?: LoggerType;
|
|
21
|
-
/**
|
|
22
|
-
* The format
|
|
23
|
-
*/
|
|
24
21
|
format?: LoggerFormat;
|
|
25
22
|
path?: string;
|
|
26
23
|
level?: string;
|
|
@@ -226,6 +223,8 @@ export type ServerSettingsConf = {
|
|
|
226
223
|
*/
|
|
227
224
|
pluginPrefix?: string;
|
|
228
225
|
passwordValidationRegex?: RegExp;
|
|
226
|
+
// docs on `trustProxy` can be found at: https://expressjs.com/en/guide/behind-proxies.html
|
|
227
|
+
trustProxy?: string;
|
|
229
228
|
};
|
|
230
229
|
|
|
231
230
|
/**
|
package/src/manifest.ts
CHANGED
|
@@ -89,6 +89,12 @@ export interface Tags {
|
|
|
89
89
|
[key: string]: Version;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
export interface PeerDependenciesMeta {
|
|
93
|
+
[dependencyName: string]: {
|
|
94
|
+
optional?: boolean;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
92
98
|
export interface Version {
|
|
93
99
|
name: string;
|
|
94
100
|
version: string;
|
|
@@ -116,6 +122,7 @@ export interface Version {
|
|
|
116
122
|
peerDependencies?: Dependencies;
|
|
117
123
|
devDependencies?: Dependencies;
|
|
118
124
|
optionalDependencies?: Dependencies;
|
|
125
|
+
peerDependenciesMeta?: PeerDependenciesMeta;
|
|
119
126
|
bundleDependencies?: Dependencies;
|
|
120
127
|
keywords?: string | string[];
|
|
121
128
|
nodeVersion?: string;
|
|
@@ -127,6 +134,8 @@ export interface Version {
|
|
|
127
134
|
funding?: { type: string; url: string };
|
|
128
135
|
engines?: Engines;
|
|
129
136
|
hasInstallScript?: boolean;
|
|
137
|
+
cpu?: string[];
|
|
138
|
+
os?: string[];
|
|
130
139
|
}
|
|
131
140
|
|
|
132
141
|
export interface Dependencies {
|
package/build/commons.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
export type Callback = Function;
|
|
3
|
-
export type CallbackAction = (err: any | null) => void;
|
|
4
|
-
export type CallbackError = (err: NodeJS.ErrnoException) => void;
|
|
5
|
-
export interface RemoteUser {
|
|
6
|
-
real_groups: string[];
|
|
7
|
-
groups: string[];
|
|
8
|
-
name: string | void;
|
|
9
|
-
error?: string;
|
|
10
|
-
}
|
|
11
|
-
export type StringValue = string | void | null;
|
|
12
|
-
export interface HttpError extends Error {
|
|
13
|
-
status: number;
|
|
14
|
-
statusCode: number;
|
|
15
|
-
expose: boolean;
|
|
16
|
-
headers?: {
|
|
17
|
-
[key: string]: string;
|
|
18
|
-
};
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
}
|
|
21
|
-
export type URLPrefix = {
|
|
22
|
-
absolute: boolean;
|
|
23
|
-
basePath: string;
|
|
24
|
-
};
|
package/build/configuration.d.ts
DELETED
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
import { PackageAccess, PackageList } from '@verdaccio/types/src/manifest';
|
|
2
|
-
export type TypeToken = 'Bearer' | 'Basic';
|
|
3
|
-
export interface Logger {
|
|
4
|
-
child: (conf: any) => any;
|
|
5
|
-
debug: (conf: any, template?: string) => void;
|
|
6
|
-
error: (conf: any, template?: string) => void;
|
|
7
|
-
http: (conf: any, template?: string) => void;
|
|
8
|
-
trace: (conf: any, template?: string) => void;
|
|
9
|
-
warn: (conf: any, template?: string) => void;
|
|
10
|
-
info: (conf: any, template?: string) => void;
|
|
11
|
-
}
|
|
12
|
-
export type LoggerType = 'stdout' | 'file';
|
|
13
|
-
export type LoggerFormat = 'pretty' | 'pretty-timestamped' | 'json';
|
|
14
|
-
export type LoggerLevel = 'http' | 'fatal' | 'warn' | 'info' | 'debug' | 'trace';
|
|
15
|
-
export type LoggerConfigItem = {
|
|
16
|
-
type?: LoggerType;
|
|
17
|
-
/**
|
|
18
|
-
* The format
|
|
19
|
-
*/
|
|
20
|
-
format?: LoggerFormat;
|
|
21
|
-
path?: string;
|
|
22
|
-
level?: string;
|
|
23
|
-
colors?: boolean;
|
|
24
|
-
async?: boolean;
|
|
25
|
-
};
|
|
26
|
-
export interface ConfigWithHttps extends Config {
|
|
27
|
-
https: HttpsConf;
|
|
28
|
-
}
|
|
29
|
-
export interface PackageAccessYaml {
|
|
30
|
-
storage?: string;
|
|
31
|
-
publish?: string;
|
|
32
|
-
proxy?: string;
|
|
33
|
-
access?: string;
|
|
34
|
-
unpublish?: string;
|
|
35
|
-
}
|
|
36
|
-
export interface LoggerConfItem {
|
|
37
|
-
type: LoggerType;
|
|
38
|
-
format: LoggerFormat;
|
|
39
|
-
level: LoggerLevel;
|
|
40
|
-
}
|
|
41
|
-
export interface Headers {
|
|
42
|
-
[key: string]: string;
|
|
43
|
-
}
|
|
44
|
-
export interface UpLinkTokenConf {
|
|
45
|
-
type: TypeToken;
|
|
46
|
-
token?: string;
|
|
47
|
-
token_env?: boolean | string;
|
|
48
|
-
}
|
|
49
|
-
export interface UpLinkConf {
|
|
50
|
-
url: string;
|
|
51
|
-
ca?: string;
|
|
52
|
-
cache?: boolean;
|
|
53
|
-
timeout?: string | void;
|
|
54
|
-
maxage?: string | void;
|
|
55
|
-
max_fails?: number | void;
|
|
56
|
-
fail_timeout?: string | void;
|
|
57
|
-
headers?: Headers;
|
|
58
|
-
auth?: UpLinkTokenConf;
|
|
59
|
-
strict_ssl?: boolean | void;
|
|
60
|
-
_autogenerated?: boolean;
|
|
61
|
-
}
|
|
62
|
-
export type RateLimit = {
|
|
63
|
-
windowMs?: number;
|
|
64
|
-
max?: number;
|
|
65
|
-
};
|
|
66
|
-
export type FlagsConfig = {
|
|
67
|
-
searchRemote?: boolean;
|
|
68
|
-
changePassword?: boolean;
|
|
69
|
-
};
|
|
70
|
-
export type PackageManagers = 'pnpm' | 'yarn' | 'npm';
|
|
71
|
-
export type CommonWebConf = {
|
|
72
|
-
title?: string;
|
|
73
|
-
logo?: string;
|
|
74
|
-
favicon?: string;
|
|
75
|
-
gravatar?: boolean;
|
|
76
|
-
sort_packages?: string;
|
|
77
|
-
darkMode?: boolean;
|
|
78
|
-
url_prefix?: string;
|
|
79
|
-
language?: string;
|
|
80
|
-
login?: boolean;
|
|
81
|
-
scope?: string;
|
|
82
|
-
pkgManagers?: PackageManagers[];
|
|
83
|
-
showInfo?: boolean;
|
|
84
|
-
showSettings?: boolean;
|
|
85
|
-
showSearch?: boolean;
|
|
86
|
-
showFooter?: boolean;
|
|
87
|
-
showThemeSwitch?: boolean;
|
|
88
|
-
showDownloadTarball?: boolean;
|
|
89
|
-
primaryColor: string;
|
|
90
|
-
showRaw?: boolean;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* Options are passed to the index.html
|
|
94
|
-
*/
|
|
95
|
-
export type TemplateUIOptions = {
|
|
96
|
-
uri?: string;
|
|
97
|
-
protocol?: string;
|
|
98
|
-
host?: string;
|
|
99
|
-
basename?: string;
|
|
100
|
-
base: string;
|
|
101
|
-
version?: string;
|
|
102
|
-
flags: FlagsConfig;
|
|
103
|
-
} & CommonWebConf;
|
|
104
|
-
/**
|
|
105
|
-
* Options on config.yaml for web
|
|
106
|
-
*/
|
|
107
|
-
export type WebConf = {
|
|
108
|
-
primary_color?: string;
|
|
109
|
-
primaryColor?: string;
|
|
110
|
-
enable?: boolean;
|
|
111
|
-
scriptsHead?: string[];
|
|
112
|
-
scriptsBodyAfter?: string[];
|
|
113
|
-
scriptsbodyBefore?: string[];
|
|
114
|
-
metaScripts?: string[];
|
|
115
|
-
bodyBefore?: string[];
|
|
116
|
-
bodyAfter?: string[];
|
|
117
|
-
rateLimit?: RateLimit;
|
|
118
|
-
html_cache?: boolean;
|
|
119
|
-
} & CommonWebConf;
|
|
120
|
-
export interface UpLinksConfList {
|
|
121
|
-
[key: string]: UpLinkConf;
|
|
122
|
-
}
|
|
123
|
-
export interface AuthHtpasswd {
|
|
124
|
-
file: string;
|
|
125
|
-
max_users: number;
|
|
126
|
-
}
|
|
127
|
-
export type AuthConf = any | AuthHtpasswd;
|
|
128
|
-
export interface JWTOptions {
|
|
129
|
-
sign: JWTSignOptions;
|
|
130
|
-
verify: JWTVerifyOptions;
|
|
131
|
-
}
|
|
132
|
-
export interface JWTSignOptions {
|
|
133
|
-
algorithm?: string;
|
|
134
|
-
expiresIn?: string;
|
|
135
|
-
notBefore?: string;
|
|
136
|
-
ignoreExpiration?: boolean;
|
|
137
|
-
maxAge?: string | number;
|
|
138
|
-
clockTimestamp?: number;
|
|
139
|
-
}
|
|
140
|
-
export interface JWTVerifyOptions {
|
|
141
|
-
algorithm?: string;
|
|
142
|
-
expiresIn?: string;
|
|
143
|
-
notBefore?: string | number;
|
|
144
|
-
ignoreExpiration?: boolean;
|
|
145
|
-
maxAge?: string | number;
|
|
146
|
-
clockTimestamp?: number;
|
|
147
|
-
}
|
|
148
|
-
export interface APITokenOptions {
|
|
149
|
-
legacy: boolean;
|
|
150
|
-
jwt?: JWTOptions;
|
|
151
|
-
}
|
|
152
|
-
export interface Security {
|
|
153
|
-
enhancedLegacySignature?: boolean;
|
|
154
|
-
web: JWTOptions;
|
|
155
|
-
api: APITokenOptions;
|
|
156
|
-
}
|
|
157
|
-
export interface PublishOptions {
|
|
158
|
-
allow_offline: boolean;
|
|
159
|
-
}
|
|
160
|
-
export interface ListenAddress {
|
|
161
|
-
[key: string]: string;
|
|
162
|
-
}
|
|
163
|
-
export interface HttpsConfKeyCert {
|
|
164
|
-
key: string;
|
|
165
|
-
cert: string;
|
|
166
|
-
ca?: string;
|
|
167
|
-
}
|
|
168
|
-
export interface HttpsConfPfx {
|
|
169
|
-
pfx: string;
|
|
170
|
-
passphrase?: string;
|
|
171
|
-
}
|
|
172
|
-
export type HttpsConf = HttpsConfKeyCert | HttpsConfPfx;
|
|
173
|
-
export interface Notifications {
|
|
174
|
-
method: string;
|
|
175
|
-
packagePattern: RegExp;
|
|
176
|
-
packagePatternFlags: string;
|
|
177
|
-
endpoint: string;
|
|
178
|
-
content: string;
|
|
179
|
-
headers: Headers;
|
|
180
|
-
}
|
|
181
|
-
export type Notification = Notifications;
|
|
182
|
-
export type ServerSettingsConf = {
|
|
183
|
-
rateLimit: RateLimit;
|
|
184
|
-
keepAliveTimeout?: number;
|
|
185
|
-
/**
|
|
186
|
-
* Plugins should be prefixed verdaccio-XXXXXX by default.
|
|
187
|
-
* To override the default prefix, use this property without `-`
|
|
188
|
-
* If you set pluginPrefix: acme, the packages to resolve will be
|
|
189
|
-
* acme-XXXXXX
|
|
190
|
-
*/
|
|
191
|
-
pluginPrefix?: string;
|
|
192
|
-
passwordValidationRegex?: RegExp;
|
|
193
|
-
};
|
|
194
|
-
/**
|
|
195
|
-
* YAML configuration file available options.
|
|
196
|
-
*/
|
|
197
|
-
export interface ConfigYaml {
|
|
198
|
-
_debug?: boolean;
|
|
199
|
-
storage?: string | void;
|
|
200
|
-
packages: PackageList;
|
|
201
|
-
uplinks: UpLinksConfList;
|
|
202
|
-
log?: LoggerConfItem;
|
|
203
|
-
logs?: LoggerConfItem;
|
|
204
|
-
web?: WebConf;
|
|
205
|
-
auth?: AuthConf;
|
|
206
|
-
security: Security;
|
|
207
|
-
publish?: PublishOptions;
|
|
208
|
-
store?: any;
|
|
209
|
-
listen?: ListenAddress;
|
|
210
|
-
https?: HttpsConf;
|
|
211
|
-
user_agent?: string;
|
|
212
|
-
http_proxy?: string;
|
|
213
|
-
plugins?: string | void | null;
|
|
214
|
-
https_proxy?: string;
|
|
215
|
-
no_proxy?: string;
|
|
216
|
-
max_body_size?: string;
|
|
217
|
-
notifications?: Notifications;
|
|
218
|
-
notify?: Notifications | Notifications[];
|
|
219
|
-
middlewares?: any;
|
|
220
|
-
filters?: any;
|
|
221
|
-
url_prefix?: string;
|
|
222
|
-
server?: ServerSettingsConf;
|
|
223
|
-
flags?: FlagsConfig;
|
|
224
|
-
experiments?: FlagsConfig;
|
|
225
|
-
userRateLimit?: RateLimit;
|
|
226
|
-
configPath?: string;
|
|
227
|
-
i18n?: {
|
|
228
|
-
web: string;
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Configuration object with additional methods for configuration, includes yaml and internal medatada.
|
|
233
|
-
* @interface Config
|
|
234
|
-
* @extends {ConfigYaml}
|
|
235
|
-
*/
|
|
236
|
-
export interface Config extends Omit<ConfigYaml, 'packages' | 'security' | 'configPath'> {
|
|
237
|
-
server_id: string;
|
|
238
|
-
secret: string;
|
|
239
|
-
configPath: string;
|
|
240
|
-
self_path?: string;
|
|
241
|
-
packages: PackageList;
|
|
242
|
-
security: Security;
|
|
243
|
-
checkSecretKey(token: string): string;
|
|
244
|
-
getMatchedPackagesSpec(storage: string): PackageAccess | void;
|
|
245
|
-
[key: string]: any;
|
|
246
|
-
}
|
|
247
|
-
export interface AllowAccess {
|
|
248
|
-
name: string;
|
|
249
|
-
version?: string;
|
|
250
|
-
tag?: string;
|
|
251
|
-
}
|
|
252
|
-
export interface AuthPackageAllow extends PackageAccess, AllowAccess {
|
|
253
|
-
}
|
package/build/manifest.d.ts
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
export interface PackageAccess {
|
|
2
|
-
storage?: string;
|
|
3
|
-
publish?: string[];
|
|
4
|
-
proxy?: string[];
|
|
5
|
-
access?: string[];
|
|
6
|
-
unpublish: string[];
|
|
7
|
-
}
|
|
8
|
-
export interface PackageList {
|
|
9
|
-
[key: string]: PackageAccess;
|
|
10
|
-
}
|
|
11
|
-
export interface MergeTags {
|
|
12
|
-
[key: string]: string;
|
|
13
|
-
}
|
|
14
|
-
export interface DistFile {
|
|
15
|
-
url: string;
|
|
16
|
-
sha: string;
|
|
17
|
-
registry?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface DistFiles {
|
|
20
|
-
[key: string]: DistFile;
|
|
21
|
-
}
|
|
22
|
-
export interface Token {
|
|
23
|
-
user: string;
|
|
24
|
-
token: string;
|
|
25
|
-
key: string;
|
|
26
|
-
cidr?: string[];
|
|
27
|
-
readonly: boolean;
|
|
28
|
-
created: number | string;
|
|
29
|
-
updated?: number | string;
|
|
30
|
-
}
|
|
31
|
-
export interface AttachMents {
|
|
32
|
-
[key: string]: AttachMentsItem;
|
|
33
|
-
}
|
|
34
|
-
export interface AttachMentsItem {
|
|
35
|
-
content_type?: string;
|
|
36
|
-
data?: string;
|
|
37
|
-
length?: number;
|
|
38
|
-
shasum?: string;
|
|
39
|
-
version?: string;
|
|
40
|
-
}
|
|
41
|
-
export interface GenericBody {
|
|
42
|
-
[key: string]: string;
|
|
43
|
-
}
|
|
44
|
-
export interface UpLinkMetadata {
|
|
45
|
-
etag: string;
|
|
46
|
-
fetched: number;
|
|
47
|
-
}
|
|
48
|
-
export interface UpLinks {
|
|
49
|
-
[key: string]: UpLinkMetadata;
|
|
50
|
-
}
|
|
51
|
-
export interface Signatures {
|
|
52
|
-
keyid: string;
|
|
53
|
-
sig: string;
|
|
54
|
-
}
|
|
55
|
-
export interface Dist {
|
|
56
|
-
'npm-signature'?: string;
|
|
57
|
-
signatures?: Signatures[];
|
|
58
|
-
fileCount?: number;
|
|
59
|
-
integrity?: string;
|
|
60
|
-
shasum: string;
|
|
61
|
-
unpackedSize?: number;
|
|
62
|
-
tarball: string;
|
|
63
|
-
}
|
|
64
|
-
export interface Author {
|
|
65
|
-
username?: string;
|
|
66
|
-
name: string;
|
|
67
|
-
email?: string;
|
|
68
|
-
url?: string;
|
|
69
|
-
}
|
|
70
|
-
export interface PackageUsers {
|
|
71
|
-
[key: string]: boolean;
|
|
72
|
-
}
|
|
73
|
-
export interface Tags {
|
|
74
|
-
[key: string]: Version;
|
|
75
|
-
}
|
|
76
|
-
export interface Version {
|
|
77
|
-
name: string;
|
|
78
|
-
version: string;
|
|
79
|
-
directories?: any;
|
|
80
|
-
dist: Dist;
|
|
81
|
-
author: string | Author;
|
|
82
|
-
main: string;
|
|
83
|
-
homemage?: string;
|
|
84
|
-
license?: string;
|
|
85
|
-
readme: string;
|
|
86
|
-
readmeFileName?: string;
|
|
87
|
-
readmeFilename?: string;
|
|
88
|
-
description: string;
|
|
89
|
-
bin?: string;
|
|
90
|
-
bugs?: any;
|
|
91
|
-
files?: string[];
|
|
92
|
-
gitHead?: string;
|
|
93
|
-
maintainers?: Author[];
|
|
94
|
-
contributors?: Author[];
|
|
95
|
-
repository?: string | any;
|
|
96
|
-
scripts?: any;
|
|
97
|
-
homepage?: string;
|
|
98
|
-
etag?: string;
|
|
99
|
-
dependencies?: Dependencies;
|
|
100
|
-
peerDependencies?: Dependencies;
|
|
101
|
-
devDependencies?: Dependencies;
|
|
102
|
-
optionalDependencies?: Dependencies;
|
|
103
|
-
bundleDependencies?: Dependencies;
|
|
104
|
-
keywords?: string | string[];
|
|
105
|
-
nodeVersion?: string;
|
|
106
|
-
_id: string;
|
|
107
|
-
_npmVersion?: string;
|
|
108
|
-
_npmUser: Author;
|
|
109
|
-
_hasShrinkwrap?: boolean;
|
|
110
|
-
deprecated?: string;
|
|
111
|
-
funding?: {
|
|
112
|
-
type: string;
|
|
113
|
-
url: string;
|
|
114
|
-
};
|
|
115
|
-
engines?: Engines;
|
|
116
|
-
hasInstallScript?: boolean;
|
|
117
|
-
}
|
|
118
|
-
export interface Dependencies {
|
|
119
|
-
[key: string]: string;
|
|
120
|
-
}
|
|
121
|
-
export interface Engines {
|
|
122
|
-
[key: string]: string;
|
|
123
|
-
}
|
|
124
|
-
export interface Versions {
|
|
125
|
-
[key: string]: Version;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* @deprecated use Manifest instead
|
|
129
|
-
*/
|
|
130
|
-
export interface Package {
|
|
131
|
-
_id?: string;
|
|
132
|
-
name: string;
|
|
133
|
-
versions: Versions;
|
|
134
|
-
'dist-tags': GenericBody;
|
|
135
|
-
time: GenericBody;
|
|
136
|
-
readme?: string;
|
|
137
|
-
users?: PackageUsers;
|
|
138
|
-
_distfiles: DistFiles;
|
|
139
|
-
_attachments: AttachMents;
|
|
140
|
-
_uplinks: UpLinks;
|
|
141
|
-
_rev: string;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Represents upstream manifest from another registry
|
|
145
|
-
*/
|
|
146
|
-
export interface FullRemoteManifest {
|
|
147
|
-
_id?: string;
|
|
148
|
-
_rev?: string;
|
|
149
|
-
name: string;
|
|
150
|
-
description?: string;
|
|
151
|
-
'dist-tags': GenericBody;
|
|
152
|
-
time: GenericBody;
|
|
153
|
-
versions: Versions;
|
|
154
|
-
maintainers?: Author[];
|
|
155
|
-
/** store the latest readme **/
|
|
156
|
-
readme?: string;
|
|
157
|
-
/** store star assigned to this packages by users */
|
|
158
|
-
users?: PackageUsers;
|
|
159
|
-
access?: any;
|
|
160
|
-
bugs?: {
|
|
161
|
-
url: string;
|
|
162
|
-
};
|
|
163
|
-
license?: string;
|
|
164
|
-
homepage?: string;
|
|
165
|
-
repository?: string | {
|
|
166
|
-
type?: string;
|
|
167
|
-
url: string;
|
|
168
|
-
directory?: string;
|
|
169
|
-
};
|
|
170
|
-
keywords?: string[];
|
|
171
|
-
author?: string | Author;
|
|
172
|
-
}
|
|
173
|
-
export interface Manifest extends FullRemoteManifest, PublishManifest {
|
|
174
|
-
/**
|
|
175
|
-
* store fast access to the dist url of an specific tarball, instead search version
|
|
176
|
-
* by id, just the tarball id is faster.
|
|
177
|
-
*
|
|
178
|
-
* The _distfiles is created only when a package is being sync from an upstream.
|
|
179
|
-
* also used to fetch tarballs from upstream, the private publish tarballs are not stored in
|
|
180
|
-
* this object because they are not published in the upstream registry.
|
|
181
|
-
*/
|
|
182
|
-
_distfiles: DistFiles;
|
|
183
|
-
/**
|
|
184
|
-
* Store access cache metadata, to avoid to fetch the same metadata multiple times.
|
|
185
|
-
*
|
|
186
|
-
* The key represents the uplink id which is composed of a etag and a fetched timestamp.
|
|
187
|
-
*
|
|
188
|
-
* The fetched timestamp is the time when the metadata was fetched, used to avoid to fetch the
|
|
189
|
-
* same metadata until the metadata is older than the last fetch.
|
|
190
|
-
*/
|
|
191
|
-
_uplinks: UpLinks;
|
|
192
|
-
/**
|
|
193
|
-
* store the revision of the manifest
|
|
194
|
-
*/
|
|
195
|
-
_rev: string;
|
|
196
|
-
}
|
|
197
|
-
export type AbbreviatedVersion = Pick<Version, 'name' | 'version' | 'description' | 'dependencies' | 'devDependencies' | 'bin' | 'dist' | 'engines' | 'funding' | 'peerDependencies'>;
|
|
198
|
-
export interface AbbreviatedVersions {
|
|
199
|
-
[key: string]: AbbreviatedVersion;
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
*
|
|
203
|
-
*/
|
|
204
|
-
export type AbbreviatedManifest = Pick<Manifest, 'name' | 'dist-tags' | 'time'> & {
|
|
205
|
-
modified: string;
|
|
206
|
-
versions: AbbreviatedVersions;
|
|
207
|
-
};
|
|
208
|
-
export interface PublishManifest {
|
|
209
|
-
/**
|
|
210
|
-
* The `_attachments` object has different usages:
|
|
211
|
-
*
|
|
212
|
-
* - When a package is published, it contains the tarball as an string, this string is used to be
|
|
213
|
-
* converted as a tarball, usually attached to the package but not stored in the database.
|
|
214
|
-
* - If user runs `npm star` the _attachments will be at the manifest body but empty.
|
|
215
|
-
*
|
|
216
|
-
* It has also an internal usage:
|
|
217
|
-
*
|
|
218
|
-
* - Used as a cache for the tarball, quick access to the tarball shasum, etc. Instead
|
|
219
|
-
* iterate versions and find the right one, just using the tarball as a key which is what
|
|
220
|
-
* the package manager sends to the registry.
|
|
221
|
-
*
|
|
222
|
-
* - A `_attachments` object is added every time a private tarball is published, upstream cached tarballs are
|
|
223
|
-
* not being part of this object, only for published private packages.
|
|
224
|
-
*
|
|
225
|
-
* Note: This field is removed when the package is accesed through the web user interface.
|
|
226
|
-
* */
|
|
227
|
-
_attachments: AttachMents;
|
|
228
|
-
}
|
package/build/plugins/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@verdaccio/types/src/plugins/storage';
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Callback, CallbackAction } from '@verdaccio/types/src/commons';
|
|
2
|
-
import { Manifest, Token } from '@verdaccio/types/src/manifest';
|
|
3
|
-
export type StorageList = string[];
|
|
4
|
-
export interface ILocalStorage {
|
|
5
|
-
add(name: string): void;
|
|
6
|
-
remove(name: string): void;
|
|
7
|
-
get(): StorageList;
|
|
8
|
-
sync(): void;
|
|
9
|
-
}
|
|
10
|
-
export interface TokenFilter {
|
|
11
|
-
user: string;
|
|
12
|
-
}
|
|
13
|
-
export interface ITokenActions {
|
|
14
|
-
saveToken(token: Token): Promise<any>;
|
|
15
|
-
deleteToken(user: string, tokenKey: string): Promise<any>;
|
|
16
|
-
readTokens(filter: TokenFilter): Promise<Token[]>;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* This method expect return a Package object
|
|
20
|
-
* eg:
|
|
21
|
-
* {
|
|
22
|
-
* name: string;
|
|
23
|
-
* time: number;
|
|
24
|
-
* ... and other props
|
|
25
|
-
* }
|
|
26
|
-
*
|
|
27
|
-
* The `cb` callback object will be executed if:
|
|
28
|
-
* - it might return object (truly)
|
|
29
|
-
* - it might reutrn null
|
|
30
|
-
*/
|
|
31
|
-
export type onSearchPackage = (item: Manifest, cb: CallbackAction) => void;
|
|
32
|
-
export type onEndSearchPackage = (error?: any) => void;
|
|
33
|
-
export type onValidatePackage = (name: string) => boolean;
|
|
34
|
-
export type StorageUpdateCallback = (data: Manifest, cb: CallbackAction) => void;
|
|
35
|
-
export type StorageWriteCallback = (name: string, json: Manifest, callback: Callback) => void;
|
|
36
|
-
export type PackageTransformer = (pkg: Manifest) => Manifest;
|
|
37
|
-
export type ReadPackageCallback = (err: any | null, data?: Manifest) => void;
|
package/build/search.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export type PublisherMaintainer = {
|
|
2
|
-
username: string;
|
|
3
|
-
email: string;
|
|
4
|
-
};
|
|
5
|
-
export type SearchPackageBody = {
|
|
6
|
-
name: string;
|
|
7
|
-
scope: string;
|
|
8
|
-
description: string;
|
|
9
|
-
author: string | PublisherMaintainer;
|
|
10
|
-
version: string;
|
|
11
|
-
keywords: string | string[] | undefined;
|
|
12
|
-
date: string;
|
|
13
|
-
links?: {
|
|
14
|
-
npm: string;
|
|
15
|
-
homepage?: string;
|
|
16
|
-
repository?: string;
|
|
17
|
-
bugs?: string;
|
|
18
|
-
};
|
|
19
|
-
publisher?: any;
|
|
20
|
-
maintainers?: PublisherMaintainer[];
|
|
21
|
-
};
|
|
22
|
-
export type SearchResultWeb = {
|
|
23
|
-
name: string;
|
|
24
|
-
version: string;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
package/build/types.d.ts
DELETED