@verdaccio/types 13.0.0-next-8.4 → 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 +13 -30
- 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,9 +76,10 @@ export type RateLimit = {
|
|
|
75
76
|
export type FlagsConfig = {
|
|
76
77
|
searchRemote?: boolean;
|
|
77
78
|
changePassword?: boolean;
|
|
79
|
+
webLogin?: boolean;
|
|
78
80
|
};
|
|
79
81
|
|
|
80
|
-
export type PackageManagers = 'pnpm' | 'yarn' | 'npm';
|
|
82
|
+
export type PackageManagers = 'pnpm' | 'yarn' | 'npm' | string;
|
|
81
83
|
|
|
82
84
|
// FUTURE: WebConf and TemplateUIOptions should be merged .
|
|
83
85
|
export type CommonWebConf = {
|
|
@@ -101,7 +103,7 @@ export type CommonWebConf = {
|
|
|
101
103
|
showDownloadTarball?: boolean;
|
|
102
104
|
showUplinks?: boolean;
|
|
103
105
|
hideDeprecatedVersions?: boolean;
|
|
104
|
-
primaryColor
|
|
106
|
+
primaryColor?: string;
|
|
105
107
|
showRaw?: boolean;
|
|
106
108
|
};
|
|
107
109
|
|
|
@@ -116,7 +118,7 @@ export type TemplateUIOptions = {
|
|
|
116
118
|
basename?: string;
|
|
117
119
|
base: string;
|
|
118
120
|
version?: string;
|
|
119
|
-
flags
|
|
121
|
+
flags?: FlagsConfig;
|
|
120
122
|
} & CommonWebConf;
|
|
121
123
|
|
|
122
124
|
/**
|
|
@@ -126,10 +128,14 @@ export type WebConf = {
|
|
|
126
128
|
// @deprecated use primaryColor
|
|
127
129
|
primary_color?: string;
|
|
128
130
|
primaryColor?: string;
|
|
131
|
+
// @deprecated use enabled
|
|
129
132
|
enable?: boolean;
|
|
133
|
+
enabled?: boolean;
|
|
130
134
|
scriptsHead?: string[];
|
|
131
135
|
scriptsBodyAfter?: string[];
|
|
136
|
+
// @deprecated use scriptsBodyBefore
|
|
132
137
|
scriptsbodyBefore?: string[];
|
|
138
|
+
scriptsBodyBefore?: string[];
|
|
133
139
|
metaScripts?: string[];
|
|
134
140
|
bodyBefore?: string[];
|
|
135
141
|
bodyAfter?: string[];
|
|
@@ -153,34 +159,10 @@ export interface JWTOptions {
|
|
|
153
159
|
verify: JWTVerifyOptions;
|
|
154
160
|
}
|
|
155
161
|
|
|
156
|
-
export type Algorithm =
|
|
157
|
-
| 'HS256'
|
|
158
|
-
| 'HS384'
|
|
159
|
-
| 'HS512'
|
|
160
|
-
| 'RS256'
|
|
161
|
-
| 'RS384'
|
|
162
|
-
| 'RS512'
|
|
163
|
-
| 'ES256'
|
|
164
|
-
| 'ES384'
|
|
165
|
-
| 'ES512'
|
|
166
|
-
| 'PS256'
|
|
167
|
-
| 'PS384'
|
|
168
|
-
| 'PS512'
|
|
169
|
-
| 'none';
|
|
170
|
-
|
|
171
|
-
export interface JWTSignOptions {
|
|
172
|
-
algorithm?: Algorithm | undefined;
|
|
173
|
-
expiresIn?: string | number | undefined;
|
|
174
|
-
notBefore?: string | number | undefined;
|
|
175
|
-
}
|
|
162
|
+
export type Algorithm = Algorithms;
|
|
176
163
|
|
|
177
|
-
export interface
|
|
178
|
-
|
|
179
|
-
notBefore?: string | number;
|
|
180
|
-
ignoreExpiration?: boolean;
|
|
181
|
-
maxAge?: string | number;
|
|
182
|
-
clockTimestamp?: number;
|
|
183
|
-
}
|
|
164
|
+
export interface JWTSignOptions extends SignOptions {}
|
|
165
|
+
export interface JWTVerifyOptions extends VerifyOptions {}
|
|
184
166
|
|
|
185
167
|
export interface APITokenOptions {
|
|
186
168
|
legacy: boolean;
|
|
@@ -306,6 +288,7 @@ export interface Config extends Omit<ConfigYaml, 'packages' | 'security' | 'conf
|
|
|
306
288
|
security: Security;
|
|
307
289
|
// @deprecated (pending adding the replacement)
|
|
308
290
|
checkSecretKey(token: string | void): string;
|
|
291
|
+
// @deprecated use core.authUtils instead
|
|
309
292
|
getMatchedPackagesSpec(storage: string): PackageAccess | void;
|
|
310
293
|
// TODO: verify how to handle this in the future
|
|
311
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
|
+
}
|