@verdaccio/types 10.5.0 → 10.6.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 ADDED
@@ -0,0 +1,580 @@
1
+ # Change Log
2
+
3
+ ## 10.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f8d763c: feat: add abbreviated versions support
8
+
9
+ ## 10.5.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 5c127e6: feat: add server.trustProxy configuration type
14
+
15
+ ## 10.5.1
16
+
17
+ ### Patch Changes
18
+
19
+ - 4643709: fix: wrong package configuration
20
+
21
+ ## 10.5.0
22
+
23
+ ### Minor Changes
24
+
25
+ - b5cfaf6: feat: refactor types and typescript 4
26
+
27
+ ## 10.4.2
28
+
29
+ ### Patch Changes
30
+
31
+ - 2d428b3: fix: user_agent property as boolean
32
+
33
+ ## 10.4.1
34
+
35
+ ### Patch Changes
36
+
37
+ - aaf0da4: fix: self_path correct property
38
+
39
+ ## 10.4.0
40
+
41
+ ### Minor Changes
42
+
43
+ - 00e4afd: feat: update configuration types
44
+
45
+ ## 10.3.0
46
+
47
+ ### Minor Changes
48
+
49
+ - 803c518: chore: update core dependencies
50
+
51
+ ## 10.2.2
52
+
53
+ ### Patch Changes
54
+
55
+ - 9ca52a7: fix: move userRateLimit to config body
56
+
57
+ ## 10.2.1
58
+
59
+ ### Patch Changes
60
+
61
+ - 254a282: fix: user_agent can be also string
62
+
63
+ ## 10.2.0
64
+
65
+ ### Minor Changes
66
+
67
+ - 96b62c8: feat: add rate limit and convert user agent type to boolean
68
+
69
+ ## 10.1.0
70
+
71
+ ### Minor Changes
72
+
73
+ - 4e9a3d0: feat: remove core-js from bundle
74
+
75
+ By using babel.js core-js injects some requires that are not necessarily dependencies and fails on pnpm and yarn 2 due are strict. No need to add this feature so is removed.
76
+
77
+ - https://babeljs.io/docs/en/babel-preset-env#usebuiltins
78
+
79
+ ## 10.0.1
80
+
81
+ ### Patch Changes
82
+
83
+ - 6134415: fix: update dependencies
84
+
85
+ All notable changes to this project will be documented in this file.
86
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
87
+
88
+ # [10.0.0](https://github.com/verdaccio/monorepo/compare/v9.7.5...v10.0.0) (2021-03-29)
89
+
90
+ **Note:** Version bump only for package @verdaccio/types
91
+
92
+ ## [9.7.2](https://github.com/verdaccio/monorepo/compare/v9.7.1...v9.7.2) (2020-07-20)
93
+
94
+ ### Bug Fixes
95
+
96
+ - incorrect AuthAccessCallback and AuthCallback ([#374](https://github.com/verdaccio/monorepo/issues/374)) ([97538f8](https://github.com/verdaccio/monorepo/commit/97538f886271ccdbea7862957f65c4a17c4cd831)), closes [/github.com/verdaccio/verdaccio/blob/master/src/lib/auth.ts#L264](https://github.com//github.com/verdaccio/verdaccio/blob/master/src/lib/auth.ts/issues/L264) [/github.com/verdaccio/verdaccio/blob/master/src/lib/auth.ts#L114](https://github.com//github.com/verdaccio/verdaccio/blob/master/src/lib/auth.ts/issues/L114)
97
+
98
+ # [9.7.0](https://github.com/verdaccio/monorepo/compare/v9.6.1...v9.7.0) (2020-06-24)
99
+
100
+ ### Features
101
+
102
+ - types for https config ([#368](https://github.com/verdaccio/monorepo/issues/368)) ([aa4aa83](https://github.com/verdaccio/monorepo/commit/aa4aa83e8a2f6a29ebe7c0b43ccc560a37fe2da9))
103
+
104
+ # [9.5.0](https://github.com/verdaccio/monorepo/compare/v9.4.1...v9.5.0) (2020-05-02)
105
+
106
+ ### Features
107
+
108
+ - **types:** custom favicon ([#356](https://github.com/verdaccio/monorepo/issues/356)) ([bd78861](https://github.com/verdaccio/monorepo/commit/bd78861f46cd5189808b6689d2018a7bac6755f7))
109
+
110
+ # [9.3.0](https://github.com/verdaccio/monorepo/compare/v9.2.0...v9.3.0) (2020-01-29)
111
+
112
+ ### Features
113
+
114
+ - **types:** adding tag type for auth plugins ([#318](https://github.com/verdaccio/monorepo/issues/318)) ([7f07c94](https://github.com/verdaccio/monorepo/commit/7f07c94d9dba5ac45b35aef3bd1ffd3080fb35db))
115
+
116
+ # [9.0.0](https://github.com/verdaccio/monorepo/compare/v8.5.3...v9.0.0) (2020-01-07)
117
+
118
+ **Note:** Version bump only for package @verdaccio/types
119
+
120
+ ## [8.5.2](https://github.com/verdaccio/monorepo/compare/v8.5.1...v8.5.2) (2019-12-25)
121
+
122
+ ### Bug Fixes
123
+
124
+ - add types for storage handler ([#307](https://github.com/verdaccio/monorepo/issues/307)) ([c35746e](https://github.com/verdaccio/monorepo/commit/c35746ebba071900db172608dedff66a7d27c23d))
125
+
126
+ ## [8.5.1](https://github.com/verdaccio/monorepo/compare/v8.5.0...v8.5.1) (2019-12-24)
127
+
128
+ ### Bug Fixes
129
+
130
+ - add new types for local storage ([#306](https://github.com/verdaccio/monorepo/issues/306)) ([e715e24](https://github.com/verdaccio/monorepo/commit/e715e24ec7b7e7b3dca31a3321714ebccadf2a8d))
131
+
132
+ # [8.5.0](https://github.com/verdaccio/monorepo/compare/v8.4.2...v8.5.0) (2019-12-22)
133
+
134
+ ### Bug Fixes
135
+
136
+ - **types:** add allow_unpublish generic ([#305](https://github.com/verdaccio/monorepo/issues/305)) ([aeaf64c](https://github.com/verdaccio/monorepo/commit/aeaf64c67cafb9ec16fa5a66aad9c4912f2a3710))
137
+
138
+ ## [8.4.2](https://github.com/verdaccio/monorepo/compare/v8.4.1...v8.4.2) (2019-11-23)
139
+
140
+ **Note:** Version bump only for package @verdaccio/types
141
+
142
+ ## [8.4.1](https://github.com/verdaccio/monorepo/compare/v8.4.0...v8.4.1) (2019-11-22)
143
+
144
+ **Note:** Version bump only for package @verdaccio/types
145
+
146
+ # [8.4.0](https://github.com/verdaccio/monorepo/compare/v8.3.0...v8.4.0) (2019-11-22)
147
+
148
+ ### Bug Fixes
149
+
150
+ - adds sort_packages in WebConf Interface ([#227](https://github.com/verdaccio/monorepo/issues/227)) ([5b60ade](https://github.com/verdaccio/monorepo/commit/5b60adef5da49d7d1b62aa9f484b27c9fa319bdd))
151
+
152
+ # [8.3.0](https://github.com/verdaccio/monorepo/compare/v8.2.0...v8.3.0) (2019-10-27)
153
+
154
+ ### Features
155
+
156
+ - improve auth callback TS types ([#225](https://github.com/verdaccio/monorepo/issues/225)) ([ee442a0](https://github.com/verdaccio/monorepo/commit/ee442a0))
157
+
158
+ # [8.1.0](https://github.com/verdaccio/monorepo/compare/v8.0.1-next.1...v8.1.0) (2019-09-07)
159
+
160
+ **Note:** Version bump only for package @verdaccio/types
161
+
162
+ ## [8.0.1-next.1](https://github.com/verdaccio/monorepo/compare/v8.0.1-next.0...v8.0.1-next.1) (2019-08-29)
163
+
164
+ **Note:** Version bump only for package @verdaccio/types
165
+
166
+ ## [8.0.1-next.0](https://github.com/verdaccio/monorepo/compare/v8.0.0...v8.0.1-next.0) (2019-08-29)
167
+
168
+ **Note:** Version bump only for package @verdaccio/types
169
+
170
+ # [8.0.0](https://github.com/verdaccio/monorepo/compare/v8.0.0-next.4...v8.0.0) (2019-08-22)
171
+
172
+ **Note:** Version bump only for package @verdaccio/types
173
+
174
+ # [8.0.0-next.4](https://github.com/verdaccio/monorepo/compare/v8.0.0-next.3...v8.0.0-next.4) (2019-08-18)
175
+
176
+ **Note:** Version bump only for package @verdaccio/types
177
+
178
+ # [8.0.0-next.2](https://github.com/verdaccio/monorepo/compare/v8.0.0-next.1...v8.0.0-next.2) (2019-08-03)
179
+
180
+ ### Bug Fixes
181
+
182
+ - update types for tokens ([9734fa8](https://github.com/verdaccio/monorepo/commit/9734fa8))
183
+
184
+ # [8.0.0-next.1](https://github.com/verdaccio/monorepo/compare/v8.0.0-next.0...v8.0.0-next.1) (2019-08-01)
185
+
186
+ **Note:** Version bump only for package @verdaccio/types
187
+
188
+ # [8.0.0-next.0](https://github.com/verdaccio/monorepo/compare/v2.0.0...v8.0.0-next.0) (2019-08-01)
189
+
190
+ ### Bug Fixes
191
+
192
+ - add \_autogenerated to UpLinkConf ([436bd91](https://github.com/verdaccio/monorepo/commit/436bd91))
193
+ - add config prop to IBasicAuth ([2481d6f](https://github.com/verdaccio/monorepo/commit/2481d6f))
194
+ - add missing adduser method ([22cdb4e](https://github.com/verdaccio/monorepo/commit/22cdb4e))
195
+ - add missing properties ([973c5e4](https://github.com/verdaccio/monorepo/commit/973c5e4))
196
+ - allow extend config ([0aea94f](https://github.com/verdaccio/monorepo/commit/0aea94f))
197
+ - allow sub types on allow auth methods ([7325f74](https://github.com/verdaccio/monorepo/commit/7325f74))
198
+ - deprecated methods are optional ([b77155a](https://github.com/verdaccio/monorepo/commit/b77155a))
199
+ - entry point [#14](https://github.com/verdaccio/monorepo/issues/14) ([7575e75](https://github.com/verdaccio/monorepo/commit/7575e75))
200
+ - export Author type ([bf7115b](https://github.com/verdaccio/monorepo/commit/bf7115b))
201
+ - fix/token i local package manager ([#61](https://github.com/verdaccio/monorepo/issues/61)) ([a7e0fc8](https://github.com/verdaccio/monorepo/commit/a7e0fc8))
202
+ - fixes for storage plugin types per code review ([#59](https://github.com/verdaccio/monorepo/issues/59)) ([04fccb8](https://github.com/verdaccio/monorepo/commit/04fccb8))
203
+ - getPackageStorage allowed to return undefined ([8a859d0](https://github.com/verdaccio/monorepo/commit/8a859d0))
204
+ - improvements config interface ([1dac321](https://github.com/verdaccio/monorepo/commit/1dac321))
205
+ - methods return Stream ([22e0672](https://github.com/verdaccio/monorepo/commit/22e0672))
206
+ - remove options from get package metadata ([2bfc048](https://github.com/verdaccio/monorepo/commit/2bfc048))
207
+ - remove wrong definition ([acba624](https://github.com/verdaccio/monorepo/commit/acba624))
208
+ - remove wrong imports ([c82f51c](https://github.com/verdaccio/monorepo/commit/c82f51c))
209
+ - restore missing type on RemoteUser ([b596896](https://github.com/verdaccio/monorepo/commit/b596896))
210
+ - storage types ([1285675](https://github.com/verdaccio/monorepo/commit/1285675))
211
+ - tokens are accesible also in local-storage ([08b342d](https://github.com/verdaccio/monorepo/commit/08b342d))
212
+ - update https ([c93c3fc](https://github.com/verdaccio/monorepo/commit/c93c3fc))
213
+ - update readTarball with right parameters ([8cbc7d1](https://github.com/verdaccio/monorepo/commit/8cbc7d1))
214
+ - update streams type ([7fa7be5](https://github.com/verdaccio/monorepo/commit/7fa7be5))
215
+ - update types for local data ([6706770](https://github.com/verdaccio/monorepo/commit/6706770))
216
+ - update utils types ([7c37133](https://github.com/verdaccio/monorepo/commit/7c37133))
217
+ - wrong signature for auth plugin ([e3e2508](https://github.com/verdaccio/monorepo/commit/e3e2508))
218
+
219
+ ### Features
220
+
221
+ - add AuthPluginPackage type ([f0e1cea](https://github.com/verdaccio/monorepo/commit/f0e1cea))
222
+ - add callback to database methods ([d0d55e9](https://github.com/verdaccio/monorepo/commit/d0d55e9))
223
+ - add config file types ([188a3e5](https://github.com/verdaccio/monorepo/commit/188a3e5))
224
+ - add gravatar prop for web config ([b3ac873](https://github.com/verdaccio/monorepo/commit/b3ac873))
225
+ - add interface for middleware and storage plugin ([2b18e22](https://github.com/verdaccio/monorepo/commit/2b18e22))
226
+ - add IStorageManager for middleware plugin ([0ac1cc4](https://github.com/verdaccio/monorepo/commit/0ac1cc4))
227
+ - Add locking library on typings ([7f7ab67](https://github.com/verdaccio/monorepo/commit/7f7ab67))
228
+ - add RemoteUser type ([7d11892](https://github.com/verdaccio/monorepo/commit/7d11892))
229
+ - add search method BREAKING CHANGE: search method must be implemented to allow search functionality ([b6d94e6](https://github.com/verdaccio/monorepo/commit/b6d94e6))
230
+ - add secret gateway methods ([5300147](https://github.com/verdaccio/monorepo/commit/5300147))
231
+ - add Security configuration ([0cdc0dd](https://github.com/verdaccio/monorepo/commit/0cdc0dd))
232
+ - add types for auth plugin ([6378186](https://github.com/verdaccio/monorepo/commit/6378186))
233
+ - add types for PackageUsers ([ad5f917](https://github.com/verdaccio/monorepo/commit/ad5f917))
234
+ - add types for search class ([e23782d](https://github.com/verdaccio/monorepo/commit/e23782d))
235
+ - callback does not return ([fd78bfc](https://github.com/verdaccio/monorepo/commit/fd78bfc))
236
+ - merge changes from 5.x ([5f61009](https://github.com/verdaccio/monorepo/commit/5f61009))
237
+ - package access props are not optional ([61708e2](https://github.com/verdaccio/monorepo/commit/61708e2))
238
+ - remove flow [#70](https://github.com/verdaccio/monorepo/issues/70) ([2218b74](https://github.com/verdaccio/monorepo/commit/2218b74))
239
+ - remove sync method ([f60f81c](https://github.com/verdaccio/monorepo/commit/f60f81c))
240
+ - secret methods are async ([d5eacf5](https://github.com/verdaccio/monorepo/commit/d5eacf5))
241
+ - support for an IPluginStorageFilter ([#58](https://github.com/verdaccio/monorepo/issues/58)) ([eab219e](https://github.com/verdaccio/monorepo/commit/eab219e))
242
+ - token types ([#60](https://github.com/verdaccio/monorepo/issues/60)) @Eomm ([6e74da6](https://github.com/verdaccio/monorepo/commit/6e74da6))
243
+ - **auth:** add method to update password ([e257c3a](https://github.com/verdaccio/monorepo/commit/e257c3a))
244
+ - **storage:** path is not mandatory ([2c42931](https://github.com/verdaccio/monorepo/commit/2c42931))
245
+
246
+ ### BREAKING CHANGES
247
+
248
+ - remove flow definitions
249
+ - storage needs to add new methods
250
+
251
+ - add: token types
252
+
253
+ - add: typescripts types
254
+ - **auth:** it will affect all auth plugins
255
+
256
+ # Changelog
257
+
258
+ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
259
+
260
+ ## [7.0.0](https://github.com/verdaccio/flow-types/compare/v6.2.0...v7.0.0) (2019-07-25)
261
+
262
+ ### Bug Fixes
263
+
264
+ - add \_autogenerated to UpLinkConf ([971e52e](https://github.com/verdaccio/flow-types/commit/971e52e))
265
+ - **IPluginAuth:** adduser, changePassword optional ([40d4e7a](https://github.com/verdaccio/flow-types/commit/40d4e7a)), closes [/github.com/verdaccio/verdaccio/blob/66f4197236d9d71af149314aae15102b336f45e1/src/lib/auth.ts#L67-L71](https://github.com/verdaccio/flow-types/issues/L67-L71) [/github.com/verdaccio/verdaccio/blob/66f4197236d9d71af149314aae15102b336f45e1/src/lib/auth.ts#L138-L166](https://github.com/verdaccio/flow-types/issues/L138-L166)
266
+ - **IPluginAuth:** remove `login_url` ([1663c07](https://github.com/verdaccio/flow-types/commit/1663c07)), closes [#69](https://github.com/verdaccio/flow-types/issues/69)
267
+
268
+ ### Features
269
+
270
+ - merge changes from 5.x ([7d2d526](https://github.com/verdaccio/flow-types/commit/7d2d526))
271
+ - remove flow [#70](https://github.com/verdaccio/flow-types/issues/70) ([826d5fe](https://github.com/verdaccio/flow-types/commit/826d5fe))
272
+
273
+ ### BREAKING CHANGES
274
+
275
+ - remove flow definitions
276
+
277
+ <a name="6.2.0"></a>
278
+
279
+ # [6.2.0](https://github.com/verdaccio/flow-types/compare/v6.1.0...v6.2.0) (2019-05-28)
280
+
281
+ ### Features
282
+
283
+ - add types for Version ([900861d](https://github.com/verdaccio/flow-types/commit/900861d))
284
+
285
+ <a name="6.1.0"></a>
286
+
287
+ # [6.1.0](https://github.com/verdaccio/flow-types/compare/v6.0.2...v6.1.0) (2019-05-14)
288
+
289
+ ### Bug Fixes
290
+
291
+ - revert token signature ([59a03e7](https://github.com/verdaccio/flow-types/commit/59a03e7))
292
+
293
+ ### Features
294
+
295
+ - moved token api signature ([e51991c](https://github.com/verdaccio/flow-types/commit/e51991c))
296
+
297
+ <a name="6.0.2"></a>
298
+
299
+ ## [6.0.2](https://github.com/verdaccio/flow-types/compare/v6.0.1...v6.0.2) (2019-05-06)
300
+
301
+ ### Bug Fixes
302
+
303
+ - fix/token i local package manager ([#61](https://github.com/verdaccio/flow-types/issues/61)) ([14adfb2](https://github.com/verdaccio/flow-types/commit/14adfb2))
304
+
305
+ <a name="6.0.1"></a>
306
+
307
+ ## [6.0.1](https://github.com/verdaccio/flow-types/compare/v6.0.0...v6.0.1) (2019-05-04)
308
+
309
+ ### Bug Fixes
310
+
311
+ - tokens are accesible also in local-storage ([56551cf](https://github.com/verdaccio/flow-types/commit/56551cf))
312
+
313
+ <a name="6.0.0"></a>
314
+
315
+ # [6.0.0](https://github.com/verdaccio/flow-types/compare/v5.0.2...v6.0.0) (2019-04-30)
316
+
317
+ ### Bug Fixes
318
+
319
+ - remove wrong imports ([a75476a](https://github.com/verdaccio/flow-types/commit/a75476a))
320
+
321
+ ### Features
322
+
323
+ - token types ([#60](https://github.com/verdaccio/flow-types/issues/60)) @Eomm ([7b74982](https://github.com/verdaccio/flow-types/commit/7b74982))
324
+
325
+ ### BREAKING CHANGES
326
+
327
+ - storage needs to add new methods
328
+
329
+ - add: token types
330
+
331
+ - add: typescripts types
332
+
333
+ <a name="5.0.2"></a>
334
+
335
+ ## [5.0.2](https://github.com/verdaccio/flow-types/compare/v5.0.1...v5.0.2) (2019-04-22)
336
+
337
+ ### Bug Fixes
338
+
339
+ - fixes for storage plugin types per code review ([#59](https://github.com/verdaccio/flow-types/issues/59)) ([c2ea90b](https://github.com/verdaccio/flow-types/commit/c2ea90b))
340
+
341
+ <a name="5.0.1"></a>
342
+
343
+ ## [5.0.1](https://github.com/verdaccio/flow-types/compare/v5.0.0...v5.0.1) (2019-04-18)
344
+
345
+ <a name="5.0.0"></a>
346
+
347
+ # [5.0.0](https://github.com/verdaccio/flow-types/compare/v5.0.0-beta.4...v5.0.0) (2019-04-18)
348
+
349
+ ### Features
350
+
351
+ - support for an IPluginStorageFilter ([#58](https://github.com/verdaccio/flow-types/issues/58)) ([e67559f](https://github.com/verdaccio/flow-types/commit/e67559f))
352
+
353
+ <a name="5.0.0-beta.4"></a>
354
+
355
+ # [5.0.0-beta.4](https://github.com/verdaccio/flow-types/compare/v5.0.0-beta.3...v5.0.0-beta.4) (2019-03-29)
356
+
357
+ ### Features
358
+
359
+ - **storage:** path is not mandatory ([784f1bb](https://github.com/verdaccio/flow-types/commit/784f1bb))
360
+
361
+ <a name="5.0.0-beta.3"></a>
362
+
363
+ # [5.0.0-beta.3](https://github.com/verdaccio/flow-types/compare/v5.0.0-beta.2...v5.0.0-beta.3) (2019-03-09)
364
+
365
+ ### Features
366
+
367
+ - add types for PackageUsers ([9bb3c26](https://github.com/verdaccio/flow-types/commit/9bb3c26))
368
+
369
+ <a name="5.0.0-beta.2"></a>
370
+
371
+ # [5.0.0-beta.2](https://github.com/verdaccio/flow-types/compare/v5.0.0-beta.1...v5.0.0-beta.2) (2019-02-03)
372
+
373
+ ### Features
374
+
375
+ - allow_access and allow_publish are optional for auth plugin ([0d5a53c](https://github.com/verdaccio/flow-types/commit/0d5a53c))
376
+
377
+ <a name="5.0.0-beta.1"></a>
378
+
379
+ # [5.0.0-beta.1](https://github.com/verdaccio/flow-types/compare/v5.0.0-beta.0...v5.0.0-beta.1) (2019-02-01)
380
+
381
+ <a name="5.0.0-beta.0"></a>
382
+
383
+ # [5.0.0-beta.0](https://github.com/verdaccio/flow-types/compare/v4.3.0...v5.0.0-beta.0) (2019-01-27)
384
+
385
+ <a name="4.3.0"></a>
386
+
387
+ # [4.3.0](https://github.com/verdaccio/flow-types/compare/v4.2.0...v4.3.0) (2019-01-12)
388
+
389
+ ### Features
390
+
391
+ - add gravatar prop for web config ([99ceae9](https://github.com/verdaccio/flow-types/commit/99ceae9))
392
+
393
+ <a name="4.2.0"></a>
394
+
395
+ # [4.2.0](https://github.com/verdaccio/flow-types/compare/v4.1.2...v4.2.0) (2019-01-12)
396
+
397
+ ### Features
398
+
399
+ - add AuthPluginPackage type ([0e46b04](https://github.com/verdaccio/flow-types/commit/0e46b04))
400
+
401
+ <a name="4.1.2"></a>
402
+
403
+ ## [4.1.2](https://github.com/verdaccio/flow-types/compare/v4.1.1...v4.1.2) (2018-11-11)
404
+
405
+ ### Bug Fixes
406
+
407
+ - remove wrong definition ([9bc53fc](https://github.com/verdaccio/flow-types/commit/9bc53fc))
408
+
409
+ <a name="4.1.1"></a>
410
+
411
+ ## [4.1.1](https://github.com/verdaccio/flow-types/compare/v4.1.0...v4.1.1) (2018-10-06)
412
+
413
+ ### Bug Fixes
414
+
415
+ - deprecated methods are optional ([4c96e89](https://github.com/verdaccio/flow-types/commit/4c96e89))
416
+
417
+ <a name="4.1.0"></a>
418
+
419
+ # [4.1.0](https://github.com/verdaccio/flow-types/compare/v4.0.0...v4.1.0) (2018-10-06)
420
+
421
+ ### Features
422
+
423
+ - package access props are not optional ([afabaf1](https://github.com/verdaccio/flow-types/commit/afabaf1))
424
+
425
+ <a name="4.0.0"></a>
426
+
427
+ # [4.0.0](https://github.com/verdaccio/flow-types/compare/v3.7.2...v4.0.0) (2018-09-30)
428
+
429
+ ### Features
430
+
431
+ - **auth:** add method to update password ([21fc43f](https://github.com/verdaccio/flow-types/commit/21fc43f))
432
+
433
+ ### BREAKING CHANGES
434
+
435
+ - **auth:** it will affect all auth plugins
436
+
437
+ <a name="3.7.2"></a>
438
+
439
+ ## [3.7.2](https://github.com/verdaccio/flow-types/compare/v3.7.1...v3.7.2) (2018-09-27)
440
+
441
+ ### Bug Fixes
442
+
443
+ - entry point [#14](https://github.com/verdaccio/flow-types/issues/14) ([f7b8982](https://github.com/verdaccio/flow-types/commit/f7b8982))
444
+ - export Author type ([7869dde](https://github.com/verdaccio/flow-types/commit/7869dde))
445
+
446
+ <a name="3.7.1"></a>
447
+
448
+ ## [3.7.1](https://github.com/verdaccio/flow-types/compare/v3.7.0...v3.7.1) (2018-08-11)
449
+
450
+ ### Bug Fixes
451
+
452
+ - restore missing type on RemoteUser ([88d809e](https://github.com/verdaccio/flow-types/commit/88d809e))
453
+
454
+ <a name="3.7.0"></a>
455
+
456
+ # [3.7.0](https://github.com/verdaccio/flow-types/compare/v3.6.0...v3.7.0) (2018-08-05)
457
+
458
+ ### Features
459
+
460
+ - add Security configuration ([0d9aece](https://github.com/verdaccio/flow-types/commit/0d9aece))
461
+
462
+ <a name="3.6.0"></a>
463
+
464
+ # [3.6.0](https://github.com/verdaccio/flow-types/compare/v3.5.1...v3.6.0) (2018-07-30)
465
+
466
+ ### Features
467
+
468
+ - changes max_users type to number ([1fa6e73](https://github.com/verdaccio/flow-types/commit/1fa6e73))
469
+
470
+ <a name="3.5.1"></a>
471
+
472
+ ## [3.5.1](https://github.com/verdaccio/flow-types/compare/v3.5.0...v3.5.1) (2018-07-21)
473
+
474
+ ### Bug Fixes
475
+
476
+ - login_url should be an optional property ([0fcfb9c](https://github.com/verdaccio/flow-types/commit/0fcfb9c))
477
+
478
+ <a name="3.5.0"></a>
479
+
480
+ # [3.5.0](https://github.com/verdaccio/flow-types/compare/v3.4.3...v3.5.0) (2018-07-21)
481
+
482
+ ### Features
483
+
484
+ - add `login_url` to verdaccio\$IPluginAuth ([6e03209](https://github.com/verdaccio/flow-types/commit/6e03209)), closes [verdaccio/verdaccio#834](https://github.com/verdaccio/verdaccio/issues/834)
485
+
486
+ <a name="3.4.3"></a>
487
+
488
+ ## [3.4.3](https://github.com/verdaccio/flow-types/compare/v3.4.2...v3.4.3) (2018-07-19)
489
+
490
+ ### Bug Fixes
491
+
492
+ - allow extend config ([06e810f](https://github.com/verdaccio/flow-types/commit/06e810f))
493
+
494
+ <a name="3.4.2"></a>
495
+
496
+ ## [3.4.2](https://github.com/verdaccio/flow-types/compare/v3.4.1...v3.4.2) (2018-07-17)
497
+
498
+ <a name="3.4.1"></a>
499
+
500
+ ## [3.4.1](https://github.com/verdaccio/flow-types/compare/v3.4.0...v3.4.1) (2018-07-16)
501
+
502
+ ### Bug Fixes
503
+
504
+ - allow sub types on allow auth methods ([fa8125b](https://github.com/verdaccio/flow-types/commit/fa8125b))
505
+
506
+ <a name="3.4.0"></a>
507
+
508
+ # [3.4.0](https://github.com/verdaccio/flow-types/compare/v3.3.3...v3.4.0) (2018-07-16)
509
+
510
+ ### Features
511
+
512
+ - add RemoteUser type ([aa83839](https://github.com/verdaccio/flow-types/commit/aa83839))
513
+
514
+ <a name="3.3.3"></a>
515
+
516
+ ## [3.3.3](https://github.com/verdaccio/flow-types/compare/v3.3.2...v3.3.3) (2018-07-16)
517
+
518
+ ### Bug Fixes
519
+
520
+ - wrong signature for auth plugin ([11a0ce6](https://github.com/verdaccio/flow-types/commit/11a0ce6))
521
+
522
+ <a name="3.3.2"></a>
523
+
524
+ ## [3.3.2](https://github.com/verdaccio/flow-types/compare/v3.3.1...v3.3.2) (2018-07-16)
525
+
526
+ ### Bug Fixes
527
+
528
+ - add missing adduser method ([0b54fe7](https://github.com/verdaccio/flow-types/commit/0b54fe7))
529
+
530
+ <a name="3.3.1"></a>
531
+
532
+ ## [3.3.1](https://github.com/verdaccio/flow-types/compare/v3.3.0...v3.3.1) (2018-07-15)
533
+
534
+ ### Bug Fixes
535
+
536
+ - add config prop to IBasicAuth ([0714316](https://github.com/verdaccio/flow-types/commit/0714316))
537
+
538
+ <a name="3.3.0"></a>
539
+
540
+ # [3.3.0](https://github.com/verdaccio/flow-types/compare/v3.2.0...v3.3.0) (2018-07-15)
541
+
542
+ ### Features
543
+
544
+ - add IStorageManager for middleware plugin ([d473b4c](https://github.com/verdaccio/flow-types/commit/d473b4c))
545
+
546
+ <a name="3.2.0"></a>
547
+
548
+ # [3.2.0](https://github.com/verdaccio/flow-types/compare/v3.1.0...v3.2.0) (2018-07-15)
549
+
550
+ ### Features
551
+
552
+ - add interface for middleware and storage plugin ([0028085](https://github.com/verdaccio/flow-types/commit/0028085))
553
+
554
+ <a name="3.1.0"></a>
555
+
556
+ # [3.1.0](https://github.com/verdaccio/flow-types/compare/v3.0.1...v3.1.0) (2018-07-14)
557
+
558
+ ### Features
559
+
560
+ - add types for auth plugin ([a9b7bc9](https://github.com/verdaccio/flow-types/commit/a9b7bc9))
561
+
562
+ <a name="3.0.1"></a>
563
+
564
+ ## [3.0.1](https://github.com/verdaccio/flow-types/compare/v3.0.0...v3.0.1) (2018-07-02)
565
+
566
+ ### Bug Fixes
567
+
568
+ - improvements config interface ([8ea6276](https://github.com/verdaccio/flow-types/commit/8ea6276))
569
+
570
+ <a name="3.0.0"></a>
571
+
572
+ # [3.0.0](https://github.com/verdaccio/flow-types/compare/v2.2.2...v3.0.0) (2018-06-08)
573
+
574
+ ### Features
575
+
576
+ - add search method ([2cf3ce9](https://github.com/verdaccio/flow-types/commit/2cf3ce9))
577
+
578
+ ### BREAKING CHANGES
579
+
580
+ - search method must be implemented to allow search functionality
@@ -0,0 +1,20 @@
1
+ /// <reference types="node" />
2
+ export declare type Callback = Function;
3
+ export declare type CallbackAction = (err: any | null) => void;
4
+ export declare 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 declare 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
+ }
@@ -0,0 +1,157 @@
1
+ import { PackageAccess, PackageList } from './manifest';
2
+ export declare 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 declare type LoggerType = 'stdout' | 'stderr' | 'file';
13
+ export declare type LoggerFormat = 'pretty' | 'pretty-timestamped' | 'file';
14
+ export declare type LoggerLevel = 'http' | 'fatal' | 'warn' | 'info' | 'debug' | 'trace';
15
+ export interface ConfigWithHttps extends Config {
16
+ https: HttpsConf;
17
+ }
18
+ export interface LoggerConfItem {
19
+ type: LoggerType;
20
+ format: LoggerFormat;
21
+ level: LoggerLevel;
22
+ }
23
+ export interface Headers {
24
+ [key: string]: string;
25
+ }
26
+ export interface UpLinkTokenConf {
27
+ type: TypeToken;
28
+ token?: string;
29
+ token_env?: boolean | string;
30
+ }
31
+ export interface UpLinkConf {
32
+ url: string;
33
+ ca?: string;
34
+ cache?: boolean;
35
+ timeout?: string | void;
36
+ maxage?: string | void;
37
+ max_fails?: number | void;
38
+ fail_timeout?: string | void;
39
+ headers?: Headers;
40
+ auth?: UpLinkTokenConf;
41
+ strict_ssl?: boolean | void;
42
+ _autogenerated?: boolean;
43
+ }
44
+ export declare type RateLimit = {
45
+ windowMs?: number;
46
+ max?: number;
47
+ };
48
+ export interface WebConf {
49
+ enable?: boolean;
50
+ title?: string;
51
+ logo?: string;
52
+ favicon?: string;
53
+ gravatar?: boolean;
54
+ sort_packages?: string;
55
+ rateLimit?: RateLimit;
56
+ }
57
+ export interface UpLinksConfList {
58
+ [key: string]: UpLinkConf;
59
+ }
60
+ export interface AuthHtpasswd {
61
+ file: string;
62
+ max_users: number;
63
+ }
64
+ export declare type AuthConf = any | AuthHtpasswd;
65
+ export interface JWTOptions {
66
+ sign: JWTSignOptions;
67
+ verify: JWTVerifyOptions;
68
+ }
69
+ export interface JWTSignOptions {
70
+ algorithm?: string;
71
+ expiresIn?: string;
72
+ notBefore?: string;
73
+ ignoreExpiration?: boolean;
74
+ maxAge?: string | number;
75
+ clockTimestamp?: number;
76
+ }
77
+ export interface JWTVerifyOptions {
78
+ algorithm?: string;
79
+ expiresIn?: string;
80
+ notBefore?: string | number;
81
+ ignoreExpiration?: boolean;
82
+ maxAge?: string | number;
83
+ clockTimestamp?: number;
84
+ }
85
+ export interface APITokenOptions {
86
+ legacy: boolean;
87
+ jwt?: JWTOptions;
88
+ }
89
+ export interface Security {
90
+ web: JWTOptions;
91
+ api: APITokenOptions;
92
+ }
93
+ export interface PublishOptions {
94
+ allow_offline: boolean;
95
+ }
96
+ export interface ListenAddress {
97
+ [key: string]: string;
98
+ }
99
+ export interface HttpsConfKeyCert {
100
+ key: string;
101
+ cert: string;
102
+ ca?: string;
103
+ }
104
+ export interface HttpsConfPfx {
105
+ pfx: string;
106
+ passphrase?: string;
107
+ }
108
+ export declare type HttpsConf = HttpsConfKeyCert | HttpsConfPfx;
109
+ export interface Notifications {
110
+ method: string;
111
+ packagePattern: RegExp;
112
+ packagePatternFlags: string;
113
+ endpoint: string;
114
+ content: string;
115
+ headers: Headers;
116
+ }
117
+ export declare type ServerSettingsConf = {
118
+ trustProxy?: string;
119
+ rateLimit: RateLimit;
120
+ keepAliveTimeout?: number;
121
+ };
122
+ export interface ConfigYaml {
123
+ _debug?: boolean;
124
+ storage?: string | void;
125
+ packages: PackageList;
126
+ uplinks: UpLinksConfList;
127
+ logs?: LoggerConfItem;
128
+ web?: WebConf;
129
+ auth?: AuthConf;
130
+ security: Security;
131
+ publish?: PublishOptions;
132
+ store?: any;
133
+ listen?: ListenAddress;
134
+ https?: HttpsConf;
135
+ http_proxy?: string;
136
+ plugins?: string | void;
137
+ https_proxy?: string;
138
+ no_proxy?: string;
139
+ max_body_size?: string;
140
+ notifications?: Notifications;
141
+ notify?: Notifications | Notifications[];
142
+ middlewares?: any;
143
+ filters?: any;
144
+ url_prefix?: string;
145
+ server?: ServerSettingsConf;
146
+ }
147
+ export interface ConfigRuntime extends ConfigYaml {
148
+ self_path: string;
149
+ }
150
+ export interface Config extends ConfigYaml, ConfigRuntime {
151
+ user_agent?: string | boolean;
152
+ server_id: string;
153
+ secret: string;
154
+ checkSecretKey(token: string): string;
155
+ getMatchedPackagesSpec(storage: string): PackageAccess | void;
156
+ [key: string]: any;
157
+ }
@@ -0,0 +1,138 @@
1
+ export interface PackageAccess {
2
+ storage?: string;
3
+ publish?: string[];
4
+ proxy?: string[];
5
+ access?: string[];
6
+ }
7
+ export interface PackageList {
8
+ [key: string]: PackageAccess;
9
+ }
10
+ export interface MergeTags {
11
+ [key: string]: string;
12
+ }
13
+ export interface DistFile {
14
+ url: string;
15
+ sha: string;
16
+ registry?: string;
17
+ }
18
+ export interface DistFiles {
19
+ [key: string]: DistFile;
20
+ }
21
+ export interface Token {
22
+ user: string;
23
+ token: string;
24
+ key: string;
25
+ cidr?: string[];
26
+ readonly: boolean;
27
+ created: number | string;
28
+ updated?: number | string;
29
+ }
30
+ export interface AttachMents {
31
+ [key: string]: AttachMentsItem;
32
+ }
33
+ export interface AttachMentsItem {
34
+ content_type?: string;
35
+ data?: string;
36
+ length?: number;
37
+ shasum?: string;
38
+ version?: string;
39
+ }
40
+ export interface GenericBody {
41
+ [key: string]: string;
42
+ }
43
+ export interface UpLinkMetadata {
44
+ etag: string;
45
+ fetched: number;
46
+ }
47
+ export interface UpLinks {
48
+ [key: string]: UpLinkMetadata;
49
+ }
50
+ export interface Dist {
51
+ integrity?: string;
52
+ shasum: string;
53
+ tarball: string;
54
+ }
55
+ export interface Author {
56
+ name: string;
57
+ email?: string;
58
+ url?: string;
59
+ }
60
+ export interface PackageUsers {
61
+ [key: string]: boolean;
62
+ }
63
+ export interface Version {
64
+ name: string;
65
+ version: string;
66
+ directories?: any;
67
+ dist: Dist;
68
+ author: string | Author;
69
+ main: string;
70
+ homemage?: string;
71
+ license?: string;
72
+ readme: string;
73
+ readmeFileName?: string;
74
+ readmeFilename?: string;
75
+ description: string;
76
+ bin?: string;
77
+ bugs?: any;
78
+ files?: string[];
79
+ gitHead?: string;
80
+ maintainers?: Author[];
81
+ contributors?: Author[];
82
+ repository?: string | any;
83
+ scripts?: any;
84
+ homepage?: string;
85
+ etag?: string;
86
+ dependencies?: Dependencies;
87
+ peerDependencies?: Dependencies;
88
+ devDependencies?: Dependencies;
89
+ optionalDependencies?: Dependencies;
90
+ bundleDependencies?: Dependencies;
91
+ keywords?: string | string[];
92
+ nodeVersion?: string;
93
+ _id: string;
94
+ _npmVersion?: string;
95
+ _npmUser: Author;
96
+ _hasShrinkwrap?: boolean;
97
+ deprecated?: string;
98
+ funding?: {
99
+ type: string;
100
+ url: string;
101
+ };
102
+ engines?: Engines;
103
+ hasInstallScript?: boolean;
104
+ }
105
+ export interface Dependencies {
106
+ [key: string]: string;
107
+ }
108
+ export interface Engines {
109
+ [key: string]: string;
110
+ }
111
+ export interface Versions {
112
+ [key: string]: Version;
113
+ }
114
+ export declare type AbbreviatedVersion = Pick<Version, 'name' | 'version' | 'description' | 'dependencies' | 'devDependencies' | 'bin' | 'dist' | 'engines' | 'funding' | 'peerDependencies'>;
115
+ export interface AbbreviatedVersions {
116
+ [key: string]: AbbreviatedVersion;
117
+ }
118
+ /**
119
+ *
120
+ */
121
+ export declare type AbbreviatedManifest = Pick<Manifest, 'name' | 'dist-tags' | 'time'> & {
122
+ modified: string;
123
+ versions: AbbreviatedVersions;
124
+ };
125
+ export declare type Package = Manifest;
126
+ export interface Manifest {
127
+ _id?: string;
128
+ name: string;
129
+ versions: Versions;
130
+ 'dist-tags': GenericBody;
131
+ time?: GenericBody;
132
+ readme?: string;
133
+ users?: PackageUsers;
134
+ _distfiles: DistFiles;
135
+ _attachments: AttachMents;
136
+ _uplinks: UpLinks;
137
+ _rev: string;
138
+ }
@@ -0,0 +1,22 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import { Callback, HttpError, RemoteUser } from '../commons';
4
+ import { Config } from '../configuration';
5
+ export interface AuthPluginPackage {
6
+ packageName: string;
7
+ packageVersion?: string;
8
+ tag?: string;
9
+ }
10
+ export declare type AuthError = HttpError & {
11
+ code: number;
12
+ };
13
+ export declare type AuthAccessCallback = (error: AuthError | null, access: boolean) => void;
14
+ export declare type AuthCallback = (error: AuthError | null, groups: string[] | false) => void;
15
+ export interface IBasicAuth<T> {
16
+ config: T & Config;
17
+ aesEncrypt(buf: Buffer): Buffer;
18
+ authenticate(user: string, password: string, cb: Callback): void;
19
+ changePassword(user: string, password: string, newPassword: string, cb: Callback): void;
20
+ allow_access(pkg: AuthPluginPackage, user: RemoteUser, callback: Callback): void;
21
+ add_user(user: string, password: string, cb: Callback): any;
22
+ }
@@ -0,0 +1,11 @@
1
+ import { Config, Logger } from '../configuration';
2
+ export declare class Plugin<T> {
3
+ constructor(config: T, options: PluginOptions<T>);
4
+ }
5
+ export interface IPlugin<T> {
6
+ version?: string;
7
+ }
8
+ export interface PluginOptions<T> {
9
+ config: T & Config;
10
+ logger: Logger;
11
+ }
@@ -0,0 +1,5 @@
1
+ import { Package } from '../manifest';
2
+ import { IPlugin } from './commons';
3
+ export interface IPluginStorageFilter<T> extends IPlugin<T> {
4
+ filter_metadata(packageInfo: Package): Promise<Package>;
5
+ }
@@ -0,0 +1,34 @@
1
+ import { RemoteUser } from '../commons';
2
+ import { PackageAccess } from '../manifest';
3
+ import { AuthAccessCallback, AuthCallback } from './auth';
4
+ import { IPlugin } from './commons';
5
+ export interface AllowAccess {
6
+ name: string;
7
+ version?: string;
8
+ tag?: string;
9
+ }
10
+ /**
11
+ * ```typescript
12
+ * dasdsadsa()
13
+ * ```
14
+ */
15
+ export interface IPluginAuth<T> extends IPlugin<T> {
16
+ /**
17
+ * @param props user from Application component
18
+ */
19
+ authenticate(user: string, password: string, cb: AuthCallback): void;
20
+ adduser?(user: string, password: string, cb: AuthCallback): void;
21
+ changePassword?(user: string, password: string, newPassword: string, cb: AuthCallback): void;
22
+ allow_publish?(user: RemoteUser, pkg: T & PackageAccess, cb: AuthAccessCallback): void;
23
+ allow_access?(user: RemoteUser, pkg: T & PackageAccess, cb: AuthAccessCallback): void;
24
+ allow_unpublish?(user: RemoteUser, pkg: T & PackageAccess, cb: AuthAccessCallback): void;
25
+ allow_publish?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: AuthAccessCallback): void;
26
+ allow_access?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: AuthAccessCallback): void;
27
+ allow_unpublish?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: AuthAccessCallback): void;
28
+ apiJWTmiddleware?(helpers: any): Function;
29
+ }
30
+ export * from './auth';
31
+ export * from './storage';
32
+ export * from './middleware';
33
+ export * from './commons';
34
+ export * from './filter';
@@ -0,0 +1,6 @@
1
+ import { IBasicAuth } from './auth';
2
+ import { IPlugin } from './commons';
3
+ import { IStorageManager } from './storage';
4
+ export interface IPluginMiddleware<T> extends IPlugin<T> {
5
+ register_middlewares(app: any, auth: IBasicAuth<T>, storage: IStorageManager<T>): void;
6
+ }
@@ -0,0 +1,105 @@
1
+ /// <reference types="node" />
2
+ import { PassThrough } from 'stream';
3
+ import { Callback, CallbackAction, StringValue } from '../commons';
4
+ import { Config, Logger } from '../configuration';
5
+ import { MergeTags, Package, Token, Version } from '../manifest';
6
+ import { IPlugin } from './commons';
7
+ export declare class IUploadTarball extends PassThrough {
8
+ abort(): void;
9
+ done(): void;
10
+ }
11
+ export declare class IReadTarball extends PassThrough {
12
+ abort(): void;
13
+ }
14
+ export declare type StorageList = string[];
15
+ export interface LocalStorage {
16
+ list: any;
17
+ secret: string;
18
+ }
19
+ export interface ILocalStorage {
20
+ add(name: string): void;
21
+ remove(name: string): void;
22
+ get(): StorageList;
23
+ sync(): void;
24
+ }
25
+ interface TarballActions {
26
+ addTarball(name: string, filename: string): IUploadTarball;
27
+ getTarball(name: string, filename: string): IReadTarball;
28
+ removeTarball(name: string, filename: string, revision: string, callback: Callback): void;
29
+ }
30
+ interface StoragePackageActions extends TarballActions {
31
+ addVersion(name: string, version: string, metadata: Version, tag: StringValue, callback: Callback): void;
32
+ mergeTags(name: string, tags: MergeTags, callback: Callback): void;
33
+ removePackage(name: string, callback: Callback): void;
34
+ changePackage(name: string, metadata: Package, revision: string, callback: Callback): void;
35
+ }
36
+ export interface IStorageManager<T> extends StoragePackageActions {
37
+ config: T & Config;
38
+ logger: Logger;
39
+ init(config: T & Config, filters: any): Promise<any>;
40
+ addPackage(name: string, metadata: any, callback: Callback): Promise<any>;
41
+ getPackage(options: any): void;
42
+ search(startkey: string, options: any): IReadTarball;
43
+ getLocalDatabase(callback: Callback): void;
44
+ }
45
+ export interface IBasicStorage<T> extends StoragePackageActions {
46
+ addPackage(name: string, info: Package, callback: Callback): void;
47
+ updateVersions(name: string, packageInfo: Package, callback: Callback): void;
48
+ getPackageMetadata(name: string, callback: Callback): void;
49
+ search(startKey: string, options: any): IReadTarball;
50
+ getSecret(config: T & Config): Promise<any>;
51
+ }
52
+ export interface TokenFilter {
53
+ user: string;
54
+ }
55
+ export interface ITokenActions {
56
+ saveToken(token: Token): Promise<any>;
57
+ deleteToken(user: string, tokenKey: string): Promise<any>;
58
+ readTokens(filter: TokenFilter): Promise<Token[]>;
59
+ }
60
+ /**
61
+ * This method expect return a Package object
62
+ * eg:
63
+ * {
64
+ * name: string;
65
+ * time: number;
66
+ * ... and other props
67
+ * }
68
+ *
69
+ * The `cb` callback object will be executed if:
70
+ * - it might return object (truly)
71
+ * - it might reutrn null
72
+ */
73
+ export declare type onSearchPackage = (item: Package, cb: CallbackAction) => void;
74
+ export declare type onEndSearchPackage = (error?: any) => void;
75
+ export declare type onValidatePackage = (name: string) => boolean;
76
+ export declare type StorageUpdateCallback = (data: Package, cb: CallbackAction) => void;
77
+ export declare type StorageWriteCallback = (name: string, json: Package, callback: Callback) => void;
78
+ export declare type PackageTransformer = (pkg: Package) => Package;
79
+ export declare type ReadPackageCallback = (err: any | null, data?: Package) => void;
80
+ export interface ILocalPackageManager {
81
+ logger: Logger;
82
+ writeTarball(pkgName: string): IUploadTarball;
83
+ readTarball(pkgName: string): IReadTarball;
84
+ readPackage(fileName: string, callback: ReadPackageCallback): void;
85
+ createPackage(pkgName: string, value: Package, cb: CallbackAction): void;
86
+ deletePackage(fileName: string, callback: CallbackAction): void;
87
+ removePackage(callback: CallbackAction): void;
88
+ updatePackage(pkgFileName: string, updateHandler: StorageUpdateCallback, onWrite: StorageWriteCallback, transformPackage: PackageTransformer, onEnd: CallbackAction): void;
89
+ savePackage(fileName: string, json: Package, callback: CallbackAction): void;
90
+ }
91
+ export declare type IPackageStorage = ILocalPackageManager | void;
92
+ export declare type IPluginStorage<T> = ILocalData<T>;
93
+ export declare type IPackageStorageManager = ILocalPackageManager;
94
+ export interface ILocalData<T> extends IPlugin<T>, ITokenActions {
95
+ logger: Logger;
96
+ config: T & Config;
97
+ add(name: string, callback: Callback): void;
98
+ remove(name: string, callback: Callback): void;
99
+ get(callback: Callback): void;
100
+ getSecret(): Promise<string>;
101
+ setSecret(secret: string): Promise<any>;
102
+ getPackageStorage(packageInfo: string): IPackageStorage;
103
+ search(onPackage: onSearchPackage, onEnd: onEndSearchPackage, validateName: onValidatePackage): void;
104
+ }
105
+ export {};
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/types",
3
- "version": "10.5.0",
3
+ "version": "10.6.0",
4
4
  "description": "verdaccio types definitions",
5
5
  "keywords": [
6
6
  "verdaccio",
@@ -10,9 +10,6 @@
10
10
  "author": "Juan Picado <juanpicado19@gmail.com>",
11
11
  "license": "MIT",
12
12
  "homepage": "https://verdaccio.org",
13
- "files": [
14
- "./build"
15
- ],
16
13
  "repository": {
17
14
  "type": "git",
18
15
  "url": "https://github.com/verdaccio/monorepo",
@@ -28,9 +25,9 @@
28
25
  "types": "build/types.d.ts",
29
26
  "devDependencies": {
30
27
  "@types/node": "12.12.6",
31
- "typedoc": "^0.22.17",
32
- "typedoc-plugin-missing-exports": "^0.22.6",
33
- "typedoc-umlclass": "^0.6.1"
28
+ "typedoc": "^0.23.0",
29
+ "typedoc-plugin-missing-exports": "^0.23.0",
30
+ "typedoc-umlclass": "^0.7.0"
34
31
  },
35
32
  "funding": {
36
33
  "type": "opencollective",
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "compileOnSave": false,
3
+ "compilerOptions": {
4
+ "target": "esnext",
5
+ "module": "commonjs",
6
+ "noImplicitAny": false,
7
+ "strict": true,
8
+ "declaration": true,
9
+ "strictNullChecks": true,
10
+ "resolveJsonModule": true,
11
+ "allowSyntheticDefaultImports": true,
12
+ "esModuleInterop": true,
13
+ "rootDir": "./src",
14
+ "outDir": "./build"
15
+ }
16
+ }