@verdaccio/config 8.0.0-next-8.13 → 8.0.0-next-8.15

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.
@@ -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/tree/5.x/packages/config/src/conf/default.yaml
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
- # path to a directory with all packages
12
+ # Path to a directory with all packages
13
13
  storage: ./storage
14
- # path to a directory with plugins to include, the plugins folder has the higher priority for loading plugins
15
- # disable this folder to avoid warnings if is not used
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
- # custom colors for header background and font
23
+ # Disable complete web UI
24
+ # enabled: false
25
+ # Custom colors for header background and font
22
26
  # primaryColor: "#4b5e40"
23
- # custom logos and favicon
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
- # comment out to disable gravatar support
31
+ # Disable gravatar support
28
32
  # gravatar: false
29
- # by default packages are ordercer ascendant (asc|desc)
30
- # sort_packages: asc
31
- # convert your UI to the dark side
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
- # by default all features are displayed
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
- # HTML tags injected after manifest <scripts/>
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
- # - '<script type="text/javascript" src="https://my.company.com/customJS.min.js"></script>'
48
- # HTML tags injected before ends </head>
49
- # metaScripts:
50
- # - '<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>'
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 avoid dependency confusion
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`, please don't include `-`. If `something` is provided
111
- # the resolve package will be `something-xxxx`.
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
- # See: https://expressjs.com/en/guide/behind-proxies.html
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
- # VERDACCIO_PUBLIC_URL='https://somedomain.org';
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
- # VERDACCIO_PUBLIC_URL='https://somedomain.org';
143
+ #
144
+ # VERDACCIO_PUBLIC_URL='https://somedomain.org'
132
145
  # url_prefix: '/'
133
146
  # // url -> https://somedomain.org/
134
- # VERDACCIO_PUBLIC_URL='https://somedomain.org/first_prefix';
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
- # - localhost:4873 # default value
164
- # - http://localhost:4873 # same thing
165
- # - 0.0.0.0:4873 # listen on all addresses (INADDR_ANY)
166
- # - https://example.org:4873 # if you want to use https
167
- # - "[::1]:4873" # ipv6
168
- # - unix:/tmp/verdaccio.sock # unix socket
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
- #experiments:
197
- # # support for npm token command
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
- # # disable writing body size to logs, read more on ticket 1912
200
- # bytesin_off: false
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
- # # the tarball_url_redirect can be a function, takes packageName and filename and returns the url, when working with a js configuration file
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
- # translate your registry, api i18n not available yet
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
@@ -1,75 +1,80 @@
1
1
  #
2
- # This is the default configuration file. As it allows all users to do anything,
3
- # please read carefully the documentation and best practices to improve security.
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/tree/5.x/packages/config/src/conf/docker.yaml
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
- # path to a directory with all packages
12
+ # Path to a directory with all packages
16
13
  storage: /verdaccio/storage/data
17
- # path to a directory with plugins to include, the plugins folder has the higher priority for loading plugins
18
- # disable this folder to avoid warnings if is not used
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
- # custom colors for header background and font
23
+ # Disable complete web UI
24
+ # enabled: false
25
+ # Custom colors for header background and font
25
26
  # primaryColor: "#4b5e40"
26
- # custom logos and favicon
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
- # Comment out to disable gravatar support
31
+ # Disable gravatar support
31
32
  # gravatar: false
32
- # By default packages are ordered ascendant (asc|desc)
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 a specific theme
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
- # HTML tags injected after manifest <scripts/>
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
- # - '<script type="text/javascript" src="https://my.company.com/customJS.min.js"></script>'
51
- # HTML tags injected before end </head>
52
- # metaScripts:
53
- # - '<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>'
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 "+infinity".
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
- # Allow all users (including non-authenticated users) to read and
94
+ # allow all users (including non-authenticated users) to read and
90
95
  # publish all packages
91
96
  #
92
- # You can specify usernames/groupnames (depending on your auth plugin)
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
- # Allow all known users to publish/unpublish packages
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 the HTTP/1.1 server keep alive timeout in seconds for incoming connections.
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
- # keep-alive timeout.
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`, please don't include `-`. If `something` is provided
117
- # the resolve package will be `something-xxxx`.
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
- # See: https://expressjs.com/en/guide/behind-proxies.html
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
- # VERDACCIO_PUBLIC_URL='https://somedomain.org';
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
- # VERDACCIO_PUBLIC_URL='https://somedomain.org';
143
+ #
144
+ # VERDACCIO_PUBLIC_URL='https://somedomain.org'
138
145
  # url_prefix: '/'
