@verdaccio/types 11.0.0-6-next.23 → 11.0.0-6-next.25
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 +12 -0
- package/package.json +4 -4
- package/src/configuration.ts +19 -22
- package/src/manifest.ts +9 -0
- package/build/commons.d.ts +0 -24
- package/build/configuration.d.ts +0 -247
- package/build/manifest.d.ts +0 -228
- package/build/plugins/index.d.ts +0 -1
- package/build/plugins/storage.d.ts +0 -37
- package/build/search.d.ts +0 -26
- package/build/types.d.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 11.0.0-6-next.25
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 16e38df8: feat: trustProxy property
|
|
8
|
+
|
|
9
|
+
## 11.0.0-6-next.24
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 7ef599cc: fix: missing version on footer
|
|
14
|
+
|
|
3
15
|
## 11.0.0-6-next.23
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/types",
|
|
3
|
-
"version": "11.0.0-6-next.
|
|
3
|
+
"version": "11.0.0-6-next.25",
|
|
4
4
|
"description": "verdaccio types definitions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"private",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
|
-
"main": "
|
|
34
|
-
"types": "
|
|
33
|
+
"main": "src/types.ts",
|
|
34
|
+
"types": "src/types.ts",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "16.18.10",
|
|
37
37
|
"typedoc": "0.23.25"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"test": "pnpm type-check",
|
|
51
51
|
"build:docs": "typedoc --options ./typedoc.json --tsconfig tsconfig.build.json",
|
|
52
52
|
"type-check": "tsc --noEmit -p tsconfig.build.json",
|
|
53
|
-
"build": "
|
|
53
|
+
"build": "echo 0"
|
|
54
54
|
},
|
|
55
55
|
"readme": "# @verdaccio/types\n\nTypeScript definitions for Verdaccio plugins and internal code.\n"
|
|
56
56
|
}
|
package/src/configuration.ts
CHANGED
|
@@ -75,16 +75,6 @@ export type RateLimit = {
|
|
|
75
75
|
max?: number;
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
// export interface WebConf {
|
|
79
|
-
// enable?: boolean;
|
|
80
|
-
// title?: string;
|
|
81
|
-
// logo?: string;
|
|
82
|
-
// favicon?: string;
|
|
83
|
-
// gravatar?: boolean;
|
|
84
|
-
// sort_packages?: string;
|
|
85
|
-
// rateLimit?: RateLimit;
|
|
86
|
-
// }
|
|
87
|
-
|
|
88
78
|
export type FlagsConfig = {
|
|
89
79
|
searchRemote?: boolean;
|
|
90
80
|
changePassword?: boolean;
|
|
@@ -105,6 +95,14 @@ export type CommonWebConf = {
|
|
|
105
95
|
login?: boolean;
|
|
106
96
|
scope?: string;
|
|
107
97
|
pkgManagers?: PackageManagers[];
|
|
98
|
+
showInfo?: boolean;
|
|
99
|
+
showSettings?: boolean;
|
|
100
|
+
showSearch?: boolean;
|
|
101
|
+
showFooter?: boolean;
|
|
102
|
+
showThemeSwitch?: boolean;
|
|
103
|
+
showDownloadTarball?: boolean;
|
|
104
|
+
primaryColor: string;
|
|
105
|
+
showRaw?: boolean;
|
|
108
106
|
};
|
|
109
107
|
|
|
110
108
|
/**
|
|
@@ -112,21 +110,11 @@ export type CommonWebConf = {
|
|
|
112
110
|
*/
|
|
113
111
|
export type TemplateUIOptions = {
|
|
114
112
|
uri?: string;
|
|
115
|
-
darkMode?: boolean;
|
|
116
113
|
protocol?: string;
|
|
117
114
|
host?: string;
|
|
118
|
-
// deprecated
|
|
115
|
+
// @deprecated use base instead
|
|
119
116
|
basename?: string;
|
|
120
|
-
scope?: string;
|
|
121
|
-
showInfo?: boolean;
|
|
122
|
-
showSettings?: boolean;
|
|
123
|
-
showSearch?: boolean;
|
|
124
|
-
showFooter?: boolean;
|
|
125
|
-
showThemeSwitch?: boolean;
|
|
126
|
-
showDownloadTarball?: boolean;
|
|
127
|
-
showRaw?: boolean;
|
|
128
117
|
base: string;
|
|
129
|
-
primaryColor: string;
|
|
130
118
|
version?: string;
|
|
131
119
|
flags: FlagsConfig;
|
|
132
120
|
} & CommonWebConf;
|
|
@@ -135,14 +123,18 @@ export type TemplateUIOptions = {
|
|
|
135
123
|
* Options on config.yaml for web
|
|
136
124
|
*/
|
|
137
125
|
export type WebConf = {
|
|
138
|
-
//
|
|
126
|
+
// @deprecated use primaryColor
|
|
139
127
|
primary_color?: string;
|
|
128
|
+
primaryColor?: string;
|
|
140
129
|
enable?: boolean;
|
|
141
130
|
scriptsHead?: string[];
|
|
142
131
|
scriptsBodyAfter?: string[];
|
|
132
|
+
scriptsbodyBefore?: string[];
|
|
143
133
|
metaScripts?: string[];
|
|
144
134
|
bodyBefore?: string[];
|
|
145
135
|
bodyAfter?: string[];
|
|
136
|
+
rateLimit?: RateLimit;
|
|
137
|
+
html_cache?: boolean;
|
|
146
138
|
} & CommonWebConf;
|
|
147
139
|
|
|
148
140
|
export interface UpLinksConfList {
|
|
@@ -234,6 +226,8 @@ export type ServerSettingsConf = {
|
|
|
234
226
|
*/
|
|
235
227
|
pluginPrefix?: string;
|
|
236
228
|
passwordValidationRegex?: RegExp;
|
|
229
|
+
// docs on `trustProxy` can be found at: https://expressjs.com/en/guide/behind-proxies.html
|
|
230
|
+
trustProxy?: string;
|
|
237
231
|
};
|
|
238
232
|
|
|
239
233
|
/**
|
|
@@ -267,10 +261,13 @@ export interface ConfigYaml {
|
|
|
267
261
|
url_prefix?: string;
|
|
268
262
|
server?: ServerSettingsConf;
|
|
269
263
|
flags?: FlagsConfig;
|
|
264
|
+
// @deprecated use flags instead
|
|
265
|
+
experiments?: FlagsConfig;
|
|
270
266
|
userRateLimit?: RateLimit;
|
|
271
267
|
// internal objects, added by internal yaml to JS config parser
|
|
272
268
|
// save the configuration file path
|
|
273
269
|
configPath?: string;
|
|
270
|
+
i18n?: { web: string };
|
|
274
271
|
}
|
|
275
272
|
|
|
276
273
|
/**
|
package/src/manifest.ts
CHANGED
|
@@ -89,6 +89,12 @@ export interface Tags {
|
|
|
89
89
|
[key: string]: Version;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
export interface PeerDependenciesMeta {
|
|
93
|
+
[dependencyName: string]: {
|
|
94
|
+
optional?: boolean;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
92
98
|
export interface Version {
|
|
93
99
|
name: string;
|
|
94
100
|
version: string;
|
|
@@ -116,6 +122,7 @@ export interface Version {
|
|
|
116
122
|
peerDependencies?: Dependencies;
|
|
117
123
|
devDependencies?: Dependencies;
|
|
118
124
|
optionalDependencies?: Dependencies;
|
|
125
|
+
peerDependenciesMeta?: PeerDependenciesMeta;
|
|
119
126
|
bundleDependencies?: Dependencies;
|
|
120
127
|
keywords?: string | string[];
|
|
121
128
|
nodeVersion?: string;
|
|
@@ -127,6 +134,8 @@ export interface Version {
|
|
|
127
134
|
funding?: { type: string; url: string };
|
|
128
135
|
engines?: Engines;
|
|
129
136
|
hasInstallScript?: boolean;
|
|
137
|
+
cpu?: string[];
|
|
138
|
+
os?: string[];
|
|
130
139
|
}
|
|
131
140
|
|
|
132
141
|
export interface Dependencies {
|
package/build/commons.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
export type Callback = Function;
|
|
3
|
-
export type CallbackAction = (err: any | null) => void;
|
|
4
|
-
export 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 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
|
-
}
|
|
21
|
-
export type URLPrefix = {
|
|
22
|
-
absolute: boolean;
|
|
23
|
-
basePath: string;
|
|
24
|
-
};
|
package/build/configuration.d.ts
DELETED
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
import { PackageAccess, PackageList } from '@verdaccio/types/src/manifest';
|
|
2
|
-
export 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 type LoggerType = 'stdout' | 'file';
|
|
13
|
-
export type LoggerFormat = 'pretty' | 'pretty-timestamped' | 'json';
|
|
14
|
-
export type LoggerLevel = 'http' | 'fatal' | 'warn' | 'info' | 'debug' | 'trace';
|
|
15
|
-
export type LoggerConfigItem = {
|
|
16
|
-
type?: LoggerType;
|
|
17
|
-
/**
|
|
18
|
-
* The format
|
|
19
|
-
*/
|
|
20
|
-
format?: LoggerFormat;
|
|
21
|
-
path?: string;
|
|
22
|
-
level?: string;
|
|
23
|
-
colors?: boolean;
|
|
24
|
-
async?: boolean;
|
|
25
|
-
};
|
|
26
|
-
export interface ConfigWithHttps extends Config {
|
|
27
|
-
https: HttpsConf;
|
|
28
|
-
}
|
|
29
|
-
export interface PackageAccessYaml {
|
|
30
|
-
storage?: string;
|
|
31
|
-
publish?: string;
|
|
32
|
-
proxy?: string;
|
|
33
|
-
access?: string;
|
|
34
|
-
unpublish?: string;
|
|
35
|
-
}
|
|
36
|
-
export interface LoggerConfItem {
|
|
37
|
-
type: LoggerType;
|
|
38
|
-
format: LoggerFormat;
|
|
39
|
-
level: LoggerLevel;
|
|
40
|
-
}
|
|
41
|
-
export interface Headers {
|
|
42
|
-
[key: string]: string;
|
|
43
|
-
}
|
|
44
|
-
export interface UpLinkTokenConf {
|
|
45
|
-
type: TypeToken;
|
|
46
|
-
token?: string;
|
|
47
|
-
token_env?: boolean | string;
|
|
48
|
-
}
|
|
49
|
-
export interface UpLinkConf {
|
|
50
|
-
url: string;
|
|
51
|
-
ca?: string;
|
|
52
|
-
cache?: boolean;
|
|
53
|
-
timeout?: string | void;
|
|
54
|
-
maxage?: string | void;
|
|
55
|
-
max_fails?: number | void;
|
|
56
|
-
fail_timeout?: string | void;
|
|
57
|
-
headers?: Headers;
|
|
58
|
-
auth?: UpLinkTokenConf;
|
|
59
|
-
strict_ssl?: boolean | void;
|
|
60
|
-
_autogenerated?: boolean;
|
|
61
|
-
}
|
|
62
|
-
export type RateLimit = {
|
|
63
|
-
windowMs?: number;
|
|
64
|
-
max?: number;
|
|
65
|
-
};
|
|
66
|
-
export type FlagsConfig = {
|
|
67
|
-
searchRemote?: boolean;
|
|
68
|
-
changePassword?: boolean;
|
|
69
|
-
};
|
|
70
|
-
export type PackageManagers = 'pnpm' | 'yarn' | 'npm';
|
|
71
|
-
export type CommonWebConf = {
|
|
72
|
-
title?: string;
|
|
73
|
-
logo?: string;
|
|
74
|
-
favicon?: string;
|
|
75
|
-
gravatar?: boolean;
|
|
76
|
-
sort_packages?: string;
|
|
77
|
-
darkMode?: boolean;
|
|
78
|
-
url_prefix?: string;
|
|
79
|
-
language?: string;
|
|
80
|
-
login?: boolean;
|
|
81
|
-
scope?: string;
|
|
82
|
-
pkgManagers?: PackageManagers[];
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* Options are passed to the index.html
|
|
86
|
-
*/
|
|
87
|
-
export type TemplateUIOptions = {
|
|
88
|
-
uri?: string;
|
|
89
|
-
darkMode?: boolean;
|
|
90
|
-
protocol?: string;
|
|
91
|
-
host?: string;
|
|
92
|
-
basename?: string;
|
|
93
|
-
scope?: string;
|
|
94
|
-
showInfo?: boolean;
|
|
95
|
-
showSettings?: boolean;
|
|
96
|
-
showSearch?: boolean;
|
|
97
|
-
showFooter?: boolean;
|
|
98
|
-
showThemeSwitch?: boolean;
|
|
99
|
-
showDownloadTarball?: boolean;
|
|
100
|
-
showRaw?: boolean;
|
|
101
|
-
base: string;
|
|
102
|
-
primaryColor: string;
|
|
103
|
-
version?: string;
|
|
104
|
-
flags: FlagsConfig;
|
|
105
|
-
} & CommonWebConf;
|
|
106
|
-
/**
|
|
107
|
-
* Options on config.yaml for web
|
|
108
|
-
*/
|
|
109
|
-
export type WebConf = {
|
|
110
|
-
primary_color?: string;
|
|
111
|
-
enable?: boolean;
|
|
112
|
-
scriptsHead?: string[];
|
|
113
|
-
scriptsBodyAfter?: string[];
|
|
114
|
-
metaScripts?: string[];
|
|
115
|
-
bodyBefore?: string[];
|
|
116
|
-
bodyAfter?: string[];
|
|
117
|
-
} & CommonWebConf;
|
|
118
|
-
export interface UpLinksConfList {
|
|
119
|
-
[key: string]: UpLinkConf;
|
|
120
|
-
}
|
|
121
|
-
export interface AuthHtpasswd {
|
|
122
|
-
file: string;
|
|
123
|
-
max_users: number;
|
|
124
|
-
}
|
|
125
|
-
export type AuthConf = any | AuthHtpasswd;
|
|
126
|
-
export interface JWTOptions {
|
|
127
|
-
sign: JWTSignOptions;
|
|
128
|
-
verify: JWTVerifyOptions;
|
|
129
|
-
}
|
|
130
|
-
export interface JWTSignOptions {
|
|
131
|
-
algorithm?: string;
|
|
132
|
-
expiresIn?: string;
|
|
133
|
-
notBefore?: string;
|
|
134
|
-
ignoreExpiration?: boolean;
|
|
135
|
-
maxAge?: string | number;
|
|
136
|
-
clockTimestamp?: number;
|
|
137
|
-
}
|
|
138
|
-
export interface JWTVerifyOptions {
|
|
139
|
-
algorithm?: string;
|
|
140
|
-
expiresIn?: string;
|
|
141
|
-
notBefore?: string | number;
|
|
142
|
-
ignoreExpiration?: boolean;
|
|
143
|
-
maxAge?: string | number;
|
|
144
|
-
clockTimestamp?: number;
|
|
145
|
-
}
|
|
146
|
-
export interface APITokenOptions {
|
|
147
|
-
legacy: boolean;
|
|
148
|
-
jwt?: JWTOptions;
|
|
149
|
-
}
|
|
150
|
-
export interface Security {
|
|
151
|
-
enhancedLegacySignature?: boolean;
|
|
152
|
-
web: JWTOptions;
|
|
153
|
-
api: APITokenOptions;
|
|
154
|
-
}
|
|
155
|
-
export interface PublishOptions {
|
|
156
|
-
allow_offline: boolean;
|
|
157
|
-
}
|
|
158
|
-
export interface ListenAddress {
|
|
159
|
-
[key: string]: string;
|
|
160
|
-
}
|
|
161
|
-
export interface HttpsConfKeyCert {
|
|
162
|
-
key: string;
|
|
163
|
-
cert: string;
|
|
164
|
-
ca?: string;
|
|
165
|
-
}
|
|
166
|
-
export interface HttpsConfPfx {
|
|
167
|
-
pfx: string;
|
|
168
|
-
passphrase?: string;
|
|
169
|
-
}
|
|
170
|
-
export type HttpsConf = HttpsConfKeyCert | HttpsConfPfx;
|
|
171
|
-
export interface Notifications {
|
|
172
|
-
method: string;
|
|
173
|
-
packagePattern: RegExp;
|
|
174
|
-
packagePatternFlags: string;
|
|
175
|
-
endpoint: string;
|
|
176
|
-
content: string;
|
|
177
|
-
headers: Headers;
|
|
178
|
-
}
|
|
179
|
-
export type Notification = Notifications;
|
|
180
|
-
export type ServerSettingsConf = {
|
|
181
|
-
rateLimit: RateLimit;
|
|
182
|
-
keepAliveTimeout?: number;
|
|
183
|
-
/**
|
|
184
|
-
* Plugins should be prefixed verdaccio-XXXXXX by default.
|
|
185
|
-
* To override the default prefix, use this property without `-`
|
|
186
|
-
* If you set pluginPrefix: acme, the packages to resolve will be
|
|
187
|
-
* acme-XXXXXX
|
|
188
|
-
*/
|
|
189
|
-
pluginPrefix?: string;
|
|
190
|
-
passwordValidationRegex?: RegExp;
|
|
191
|
-
};
|
|
192
|
-
/**
|
|
193
|
-
* YAML configuration file available options.
|
|
194
|
-
*/
|
|
195
|
-
export interface ConfigYaml {
|
|
196
|
-
_debug?: boolean;
|
|
197
|
-
storage?: string | void;
|
|
198
|
-
packages: PackageList;
|
|
199
|
-
uplinks: UpLinksConfList;
|
|
200
|
-
log?: LoggerConfItem;
|
|
201
|
-
logs?: LoggerConfItem;
|
|
202
|
-
web?: WebConf;
|
|
203
|
-
auth?: AuthConf;
|
|
204
|
-
security: Security;
|
|
205
|
-
publish?: PublishOptions;
|
|
206
|
-
store?: any;
|
|
207
|
-
listen?: ListenAddress;
|
|
208
|
-
https?: HttpsConf;
|
|
209
|
-
user_agent?: string;
|
|
210
|
-
http_proxy?: string;
|
|
211
|
-
plugins?: string | void | null;
|
|
212
|
-
https_proxy?: string;
|
|
213
|
-
no_proxy?: string;
|
|
214
|
-
max_body_size?: string;
|
|
215
|
-
notifications?: Notifications;
|
|
216
|
-
notify?: Notifications | Notifications[];
|
|
217
|
-
middlewares?: any;
|
|
218
|
-
filters?: any;
|
|
219
|
-
url_prefix?: string;
|
|
220
|
-
server?: ServerSettingsConf;
|
|
221
|
-
flags?: FlagsConfig;
|
|
222
|
-
userRateLimit?: RateLimit;
|
|
223
|
-
configPath?: string;
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Configuration object with additional methods for configuration, includes yaml and internal medatada.
|
|
227
|
-
* @interface Config
|
|
228
|
-
* @extends {ConfigYaml}
|
|
229
|
-
*/
|
|
230
|
-
export interface Config extends Omit<ConfigYaml, 'packages' | 'security' | 'configPath'> {
|
|
231
|
-
server_id: string;
|
|
232
|
-
secret: string;
|
|
233
|
-
configPath: string;
|
|
234
|
-
self_path?: string;
|
|
235
|
-
packages: PackageList;
|
|
236
|
-
security: Security;
|
|
237
|
-
checkSecretKey(token: string): string;
|
|
238
|
-
getMatchedPackagesSpec(storage: string): PackageAccess | void;
|
|
239
|
-
[key: string]: any;
|
|
240
|
-
}
|
|
241
|
-
export interface AllowAccess {
|
|
242
|
-
name: string;
|
|
243
|
-
version?: string;
|
|
244
|
-
tag?: string;
|
|
245
|
-
}
|
|
246
|
-
export interface AuthPackageAllow extends PackageAccess, AllowAccess {
|
|
247
|
-
}
|
package/build/manifest.d.ts
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
export interface PackageAccess {
|
|
2
|
-
storage?: string;
|
|
3
|
-
publish?: string[];
|
|
4
|
-
proxy?: string[];
|
|
5
|
-
access?: string[];
|
|
6
|
-
unpublish: string[];
|
|
7
|
-
}
|
|
8
|
-
export interface PackageList {
|
|
9
|
-
[key: string]: PackageAccess;
|
|
10
|
-
}
|
|
11
|
-
export interface MergeTags {
|
|
12
|
-
[key: string]: string;
|
|
13
|
-
}
|
|
14
|
-
export interface DistFile {
|
|
15
|
-
url: string;
|
|
16
|
-
sha: string;
|
|
17
|
-
registry?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface DistFiles {
|
|
20
|
-
[key: string]: DistFile;
|
|
21
|
-
}
|
|
22
|
-
export interface Token {
|
|
23
|
-
user: string;
|
|
24
|
-
token: string;
|
|
25
|
-
key: string;
|
|
26
|
-
cidr?: string[];
|
|
27
|
-
readonly: boolean;
|
|
28
|
-
created: number | string;
|
|
29
|
-
updated?: number | string;
|
|
30
|
-
}
|
|
31
|
-
export interface AttachMents {
|
|
32
|
-
[key: string]: AttachMentsItem;
|
|
33
|
-
}
|
|
34
|
-
export interface AttachMentsItem {
|
|
35
|
-
content_type?: string;
|
|
36
|
-
data?: string;
|
|
37
|
-
length?: number;
|
|
38
|
-
shasum?: string;
|
|
39
|
-
version?: string;
|
|
40
|
-
}
|
|
41
|
-
export interface GenericBody {
|
|
42
|
-
[key: string]: string;
|
|
43
|
-
}
|
|
44
|
-
export interface UpLinkMetadata {
|
|
45
|
-
etag: string;
|
|
46
|
-
fetched: number;
|
|
47
|
-
}
|
|
48
|
-
export interface UpLinks {
|
|
49
|
-
[key: string]: UpLinkMetadata;
|
|
50
|
-
}
|
|
51
|
-
export interface Signatures {
|
|
52
|
-
keyid: string;
|
|
53
|
-
sig: string;
|
|
54
|
-
}
|
|
55
|
-
export interface Dist {
|
|
56
|
-
'npm-signature'?: string;
|
|
57
|
-
signatures?: Signatures[];
|
|
58
|
-
fileCount?: number;
|
|
59
|
-
integrity?: string;
|
|
60
|
-
shasum: string;
|
|
61
|
-
unpackedSize?: number;
|
|
62
|
-
tarball: string;
|
|
63
|
-
}
|
|
64
|
-
export interface Author {
|
|
65
|
-
username?: string;
|
|
66
|
-
name: string;
|
|
67
|
-
email?: string;
|
|
68
|
-
url?: string;
|
|
69
|
-
}
|
|
70
|
-
export interface PackageUsers {
|
|
71
|
-
[key: string]: boolean;
|
|
72
|
-
}
|
|
73
|
-
export interface Tags {
|
|
74
|
-
[key: string]: Version;
|
|
75
|
-
}
|
|
76
|
-
export interface Version {
|
|
77
|
-
name: string;
|
|
78
|
-
version: string;
|
|
79
|
-
directories?: any;
|
|
80
|
-
dist: Dist;
|
|
81
|
-
author: string | Author;
|
|
82
|
-
main: string;
|
|
83
|
-
homemage?: string;
|
|
84
|
-
license?: string;
|
|
85
|
-
readme: string;
|
|
86
|
-
readmeFileName?: string;
|
|
87
|
-
readmeFilename?: string;
|
|
88
|
-
description: string;
|
|
89
|
-
bin?: string;
|
|
90
|
-
bugs?: any;
|
|
91
|
-
files?: string[];
|
|
92
|
-
gitHead?: string;
|
|
93
|
-
maintainers?: Author[];
|
|
94
|
-
contributors?: Author[];
|
|
95
|
-
repository?: string | any;
|
|
96
|
-
scripts?: any;
|
|
97
|
-
homepage?: string;
|
|
98
|
-
etag?: string;
|
|
99
|
-
dependencies?: Dependencies;
|
|
100
|
-
peerDependencies?: Dependencies;
|
|
101
|
-
devDependencies?: Dependencies;
|
|
102
|
-
optionalDependencies?: Dependencies;
|
|
103
|
-
bundleDependencies?: Dependencies;
|
|
104
|
-
keywords?: string | string[];
|
|
105
|
-
nodeVersion?: string;
|
|
106
|
-
_id: string;
|
|
107
|
-
_npmVersion?: string;
|
|
108
|
-
_npmUser: Author;
|
|
109
|
-
_hasShrinkwrap?: boolean;
|
|
110
|
-
deprecated?: string;
|
|
111
|
-
funding?: {
|
|
112
|
-
type: string;
|
|
113
|
-
url: string;
|
|
114
|
-
};
|
|
115
|
-
engines?: Engines;
|
|
116
|
-
hasInstallScript?: boolean;
|
|
117
|
-
}
|
|
118
|
-
export interface Dependencies {
|
|
119
|
-
[key: string]: string;
|
|
120
|
-
}
|
|
121
|
-
export interface Engines {
|
|
122
|
-
[key: string]: string;
|
|
123
|
-
}
|
|
124
|
-
export interface Versions {
|
|
125
|
-
[key: string]: Version;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* @deprecated use Manifest instead
|
|
129
|
-
*/
|
|
130
|
-
export interface Package {
|
|
131
|
-
_id?: string;
|
|
132
|
-
name: string;
|
|
133
|
-
versions: Versions;
|
|
134
|
-
'dist-tags': GenericBody;
|
|
135
|
-
time: GenericBody;
|
|
136
|
-
readme?: string;
|
|
137
|
-
users?: PackageUsers;
|
|
138
|
-
_distfiles: DistFiles;
|
|
139
|
-
_attachments: AttachMents;
|
|
140
|
-
_uplinks: UpLinks;
|
|
141
|
-
_rev: string;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Represents upstream manifest from another registry
|
|
145
|
-
*/
|
|
146
|
-
export interface FullRemoteManifest {
|
|
147
|
-
_id?: string;
|
|
148
|
-
_rev?: string;
|
|
149
|
-
name: string;
|
|
150
|
-
description?: string;
|
|
151
|
-
'dist-tags': GenericBody;
|
|
152
|
-
time: GenericBody;
|
|
153
|
-
versions: Versions;
|
|
154
|
-
maintainers?: Author[];
|
|
155
|
-
/** store the latest readme **/
|
|
156
|
-
readme?: string;
|
|
157
|
-
/** store star assigned to this packages by users */
|
|
158
|
-
users?: PackageUsers;
|
|
159
|
-
access?: any;
|
|
160
|
-
bugs?: {
|
|
161
|
-
url: string;
|
|
162
|
-
};
|
|
163
|
-
license?: string;
|
|
164
|
-
homepage?: string;
|
|
165
|
-
repository?: string | {
|
|
166
|
-
type?: string;
|
|
167
|
-
url: string;
|
|
168
|
-
directory?: string;
|
|
169
|
-
};
|
|
170
|
-
keywords?: string[];
|
|
171
|
-
author?: string | Author;
|
|
172
|
-
}
|
|
173
|
-
export interface Manifest extends FullRemoteManifest, PublishManifest {
|
|
174
|
-
/**
|
|
175
|
-
* store fast access to the dist url of an specific tarball, instead search version
|
|
176
|
-
* by id, just the tarball id is faster.
|
|
177
|
-
*
|
|
178
|
-
* The _distfiles is created only when a package is being sync from an upstream.
|
|
179
|
-
* also used to fetch tarballs from upstream, the private publish tarballs are not stored in
|
|
180
|
-
* this object because they are not published in the upstream registry.
|
|
181
|
-
*/
|
|
182
|
-
_distfiles: DistFiles;
|
|
183
|
-
/**
|
|
184
|
-
* Store access cache metadata, to avoid to fetch the same metadata multiple times.
|
|
185
|
-
*
|
|
186
|
-
* The key represents the uplink id which is composed of a etag and a fetched timestamp.
|
|
187
|
-
*
|
|
188
|
-
* The fetched timestamp is the time when the metadata was fetched, used to avoid to fetch the
|
|
189
|
-
* same metadata until the metadata is older than the last fetch.
|
|
190
|
-
*/
|
|
191
|
-
_uplinks: UpLinks;
|
|
192
|
-
/**
|
|
193
|
-
* store the revision of the manifest
|
|
194
|
-
*/
|
|
195
|
-
_rev: string;
|
|
196
|
-
}
|
|
197
|
-
export type AbbreviatedVersion = Pick<Version, 'name' | 'version' | 'description' | 'dependencies' | 'devDependencies' | 'bin' | 'dist' | 'engines' | 'funding' | 'peerDependencies'>;
|
|
198
|
-
export interface AbbreviatedVersions {
|
|
199
|
-
[key: string]: AbbreviatedVersion;
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
*
|
|
203
|
-
*/
|
|
204
|
-
export type AbbreviatedManifest = Pick<Manifest, 'name' | 'dist-tags' | 'time'> & {
|
|
205
|
-
modified: string;
|
|
206
|
-
versions: AbbreviatedVersions;
|
|
207
|
-
};
|
|
208
|
-
export interface PublishManifest {
|
|
209
|
-
/**
|
|
210
|
-
* The `_attachments` object has different usages:
|
|
211
|
-
*
|
|
212
|
-
* - When a package is published, it contains the tarball as an string, this string is used to be
|
|
213
|
-
* converted as a tarball, usually attached to the package but not stored in the database.
|
|
214
|
-
* - If user runs `npm star` the _attachments will be at the manifest body but empty.
|
|
215
|
-
*
|
|
216
|
-
* It has also an internal usage:
|
|
217
|
-
*
|
|
218
|
-
* - Used as a cache for the tarball, quick access to the tarball shasum, etc. Instead
|
|
219
|
-
* iterate versions and find the right one, just using the tarball as a key which is what
|
|
220
|
-
* the package manager sends to the registry.
|
|
221
|
-
*
|
|
222
|
-
* - A `_attachments` object is added every time a private tarball is published, upstream cached tarballs are
|
|
223
|
-
* not being part of this object, only for published private packages.
|
|
224
|
-
*
|
|
225
|
-
* Note: This field is removed when the package is accesed through the web user interface.
|
|
226
|
-
* */
|
|
227
|
-
_attachments: AttachMents;
|
|
228
|
-
}
|
package/build/plugins/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@verdaccio/types/src/plugins/storage';
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Callback, CallbackAction } from '@verdaccio/types/src/commons';
|
|
2
|
-
import { Manifest, Token } from '@verdaccio/types/src/manifest';
|
|
3
|
-
export type StorageList = string[];
|
|
4
|
-
export interface ILocalStorage {
|
|
5
|
-
add(name: string): void;
|
|
6
|
-
remove(name: string): void;
|
|
7
|
-
get(): StorageList;
|
|
8
|
-
sync(): void;
|
|
9
|
-
}
|
|
10
|
-
export interface TokenFilter {
|
|
11
|
-
user: string;
|
|
12
|
-
}
|
|
13
|
-
export interface ITokenActions {
|
|
14
|
-
saveToken(token: Token): Promise<any>;
|
|
15
|
-
deleteToken(user: string, tokenKey: string): Promise<any>;
|
|
16
|
-
readTokens(filter: TokenFilter): Promise<Token[]>;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* This method expect return a Package object
|
|
20
|
-
* eg:
|
|
21
|
-
* {
|
|
22
|
-
* name: string;
|
|
23
|
-
* time: number;
|
|
24
|
-
* ... and other props
|
|
25
|
-
* }
|
|
26
|
-
*
|
|
27
|
-
* The `cb` callback object will be executed if:
|
|
28
|
-
* - it might return object (truly)
|
|
29
|
-
* - it might reutrn null
|
|
30
|
-
*/
|
|
31
|
-
export type onSearchPackage = (item: Manifest, cb: CallbackAction) => void;
|
|
32
|
-
export type onEndSearchPackage = (error?: any) => void;
|
|
33
|
-
export type onValidatePackage = (name: string) => boolean;
|
|
34
|
-
export type StorageUpdateCallback = (data: Manifest, cb: CallbackAction) => void;
|
|
35
|
-
export type StorageWriteCallback = (name: string, json: Manifest, callback: Callback) => void;
|
|
36
|
-
export type PackageTransformer = (pkg: Manifest) => Manifest;
|
|
37
|
-
export type ReadPackageCallback = (err: any | null, data?: Manifest) => void;
|
package/build/search.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export type PublisherMaintainer = {
|
|
2
|
-
username: string;
|
|
3
|
-
email: string;
|
|
4
|
-
};
|
|
5
|
-
export type SearchPackageBody = {
|
|
6
|
-
name: string;
|
|
7
|
-
scope: string;
|
|
8
|
-
description: string;
|
|
9
|
-
author: string | PublisherMaintainer;
|
|
10
|
-
version: string;
|
|
11
|
-
keywords: string | string[] | undefined;
|
|
12
|
-
date: string;
|
|
13
|
-
links?: {
|
|
14
|
-
npm: string;
|
|
15
|
-
homepage?: string;
|
|
16
|
-
repository?: string;
|
|
17
|
-
bugs?: string;
|
|
18
|
-
};
|
|
19
|
-
publisher?: any;
|
|
20
|
-
maintainers?: PublisherMaintainer[];
|
|
21
|
-
};
|
|
22
|
-
export type SearchResultWeb = {
|
|
23
|
-
name: string;
|
|
24
|
-
version: string;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
package/build/types.d.ts
DELETED