@verdaccio/types 13.0.0-next-8.5 → 13.0.0-next-8.7
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/package.json +3 -1
- package/src/configuration.ts +14 -28
- package/src/manifest.ts +17 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/types",
|
|
3
|
-
"version": "13.0.0-next-8.
|
|
3
|
+
"version": "13.0.0-next-8.7",
|
|
4
4
|
"description": "Verdaccio Type Definitions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"private",
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
"main": "src/types.ts",
|
|
34
34
|
"types": "src/types.ts",
|
|
35
35
|
"devDependencies": {
|
|
36
|
+
"@types/jsonwebtoken": "9.0.6",
|
|
37
|
+
"@types/ms": "2.1.0",
|
|
36
38
|
"typedoc": "0.23.25"
|
|
37
39
|
},
|
|
38
40
|
"typedoc": {
|
package/src/configuration.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Algorithm as Algorithms, SignOptions, VerifyOptions } from 'jsonwebtoken';
|
|
1
2
|
import { AgentOptions as HttpAgentOptions } from 'node:http';
|
|
2
3
|
import { AgentOptions as HttpsAgentOptions } from 'node:https';
|
|
3
4
|
|
|
@@ -19,13 +20,20 @@ export type LoggerType = 'stdout' | 'file';
|
|
|
19
20
|
export type LoggerFormat = 'pretty' | 'pretty-timestamped' | 'json';
|
|
20
21
|
export type LoggerLevel = 'fatal' | 'error' | 'warn' | 'info' | 'http' | 'debug' | 'trace';
|
|
21
22
|
|
|
23
|
+
export type LoggerRedact = {
|
|
24
|
+
paths: string[];
|
|
25
|
+
censor?: string;
|
|
26
|
+
remove?: boolean;
|
|
27
|
+
};
|
|
28
|
+
|
|
22
29
|
export type LoggerConfigItem = {
|
|
23
30
|
type?: LoggerType;
|
|
24
31
|
format?: LoggerFormat;
|
|
25
32
|
path?: string;
|
|
26
33
|
level?: LoggerLevel;
|
|
27
34
|
colors?: boolean;
|
|
28
|
-
|
|
35
|
+
sync?: boolean;
|
|
36
|
+
redact?: LoggerRedact;
|
|
29
37
|
};
|
|
30
38
|
|
|
31
39
|
export interface ConfigWithHttps extends Config {
|
|
@@ -75,6 +83,7 @@ export type RateLimit = {
|
|
|
75
83
|
export type FlagsConfig = {
|
|
76
84
|
searchRemote?: boolean;
|
|
77
85
|
changePassword?: boolean;
|
|
86
|
+
webLogin?: boolean;
|
|
78
87
|
};
|
|
79
88
|
|
|
80
89
|
export type PackageManagers = 'pnpm' | 'yarn' | 'npm' | string;
|
|
@@ -157,34 +166,10 @@ export interface JWTOptions {
|
|
|
157
166
|
verify: JWTVerifyOptions;
|
|
158
167
|
}
|
|
159
168
|
|
|
160
|
-
export type Algorithm =
|
|
161
|
-
| 'HS256'
|
|
162
|
-
| 'HS384'
|
|
163
|
-
| 'HS512'
|
|
164
|
-
| 'RS256'
|
|
165
|
-
| 'RS384'
|
|
166
|
-
| 'RS512'
|
|
167
|
-
| 'ES256'
|
|
168
|
-
| 'ES384'
|
|
169
|
-
| 'ES512'
|
|
170
|
-
| 'PS256'
|
|
171
|
-
| 'PS384'
|
|
172
|
-
| 'PS512'
|
|
173
|
-
| 'none';
|
|
174
|
-
|
|
175
|
-
export interface JWTSignOptions {
|
|
176
|
-
algorithm?: Algorithm | undefined;
|
|
177
|
-
expiresIn?: string | number | undefined;
|
|
178
|
-
notBefore?: string | number | undefined;
|
|
179
|
-
}
|
|
169
|
+
export type Algorithm = Algorithms;
|
|
180
170
|
|
|
181
|
-
export interface
|
|
182
|
-
|
|
183
|
-
notBefore?: string | number;
|
|
184
|
-
ignoreExpiration?: boolean;
|
|
185
|
-
maxAge?: string | number;
|
|
186
|
-
clockTimestamp?: number;
|
|
187
|
-
}
|
|
171
|
+
export interface JWTSignOptions extends SignOptions {}
|
|
172
|
+
export interface JWTVerifyOptions extends VerifyOptions {}
|
|
188
173
|
|
|
189
174
|
export interface APITokenOptions {
|
|
190
175
|
legacy: boolean;
|
|
@@ -310,6 +295,7 @@ export interface Config extends Omit<ConfigYaml, 'packages' | 'security' | 'conf
|
|
|
310
295
|
security: Security;
|
|
311
296
|
// @deprecated (pending adding the replacement)
|
|
312
297
|
checkSecretKey(token: string | void): string;
|
|
298
|
+
// @deprecated use core.authUtils instead
|
|
313
299
|
getMatchedPackagesSpec(storage: string): PackageAccess | void;
|
|
314
300
|
// TODO: verify how to handle this in the future
|
|
315
301
|
[key: string]: any;
|
package/src/manifest.ts
CHANGED
|
@@ -79,8 +79,11 @@ export interface Author {
|
|
|
79
79
|
name: string;
|
|
80
80
|
email?: string;
|
|
81
81
|
url?: string;
|
|
82
|
+
_avatar?: string; // for web ui
|
|
82
83
|
}
|
|
83
84
|
|
|
85
|
+
export type Person = Author | string;
|
|
86
|
+
|
|
84
87
|
export interface PackageUsers {
|
|
85
88
|
[key: string]: boolean;
|
|
86
89
|
}
|
|
@@ -100,7 +103,7 @@ export interface Version {
|
|
|
100
103
|
version: string;
|
|
101
104
|
directories?: any;
|
|
102
105
|
dist: Dist;
|
|
103
|
-
author:
|
|
106
|
+
author: Person;
|
|
104
107
|
main: string;
|
|
105
108
|
homemage?: string;
|
|
106
109
|
license?: string;
|
|
@@ -112,8 +115,8 @@ export interface Version {
|
|
|
112
115
|
bugs?: any;
|
|
113
116
|
files?: string[];
|
|
114
117
|
gitHead?: string;
|
|
115
|
-
maintainers?:
|
|
116
|
-
contributors?:
|
|
118
|
+
maintainers?: Person[];
|
|
119
|
+
contributors?: Person[];
|
|
117
120
|
repository?: string | any;
|
|
118
121
|
scripts?: any;
|
|
119
122
|
homepage?: string;
|
|
@@ -180,8 +183,8 @@ export interface FullRemoteManifest {
|
|
|
180
183
|
time: GenericBody;
|
|
181
184
|
versions: Versions;
|
|
182
185
|
/** store owners of this package */
|
|
183
|
-
maintainers?:
|
|
184
|
-
contributors?:
|
|
186
|
+
maintainers?: Person[];
|
|
187
|
+
contributors?: Person[];
|
|
185
188
|
/** store the latest readme **/
|
|
186
189
|
readme?: string;
|
|
187
190
|
/** store star assigned to this packages by users */
|
|
@@ -193,7 +196,7 @@ export interface FullRemoteManifest {
|
|
|
193
196
|
homepage?: string;
|
|
194
197
|
repository?: string | { type?: string; url: string; directory?: string };
|
|
195
198
|
keywords?: string[];
|
|
196
|
-
author?:
|
|
199
|
+
author?: Person;
|
|
197
200
|
}
|
|
198
201
|
|
|
199
202
|
export interface Manifest extends FullRemoteManifest, PublishManifest {
|
|
@@ -281,3 +284,11 @@ export interface PublishManifest {
|
|
|
281
284
|
* */
|
|
282
285
|
_attachments: AttachMents;
|
|
283
286
|
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Web user interface hoists the selected version to "latest" and adds "dist.tarball" field.
|
|
290
|
+
*/
|
|
291
|
+
export interface WebManifest extends Manifest {
|
|
292
|
+
latest?: Version;
|
|
293
|
+
dist?: { tarball: string };
|
|
294
|
+
}
|