@verdaccio/config 8.0.0-next-8.12 → 8.0.0-next-8.14
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 +76 -4
- package/build/conf/default.yaml +75 -50
- package/build/conf/docker.yaml +84 -65
- package/build/config.js +2 -2
- package/build/config.js.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.js +12 -0
- package/build/index.js.map +1 -1
- package/build/uplinks.d.ts +1 -0
- package/build/uplinks.js +6 -2
- package/build/uplinks.js.map +1 -1
- package/package.json +9 -5
- package/.babelrc +0 -14
- package/CHANGELOG.md +0 -1468
- package/src/agent.ts +0 -17
- package/src/builder.ts +0 -71
- package/src/conf/README.md +0 -8
- package/src/conf/default.yaml +0 -212
- package/src/conf/docker.yaml +0 -218
- package/src/conf/index.ts +0 -8
- package/src/config-path.ts +0 -210
- package/src/config-utils.ts +0 -40
- package/src/config.ts +0 -239
- package/src/index.ts +0 -11
- package/src/package-access.ts +0 -82
- package/src/parse.ts +0 -63
- package/src/security.ts +0 -22
- package/src/serverSettings.ts +0 -10
- package/src/token.ts +0 -12
- package/src/uplinks.ts +0 -75
- package/src/user.ts +0 -53
- package/test/__snapshots__/builder.spec.ts.snap +0 -24
- package/test/__snapshots__/config-parsing.spec.ts.snap +0 -44
- package/test/agent.spec.ts +0 -44
- package/test/builder.spec.ts +0 -126
- package/test/config-parsing.spec.ts +0 -71
- package/test/config-utils.spec.ts +0 -22
- package/test/config.path.spec.ts +0 -134
- package/test/config.spec.ts +0 -249
- package/test/package-access.spec.ts +0 -153
- package/test/partials/config/js/default.js +0 -15
- package/test/partials/config/js/from-js-to-yaml.js +0 -15
- package/test/partials/config/js/invalid.js +0 -1
- package/test/partials/config/json/README.md +0 -7
- package/test/partials/config/json/default.json +0 -55
- package/test/partials/config/json/invalid.json +0 -1
- package/test/partials/config/yaml/config-getMatchedPackagesSpec.yaml +0 -17
- package/test/partials/config/yaml/deprecated-pkgs-basic.yaml +0 -14
- package/test/partials/config/yaml/pkgs-basic-no-access.yaml +0 -7
- package/test/partials/config/yaml/pkgs-basic-no-proxy.yaml +0 -7
- package/test/partials/config/yaml/pkgs-basic-no-publish.yaml +0 -7
- package/test/partials/config/yaml/pkgs-basic.yaml +0 -9
- package/test/partials/config/yaml/pkgs-custom.yaml +0 -17
- package/test/partials/config/yaml/pkgs-empty.yaml +0 -4
- package/test/partials/config/yaml/pkgs-multi-group.yaml +0 -9
- package/test/partials/config/yaml/storage.yaml +0 -4
- package/test/partials/config/yaml/uplink-basic.yaml +0 -7
- package/test/partials/config/yaml/uplink-wrong.yaml +0 -9
- package/test/partials/exist/README.md +0 -1
- package/test/token.spec.ts +0 -8
- package/test/uplinks.spec.ts +0 -94
- package/test/utils/index.ts +0 -1
- package/test/utils/parse-configuration-file.ts +0 -8
- package/test/utils.spec.ts +0 -29
- package/tsconfig.build.json +0 -9
- package/tsconfig.json +0 -17
package/README.md
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
# @verdaccio/config
|
|
1
|
+
# @verdaccio/config - Verdaccio Configuration
|
|
2
|
+
|
|
3
|
+
[](https://verdaccio.org)
|
|
4
|
+
[](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)
|
|
5
|
+
[](https://github.com/verdaccio/verdaccio)
|
|
6
|
+
[](https://npmjs.com/package/@verdaccio/config)
|
|
7
|
+
|
|
8
|
+
[](https://verdaccio.org/docs)
|
|
9
|
+
[](https://discord.com/channels/388674437219745793)
|
|
10
|
+
[](https://bsky.app/profile/verdaccio.org)
|
|
11
|
+
[](https://opencollective.com/verdaccio/contribute)
|
|
12
|
+
[](https://opencollective.com/verdaccio/contribute)
|
|
13
|
+
|
|
14
|
+
[](https://www.npmjs.com/package/verdaccio)
|
|
15
|
+
[](https://hub.docker.com/r/verdaccio/verdaccio)
|
|
16
|
+
[](https://github.com/verdaccio/verdaccio/stargazers)
|
|
2
17
|
|
|
3
18
|
## Overview
|
|
4
19
|
|
|
@@ -69,9 +84,66 @@ const defaultConfig = getDefaultConfig();
|
|
|
69
84
|
- `fromJStoYAML(config: ConfigYaml): string`: Converts a JavaScript configuration object to YAML format.
|
|
70
85
|
- `parseConfigFile(filePath: string): ConfigYaml`: Parses a configuration file from the specified path and returns the configuration object.
|
|
71
86
|
|
|
72
|
-
|
|
87
|
+
## Donations
|
|
88
|
+
|
|
89
|
+
Verdaccio is run by **volunteers**; nobody is working full-time on it. If you find this project to be useful and would like to support its development, consider making a donation - **your logo might end up in this readme.** 😉
|
|
90
|
+
|
|
91
|
+
**[Donate](https://opencollective.com/verdaccio)** 💵👍🏻 starting from _\$1/month_ or just one single contribution.
|
|
92
|
+
|
|
93
|
+
## Report a vulnerability
|
|
94
|
+
|
|
95
|
+
If you want to report a security vulnerability, please follow the steps which we have defined for you in our [security policy](https://github.com/verdaccio/verdaccio/security/policy).
|
|
96
|
+
|
|
97
|
+
## Open Collective Sponsors
|
|
98
|
+
|
|
99
|
+
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/verdaccio/contribute)]
|
|
100
|
+
|
|
101
|
+
[](https://opencollective.com/verdaccio/sponsor/0/website)
|
|
102
|
+
[](https://opencollective.com/verdaccio/sponsor/1/website)
|
|
103
|
+
[](https://opencollective.com/verdaccio/sponsor/2/website)
|
|
104
|
+
[](https://opencollective.com/verdaccio/sponsor/3/website)
|
|
105
|
+
[](https://opencollective.com/verdaccio/sponsor/4/website)
|
|
106
|
+
[](https://opencollective.com/verdaccio/sponsor/5/website)
|
|
107
|
+
[](https://opencollective.com/verdaccio/sponsor/6/website)
|
|
108
|
+
[](https://opencollective.com/verdaccio/sponsor/7/website)
|
|
109
|
+
[](https://opencollective.com/verdaccio/sponsor/8/website)
|
|
110
|
+
[](https://opencollective.com/verdaccio/sponsor/9/website)
|
|
111
|
+
|
|
112
|
+
## Open Collective Backers
|
|
113
|
+
|
|
114
|
+
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/verdaccio/contribute)]
|
|
115
|
+
|
|
116
|
+
[](https://opencollective.com/verdaccio/contributes)
|
|
117
|
+
|
|
118
|
+
## Special Thanks
|
|
119
|
+
|
|
120
|
+
Thanks to the following companies to help us to achieve our goals providing free open source licenses.
|
|
121
|
+
|
|
122
|
+
[](https://www.jetbrains.com/)
|
|
123
|
+
[](https://crowdin.com/)
|
|
124
|
+
|
|
125
|
+
## Contributors
|
|
126
|
+
|
|
127
|
+
This project exists thanks to all the people who contribute. [[Contribute](https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md)].
|
|
128
|
+
|
|
129
|
+
[](https://github.com/verdaccio/verdaccio/graphs/contributors)
|
|
130
|
+
|
|
131
|
+
## FAQ / Contact / Troubleshoot
|
|
132
|
+
|
|
133
|
+
If you have any issue you can try the following options. Do not hesitate to ask or check our issues database. Perhaps someone has asked already what you are looking for.
|
|
134
|
+
|
|
135
|
+
- [Blog](https://verdaccio.org/blog/)
|
|
136
|
+
- [Donations](https://opencollective.com/verdaccio)
|
|
137
|
+
- [Reporting an issue](https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md#reporting-a-bug)
|
|
138
|
+
- [Running discussions](https://github.com/orgs/verdaccio/discussions)
|
|
139
|
+
- [Chat](https://discord.com/channels/388674437219745793)
|
|
140
|
+
- [Logos](https://verdaccio.org/docs/logo)
|
|
141
|
+
- [Docker Examples](https://github.com/verdaccio/verdaccio/tree/master/docker-examples)
|
|
142
|
+
- [FAQ](https://github.com/verdaccio/verdaccio/issues?utf8=%E2%9C%93&q=is%3Aissue%20label%3Aquestion%20)
|
|
143
|
+
|
|
144
|
+
## License
|
|
73
145
|
|
|
74
146
|
Verdaccio is [MIT licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)
|
|
75
147
|
|
|
76
|
-
The Verdaccio documentation and logos (excluding /thanks, e.g., .md, .png, .sketch
|
|
77
|
-
[Creative Commons licensed](https://
|
|
148
|
+
The Verdaccio documentation and logos (excluding /thanks, e.g., .md, .png, .sketch files within the /assets folder) are
|
|
149
|
+
[Creative Commons licensed](https://creativecommons.org/licenses/by/4.0/).
|
package/build/conf/default.yaml
CHANGED
|
@@ -4,34 +4,38 @@
|
|
|
4
4
|
# improve security.
|
|
5
5
|
#
|
|
6
6
|
# Look here for more config file examples:
|
|
7
|
-
# https://github.com/verdaccio/verdaccio/
|
|
7
|
+
# https://github.com/verdaccio/verdaccio/blob/master/docker-examples/README.md
|
|
8
8
|
#
|
|
9
9
|
# Read about the best practices
|
|
10
10
|
# https://verdaccio.org/docs/best
|
|
11
11
|
|
|
12
|
-
#
|
|
12
|
+
# Path to a directory with all packages
|
|
13
13
|
storage: ./storage
|
|
14
|
-
|
|
15
|
-
#
|
|
14
|
+
|
|
15
|
+
# Path to a directory with plugins to include, the plugins folder has the higher priority for loading plugins
|
|
16
|
+
# Disable this folder to avoid warnings if is not used
|
|
16
17
|
# plugins: ./plugins
|
|
17
18
|
|
|
19
|
+
# Web UI settings
|
|
18
20
|
# https://verdaccio.org/docs/webui
|
|
19
21
|
web:
|
|
20
22
|
title: Verdaccio
|
|
21
|
-
#
|
|
23
|
+
# Disable complete web UI
|
|
24
|
+
# enabled: false
|
|
25
|
+
# Custom colors for header background and font
|
|
22
26
|
# primaryColor: "#4b5e40"
|
|
23
|
-
#
|
|
27
|
+
# Custom logos and favicon
|
|
24
28
|
# logo: ./path/to/logo.png
|
|
25
29
|
# logoDark: ./path/to/logoDark.png
|
|
26
30
|
# favicon: ./path/to/favicon.ico
|
|
27
|
-
#
|
|
31
|
+
# Disable gravatar support
|
|
28
32
|
# gravatar: false
|
|
29
|
-
#
|
|
30
|
-
# sort_packages: asc
|
|
31
|
-
#
|
|
33
|
+
# By default, packages are ordered ascending
|
|
34
|
+
# sort_packages: asc | desc
|
|
35
|
+
# Convert your UI to the dark side
|
|
32
36
|
# darkMode: true
|
|
33
37
|
# html_cache: true
|
|
34
|
-
#
|
|
38
|
+
# By default, all features are displayed
|
|
35
39
|
# login: true
|
|
36
40
|
# showInfo: true
|
|
37
41
|
# showSettings: true
|
|
@@ -42,20 +46,25 @@ web:
|
|
|
42
46
|
# showRaw: true
|
|
43
47
|
# showDownloadTarball: true
|
|
44
48
|
# showUplinks: true
|
|
45
|
-
#
|
|
49
|
+
#
|
|
50
|
+
# HTML tags injected before ends </head>
|
|
51
|
+
# metaScripts:
|
|
52
|
+
# - '<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>'
|
|
53
|
+
# - '<script type="text/javascript" src="https://browser.sentry-cdn.com/5.15.5/bundle.min.js"></script>'
|
|
54
|
+
# - '<meta name="robots" content="noindex">'
|
|
55
|
+
#
|
|
56
|
+
# HTML tags injected as first child in <body>
|
|
57
|
+
# scriptsBodyBefore:
|
|
58
|
+
# - '<div id="myId">html before webpack scripts</div>'
|
|
59
|
+
#
|
|
60
|
+
# HTML tags injected as last child in </body>
|
|
46
61
|
# scriptsBodyAfter:
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
# - '<script type="text/javascript" src="https://browser.sentry-cdn.com/5.15.5/bundle.min.js"></script>'
|
|
52
|
-
# - '<meta name="robots" content="noindex" />'
|
|
53
|
-
# HTML tags injected first child at <body/>
|
|
54
|
-
# bodyBefore:
|
|
55
|
-
# - '<div id="myId">html before webpack scripts</div>'
|
|
56
|
-
# Public path for template manifest scripts (only manifest)
|
|
57
|
-
# publicPath: http://somedomain.org/
|
|
62
|
+
# - '<script type="text/javascript" src="https://my.company.com/customJS.min.js"></script>'
|
|
63
|
+
#
|
|
64
|
+
# Public path for template manifest scripts (only manifest)
|
|
65
|
+
# publicPath: http://somedomain.org/
|
|
58
66
|
|
|
67
|
+
# Settings for authentication plugin
|
|
59
68
|
# https://verdaccio.org/docs/configuration#authentication
|
|
60
69
|
auth:
|
|
61
70
|
htpasswd:
|
|
@@ -64,8 +73,8 @@ auth:
|
|
|
64
73
|
# You can set this to -1 to disable registration.
|
|
65
74
|
# max_users: 1000
|
|
66
75
|
|
|
76
|
+
# A list of other known repositories we can talk to
|
|
67
77
|
# https://verdaccio.org/docs/configuration#uplinks
|
|
68
|
-
# a list of other known repositories we can talk to
|
|
69
78
|
uplinks:
|
|
70
79
|
npmjs:
|
|
71
80
|
url: https://registry.npmjs.org/
|
|
@@ -97,7 +106,7 @@ packages:
|
|
|
97
106
|
# if package is not available locally, proxy requests to 'npmjs' registry
|
|
98
107
|
proxy: npmjs
|
|
99
108
|
|
|
100
|
-
# To improve your security configuration and
|
|
109
|
+
# To improve your security configuration and avoid dependency confusion
|
|
101
110
|
# consider removing the proxy property for private packages
|
|
102
111
|
# https://verdaccio.org/docs/best#remove-proxy-to-increase-security-at-private-packages
|
|
103
112
|
|
|
@@ -107,14 +116,14 @@ packages:
|
|
|
107
116
|
# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
|
|
108
117
|
server:
|
|
109
118
|
keepAliveTimeout: 60
|
|
110
|
-
# The pluginPrefix replaces the default plugins prefix which is `verdaccio
|
|
111
|
-
# the
|
|
119
|
+
# The pluginPrefix replaces the default plugins prefix which is `verdaccio`. Please don't include `-`. If `something` is provided
|
|
120
|
+
# the resolved package will be `something-xxxx`.
|
|
112
121
|
# pluginPrefix: something
|
|
113
122
|
# A regex for the password validation /.{3}$/ (3 characters min)
|
|
114
123
|
# An example to limit to 10 characters minimum
|
|
115
124
|
# passwordValidationRegex: /.{10}$/
|
|
116
125
|
# Allow `req.ip` to resolve properly when Verdaccio is behind a proxy or load-balancer
|
|
117
|
-
#
|
|
126
|
+
# https://expressjs.com/en/guide/behind-proxies.html
|
|
118
127
|
# trustProxy: '127.0.0.1'
|
|
119
128
|
|
|
120
129
|
# https://verdaccio.org/docs/configuration#offline-publish
|
|
@@ -123,18 +132,24 @@ server:
|
|
|
123
132
|
# check_owners: false
|
|
124
133
|
# keep_readmes: 'latest' | 'tagged' | 'all'
|
|
125
134
|
|
|
135
|
+
# Define public URL of registry in combination with VERDACCIO_PUBLIC_URL environment variable
|
|
126
136
|
# https://verdaccio.org/docs/configuration#url-prefix
|
|
127
137
|
# url_prefix: /verdaccio/
|
|
128
|
-
#
|
|
138
|
+
#
|
|
139
|
+
# Examples:
|
|
140
|
+
# VERDACCIO_PUBLIC_URL='https://somedomain.org'
|
|
129
141
|
# url_prefix: '/my_prefix'
|
|
130
142
|
# // url -> https://somedomain.org/my_prefix/
|
|
131
|
-
#
|
|
143
|
+
#
|
|
144
|
+
# VERDACCIO_PUBLIC_URL='https://somedomain.org'
|
|
132
145
|
# url_prefix: '/'
|
|
133
146
|
# // url -> https://somedomain.org/
|
|
134
|
-
#
|
|
147
|
+
#
|
|
148
|
+
# VERDACCIO_PUBLIC_URL='https://somedomain.org/first_prefix'
|
|
135
149
|
# url_prefix: '/second_prefix'
|
|
136
|
-
# // url -> https://somedomain.org/second_prefix/
|
|
150
|
+
# // url -> https://somedomain.org/second_prefix/
|
|
137
151
|
|
|
152
|
+
# Security settings
|
|
138
153
|
# https://verdaccio.org/docs/configuration#security
|
|
139
154
|
# security:
|
|
140
155
|
# api:
|
|
@@ -160,12 +175,12 @@ server:
|
|
|
160
175
|
|
|
161
176
|
# https://verdaccio.org/docs/configuration#listen-port
|
|
162
177
|
# listen:
|
|
163
|
-
#
|
|
164
|
-
#
|
|
165
|
-
#
|
|
166
|
-
#
|
|
167
|
-
#
|
|
168
|
-
#
|
|
178
|
+
# - localhost:4873 # default value
|
|
179
|
+
# - http://localhost:4873 # same thing
|
|
180
|
+
# - 0.0.0.0:4873 # listen on all addresses (INADDR_ANY)
|
|
181
|
+
# - https://example.org:4873 # if you want to use https
|
|
182
|
+
# - "[::1]:4873" # ipv6
|
|
183
|
+
# - unix:/tmp/verdaccio.sock # unix socket
|
|
169
184
|
|
|
170
185
|
# The HTTPS configuration is useful if you do not consider use a HTTP Proxy
|
|
171
186
|
# https://verdaccio.org/docs/configuration#https
|
|
@@ -177,36 +192,46 @@ server:
|
|
|
177
192
|
# https://verdaccio.org/docs/configuration#proxy
|
|
178
193
|
# http_proxy: http://something.local/
|
|
179
194
|
# https_proxy: https://something.local/
|
|
195
|
+
# no_proxy: localhost,127.0.0.1,server.local
|
|
180
196
|
|
|
181
197
|
# https://verdaccio.org/docs/configuration#notifications
|
|
182
198
|
# notify:
|
|
183
|
-
# method: POST
|
|
184
|
-
# headers: [{ "Content-Type": "application/json" }]
|
|
185
|
-
# endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken
|
|
199
|
+
# method: 'POST'
|
|
200
|
+
# headers: '[{ "Content-Type": "application/json" }]'
|
|
201
|
+
# endpoint: 'https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken'
|
|
186
202
|
# content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
|
|
187
203
|
|
|
204
|
+
# Settings for middleware plugins
|
|
205
|
+
# https://verdaccio.org/docs/plugins#middleware-configuration
|
|
188
206
|
middlewares:
|
|
189
207
|
audit:
|
|
190
208
|
enabled: true
|
|
191
209
|
# timeout: 10000
|
|
192
210
|
|
|
211
|
+
# Log settings
|
|
193
212
|
# https://verdaccio.org/docs/logger
|
|
194
|
-
# log settings
|
|
195
213
|
log: { type: stdout, format: pretty, level: http }
|
|
196
|
-
|
|
197
|
-
#
|
|
214
|
+
|
|
215
|
+
# Feature flags (experimental settings that can be changed or removed in the future)
|
|
216
|
+
# https://verdaccio.org/docs/configuration#experiments
|
|
217
|
+
# experiments:
|
|
218
|
+
# # Support for npm token command
|
|
198
219
|
# token: false
|
|
199
|
-
# #
|
|
200
|
-
#
|
|
201
|
-
# # enable tarball URL redirect for hosting tarball with a different server, the tarball_url_redirect can be a template string
|
|
220
|
+
# # Enable tarball URL redirect for hosting tarball with a different server.
|
|
221
|
+
# # The tarball_url_redirect can be a template string
|
|
202
222
|
# tarball_url_redirect: 'https://mycdn.com/verdaccio/${packageName}/${filename}'
|
|
203
|
-
# #
|
|
223
|
+
# # The tarball_url_redirect can be a function, takes packageName and filename and returns the url,
|
|
224
|
+
# # when working with a js configuration file
|
|
204
225
|
# tarball_url_redirect(packageName, filename) {
|
|
205
226
|
# const signedUrl = // generate a signed url
|
|
206
227
|
# return signedUrl;
|
|
207
228
|
# }
|
|
229
|
+
# Renamed from "experiments" to "flags" in next major release
|
|
230
|
+
# flags:
|
|
231
|
+
# changePassword: true
|
|
232
|
+
# searchRemote: true
|
|
208
233
|
|
|
209
|
-
#
|
|
234
|
+
# Translate your registry, API and web UI
|
|
235
|
+
# List of the available translations https://github.com/verdaccio/verdaccio/blob/master/packages/plugins/ui-theme/src/i18n/ABOUT_TRANSLATIONS.md
|
|
210
236
|
i18n:
|
|
211
|
-
# list of the available translations https://github.com/verdaccio/verdaccio/blob/master/packages/plugins/ui-theme/src/i18n/ABOUT_TRANSLATIONS.md
|
|
212
237
|
web: en-US
|
package/build/conf/docker.yaml
CHANGED
|
@@ -1,75 +1,80 @@
|
|
|
1
1
|
#
|
|
2
|
-
# This is the default configuration file.
|
|
3
|
-
# please read carefully the documentation and best practices to
|
|
4
|
-
#
|
|
5
|
-
# Do not configure host and port under `listen` in this file
|
|
6
|
-
# as it will be ignored when using docker.
|
|
7
|
-
# see https://verdaccio.org/docs/en/docker#docker-and-custom-port-configuration
|
|
2
|
+
# This is the default configuration file. It allows all users to do anything,
|
|
3
|
+
# please read carefully the documentation and best practices to
|
|
4
|
+
# improve security.
|
|
8
5
|
#
|
|
9
6
|
# Look here for more config file examples:
|
|
10
|
-
# https://github.com/verdaccio/verdaccio/
|
|
7
|
+
# https://github.com/verdaccio/verdaccio/blob/master/docker-examples/README.md
|
|
11
8
|
#
|
|
12
9
|
# Read about the best practices
|
|
13
10
|
# https://verdaccio.org/docs/best
|
|
14
11
|
|
|
15
|
-
#
|
|
12
|
+
# Path to a directory with all packages
|
|
16
13
|
storage: /verdaccio/storage/data
|
|
17
|
-
|
|
18
|
-
#
|
|
14
|
+
|
|
15
|
+
# Path to a directory with plugins to include, the plugins folder has the higher priority for loading plugins
|
|
16
|
+
# Disable this folder to avoid warnings if is not used
|
|
19
17
|
plugins: /verdaccio/plugins
|
|
20
18
|
|
|
19
|
+
# Web UI settings
|
|
21
20
|
# https://verdaccio.org/docs/webui
|
|
22
21
|
web:
|
|
23
22
|
title: Verdaccio
|
|
24
|
-
#
|
|
23
|
+
# Disable complete web UI
|
|
24
|
+
# enabled: false
|
|
25
|
+
# Custom colors for header background and font
|
|
25
26
|
# primaryColor: "#4b5e40"
|
|
26
|
-
#
|
|
27
|
+
# Custom logos and favicon
|
|
27
28
|
# logo: ./path/to/logo.png
|
|
28
29
|
# logoDark: ./path/to/logoDark.png
|
|
29
30
|
# favicon: ./path/to/favicon.ico
|
|
30
|
-
#
|
|
31
|
+
# Disable gravatar support
|
|
31
32
|
# gravatar: false
|
|
32
|
-
# By default packages are ordered
|
|
33
|
-
# sort_packages: asc
|
|
33
|
+
# By default, packages are ordered ascending
|
|
34
|
+
# sort_packages: asc | desc
|
|
34
35
|
# Convert your UI to the dark side
|
|
35
36
|
# darkMode: true
|
|
36
37
|
# html_cache: true
|
|
37
|
-
# By default all features are displayed
|
|
38
|
+
# By default, all features are displayed
|
|
38
39
|
# login: true
|
|
39
40
|
# showInfo: true
|
|
40
41
|
# showSettings: true
|
|
41
|
-
# In combination with darkMode you can force
|
|
42
|
+
# In combination with darkMode you can force specific theme
|
|
42
43
|
# showThemeSwitch: true
|
|
43
44
|
# showFooter: true
|
|
44
45
|
# showSearch: true
|
|
45
46
|
# showRaw: true
|
|
46
47
|
# showDownloadTarball: true
|
|
47
48
|
# showUplinks: true
|
|
48
|
-
#
|
|
49
|
+
#
|
|
50
|
+
# HTML tags injected before ends </head>
|
|
51
|
+
# metaScripts:
|
|
52
|
+
# - '<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>'
|
|
53
|
+
# - '<script type="text/javascript" src="https://browser.sentry-cdn.com/5.15.5/bundle.min.js"></script>'
|
|
54
|
+
# - '<meta name="robots" content="noindex">'
|
|
55
|
+
#
|
|
56
|
+
# HTML tags injected as first child in <body>
|
|
57
|
+
# scriptsBodyBefore:
|
|
58
|
+
# - '<div id="myId">html before webpack scripts</div>'
|
|
59
|
+
#
|
|
60
|
+
# HTML tags injected as last child in </body>
|
|
49
61
|
# scriptsBodyAfter:
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
# - '<script type="text/javascript" src="https://browser.sentry-cdn.com/5.15.5/bundle.min.js"></script>'
|
|
55
|
-
# - '<meta name="robots" content="noindex" />'
|
|
56
|
-
# HTML tags injected as first child at <body/>
|
|
57
|
-
# bodyBefore:
|
|
58
|
-
# - '<div id="myId">html before webpack scripts</div>'
|
|
59
|
-
# Public path for template manifest scripts (only manifest)
|
|
60
|
-
# publicPath: http://somedomain.org/
|
|
62
|
+
# - '<script type="text/javascript" src="https://my.company.com/customJS.min.js"></script>'
|
|
63
|
+
#
|
|
64
|
+
# Public path for template manifest scripts (only manifest)
|
|
65
|
+
# publicPath: http://somedomain.org/
|
|
61
66
|
|
|
67
|
+
# Settings for authentication plugin
|
|
62
68
|
# https://verdaccio.org/docs/configuration#authentication
|
|
63
|
-
|
|
64
69
|
auth:
|
|
65
70
|
htpasswd:
|
|
66
71
|
file: /verdaccio/storage/htpasswd
|
|
67
|
-
# Maximum amount of users allowed to register, defaults to "+
|
|
72
|
+
# Maximum amount of users allowed to register, defaults to "+inf".
|
|
68
73
|
# You can set this to -1 to disable registration.
|
|
69
74
|
# max_users: 1000
|
|
70
75
|
|
|
71
|
-
# https://verdaccio.org/docs/configuration#uplinks
|
|
72
76
|
# A list of other known repositories we can talk to
|
|
77
|
+
# https://verdaccio.org/docs/configuration#uplinks
|
|
73
78
|
uplinks:
|
|
74
79
|
npmjs:
|
|
75
80
|
url: https://registry.npmjs.org/
|
|
@@ -86,14 +91,14 @@ packages:
|
|
|
86
91
|
proxy: npmjs
|
|
87
92
|
|
|
88
93
|
'**':
|
|
89
|
-
#
|
|
94
|
+
# allow all users (including non-authenticated users) to read and
|
|
90
95
|
# publish all packages
|
|
91
96
|
#
|
|
92
|
-
#
|
|
97
|
+
# you can specify usernames/groupnames (depending on your auth plugin)
|
|
93
98
|
# and three keywords: "$all", "$anonymous", "$authenticated"
|
|
94
99
|
access: $all
|
|
95
100
|
|
|
96
|
-
#
|
|
101
|
+
# allow all known users to publish/unpublish packages
|
|
97
102
|
# (anyone can register by default, remember?)
|
|
98
103
|
publish: $authenticated
|
|
99
104
|
unpublish: $authenticated
|
|
@@ -106,21 +111,19 @@ packages:
|
|
|
106
111
|
# https://verdaccio.org/docs/best#remove-proxy-to-increase-security-at-private-packages
|
|
107
112
|
|
|
108
113
|
# https://verdaccio.org/docs/configuration#server
|
|
109
|
-
# You can specify
|
|
110
|
-
# A value of 0 makes the http server behave similarly to Node.js versions prior to 8.0.0, which did not have a
|
|
111
|
-
#
|
|
112
|
-
# WORKAROUND: Through given configuration you can work around the following issue:
|
|
113
|
-
# https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
|
|
114
|
+
# You can specify HTTP/1.1 server keep alive timeout in seconds for incoming connections.
|
|
115
|
+
# A value of 0 makes the http server behave similarly to Node.js versions prior to 8.0.0, which did not have a keep-alive timeout.
|
|
116
|
+
# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
|
|
114
117
|
server:
|
|
115
118
|
keepAliveTimeout: 60
|
|
116
|
-
# The pluginPrefix replaces the default plugins prefix which is `verdaccio
|
|
117
|
-
# the
|
|
119
|
+
# The pluginPrefix replaces the default plugins prefix which is `verdaccio`. Please don't include `-`. If `something` is provided
|
|
120
|
+
# the resolved package will be `something-xxxx`.
|
|
118
121
|
# pluginPrefix: something
|
|
119
122
|
# A regex for the password validation /.{3}$/ (3 characters min)
|
|
120
123
|
# An example to limit to 10 characters minimum
|
|
121
124
|
# passwordValidationRegex: /.{10}$/
|
|
122
125
|
# Allow `req.ip` to resolve properly when Verdaccio is behind a proxy or load-balancer
|
|
123
|
-
#
|
|
126
|
+
# https://expressjs.com/en/guide/behind-proxies.html
|
|
124
127
|
# trustProxy: '127.0.0.1'
|
|
125
128
|
|
|
126
129
|
# https://verdaccio.org/docs/configuration#offline-publish
|
|
@@ -129,18 +132,24 @@ server:
|
|
|
129
132
|
# check_owners: false
|
|
130
133
|
# keep_readmes: 'latest' | 'tagged' | 'all'
|
|
131
134
|
|
|
135
|
+
# Define public URL of registry in combination with VERDACCIO_PUBLIC_URL environment variable
|
|
132
136
|
# https://verdaccio.org/docs/configuration#url-prefix
|
|
133
137
|
# url_prefix: /verdaccio/
|
|
134
|
-
#
|
|
138
|
+
#
|
|
139
|
+
# Examples:
|
|
140
|
+
# VERDACCIO_PUBLIC_URL='https://somedomain.org'
|
|
135
141
|
# url_prefix: '/my_prefix'
|
|
136
142
|
# // url -> https://somedomain.org/my_prefix/
|
|
137
|
-
#
|
|
143
|
+
#
|
|
144
|
+
# VERDACCIO_PUBLIC_URL='https://somedomain.org'
|
|
138
145
|
# url_prefix: '/'
|
|
139
146
|
# // url -> https://somedomain.org/
|
|
140
|
-
#
|
|
147
|
+
#
|
|
148
|
+
# VERDACCIO_PUBLIC_URL='https://somedomain.org/first_prefix'
|
|
141
149
|
# url_prefix: '/second_prefix'
|
|
142
|
-
# // url -> https://somedomain.org/second_prefix/
|
|
150
|
+
# // url -> https://somedomain.org/second_prefix/
|
|
143
151
|
|
|
152
|
+
# Security settings
|
|
144
153
|
# https://verdaccio.org/docs/configuration#security
|
|
145
154
|
# security:
|
|
146
155
|
# api:
|
|
@@ -166,14 +175,14 @@ server:
|
|
|
166
175
|
|
|
167
176
|
# https://verdaccio.org/docs/configuration#listen-port
|
|
168
177
|
# listen:
|
|
169
|
-
#
|
|
170
|
-
#
|
|
171
|
-
#
|
|
172
|
-
#
|
|
173
|
-
#
|
|
174
|
-
#
|
|
175
|
-
|
|
176
|
-
# The HTTPS configuration is useful if you do not consider
|
|
178
|
+
# - localhost:4873 # default value
|
|
179
|
+
# - http://localhost:4873 # same thing
|
|
180
|
+
# - 0.0.0.0:4873 # listen on all addresses (INADDR_ANY)
|
|
181
|
+
# - https://example.org:4873 # if you want to use https
|
|
182
|
+
# - "[::1]:4873" # ipv6
|
|
183
|
+
# - unix:/tmp/verdaccio.sock # unix socket
|
|
184
|
+
|
|
185
|
+
# The HTTPS configuration is useful if you do not consider use a HTTP Proxy
|
|
177
186
|
# https://verdaccio.org/docs/configuration#https
|
|
178
187
|
# https:
|
|
179
188
|
# key: ./path/verdaccio-key.pem
|
|
@@ -183,23 +192,29 @@ server:
|
|
|
183
192
|
# https://verdaccio.org/docs/configuration#proxy
|
|
184
193
|
# http_proxy: http://something.local/
|
|
185
194
|
# https_proxy: https://something.local/
|
|
195
|
+
# no_proxy: localhost,127.0.0.1,server.local
|
|
186
196
|
|
|
187
197
|
# https://verdaccio.org/docs/configuration#notifications
|
|
188
198
|
# notify:
|
|
189
|
-
# method: POST
|
|
190
|
-
# headers: [{ "Content-Type": "application/json" }]
|
|
191
|
-
# endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken
|
|
199
|
+
# method: 'POST'
|
|
200
|
+
# headers: '[{ "Content-Type": "application/json" }]'
|
|
201
|
+
# endpoint: 'https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken'
|
|
192
202
|
# content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
|
|
193
203
|
|
|
204
|
+
# Settings for middleware plugins
|
|
205
|
+
# https://verdaccio.org/docs/plugins#middleware-configuration
|
|
194
206
|
middlewares:
|
|
195
207
|
audit:
|
|
196
208
|
enabled: true
|
|
197
209
|
# timeout: 10000
|
|
198
210
|
|
|
211
|
+
# Log settings
|
|
199
212
|
# https://verdaccio.org/docs/logger
|
|
200
|
-
# log settings
|
|
201
213
|
log: { type: stdout, format: pretty, level: http }
|
|
202
|
-
|
|
214
|
+
|
|
215
|
+
# Feature flags (experimental settings that can be changed or removed in the future)
|
|
216
|
+
# https://verdaccio.org/docs/configuration#experiments
|
|
217
|
+
# experiments:
|
|
203
218
|
# # Support for npm token command
|
|
204
219
|
# token: false
|
|
205
220
|
# # Enable tarball URL redirect for hosting tarball with a different server.
|
|
@@ -211,8 +226,12 @@ log: { type: stdout, format: pretty, level: http }
|
|
|
211
226
|
# const signedUrl = // generate a signed url
|
|
212
227
|
# return signedUrl;
|
|
213
228
|
# }
|
|
214
|
-
|
|
215
|
-
#
|
|
216
|
-
#
|
|
217
|
-
#
|
|
218
|
-
|
|
229
|
+
# Renamed from "experiments" to "flags" in next major release
|
|
230
|
+
# flags:
|
|
231
|
+
# changePassword: true
|
|
232
|
+
# searchRemote: true
|
|
233
|
+
|
|
234
|
+
# Translate your registry, API and web UI
|
|
235
|
+
# List of the available translations https://github.com/verdaccio/verdaccio/blob/master/packages/plugins/ui-theme/src/i18n/ABOUT_TRANSLATIONS.md
|
|
236
|
+
i18n:
|
|
237
|
+
web: en-US
|
package/build/config.js
CHANGED
|
@@ -97,14 +97,14 @@ class Config {
|
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
// some weird shell scripts are valid yaml files parsed as string
|
|
100
|
-
(0, _assert.default)(
|
|
100
|
+
(0, _assert.default)(_core.validationUtils.isObject(config), _core.APP_ERROR.CONFIG_NOT_VALID);
|
|
101
101
|
|
|
102
102
|
// sanity check for strategic config properties
|
|
103
103
|
strategicConfigProps.forEach(function (x) {
|
|
104
104
|
if (self[x] == null) {
|
|
105
105
|
self[x] = {};
|
|
106
106
|
}
|
|
107
|
-
(0, _assert.default)(
|
|
107
|
+
(0, _assert.default)(_core.validationUtils.isObject(self[x]), `CONFIG: bad "${x}" value (object expected)`);
|
|
108
108
|
});
|
|
109
109
|
this.uplinks = (0, _uplinks.sanityCheckUplinksProps)((0, _uplinks.uplinkSanityCheck)(this.uplinks));
|
|
110
110
|
this.packages = (0, _packageAccess.normalisePackageAccess)(self.packages);
|