@verdaccio/types 13.0.0-next-8.5 → 13.0.0-next-8.6
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 +6 -27
- 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.6",
|
|
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
|
|
|
@@ -75,6 +76,7 @@ export type RateLimit = {
|
|
|
75
76
|
export type FlagsConfig = {
|
|
76
77
|
searchRemote?: boolean;
|
|
77
78
|
changePassword?: boolean;
|
|
79
|
+
webLogin?: boolean;
|
|
78
80
|
};
|
|
79
81
|
|
|
80
82
|
export type PackageManagers = 'pnpm' | 'yarn' | 'npm' | string;
|
|
@@ -157,34 +159,10 @@ export interface JWTOptions {
|
|
|
157
159
|
verify: JWTVerifyOptions;
|
|
158
160
|
}
|
|
159
161
|
|
|
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
|
-
}
|
|
162
|
+
export type Algorithm = Algorithms;
|
|
180
163
|
|
|
181
|
-
export interface
|
|
182
|
-
|
|
183
|
-
notBefore?: string | number;
|
|
184
|
-
ignoreExpiration?: boolean;
|
|
185
|
-
maxAge?: string | number;
|
|
186
|
-
clockTimestamp?: number;
|
|
187
|
-
}
|
|
164
|
+
export interface JWTSignOptions extends SignOptions {}
|
|
165
|
+
export interface JWTVerifyOptions extends VerifyOptions {}
|
|
188
166
|
|
|
189
167
|
export interface APITokenOptions {
|
|
190
168
|
legacy: boolean;
|
|
@@ -310,6 +288,7 @@ export interface Config extends Omit<ConfigYaml, 'packages' | 'security' | 'conf
|
|
|
310
288
|
security: Security;
|
|
311
289
|
// @deprecated (pending adding the replacement)
|
|
312
290
|
checkSecretKey(token: string | void): string;
|
|
291
|
+
// @deprecated use core.authUtils instead
|
|
313
292
|
getMatchedPackagesSpec(storage: string): PackageAccess | void;
|
|
314
293
|
// TODO: verify how to handle this in the future
|
|
315
294
|
[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
|
+
}
|