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