@verdaccio/types 10.5.0 → 10.5.1
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 +568 -0
- package/build/commons.d.ts +20 -0
- package/build/configuration.d.ts +156 -0
- package/build/manifest.d.ts +112 -0
- package/build/plugins/auth.d.ts +22 -0
- package/build/plugins/commons.d.ts +11 -0
- package/build/plugins/filter.d.ts +5 -0
- package/build/plugins/index.d.ts +34 -0
- package/build/plugins/middleware.d.ts +6 -0
- package/build/plugins/storage.d.ts +105 -0
- package/build/plugins/theme.d.ts +0 -0
- package/package.json +1 -4
- package/tsconfig.json +16 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,568 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
## 10.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4643709: fix: wrong package configuration
|
|
8
|
+
|
|
9
|
+
## 10.5.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- b5cfaf6: feat: refactor types and typescript 4
|
|
14
|
+
|
|
15
|
+
## 10.4.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 2d428b3: fix: user_agent property as boolean
|
|
20
|
+
|
|
21
|
+
## 10.4.1
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- aaf0da4: fix: self_path correct property
|
|
26
|
+
|
|
27
|
+
## 10.4.0
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- 00e4afd: feat: update configuration types
|
|
32
|
+
|
|
33
|
+
## 10.3.0
|
|
34
|
+
|
|
35
|
+
### Minor Changes
|
|
36
|
+
|
|
37
|
+
- 803c518: chore: update core dependencies
|
|
38
|
+
|
|
39
|
+
## 10.2.2
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- 9ca52a7: fix: move userRateLimit to config body
|
|
44
|
+
|
|
45
|
+
## 10.2.1
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- 254a282: fix: user_agent can be also string
|
|
50
|
+
|
|
51
|
+
## 10.2.0
|
|
52
|
+
|
|
53
|
+
### Minor Changes
|
|
54
|
+
|
|
55
|
+
- 96b62c8: feat: add rate limit and convert user agent type to boolean
|
|
56
|
+
|
|
57
|
+
## 10.1.0
|
|
58
|
+
|
|
59
|
+
### Minor Changes
|
|
60
|
+
|
|
61
|
+
- 4e9a3d0: feat: remove core-js from bundle
|
|
62
|
+
|
|
63
|
+
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.
|
|
64
|
+
|
|
65
|
+
- https://babeljs.io/docs/en/babel-preset-env#usebuiltins
|
|
66
|
+
|
|
67
|
+
## 10.0.1
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- 6134415: fix: update dependencies
|
|
72
|
+
|
|
73
|
+
All notable changes to this project will be documented in this file.
|
|
74
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
75
|
+
|
|
76
|
+
# [10.0.0](https://github.com/verdaccio/monorepo/compare/v9.7.5...v10.0.0) (2021-03-29)
|
|
77
|
+
|
|
78
|
+
**Note:** Version bump only for package @verdaccio/types
|
|
79
|
+
|
|
80
|
+
## [9.7.2](https://github.com/verdaccio/monorepo/compare/v9.7.1...v9.7.2) (2020-07-20)
|
|
81
|
+
|
|
82
|
+
### Bug Fixes
|
|
83
|
+
|
|
84
|
+
- 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)
|
|
85
|
+
|
|
86
|
+
# [9.7.0](https://github.com/verdaccio/monorepo/compare/v9.6.1...v9.7.0) (2020-06-24)
|
|
87
|
+
|
|
88
|
+
### Features
|
|
89
|
+
|
|
90
|
+
- types for https config ([#368](https://github.com/verdaccio/monorepo/issues/368)) ([aa4aa83](https://github.com/verdaccio/monorepo/commit/aa4aa83e8a2f6a29ebe7c0b43ccc560a37fe2da9))
|
|
91
|
+
|
|
92
|
+
# [9.5.0](https://github.com/verdaccio/monorepo/compare/v9.4.1...v9.5.0) (2020-05-02)
|
|
93
|
+
|
|
94
|
+
### Features
|
|
95
|
+
|
|
96
|
+
- **types:** custom favicon ([#356](https://github.com/verdaccio/monorepo/issues/356)) ([bd78861](https://github.com/verdaccio/monorepo/commit/bd78861f46cd5189808b6689d2018a7bac6755f7))
|
|
97
|
+
|
|
98
|
+
# [9.3.0](https://github.com/verdaccio/monorepo/compare/v9.2.0...v9.3.0) (2020-01-29)
|
|
99
|
+
|
|
100
|
+
### Features
|
|
101
|
+
|
|
102
|
+
- **types:** adding tag type for auth plugins ([#318](https://github.com/verdaccio/monorepo/issues/318)) ([7f07c94](https://github.com/verdaccio/monorepo/commit/7f07c94d9dba5ac45b35aef3bd1ffd3080fb35db))
|
|
103
|
+
|
|
104
|
+
# [9.0.0](https://github.com/verdaccio/monorepo/compare/v8.5.3...v9.0.0) (2020-01-07)
|
|
105
|
+
|
|
106
|
+
**Note:** Version bump only for package @verdaccio/types
|
|
107
|
+
|
|
108
|
+
## [8.5.2](https://github.com/verdaccio/monorepo/compare/v8.5.1...v8.5.2) (2019-12-25)
|
|
109
|
+
|
|
110
|
+
### Bug Fixes
|
|
111
|
+
|
|
112
|
+
- add types for storage handler ([#307](https://github.com/verdaccio/monorepo/issues/307)) ([c35746e](https://github.com/verdaccio/monorepo/commit/c35746ebba071900db172608dedff66a7d27c23d))
|
|
113
|
+
|
|
114
|
+
## [8.5.1](https://github.com/verdaccio/monorepo/compare/v8.5.0...v8.5.1) (2019-12-24)
|
|
115
|
+
|
|
116
|
+
### Bug Fixes
|
|
117
|
+
|
|
118
|
+
- add new types for local storage ([#306](https://github.com/verdaccio/monorepo/issues/306)) ([e715e24](https://github.com/verdaccio/monorepo/commit/e715e24ec7b7e7b3dca31a3321714ebccadf2a8d))
|
|
119
|
+
|
|
120
|
+
# [8.5.0](https://github.com/verdaccio/monorepo/compare/v8.4.2...v8.5.0) (2019-12-22)
|
|
121
|
+
|
|
122
|
+
### Bug Fixes
|
|
123
|
+
|
|
124
|
+
- **types:** add allow_unpublish generic ([#305](https://github.com/verdaccio/monorepo/issues/305)) ([aeaf64c](https://github.com/verdaccio/monorepo/commit/aeaf64c67cafb9ec16fa5a66aad9c4912f2a3710))
|
|
125
|
+
|
|
126
|
+
## [8.4.2](https://github.com/verdaccio/monorepo/compare/v8.4.1...v8.4.2) (2019-11-23)
|
|
127
|
+
|
|
128
|
+
**Note:** Version bump only for package @verdaccio/types
|
|
129
|
+
|
|
130
|
+
## [8.4.1](https://github.com/verdaccio/monorepo/compare/v8.4.0...v8.4.1) (2019-11-22)
|
|
131
|
+
|
|
132
|
+
**Note:** Version bump only for package @verdaccio/types
|
|
133
|
+
|
|
134
|
+
# [8.4.0](https://github.com/verdaccio/monorepo/compare/v8.3.0...v8.4.0) (2019-11-22)
|
|
135
|
+
|
|
136
|
+
### Bug Fixes
|
|
137
|
+
|
|
138
|
+
- adds sort_packages in WebConf Interface ([#227](https://github.com/verdaccio/monorepo/issues/227)) ([5b60ade](https://github.com/verdaccio/monorepo/commit/5b60adef5da49d7d1b62aa9f484b27c9fa319bdd))
|
|
139
|
+
|
|
140
|
+
# [8.3.0](https://github.com/verdaccio/monorepo/compare/v8.2.0...v8.3.0) (2019-10-27)
|
|
141
|
+
|
|
142
|
+
### Features
|
|
143
|
+
|
|
144
|
+
- improve auth callback TS types ([#225](https://github.com/verdaccio/monorepo/issues/225)) ([ee442a0](https://github.com/verdaccio/monorepo/commit/ee442a0))
|
|
145
|
+
|
|
146
|
+
# [8.1.0](https://github.com/verdaccio/monorepo/compare/v8.0.1-next.1...v8.1.0) (2019-09-07)
|
|
147
|
+
|
|
148
|
+
**Note:** Version bump only for package @verdaccio/types
|
|
149
|
+
|
|
150
|
+
## [8.0.1-next.1](https://github.com/verdaccio/monorepo/compare/v8.0.1-next.0...v8.0.1-next.1) (2019-08-29)
|
|
151
|
+
|
|
152
|
+
**Note:** Version bump only for package @verdaccio/types
|
|
153
|
+
|
|
154
|
+
## [8.0.1-next.0](https://github.com/verdaccio/monorepo/compare/v8.0.0...v8.0.1-next.0) (2019-08-29)
|
|
155
|
+
|
|
156
|
+
**Note:** Version bump only for package @verdaccio/types
|
|
157
|
+
|
|
158
|
+
# [8.0.0](https://github.com/verdaccio/monorepo/compare/v8.0.0-next.4...v8.0.0) (2019-08-22)
|
|
159
|
+
|
|
160
|
+
**Note:** Version bump only for package @verdaccio/types
|
|
161
|
+
|
|
162
|
+
# [8.0.0-next.4](https://github.com/verdaccio/monorepo/compare/v8.0.0-next.3...v8.0.0-next.4) (2019-08-18)
|
|
163
|
+
|
|
164
|
+
**Note:** Version bump only for package @verdaccio/types
|
|
165
|
+
|
|
166
|
+
# [8.0.0-next.2](https://github.com/verdaccio/monorepo/compare/v8.0.0-next.1...v8.0.0-next.2) (2019-08-03)
|
|
167
|
+
|
|
168
|
+
### Bug Fixes
|
|
169
|
+
|
|
170
|
+
- update types for tokens ([9734fa8](https://github.com/verdaccio/monorepo/commit/9734fa8))
|
|
171
|
+
|
|
172
|
+
# [8.0.0-next.1](https://github.com/verdaccio/monorepo/compare/v8.0.0-next.0...v8.0.0-next.1) (2019-08-01)
|
|
173
|
+
|
|
174
|
+
**Note:** Version bump only for package @verdaccio/types
|
|
175
|
+
|
|
176
|
+
# [8.0.0-next.0](https://github.com/verdaccio/monorepo/compare/v2.0.0...v8.0.0-next.0) (2019-08-01)
|
|
177
|
+
|
|
178
|
+
### Bug Fixes
|
|
179
|
+
|
|
180
|
+
- add \_autogenerated to UpLinkConf ([436bd91](https://github.com/verdaccio/monorepo/commit/436bd91))
|
|
181
|
+
- add config prop to IBasicAuth ([2481d6f](https://github.com/verdaccio/monorepo/commit/2481d6f))
|
|
182
|
+
- add missing adduser method ([22cdb4e](https://github.com/verdaccio/monorepo/commit/22cdb4e))
|
|
183
|
+
- add missing properties ([973c5e4](https://github.com/verdaccio/monorepo/commit/973c5e4))
|
|
184
|
+
- allow extend config ([0aea94f](https://github.com/verdaccio/monorepo/commit/0aea94f))
|
|
185
|
+
- allow sub types on allow auth methods ([7325f74](https://github.com/verdaccio/monorepo/commit/7325f74))
|
|
186
|
+
- deprecated methods are optional ([b77155a](https://github.com/verdaccio/monorepo/commit/b77155a))
|
|
187
|
+
- entry point [#14](https://github.com/verdaccio/monorepo/issues/14) ([7575e75](https://github.com/verdaccio/monorepo/commit/7575e75))
|
|
188
|
+
- export Author type ([bf7115b](https://github.com/verdaccio/monorepo/commit/bf7115b))
|
|
189
|
+
- fix/token i local package manager ([#61](https://github.com/verdaccio/monorepo/issues/61)) ([a7e0fc8](https://github.com/verdaccio/monorepo/commit/a7e0fc8))
|
|
190
|
+
- fixes for storage plugin types per code review ([#59](https://github.com/verdaccio/monorepo/issues/59)) ([04fccb8](https://github.com/verdaccio/monorepo/commit/04fccb8))
|
|
191
|
+
- getPackageStorage allowed to return undefined ([8a859d0](https://github.com/verdaccio/monorepo/commit/8a859d0))
|
|
192
|
+
- improvements config interface ([1dac321](https://github.com/verdaccio/monorepo/commit/1dac321))
|
|
193
|
+
- methods return Stream ([22e0672](https://github.com/verdaccio/monorepo/commit/22e0672))
|
|
194
|
+
- remove options from get package metadata ([2bfc048](https://github.com/verdaccio/monorepo/commit/2bfc048))
|
|
195
|
+
- remove wrong definition ([acba624](https://github.com/verdaccio/monorepo/commit/acba624))
|
|
196
|
+
- remove wrong imports ([c82f51c](https://github.com/verdaccio/monorepo/commit/c82f51c))
|
|
197
|
+
- restore missing type on RemoteUser ([b596896](https://github.com/verdaccio/monorepo/commit/b596896))
|
|
198
|
+
- storage types ([1285675](https://github.com/verdaccio/monorepo/commit/1285675))
|
|
199
|
+
- tokens are accesible also in local-storage ([08b342d](https://github.com/verdaccio/monorepo/commit/08b342d))
|
|
200
|
+
- update https ([c93c3fc](https://github.com/verdaccio/monorepo/commit/c93c3fc))
|
|
201
|
+
- update readTarball with right parameters ([8cbc7d1](https://github.com/verdaccio/monorepo/commit/8cbc7d1))
|
|
202
|
+
- update streams type ([7fa7be5](https://github.com/verdaccio/monorepo/commit/7fa7be5))
|
|
203
|
+
- update types for local data ([6706770](https://github.com/verdaccio/monorepo/commit/6706770))
|
|
204
|
+
- update utils types ([7c37133](https://github.com/verdaccio/monorepo/commit/7c37133))
|
|
205
|
+
- wrong signature for auth plugin ([e3e2508](https://github.com/verdaccio/monorepo/commit/e3e2508))
|
|
206
|
+
|
|
207
|
+
### Features
|
|
208
|
+
|
|
209
|
+
- add AuthPluginPackage type ([f0e1cea](https://github.com/verdaccio/monorepo/commit/f0e1cea))
|
|
210
|
+
- add callback to database methods ([d0d55e9](https://github.com/verdaccio/monorepo/commit/d0d55e9))
|
|
211
|
+
- add config file types ([188a3e5](https://github.com/verdaccio/monorepo/commit/188a3e5))
|
|
212
|
+
- add gravatar prop for web config ([b3ac873](https://github.com/verdaccio/monorepo/commit/b3ac873))
|
|
213
|
+
- add interface for middleware and storage plugin ([2b18e22](https://github.com/verdaccio/monorepo/commit/2b18e22))
|
|
214
|
+
- add IStorageManager for middleware plugin ([0ac1cc4](https://github.com/verdaccio/monorepo/commit/0ac1cc4))
|
|
215
|
+
- Add locking library on typings ([7f7ab67](https://github.com/verdaccio/monorepo/commit/7f7ab67))
|
|
216
|
+
- add RemoteUser type ([7d11892](https://github.com/verdaccio/monorepo/commit/7d11892))
|
|
217
|
+
- add search method BREAKING CHANGE: search method must be implemented to allow search functionality ([b6d94e6](https://github.com/verdaccio/monorepo/commit/b6d94e6))
|
|
218
|
+
- add secret gateway methods ([5300147](https://github.com/verdaccio/monorepo/commit/5300147))
|
|
219
|
+
- add Security configuration ([0cdc0dd](https://github.com/verdaccio/monorepo/commit/0cdc0dd))
|
|
220
|
+
- add types for auth plugin ([6378186](https://github.com/verdaccio/monorepo/commit/6378186))
|
|
221
|
+
- add types for PackageUsers ([ad5f917](https://github.com/verdaccio/monorepo/commit/ad5f917))
|
|
222
|
+
- add types for search class ([e23782d](https://github.com/verdaccio/monorepo/commit/e23782d))
|
|
223
|
+
- callback does not return ([fd78bfc](https://github.com/verdaccio/monorepo/commit/fd78bfc))
|
|
224
|
+
- merge changes from 5.x ([5f61009](https://github.com/verdaccio/monorepo/commit/5f61009))
|
|
225
|
+
- package access props are not optional ([61708e2](https://github.com/verdaccio/monorepo/commit/61708e2))
|
|
226
|
+
- remove flow [#70](https://github.com/verdaccio/monorepo/issues/70) ([2218b74](https://github.com/verdaccio/monorepo/commit/2218b74))
|
|
227
|
+
- remove sync method ([f60f81c](https://github.com/verdaccio/monorepo/commit/f60f81c))
|
|
228
|
+
- secret methods are async ([d5eacf5](https://github.com/verdaccio/monorepo/commit/d5eacf5))
|
|
229
|
+
- support for an IPluginStorageFilter ([#58](https://github.com/verdaccio/monorepo/issues/58)) ([eab219e](https://github.com/verdaccio/monorepo/commit/eab219e))
|
|
230
|
+
- token types ([#60](https://github.com/verdaccio/monorepo/issues/60)) @Eomm ([6e74da6](https://github.com/verdaccio/monorepo/commit/6e74da6))
|
|
231
|
+
- **auth:** add method to update password ([e257c3a](https://github.com/verdaccio/monorepo/commit/e257c3a))
|
|
232
|
+
- **storage:** path is not mandatory ([2c42931](https://github.com/verdaccio/monorepo/commit/2c42931))
|
|
233
|
+
|
|
234
|
+
### BREAKING CHANGES
|
|
235
|
+
|
|
236
|
+
- remove flow definitions
|
|
237
|
+
- storage needs to add new methods
|
|
238
|
+
|
|
239
|
+
- add: token types
|
|
240
|
+
|
|
241
|
+
- add: typescripts types
|
|
242
|
+
- **auth:** it will affect all auth plugins
|
|
243
|
+
|
|
244
|
+
# Changelog
|
|
245
|
+
|
|
246
|
+
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.
|
|
247
|
+
|
|
248
|
+
## [7.0.0](https://github.com/verdaccio/flow-types/compare/v6.2.0...v7.0.0) (2019-07-25)
|
|
249
|
+
|
|
250
|
+
### Bug Fixes
|
|
251
|
+
|
|
252
|
+
- add \_autogenerated to UpLinkConf ([971e52e](https://github.com/verdaccio/flow-types/commit/971e52e))
|
|
253
|
+
- **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)
|
|
254
|
+
- **IPluginAuth:** remove `login_url` ([1663c07](https://github.com/verdaccio/flow-types/commit/1663c07)), closes [#69](https://github.com/verdaccio/flow-types/issues/69)
|
|
255
|
+
|
|
256
|
+
### Features
|
|
257
|
+
|
|
258
|
+
- merge changes from 5.x ([7d2d526](https://github.com/verdaccio/flow-types/commit/7d2d526))
|
|
259
|
+
- remove flow [#70](https://github.com/verdaccio/flow-types/issues/70) ([826d5fe](https://github.com/verdaccio/flow-types/commit/826d5fe))
|
|
260
|
+
|
|
261
|
+
### BREAKING CHANGES
|
|
262
|
+
|
|
263
|
+
- remove flow definitions
|
|
264
|
+
|
|
265
|
+
<a name="6.2.0"></a>
|
|
266
|
+
|
|
267
|
+
# [6.2.0](https://github.com/verdaccio/flow-types/compare/v6.1.0...v6.2.0) (2019-05-28)
|
|
268
|
+
|
|
269
|
+
### Features
|
|
270
|
+
|
|
271
|
+
- add types for Version ([900861d](https://github.com/verdaccio/flow-types/commit/900861d))
|
|
272
|
+
|
|
273
|
+
<a name="6.1.0"></a>
|
|
274
|
+
|
|
275
|
+
# [6.1.0](https://github.com/verdaccio/flow-types/compare/v6.0.2...v6.1.0) (2019-05-14)
|
|
276
|
+
|
|
277
|
+
### Bug Fixes
|
|
278
|
+
|
|
279
|
+
- revert token signature ([59a03e7](https://github.com/verdaccio/flow-types/commit/59a03e7))
|
|
280
|
+
|
|
281
|
+
### Features
|
|
282
|
+
|
|
283
|
+
- moved token api signature ([e51991c](https://github.com/verdaccio/flow-types/commit/e51991c))
|
|
284
|
+
|
|
285
|
+
<a name="6.0.2"></a>
|
|
286
|
+
|
|
287
|
+
## [6.0.2](https://github.com/verdaccio/flow-types/compare/v6.0.1...v6.0.2) (2019-05-06)
|
|
288
|
+
|
|
289
|
+
### Bug Fixes
|
|
290
|
+
|
|
291
|
+
- fix/token i local package manager ([#61](https://github.com/verdaccio/flow-types/issues/61)) ([14adfb2](https://github.com/verdaccio/flow-types/commit/14adfb2))
|
|
292
|
+
|
|
293
|
+
<a name="6.0.1"></a>
|
|
294
|
+
|
|
295
|
+
## [6.0.1](https://github.com/verdaccio/flow-types/compare/v6.0.0...v6.0.1) (2019-05-04)
|
|
296
|
+
|
|
297
|
+
### Bug Fixes
|
|
298
|
+
|
|
299
|
+
- tokens are accesible also in local-storage ([56551cf](https://github.com/verdaccio/flow-types/commit/56551cf))
|
|
300
|
+
|
|
301
|
+
<a name="6.0.0"></a>
|
|
302
|
+
|
|
303
|
+
# [6.0.0](https://github.com/verdaccio/flow-types/compare/v5.0.2...v6.0.0) (2019-04-30)
|
|
304
|
+
|
|
305
|
+
### Bug Fixes
|
|
306
|
+
|
|
307
|
+
- remove wrong imports ([a75476a](https://github.com/verdaccio/flow-types/commit/a75476a))
|
|
308
|
+
|
|
309
|
+
### Features
|
|
310
|
+
|
|
311
|
+
- token types ([#60](https://github.com/verdaccio/flow-types/issues/60)) @Eomm ([7b74982](https://github.com/verdaccio/flow-types/commit/7b74982))
|
|
312
|
+
|
|
313
|
+
### BREAKING CHANGES
|
|
314
|
+
|
|
315
|
+
- storage needs to add new methods
|
|
316
|
+
|
|
317
|
+
- add: token types
|
|
318
|
+
|
|
319
|
+
- add: typescripts types
|
|
320
|
+
|
|
321
|
+
<a name="5.0.2"></a>
|
|
322
|
+
|
|
323
|
+
## [5.0.2](https://github.com/verdaccio/flow-types/compare/v5.0.1...v5.0.2) (2019-04-22)
|
|
324
|
+
|
|
325
|
+
### Bug Fixes
|
|
326
|
+
|
|
327
|
+
- 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))
|
|
328
|
+
|
|
329
|
+
<a name="5.0.1"></a>
|
|
330
|
+
|
|
331
|
+
## [5.0.1](https://github.com/verdaccio/flow-types/compare/v5.0.0...v5.0.1) (2019-04-18)
|
|
332
|
+
|
|
333
|
+
<a name="5.0.0"></a>
|
|
334
|
+
|
|
335
|
+
# [5.0.0](https://github.com/verdaccio/flow-types/compare/v5.0.0-beta.4...v5.0.0) (2019-04-18)
|
|
336
|
+
|
|
337
|
+
### Features
|
|
338
|
+
|
|
339
|
+
- support for an IPluginStorageFilter ([#58](https://github.com/verdaccio/flow-types/issues/58)) ([e67559f](https://github.com/verdaccio/flow-types/commit/e67559f))
|
|
340
|
+
|
|
341
|
+
<a name="5.0.0-beta.4"></a>
|
|
342
|
+
|
|
343
|
+
# [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)
|
|
344
|
+
|
|
345
|
+
### Features
|
|
346
|
+
|
|
347
|
+
- **storage:** path is not mandatory ([784f1bb](https://github.com/verdaccio/flow-types/commit/784f1bb))
|
|
348
|
+
|
|
349
|
+
<a name="5.0.0-beta.3"></a>
|
|
350
|
+
|
|
351
|
+
# [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)
|
|
352
|
+
|
|
353
|
+
### Features
|
|
354
|
+
|
|
355
|
+
- add types for PackageUsers ([9bb3c26](https://github.com/verdaccio/flow-types/commit/9bb3c26))
|
|
356
|
+
|
|
357
|
+
<a name="5.0.0-beta.2"></a>
|
|
358
|
+
|
|
359
|
+
# [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)
|
|
360
|
+
|
|
361
|
+
### Features
|
|
362
|
+
|
|
363
|
+
- allow_access and allow_publish are optional for auth plugin ([0d5a53c](https://github.com/verdaccio/flow-types/commit/0d5a53c))
|
|
364
|
+
|
|
365
|
+
<a name="5.0.0-beta.1"></a>
|
|
366
|
+
|
|
367
|
+
# [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)
|
|
368
|
+
|
|
369
|
+
<a name="5.0.0-beta.0"></a>
|
|
370
|
+
|
|
371
|
+
# [5.0.0-beta.0](https://github.com/verdaccio/flow-types/compare/v4.3.0...v5.0.0-beta.0) (2019-01-27)
|
|
372
|
+
|
|
373
|
+
<a name="4.3.0"></a>
|
|
374
|
+
|
|
375
|
+
# [4.3.0](https://github.com/verdaccio/flow-types/compare/v4.2.0...v4.3.0) (2019-01-12)
|
|
376
|
+
|
|
377
|
+
### Features
|
|
378
|
+
|
|
379
|
+
- add gravatar prop for web config ([99ceae9](https://github.com/verdaccio/flow-types/commit/99ceae9))
|
|
380
|
+
|
|
381
|
+
<a name="4.2.0"></a>
|
|
382
|
+
|
|
383
|
+
# [4.2.0](https://github.com/verdaccio/flow-types/compare/v4.1.2...v4.2.0) (2019-01-12)
|
|
384
|
+
|
|
385
|
+
### Features
|
|
386
|
+
|
|
387
|
+
- add AuthPluginPackage type ([0e46b04](https://github.com/verdaccio/flow-types/commit/0e46b04))
|
|
388
|
+
|
|
389
|
+
<a name="4.1.2"></a>
|
|
390
|
+
|
|
391
|
+
## [4.1.2](https://github.com/verdaccio/flow-types/compare/v4.1.1...v4.1.2) (2018-11-11)
|
|
392
|
+
|
|
393
|
+
### Bug Fixes
|
|
394
|
+
|
|
395
|
+
- remove wrong definition ([9bc53fc](https://github.com/verdaccio/flow-types/commit/9bc53fc))
|
|
396
|
+
|
|
397
|
+
<a name="4.1.1"></a>
|
|
398
|
+
|
|
399
|
+
## [4.1.1](https://github.com/verdaccio/flow-types/compare/v4.1.0...v4.1.1) (2018-10-06)
|
|
400
|
+
|
|
401
|
+
### Bug Fixes
|
|
402
|
+
|
|
403
|
+
- deprecated methods are optional ([4c96e89](https://github.com/verdaccio/flow-types/commit/4c96e89))
|
|
404
|
+
|
|
405
|
+
<a name="4.1.0"></a>
|
|
406
|
+
|
|
407
|
+
# [4.1.0](https://github.com/verdaccio/flow-types/compare/v4.0.0...v4.1.0) (2018-10-06)
|
|
408
|
+
|
|
409
|
+
### Features
|
|
410
|
+
|
|
411
|
+
- package access props are not optional ([afabaf1](https://github.com/verdaccio/flow-types/commit/afabaf1))
|
|
412
|
+
|
|
413
|
+
<a name="4.0.0"></a>
|
|
414
|
+
|
|
415
|
+
# [4.0.0](https://github.com/verdaccio/flow-types/compare/v3.7.2...v4.0.0) (2018-09-30)
|
|
416
|
+
|
|
417
|
+
### Features
|
|
418
|
+
|
|
419
|
+
- **auth:** add method to update password ([21fc43f](https://github.com/verdaccio/flow-types/commit/21fc43f))
|
|
420
|
+
|
|
421
|
+
### BREAKING CHANGES
|
|
422
|
+
|
|
423
|
+
- **auth:** it will affect all auth plugins
|
|
424
|
+
|
|
425
|
+
<a name="3.7.2"></a>
|
|
426
|
+
|
|
427
|
+
## [3.7.2](https://github.com/verdaccio/flow-types/compare/v3.7.1...v3.7.2) (2018-09-27)
|
|
428
|
+
|
|
429
|
+
### Bug Fixes
|
|
430
|
+
|
|
431
|
+
- entry point [#14](https://github.com/verdaccio/flow-types/issues/14) ([f7b8982](https://github.com/verdaccio/flow-types/commit/f7b8982))
|
|
432
|
+
- export Author type ([7869dde](https://github.com/verdaccio/flow-types/commit/7869dde))
|
|
433
|
+
|
|
434
|
+
<a name="3.7.1"></a>
|
|
435
|
+
|
|
436
|
+
## [3.7.1](https://github.com/verdaccio/flow-types/compare/v3.7.0...v3.7.1) (2018-08-11)
|
|
437
|
+
|
|
438
|
+
### Bug Fixes
|
|
439
|
+
|
|
440
|
+
- restore missing type on RemoteUser ([88d809e](https://github.com/verdaccio/flow-types/commit/88d809e))
|
|
441
|
+
|
|
442
|
+
<a name="3.7.0"></a>
|
|
443
|
+
|
|
444
|
+
# [3.7.0](https://github.com/verdaccio/flow-types/compare/v3.6.0...v3.7.0) (2018-08-05)
|
|
445
|
+
|
|
446
|
+
### Features
|
|
447
|
+
|
|
448
|
+
- add Security configuration ([0d9aece](https://github.com/verdaccio/flow-types/commit/0d9aece))
|
|
449
|
+
|
|
450
|
+
<a name="3.6.0"></a>
|
|
451
|
+
|
|
452
|
+
# [3.6.0](https://github.com/verdaccio/flow-types/compare/v3.5.1...v3.6.0) (2018-07-30)
|
|
453
|
+
|
|
454
|
+
### Features
|
|
455
|
+
|
|
456
|
+
- changes max_users type to number ([1fa6e73](https://github.com/verdaccio/flow-types/commit/1fa6e73))
|
|
457
|
+
|
|
458
|
+
<a name="3.5.1"></a>
|
|
459
|
+
|
|
460
|
+
## [3.5.1](https://github.com/verdaccio/flow-types/compare/v3.5.0...v3.5.1) (2018-07-21)
|
|
461
|
+
|
|
462
|
+
### Bug Fixes
|
|
463
|
+
|
|
464
|
+
- login_url should be an optional property ([0fcfb9c](https://github.com/verdaccio/flow-types/commit/0fcfb9c))
|
|
465
|
+
|
|
466
|
+
<a name="3.5.0"></a>
|
|
467
|
+
|
|
468
|
+
# [3.5.0](https://github.com/verdaccio/flow-types/compare/v3.4.3...v3.5.0) (2018-07-21)
|
|
469
|
+
|
|
470
|
+
### Features
|
|
471
|
+
|
|
472
|
+
- 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)
|
|
473
|
+
|
|
474
|
+
<a name="3.4.3"></a>
|
|
475
|
+
|
|
476
|
+
## [3.4.3](https://github.com/verdaccio/flow-types/compare/v3.4.2...v3.4.3) (2018-07-19)
|
|
477
|
+
|
|
478
|
+
### Bug Fixes
|
|
479
|
+
|
|
480
|
+
- allow extend config ([06e810f](https://github.com/verdaccio/flow-types/commit/06e810f))
|
|
481
|
+
|
|
482
|
+
<a name="3.4.2"></a>
|
|
483
|
+
|
|
484
|
+
## [3.4.2](https://github.com/verdaccio/flow-types/compare/v3.4.1...v3.4.2) (2018-07-17)
|
|
485
|
+
|
|
486
|
+
<a name="3.4.1"></a>
|
|
487
|
+
|
|
488
|
+
## [3.4.1](https://github.com/verdaccio/flow-types/compare/v3.4.0...v3.4.1) (2018-07-16)
|
|
489
|
+
|
|
490
|
+
### Bug Fixes
|
|
491
|
+
|
|
492
|
+
- allow sub types on allow auth methods ([fa8125b](https://github.com/verdaccio/flow-types/commit/fa8125b))
|
|
493
|
+
|
|
494
|
+
<a name="3.4.0"></a>
|
|
495
|
+
|
|
496
|
+
# [3.4.0](https://github.com/verdaccio/flow-types/compare/v3.3.3...v3.4.0) (2018-07-16)
|
|
497
|
+
|
|
498
|
+
### Features
|
|
499
|
+
|
|
500
|
+
- add RemoteUser type ([aa83839](https://github.com/verdaccio/flow-types/commit/aa83839))
|
|
501
|
+
|
|
502
|
+
<a name="3.3.3"></a>
|
|
503
|
+
|
|
504
|
+
## [3.3.3](https://github.com/verdaccio/flow-types/compare/v3.3.2...v3.3.3) (2018-07-16)
|
|
505
|
+
|
|
506
|
+
### Bug Fixes
|
|
507
|
+
|
|
508
|
+
- wrong signature for auth plugin ([11a0ce6](https://github.com/verdaccio/flow-types/commit/11a0ce6))
|
|
509
|
+
|
|
510
|
+
<a name="3.3.2"></a>
|
|
511
|
+
|
|
512
|
+
## [3.3.2](https://github.com/verdaccio/flow-types/compare/v3.3.1...v3.3.2) (2018-07-16)
|
|
513
|
+
|
|
514
|
+
### Bug Fixes
|
|
515
|
+
|
|
516
|
+
- add missing adduser method ([0b54fe7](https://github.com/verdaccio/flow-types/commit/0b54fe7))
|
|
517
|
+
|
|
518
|
+
<a name="3.3.1"></a>
|
|
519
|
+
|
|
520
|
+
## [3.3.1](https://github.com/verdaccio/flow-types/compare/v3.3.0...v3.3.1) (2018-07-15)
|
|
521
|
+
|
|
522
|
+
### Bug Fixes
|
|
523
|
+
|
|
524
|
+
- add config prop to IBasicAuth ([0714316](https://github.com/verdaccio/flow-types/commit/0714316))
|
|
525
|
+
|
|
526
|
+
<a name="3.3.0"></a>
|
|
527
|
+
|
|
528
|
+
# [3.3.0](https://github.com/verdaccio/flow-types/compare/v3.2.0...v3.3.0) (2018-07-15)
|
|
529
|
+
|
|
530
|
+
### Features
|
|
531
|
+
|
|
532
|
+
- add IStorageManager for middleware plugin ([d473b4c](https://github.com/verdaccio/flow-types/commit/d473b4c))
|
|
533
|
+
|
|
534
|
+
<a name="3.2.0"></a>
|
|
535
|
+
|
|
536
|
+
# [3.2.0](https://github.com/verdaccio/flow-types/compare/v3.1.0...v3.2.0) (2018-07-15)
|
|
537
|
+
|
|
538
|
+
### Features
|
|
539
|
+
|
|
540
|
+
- add interface for middleware and storage plugin ([0028085](https://github.com/verdaccio/flow-types/commit/0028085))
|
|
541
|
+
|
|
542
|
+
<a name="3.1.0"></a>
|
|
543
|
+
|
|
544
|
+
# [3.1.0](https://github.com/verdaccio/flow-types/compare/v3.0.1...v3.1.0) (2018-07-14)
|
|
545
|
+
|
|
546
|
+
### Features
|
|
547
|
+
|
|
548
|
+
- add types for auth plugin ([a9b7bc9](https://github.com/verdaccio/flow-types/commit/a9b7bc9))
|
|
549
|
+
|
|
550
|
+
<a name="3.0.1"></a>
|
|
551
|
+
|
|
552
|
+
## [3.0.1](https://github.com/verdaccio/flow-types/compare/v3.0.0...v3.0.1) (2018-07-02)
|
|
553
|
+
|
|
554
|
+
### Bug Fixes
|
|
555
|
+
|
|
556
|
+
- improvements config interface ([8ea6276](https://github.com/verdaccio/flow-types/commit/8ea6276))
|
|
557
|
+
|
|
558
|
+
<a name="3.0.0"></a>
|
|
559
|
+
|
|
560
|
+
# [3.0.0](https://github.com/verdaccio/flow-types/compare/v2.2.2...v3.0.0) (2018-06-08)
|
|
561
|
+
|
|
562
|
+
### Features
|
|
563
|
+
|
|
564
|
+
- add search method ([2cf3ce9](https://github.com/verdaccio/flow-types/commit/2cf3ce9))
|
|
565
|
+
|
|
566
|
+
### BREAKING CHANGES
|
|
567
|
+
|
|
568
|
+
- 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,156 @@
|
|
|
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
|
+
rateLimit: RateLimit;
|
|
119
|
+
keepAliveTimeout?: number;
|
|
120
|
+
};
|
|
121
|
+
export interface ConfigYaml {
|
|
122
|
+
_debug?: boolean;
|
|
123
|
+
storage?: string | void;
|
|
124
|
+
packages: PackageList;
|
|
125
|
+
uplinks: UpLinksConfList;
|
|
126
|
+
logs?: LoggerConfItem;
|
|
127
|
+
web?: WebConf;
|
|
128
|
+
auth?: AuthConf;
|
|
129
|
+
security: Security;
|
|
130
|
+
publish?: PublishOptions;
|
|
131
|
+
store?: any;
|
|
132
|
+
listen?: ListenAddress;
|
|
133
|
+
https?: HttpsConf;
|
|
134
|
+
http_proxy?: string;
|
|
135
|
+
plugins?: string | void;
|
|
136
|
+
https_proxy?: string;
|
|
137
|
+
no_proxy?: string;
|
|
138
|
+
max_body_size?: string;
|
|
139
|
+
notifications?: Notifications;
|
|
140
|
+
notify?: Notifications | Notifications[];
|
|
141
|
+
middlewares?: any;
|
|
142
|
+
filters?: any;
|
|
143
|
+
url_prefix?: string;
|
|
144
|
+
server?: ServerSettingsConf;
|
|
145
|
+
}
|
|
146
|
+
export interface ConfigRuntime extends ConfigYaml {
|
|
147
|
+
self_path: string;
|
|
148
|
+
}
|
|
149
|
+
export interface Config extends ConfigYaml, ConfigRuntime {
|
|
150
|
+
user_agent?: string | boolean;
|
|
151
|
+
server_id: string;
|
|
152
|
+
secret: string;
|
|
153
|
+
checkSecretKey(token: string): string;
|
|
154
|
+
getMatchedPackagesSpec(storage: string): PackageAccess | void;
|
|
155
|
+
[key: string]: any;
|
|
156
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
devDependencies?: string;
|
|
67
|
+
directories?: any;
|
|
68
|
+
dist: Dist;
|
|
69
|
+
author: string | Author;
|
|
70
|
+
main: string;
|
|
71
|
+
homemage?: string;
|
|
72
|
+
license?: string;
|
|
73
|
+
readme: string;
|
|
74
|
+
readmeFileName?: string;
|
|
75
|
+
readmeFilename?: string;
|
|
76
|
+
description: string;
|
|
77
|
+
bin?: string;
|
|
78
|
+
bugs?: any;
|
|
79
|
+
files?: string[];
|
|
80
|
+
gitHead?: string;
|
|
81
|
+
maintainers?: Author[];
|
|
82
|
+
contributors?: Author[];
|
|
83
|
+
repository?: string | any;
|
|
84
|
+
scripts?: any;
|
|
85
|
+
homepage?: string;
|
|
86
|
+
etag?: string;
|
|
87
|
+
dependencies: any;
|
|
88
|
+
keywords?: string | string[];
|
|
89
|
+
nodeVersion?: string;
|
|
90
|
+
_id: string;
|
|
91
|
+
_npmVersion?: string;
|
|
92
|
+
_npmUser: Author;
|
|
93
|
+
_hasShrinkwrap?: boolean;
|
|
94
|
+
deprecated?: string;
|
|
95
|
+
}
|
|
96
|
+
export interface Versions {
|
|
97
|
+
[key: string]: Version;
|
|
98
|
+
}
|
|
99
|
+
export declare type Package = Manifest;
|
|
100
|
+
export interface Manifest {
|
|
101
|
+
_id?: string;
|
|
102
|
+
name: string;
|
|
103
|
+
versions: Versions;
|
|
104
|
+
'dist-tags': GenericBody;
|
|
105
|
+
time?: GenericBody;
|
|
106
|
+
readme?: string;
|
|
107
|
+
users?: PackageUsers;
|
|
108
|
+
_distfiles: DistFiles;
|
|
109
|
+
_attachments: AttachMents;
|
|
110
|
+
_uplinks: UpLinks;
|
|
111
|
+
_rev: string;
|
|
112
|
+
}
|
|
@@ -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,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.
|
|
3
|
+
"version": "10.5.1",
|
|
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",
|
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
|
+
}
|