139
146
  # // url -> https://somedomain.org/
140
- # VERDACCIO_PUBLIC_URL='https://somedomain.org/first_prefix';
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
- # - localhost:4873 # default value
170
- # - http://localhost:4873 # same thing
171
- # - 0.0.0.0:4873 # listen on all addresses (INADDR_ANY)
172
- # - https://example.org:4873 # if you want to use https
173
- # - "[::1]:4873" # ipv6
174
- # - unix:/tmp/verdaccio.sock # unix socket
175
-
176
- # The HTTPS configuration is useful if you do not consider using an HTTP Proxy
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
- #experiments:
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
- # Translate your registry, api i18n not available yet
216
- # i18n:
217
- # list of the available translations https://github.com/verdaccio/verdaccio/blob/master/packages/plugins/ui-theme/src/i18n/ABOUT_TRANSLATIONS.md
218
- # web: en-US
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)(_lodash.default.isObject(config), _core.APP_ERROR.CONFIG_NOT_VALID);
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)((0, _utils.isObject)(self[x]), `CONFIG: bad "${x}" value (object expected)`);
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);
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","names":["_assert","_interopRequireDefault","require","_debug","_lodash","_core","_warningUtils","_utils","_agent","_packageAccess","_security","_serverSettings","_token","_uplinks","e","__esModule","default","strategicConfigProps","allowedEnvConfig","debug","buildDebug","WEB_TITLE","exports","defaultUserRateLimiting","windowMs","max","isNodeVersionGreaterThan21","major","minor","process","versions","node","split","map","Number","TOKEN_VALID_LENGTH","Config","constructor","config","configOverrideOptions","forceMigrateToSecureLegacySignature","self","storage","env","VERDACCIO_STORAGE_PATH","configPath","config_path","self_path","Error","plugins","security","_","merge","defaultSecurity","api","migrateToSecureLegacySignature","serverSettings","flags","searchRemote","changePassword","user_agent","configProp","getUserAgent","userRateLimit","assert","isObject","APP_ERROR","CONFIG_NOT_VALID","forEach","x","uplinks","sanityCheckUplinksProps","uplinkSanityCheck","packages","normalisePackageAccess","envConf","toUpperCase","server_id","generateRandomHexString","getMigrateToSecureLegacySignature","getConfigPath","getMatchedPackagesSpec","pkgName","checkSecretKey","secret","isEmpty","length","generateRandomSecretKey","warningUtils","emit","Codes","VERWAR007"],"sources":["../src/config.ts"],"sourcesContent":["import assert from 'assert';\nimport buildDebug from 'debug';\nimport _ from 'lodash';\n\nimport { APP_ERROR, warningUtils } from '@verdaccio/core';\nimport { Codes } from '@verdaccio/core/build/warning-utils';\nimport {\n Config as AppConfig,\n AuthConf,\n ConfigYaml,\n FlagsConfig,\n PackageAccess,\n PackageList,\n RateLimit,\n Security,\n ServerSettingsConf,\n} from '@verdaccio/types';\nimport { generateRandomHexString, getMatchedPackagesSpec, isObject } from '@verdaccio/utils';\n\nimport { getUserAgent } from './agent';\nimport { normalisePackageAccess } from './package-access';\nimport { defaultSecurity } from './security';\nimport serverSettings from './serverSettings';\nimport { generateRandomSecretKey } from './token';\nimport { sanityCheckUplinksProps, uplinkSanityCheck } from './uplinks';\n\nconst strategicConfigProps = ['uplinks', 'packages'];\nconst allowedEnvConfig = ['http_proxy', 'https_proxy', 'no_proxy'];\nconst debug = buildDebug('verdaccio:config');\n\nexport const WEB_TITLE = 'Verdaccio';\n\n// we limit max 1000 request per 15 minutes on user endpoints\nexport const defaultUserRateLimiting = {\n windowMs: 15 * 60 * 1000, // 15 minutes\n max: 1000,\n};\n\nexport function isNodeVersionGreaterThan21() {\n const [major, minor] = process.versions.node.split('.').map(Number);\n return major > 21 || (major === 21 && minor >= 0);\n}\n\nconst TOKEN_VALID_LENGTH = 32;\n\n/**\n * Coordinates the application configuration\n */\nclass Config implements AppConfig {\n public user_agent: string | undefined;\n public uplinks: any;\n public packages: PackageList;\n public users: any;\n public auth: AuthConf;\n public store: any;\n public server_id: string;\n public configPath: string;\n /**\n * @deprecated use configPath or config.getConfigPath();\n */\n public self_path: string;\n public storage: string | void;\n\n public plugins: string | void | null;\n public security: Security;\n public serverSettings: ServerSettingsConf;\n private configOverrideOptions: { forceMigrateToSecureLegacySignature: boolean };\n // @ts-ignore\n public secret: string;\n public flags: FlagsConfig;\n public userRateLimit: RateLimit;\n public constructor(\n config: ConfigYaml & { config_path: string },\n // forceEnhancedLegacySignature is a property that\n // allows switch a new legacy aes signature token signature\n // for older versions do not want to have this new signature model\n // this property must be false\n configOverrideOptions = { forceMigrateToSecureLegacySignature: true }\n ) {\n const self = this;\n this.storage = process.env.VERDACCIO_STORAGE_PATH || config.storage;\n if (!config.configPath) {\n // backport self_path for previous to version 6\n // @ts-expect-error\n config.configPath = config.config_path ?? config.self_path;\n if (!config.configPath) {\n throw new Error('configPath property is required');\n }\n }\n this.configOverrideOptions = configOverrideOptions;\n this.configPath = config.configPath;\n this.self_path = this.configPath;\n debug('config path: %s', this.configPath);\n this.plugins = config.plugins;\n this.security = _.merge(\n // override the default security configuration via constructor\n _.merge(defaultSecurity, {\n api: {\n migrateToSecureLegacySignature:\n this.configOverrideOptions.forceMigrateToSecureLegacySignature,\n },\n }),\n config.security\n );\n this.serverSettings = serverSettings;\n this.flags = {\n searchRemote: config.flags?.searchRemote ?? true,\n changePassword: config.flags?.changePassword ?? false,\n };\n this.user_agent = config.user_agent;\n\n for (const configProp in config) {\n if (self[configProp] == null) {\n self[configProp] = config[configProp];\n }\n }\n\n if (typeof this.user_agent === 'undefined') {\n // by default user agent is hidden\n debug('set default user agent');\n this.user_agent = getUserAgent(false);\n }\n\n this.userRateLimit = { ...defaultUserRateLimiting, ...config?.userRateLimit };\n\n // some weird shell scripts are valid yaml files parsed as string\n assert(_.isObject(config), APP_ERROR.CONFIG_NOT_VALID);\n\n // sanity check for strategic config properties\n strategicConfigProps.forEach(function (x): void {\n if (self[x] == null) {\n self[x] = {};\n }\n\n assert(isObject(self[x]), `CONFIG: bad \"${x}\" value (object expected)`);\n });\n\n this.uplinks = sanityCheckUplinksProps(uplinkSanityCheck(this.uplinks));\n this.packages = normalisePackageAccess(self.packages);\n\n // loading these from ENV if aren't in config\n allowedEnvConfig.forEach((envConf): void => {\n if (!(envConf in self)) {\n self[envConf] = process.env[envConf] || process.env[envConf.toUpperCase()];\n }\n });\n\n // unique identifier of self server (or a cluster), used to avoid loops\n // @ts-ignore\n if (!this.server_id) {\n this.server_id = generateRandomHexString(6);\n }\n }\n\n public getMigrateToSecureLegacySignature() {\n return this.security.api.migrateToSecureLegacySignature;\n }\n\n public getConfigPath() {\n return this.configPath;\n }\n\n /**\n * Check for package spec\n */\n public getMatchedPackagesSpec(pkgName: string): PackageAccess | void {\n // TODO: remove this method and replace by library utils\n return getMatchedPackagesSpec(pkgName, this.packages);\n }\n\n /**\n * Verify if the secret complies with the required structure\n * - If the secret is not provided, it will generate a new one\n * - For any Node.js version the new secret will be 32 characters long (to allow compatibility with modern Node.js versions)\n * - If the secret is provided:\n * - If Node.js 22 or higher, the secret must be 32 characters long thus the application will fail on startup\n * - If Node.js 21 or lower, the secret will be used as is but will display a deprecation warning\n * - If the property `security.api.migrateToSecureLegacySignature` is provided and set to true, the secret will be\n * generated with the new signature model\n * @secret external secret key\n */\n public checkSecretKey(secret?: string): string {\n debug('checking secret key init');\n if (typeof secret === 'string' && _.isEmpty(secret) === false) {\n debug('checking secret key length %s', secret.length);\n if (secret.length > TOKEN_VALID_LENGTH) {\n if (isNodeVersionGreaterThan21()) {\n debug('is node version greater than 21');\n if (this.getMigrateToSecureLegacySignature() === true) {\n this.secret = generateRandomSecretKey();\n debug('rewriting secret key with length %s', this.secret.length);\n return this.secret;\n }\n // oops, user needs to generate a new secret key\n debug(\n 'secret does not comply with the required length, current length %d, application will fail on startup',\n secret.length\n );\n throw new Error(\n `Invalid storage secret key length, must be 32 characters long but is ${secret.length}. \n The secret length in Node.js 22 or higher must be 32 characters long. Please consider generate a new one. \n Learn more at https://verdaccio.org/docs/configuration/#.verdaccio-db`\n );\n } else {\n debug('is node version lower than 22');\n if (this.getMigrateToSecureLegacySignature() === true) {\n this.secret = generateRandomSecretKey();\n debug('rewriting secret key with length %s', this.secret.length);\n return this.secret;\n }\n debug('triggering deprecation warning for secret key length %s', secret.length);\n // still using Node.js versions previous to 22, but we need to emit a deprecation warning\n // deprecation warning, secret key is too long and must be 32\n // this will be removed in the next major release and will produce an error\n warningUtils.emit(Codes.VERWAR007);\n this.secret = secret;\n return this.secret;\n }\n } else if (secret.length === TOKEN_VALID_LENGTH) {\n debug('detected valid secret key length %s', secret.length);\n this.secret = secret;\n return this.secret;\n }\n debug('reusing previous key with length %s', secret.length);\n this.secret = secret;\n return this.secret;\n } else {\n // generate a new a secret key\n // FUTURE: this might be an external secret key, perhaps within config file?\n debug('generating a new secret key');\n this.secret = generateRandomSecretKey();\n debug('generated a new secret key length %s', this.secret?.length);\n\n return this.secret;\n }\n }\n}\n\nexport { Config };\n"],"mappings":";;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAYA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,cAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,QAAA,GAAAX,OAAA;AAAuE,SAAAD,uBAAAa,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvE,MAAMG,oBAAoB,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC;AACpD,MAAMC,gBAAgB,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,UAAU,CAAC;AAClE,MAAMC,KAAK,GAAG,IAAAC,cAAU,EAAC,kBAAkB,CAAC;AAErC,MAAMC,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,WAAW;;AAEpC;AACO,MAAME,uBAAuB,GAAA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,EAAEiE,MAAM,CAACE,MAAM,CAAC;MAC3D,IAAI,CAACF,MAAM,GAAGA,MAAM;MACpB,OAAO,IAAI,CAACA,MAAM;IACpB,CAAC,MAAM;MACL;MACA;MACAjE,KAAK,CAAC,6BAA6B,CAAC;MACpC,IAAI,CAACiE,MAAM,GAAG,IAAAG,8BAAuB,EAAC,CAAC;MACvCpE,KAAK,CAAC,sCAAsC,EAAE,IAAI,CAACiE,MAAM,EAAEE,MAAM,CAAC;MAElE,OAAO,IAAI,CAACF,MAAM;IACpB;EACF;AACF;AAAC9D,OAAA,CAAAc,MAAA,GAAAA,MAAA","ignoreList":[]}
1
+ {"version":3,"file":"config.js","names":["_assert","_interopRequireDefault","require","_debug","_lodash","_core","_warningUtils","_utils","_agent","_packageAccess","_security","_serverSettings","_token","_uplinks","e","__esModule","default","strategicConfigProps","allowedEnvConfig","debug","buildDebug","WEB_TITLE","exports","defaultUserRateLimiting","windowMs","max","isNodeVersionGreaterThan21","major","minor","process","versions","node","split","map","Number","TOKEN_VALID_LENGTH","Config","constructor","config","configOverrideOptions","forceMigrateToSecureLegacySignature","self","storage","env","VERDACCIO_STORAGE_PATH","configPath","config_path","self_path","Error","plugins","security","_","merge","defaultSecurity","api","migrateToSecureLegacySignature","serverSettings","flags","searchRemote","changePassword","user_agent","configProp","getUserAgent","userRateLimit","assert","validationUtils","isObject","APP_ERROR","CONFIG_NOT_VALID","forEach","x","uplinks","sanityCheckUplinksProps","uplinkSanityCheck","packages","normalisePackageAccess","envConf","toUpperCase","server_id","generateRandomHexString","getMigrateToSecureLegacySignature","getConfigPath","getMatchedPackagesSpec","pkgName","checkSecretKey","secret","isEmpty","length","generateRandomSecretKey","warningUtils","emit","Codes","VERWAR007"],"sources":["../src/config.ts"],"sourcesContent":["import assert from 'assert';\nimport buildDebug from 'debug';\nimport _ from 'lodash';\n\nimport { APP_ERROR, validationUtils, warningUtils } from '@verdaccio/core';\nimport { Codes } from '@verdaccio/core/build/warning-utils';\nimport {\n Config as AppConfig,\n AuthConf,\n ConfigYaml,\n FlagsConfig,\n PackageAccess,\n PackageList,\n RateLimit,\n Security,\n ServerSettingsConf,\n} from '@verdaccio/types';\nimport { generateRandomHexString, getMatchedPackagesSpec } from '@verdaccio/utils';\n\nimport { getUserAgent } from './agent';\nimport { normalisePackageAccess } from './package-access';\nimport { defaultSecurity } from './security';\nimport serverSettings from './serverSettings';\nimport { generateRandomSecretKey } from './token';\nimport { sanityCheckUplinksProps, uplinkSanityCheck } from './uplinks';\n\nconst strategicConfigProps = ['uplinks', 'packages'];\nconst allowedEnvConfig = ['http_proxy', 'https_proxy', 'no_proxy'];\nconst debug = buildDebug('verdaccio:config');\n\nexport const WEB_TITLE = 'Verdaccio';\n\n// we limit max 1000 request per 15 minutes on user endpoints\nexport const defaultUserRateLimiting = {\n windowMs: 15 * 60 * 1000, // 15 minutes\n max: 1000,\n};\n\nexport function isNodeVersionGreaterThan21() {\n const [major, minor] = process.versions.node.split('.').map(Number);\n return major > 21 || (major === 21 && minor >= 0);\n}\n\nconst TOKEN_VALID_LENGTH = 32;\n\n/**\n * Coordinates the application configuration\n */\nclass Config implements AppConfig {\n public user_agent: string | undefined;\n public uplinks: any;\n public packages: PackageList;\n public users: any;\n public auth: AuthConf;\n public store: any;\n public server_id: string;\n public configPath: string;\n /**\n * @deprecated use configPath or config.getConfigPath();\n */\n public self_path: string;\n public storage: string | void;\n\n public plugins: string | void | null;\n public security: Security;\n public serverSettings: ServerSettingsConf;\n private configOverrideOptions: { forceMigrateToSecureLegacySignature: boolean };\n // @ts-ignore\n public secret: string;\n public flags: FlagsConfig;\n public userRateLimit: RateLimit;\n public constructor(\n config: ConfigYaml & { config_path: string },\n // forceEnhancedLegacySignature is a property that\n // allows switch a new legacy aes signature token signature\n // for older versions do not want to have this new signature model\n // this property must be false\n configOverrideOptions = { forceMigrateToSecureLegacySignature: true }\n ) {\n const self = this;\n this.storage = process.env.VERDACCIO_STORAGE_PATH || config.storage;\n if (!config.configPath) {\n // backport self_path for previous to version 6\n // @ts-expect-error\n config.configPath = config.config_path ?? config.self_path;\n if (!config.configPath) {\n throw new Error('configPath property is required');\n }\n }\n this.configOverrideOptions = configOverrideOptions;\n this.configPath = config.configPath;\n this.self_path = this.configPath;\n debug('config path: %s', this.configPath);\n this.plugins = config.plugins;\n this.security = _.merge(\n // override the default security configuration via constructor\n _.merge(defaultSecurity, {\n api: {\n migrateToSecureLegacySignature:\n this.configOverrideOptions.forceMigrateToSecureLegacySignature,\n },\n }),\n config.security\n );\n this.serverSettings = serverSettings;\n this.flags = {\n searchRemote: config.flags?.searchRemote ?? true,\n changePassword: config.flags?.changePassword ?? false,\n };\n this.user_agent = config.user_agent;\n\n for (const configProp in config) {\n if (self[configProp] == null) {\n self[configProp] = config[configProp];\n }\n }\n\n if (typeof this.user_agent === 'undefined') {\n // by default user agent is hidden\n debug('set default user agent');\n this.user_agent = getUserAgent(false);\n }\n\n this.userRateLimit = { ...defaultUserRateLimiting, ...config?.userRateLimit };\n\n // some weird shell scripts are valid yaml files parsed as string\n assert(validationUtils.isObject(config), APP_ERROR.CONFIG_NOT_VALID);\n\n // sanity check for strategic config properties\n strategicConfigProps.forEach(function (x): void {\n if (self[x] == null) {\n self[x] = {};\n }\n\n assert(validationUtils.isObject(self[x]), `CONFIG: bad \"${x}\" value (object expected)`);\n });\n\n this.uplinks = sanityCheckUplinksProps(uplinkSanityCheck(this.uplinks));\n this.packages = normalisePackageAccess(self.packages);\n\n // loading these from ENV if aren't in config\n allowedEnvConfig.forEach((envConf): void => {\n if (!(envConf in self)) {\n self[envConf] = process.env[envConf] || process.env[envConf.toUpperCase()];\n }\n });\n\n // unique identifier of self server (or a cluster), used to avoid loops\n // @ts-ignore\n if (!this.server_id) {\n this.server_id = generateRandomHexString(6);\n }\n }\n\n public getMigrateToSecureLegacySignature() {\n return this.security.api.migrateToSecureLegacySignature;\n }\n\n public getConfigPath() {\n return this.configPath;\n }\n\n /**\n * Check for package spec\n */\n public getMatchedPackagesSpec(pkgName: string): PackageAccess | void {\n // TODO: remove this method and replace by library utils\n return getMatchedPackagesSpec(pkgName, this.packages);\n }\n\n /**\n * Verify if the secret complies with the required structure\n * - If the secret is not provided, it will generate a new one\n * - For any Node.js version the new secret will be 32 characters long (to allow compatibility with modern Node.js versions)\n * - If the secret is provided:\n * - If Node.js 22 or higher, the secret must be 32 characters long thus the application will fail on startup\n * - If Node.js 21 or lower, the secret will be used as is but will display a deprecation warning\n * - If the property `security.api.migrateToSecureLegacySignature` is provided and set to true, the secret will be\n * generated with the new signature model\n * @secret external secret key\n */\n public checkSecretKey(secret?: string): string {\n debug('checking secret key init');\n if (typeof secret === 'string' && _.isEmpty(secret) === false) {\n debug('checking secret key length %s', secret.length);\n if (secret.length > TOKEN_VALID_LENGTH) {\n if (isNodeVersionGreaterThan21()) {\n debug('is node version greater than 21');\n if (this.getMigrateToSecureLegacySignature() === true) {\n this.secret = generateRandomSecretKey();\n debug('rewriting secret key with length %s', this.secret.length);\n return this.secret;\n }\n // oops, user needs to generate a new secret key\n debug(\n 'secret does not comply with the required length, current length %d, application will fail on startup',\n secret.length\n );\n throw new Error(\n `Invalid storage secret key length, must be 32 characters long but is ${secret.length}. \n The secret length in Node.js 22 or higher must be 32 characters long. Please consider generate a new one. \n Learn more at https://verdaccio.org/docs/configuration/#.verdaccio-db`\n );\n } else {\n debug('is node version lower than 22');\n if (this.getMigrateToSecureLegacySignature() === true) {\n this.secret = generateRandomSecretKey();\n debug('rewriting secret key with length %s', this.secret.length);\n return this.secret;\n }\n debug('triggering deprecation warning for secret key length %s', secret.length);\n // still using Node.js versions previous to 22, but we need to emit a deprecation warning\n // deprecation warning, secret key is too long and must be 32\n // this will be removed in the next major release and will produce an error\n warningUtils.emit(Codes.VERWAR007);\n this.secret = secret;\n return this.secret;\n }\n } else if (secret.length === TOKEN_VALID_LENGTH) {\n debug('detected valid secret key length %s', secret.length);\n this.secret = secret;\n return this.secret;\n }\n debug('reusing previous key with length %s', secret.length);\n this.secret = secret;\n return this.secret;\n } else {\n // generate a new a secret key\n // FUTURE: this might be an external secret key, perhaps within config file?\n debug('generating a new secret key');\n this.secret = generateRandomSecretKey();\n debug('generated a new secret key length %s', this.secret?.length);\n\n return this.secret;\n }\n }\n}\n\nexport { Config };\n"],"mappings":";;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAYA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,cAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,QAAA,GAAAX,OAAA;AAAuE,SAAAD,uBAAAa,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvE,MAAMG,oBAAoB,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC;AACpD,MAAMC,gBAAgB,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,UAAU,CAAC;AAClE,MAAMC,KAAK,GAAG,IAAAC,cAAU,EAAC,kBAAkB,CAAC;AAErC,MAAMC,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,WAAW;;AAEpC;AACO,MAAME,uBAAuB,GAAAD,OAAA,CAAAC,uBAAA,GAAG;EACrCC,QAAQ,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;EAAE;EAC1BC,GAAG,EAAE;AACP,CAAC;AAEM,SAASC,0BAA0BA,CAAA,EAAG;EAC3C,MAAM,CAACC,KAAK,EAAEC,KAAK,CAAC,GAAGC,OAAO,CAACC,QAAQ,CAACC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AC;MACvCrE,KAAK,CAAC,sCAAsC,EAAE,IAAI,CAACkE,MAAM,EAAEE,MAAM,CAAC;MAElE,OAAO,IAAI,CAACF,MAAM;IACpB;EACF;AACF;AAAC/D,OAAA,CAAAc,MAAA,GAAAA,MAAA","ignoreList":[]}
package/build/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './config';
2
2
  export * from './config-path';
3
3
  export * from './token';
4
+ export * from './config-utils';
4
5
  export * from './package-access';
5
6
  export { fromJStoYAML, parseConfigFile } from './parse';
6
7
  export * from './uplinks';
package/build/index.js CHANGED
@@ -69,6 +69,18 @@ Object.keys(_token).forEach(function (key) {
69
69
  }
70
70
  });
71
71
  });
72
+ var _configUtils = require("./config-utils");
73
+ Object.keys(_configUtils).forEach(function (key) {
74
+ if (key === "default" || key === "__esModule") return;
75
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
76
+ if (key in exports && exports[key] === _configUtils[key]) return;
77
+ Object.defineProperty(exports, key, {
78
+ enumerable: true,
79
+ get: function () {
80
+ return _configUtils[key];
81
+ }
82
+ });
83
+ });
72
84
  var _packageAccess = require("./package-access");
73
85
  Object.keys(_packageAccess).forEach(function (key) {
74
86
  if (key === "default" || key === "__esModule") return;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_config","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_configPath","_token","_packageAccess","_parse","_uplinks","_security","_agent","_user","_builder","_interopRequireDefault","_conf","e","__esModule","default"],"sources":["../src/index.ts"],"sourcesContent":["export * from './config';\nexport * from './config-path';\nexport * from './token';\nexport * from './package-access';\nexport { fromJStoYAML, parseConfigFile } from './parse';\nexport * from './uplinks';\nexport * from './security';\nexport * from './agent';\nexport * from './user';\nexport { default as ConfigBuilder } from './builder';\nexport { getDefaultConfig } from './conf';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAA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E,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_config","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_configPath","_token","_configUtils","_packageAccess","_parse","_uplinks","_security","_agent","_user","_builder","_interopRequireDefault","_conf","e","__esModule","default"],"sources":["../src/index.ts"],"sourcesContent":["export * from './config';\nexport * from './config-path';\nexport * from './token';\nexport * from './config-utils';\nexport * from './package-access';\nexport { fromJStoYAML, parseConfigFile } from './parse';\nexport * from './uplinks';\nexport * from './security';\nexport * from './agent';\nexport * from './user';\nexport { default as ConfigBuilder } from './builder';\nexport { getDefaultConfig } from './conf';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,WAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,WAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK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next-8.15",
4
4
  "description": "Verdaccio Configuration",
5
5
  "main": "./build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -33,8 +33,8 @@
33
33
  "node": ">=18"
34
34
  },
35
35
  "dependencies": {
36
- "@verdaccio/core": "8.0.0-next-8.13",
37
- "@verdaccio/utils": "8.1.0-next-8.13",
36
+ "@verdaccio/core": "8.0.0-next-8.15",
37
+ "@verdaccio/utils": "8.1.0-next-8.15",
38
38
  "debug": "4.4.0",
39
39
  "js-yaml": "4.1.0",
40
40
  "lodash": "4.17.21",