@verdaccio/config 6.0.0-6-next.12 → 6.0.0-6-next.13
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 +43 -0
- package/build/conf/default.yaml +3 -5
- package/build/conf/docker.yaml +3 -3
- package/build/config.d.ts +2 -1
- package/build/config.js +5 -0
- package/build/config.js.map +1 -1
- package/package.json +3 -3
- package/src/conf/default.yaml +3 -5
- package/src/conf/docker.yaml +3 -3
- package/src/config.ts +5 -0
- package/test/config.spec.ts +5 -5
- package/test/partials/config/js/default.js +1 -1
- package/test/partials/config/yaml/storage.yaml +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @verdaccio/config
|
|
2
2
|
|
|
3
|
+
## 6.0.0-6-next.13
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 82cb0f2b: feat!: config.logs throw an error, logging config not longer accept array or logs property
|
|
8
|
+
|
|
9
|
+
### 💥 Breaking change
|
|
10
|
+
|
|
11
|
+
This is valid
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
log: { type: stdout, format: pretty, level: http }
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This is invalid
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
logs: { type: stdout, format: pretty, level: http }
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
or
|
|
24
|
+
|
|
25
|
+
```yaml
|
|
26
|
+
logs:
|
|
27
|
+
- [{ type: stdout, format: pretty, level: http }]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Minor Changes
|
|
31
|
+
|
|
32
|
+
- 5167bb52: feat: ui search support for remote, local and private packages
|
|
33
|
+
|
|
34
|
+
The command `npm search` search globally and return all matches, with this improvement the user interface
|
|
35
|
+
is powered with the same capabilities.
|
|
36
|
+
|
|
37
|
+
The UI also tag where is the origin the package with a tag, also provide the latest version and description of the package.
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- Updated dependencies [82cb0f2b]
|
|
42
|
+
- Updated dependencies [5167bb52]
|
|
43
|
+
- @verdaccio/core@6.0.0-6-next.5
|
|
44
|
+
- @verdaccio/utils@6.0.0-6-next.11
|
|
45
|
+
|
|
3
46
|
## 6.0.0-6-next.12
|
|
4
47
|
|
|
5
48
|
### Patch Changes
|
package/build/conf/default.yaml
CHANGED
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
# so don't use it on production systems.
|
|
4
4
|
#
|
|
5
5
|
# Look here for more config file examples:
|
|
6
|
-
# https://github.com/verdaccio/verdaccio/tree/master/conf
|
|
6
|
+
# https://github.com/verdaccio/verdaccio/tree/master/packages/config/src/conf
|
|
7
7
|
#
|
|
8
8
|
|
|
9
9
|
# path to a directory with all packages
|
|
10
10
|
storage: ./storage
|
|
11
11
|
# path to a directory with plugins to include
|
|
12
12
|
plugins: ./plugins
|
|
13
|
-
# print logs
|
|
14
|
-
# logs: ./logs
|
|
15
13
|
|
|
16
14
|
web:
|
|
17
15
|
title: Verdaccio
|
|
@@ -67,7 +65,7 @@ packages:
|
|
|
67
65
|
# and three keywords: "$all", "$anonymous", "$authenticated"
|
|
68
66
|
access: $all
|
|
69
67
|
|
|
70
|
-
# allow all known users to publish/
|
|
68
|
+
# allow all known users to publish/unpublish packages
|
|
71
69
|
# (anyone can register by default, remember?)
|
|
72
70
|
publish: $authenticated
|
|
73
71
|
unpublish: $authenticated
|
|
@@ -87,7 +85,7 @@ middlewares:
|
|
|
87
85
|
enabled: true
|
|
88
86
|
|
|
89
87
|
# log settings
|
|
90
|
-
|
|
88
|
+
log:
|
|
91
89
|
# Logger as STDOUT
|
|
92
90
|
{ type: stdout, format: pretty, level: http }
|
|
93
91
|
# Logger as STDOUT as JSON
|
package/build/conf/docker.yaml
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# see https://verdaccio.org/docs/en/docker#docker-and-custom-port-configuration
|
|
8
8
|
#
|
|
9
9
|
# Look here for more config file examples:
|
|
10
|
-
# https://github.com/verdaccio/verdaccio/tree/master/conf
|
|
10
|
+
# https://github.com/verdaccio/verdaccio/tree/master/packages/config/src/conf
|
|
11
11
|
#
|
|
12
12
|
|
|
13
13
|
# path to a directory with all packages
|
|
@@ -58,7 +58,7 @@ packages:
|
|
|
58
58
|
# and three keywords: "$all", "$anonymous", "$authenticated"
|
|
59
59
|
access: $all
|
|
60
60
|
|
|
61
|
-
# allow all known users to publish/
|
|
61
|
+
# allow all known users to publish/unpublish packages
|
|
62
62
|
# (anyone can register by default, remember?)
|
|
63
63
|
publish: $authenticated
|
|
64
64
|
unpublish: $authenticated
|
|
@@ -72,7 +72,7 @@ middlewares:
|
|
|
72
72
|
|
|
73
73
|
# log settings
|
|
74
74
|
# log settings
|
|
75
|
-
|
|
75
|
+
log:
|
|
76
76
|
# Logger as STDOUT
|
|
77
77
|
{ type: stdout, format: pretty, level: http }
|
|
78
78
|
# Logger as STDOUT as JSON
|
package/build/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Config as AppConfig, AuthConf, ConfigRuntime, PackageAccess, PackageList, Security, ServerSettingsConf } from '@verdaccio/types';
|
|
1
|
+
import { Config as AppConfig, AuthConf, ConfigRuntime, FlagsConfig, PackageAccess, PackageList, Security, ServerSettingsConf } from '@verdaccio/types';
|
|
2
2
|
export declare const WEB_TITLE = "Verdaccio";
|
|
3
3
|
/**
|
|
4
4
|
* Coordinates the application configuration
|
|
@@ -16,6 +16,7 @@ declare class Config implements AppConfig {
|
|
|
16
16
|
security: Security;
|
|
17
17
|
serverSettings: ServerSettingsConf;
|
|
18
18
|
secret: string;
|
|
19
|
+
flags: FlagsConfig;
|
|
19
20
|
constructor(config: ConfigRuntime);
|
|
20
21
|
/**
|
|
21
22
|
* Check for package spec
|
package/build/config.js
CHANGED
|
@@ -42,12 +42,17 @@ exports.WEB_TITLE = WEB_TITLE;
|
|
|
42
42
|
class Config {
|
|
43
43
|
// @ts-ignore
|
|
44
44
|
constructor(config) {
|
|
45
|
+
var _config$flags;
|
|
46
|
+
|
|
45
47
|
const self = this;
|
|
46
48
|
this.storage = process.env.VERDACCIO_STORAGE_PATH || config.storage;
|
|
47
49
|
this.config_path = config.config_path;
|
|
48
50
|
this.plugins = config.plugins;
|
|
49
51
|
this.security = _lodash.default.merge(_security.defaultSecurity, config.security);
|
|
50
52
|
this.serverSettings = _serverSettings.default;
|
|
53
|
+
this.flags = {
|
|
54
|
+
searchRemote: ((_config$flags = config.flags) === null || _config$flags === void 0 ? void 0 : _config$flags.searchRemote) ?? true
|
|
55
|
+
};
|
|
51
56
|
|
|
52
57
|
for (const configProp in config) {
|
|
53
58
|
if (self[configProp] == null) {
|
package/build/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/config.ts"],"names":["strategicConfigProps","allowedEnvConfig","debug","WEB_TITLE","Config","constructor","config","self","storage","process","env","VERDACCIO_STORAGE_PATH","config_path","plugins","security","_","merge","defaultSecurity","serverSettings","configProp","isNil","user_agent","isObject","APP_ERROR","CONFIG_NOT_VALID","forEach","x","uplinks","packages","envConf","toUpperCase","server_id","getMatchedPackagesSpec","pkgName","checkSecretKey","secret","isString","isEmpty"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;
|
|
1
|
+
{"version":3,"sources":["../src/config.ts"],"names":["strategicConfigProps","allowedEnvConfig","debug","WEB_TITLE","Config","constructor","config","self","storage","process","env","VERDACCIO_STORAGE_PATH","config_path","plugins","security","_","merge","defaultSecurity","serverSettings","flags","searchRemote","configProp","isNil","user_agent","isObject","APP_ERROR","CONFIG_NOT_VALID","forEach","x","uplinks","packages","envConf","toUpperCase","server_id","getMatchedPackagesSpec","pkgName","checkSecretKey","secret","isString","isEmpty"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAWA;;AAEA;;AACA;;AACA;;AACA;;AACA;;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,IAAAA,KAAK,CAAC,oBAAD,CAAL;AACA,SAAKmC,MAAL,GAAc,qCAAd;AACA,WAAO,KAAKA,MAAZ;AACD;;AA1F+B","sourcesContent":["import assert from 'assert';\nimport buildDebug from 'debug';\nimport _ from 'lodash';\n\nimport { APP_ERROR } from '@verdaccio/core';\nimport {\n Config as AppConfig,\n AuthConf,\n ConfigRuntime,\n FlagsConfig,\n PackageAccess,\n PackageList,\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/**\n * Coordinates the application configuration\n */\nclass Config implements AppConfig {\n public user_agent: string;\n public uplinks: any;\n public packages: PackageList;\n public users: any;\n public auth: AuthConf;\n public server_id: string;\n public config_path: string;\n public storage: string | void;\n public plugins: string | void;\n public security: Security;\n public serverSettings: ServerSettingsConf;\n // @ts-ignore\n public secret: string;\n public flags: FlagsConfig;\n\n public constructor(config: ConfigRuntime) {\n const self = this;\n this.storage = process.env.VERDACCIO_STORAGE_PATH || config.storage;\n this.config_path = config.config_path;\n this.plugins = config.plugins;\n this.security = _.merge(defaultSecurity, config.security);\n this.serverSettings = serverSettings;\n this.flags = {\n searchRemote: config.flags?.searchRemote ?? true,\n };\n\n for (const configProp in config) {\n if (self[configProp] == null) {\n self[configProp] = config[configProp];\n }\n }\n\n // @ts-ignore\n if (_.isNil(this.user_agent)) {\n this.user_agent = getUserAgent();\n }\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 /**\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 * Store or create whether receive a secret key\n */\n public checkSecretKey(secret?: string): string {\n debug('check secret key');\n if (_.isString(secret) && _.isEmpty(secret) === false) {\n this.secret = secret;\n debug('reusing previous key');\n return secret;\n }\n // it generates a secret key\n // FUTURE: this might be an external secret key, perhaps within config file?\n debug('generate a new key');\n this.secret = generateRandomSecretKey();\n return this.secret;\n }\n}\n\nexport { Config };\n"],"file":"config.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/config",
|
|
3
|
-
"version": "6.0.0-6-next.
|
|
3
|
+
"version": "6.0.0-6-next.13",
|
|
4
4
|
"description": "logger",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"npm": ">=6"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@verdaccio/core": "6.0.0-6-next.
|
|
34
|
-
"@verdaccio/utils": "6.0.0-6-next.
|
|
33
|
+
"@verdaccio/core": "6.0.0-6-next.5",
|
|
34
|
+
"@verdaccio/utils": "6.0.0-6-next.11",
|
|
35
35
|
"debug": "4.3.3",
|
|
36
36
|
"js-yaml": "3.14.1",
|
|
37
37
|
"lodash": "4.17.21",
|
package/src/conf/default.yaml
CHANGED
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
# so don't use it on production systems.
|
|
4
4
|
#
|
|
5
5
|
# Look here for more config file examples:
|
|
6
|
-
# https://github.com/verdaccio/verdaccio/tree/master/conf
|
|
6
|
+
# https://github.com/verdaccio/verdaccio/tree/master/packages/config/src/conf
|
|
7
7
|
#
|
|
8
8
|
|
|
9
9
|
# path to a directory with all packages
|
|
10
10
|
storage: ./storage
|
|
11
11
|
# path to a directory with plugins to include
|
|
12
12
|
plugins: ./plugins
|
|
13
|
-
# print logs
|
|
14
|
-
# logs: ./logs
|
|
15
13
|
|
|
16
14
|
web:
|
|
17
15
|
title: Verdaccio
|
|
@@ -67,7 +65,7 @@ packages:
|
|
|
67
65
|
# and three keywords: "$all", "$anonymous", "$authenticated"
|
|
68
66
|
access: $all
|
|
69
67
|
|
|
70
|
-
# allow all known users to publish/
|
|
68
|
+
# allow all known users to publish/unpublish packages
|
|
71
69
|
# (anyone can register by default, remember?)
|
|
72
70
|
publish: $authenticated
|
|
73
71
|
unpublish: $authenticated
|
|
@@ -87,7 +85,7 @@ middlewares:
|
|
|
87
85
|
enabled: true
|
|
88
86
|
|
|
89
87
|
# log settings
|
|
90
|
-
|
|
88
|
+
log:
|
|
91
89
|
# Logger as STDOUT
|
|
92
90
|
{ type: stdout, format: pretty, level: http }
|
|
93
91
|
# Logger as STDOUT as JSON
|
package/src/conf/docker.yaml
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# see https://verdaccio.org/docs/en/docker#docker-and-custom-port-configuration
|
|
8
8
|
#
|
|
9
9
|
# Look here for more config file examples:
|
|
10
|
-
# https://github.com/verdaccio/verdaccio/tree/master/conf
|
|
10
|
+
# https://github.com/verdaccio/verdaccio/tree/master/packages/config/src/conf
|
|
11
11
|
#
|
|
12
12
|
|
|
13
13
|
# path to a directory with all packages
|
|
@@ -58,7 +58,7 @@ packages:
|
|
|
58
58
|
# and three keywords: "$all", "$anonymous", "$authenticated"
|
|
59
59
|
access: $all
|
|
60
60
|
|
|
61
|
-
# allow all known users to publish/
|
|
61
|
+
# allow all known users to publish/unpublish packages
|
|
62
62
|
# (anyone can register by default, remember?)
|
|
63
63
|
publish: $authenticated
|
|
64
64
|
unpublish: $authenticated
|
|
@@ -72,7 +72,7 @@ middlewares:
|
|
|
72
72
|
|
|
73
73
|
# log settings
|
|
74
74
|
# log settings
|
|
75
|
-
|
|
75
|
+
log:
|
|
76
76
|
# Logger as STDOUT
|
|
77
77
|
{ type: stdout, format: pretty, level: http }
|
|
78
78
|
# Logger as STDOUT as JSON
|
package/src/config.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
Config as AppConfig,
|
|
8
8
|
AuthConf,
|
|
9
9
|
ConfigRuntime,
|
|
10
|
+
FlagsConfig,
|
|
10
11
|
PackageAccess,
|
|
11
12
|
PackageList,
|
|
12
13
|
Security,
|
|
@@ -44,6 +45,7 @@ class Config implements AppConfig {
|
|
|
44
45
|
public serverSettings: ServerSettingsConf;
|
|
45
46
|
// @ts-ignore
|
|
46
47
|
public secret: string;
|
|
48
|
+
public flags: FlagsConfig;
|
|
47
49
|
|
|
48
50
|
public constructor(config: ConfigRuntime) {
|
|
49
51
|
const self = this;
|
|
@@ -52,6 +54,9 @@ class Config implements AppConfig {
|
|
|
52
54
|
this.plugins = config.plugins;
|
|
53
55
|
this.security = _.merge(defaultSecurity, config.security);
|
|
54
56
|
this.serverSettings = serverSettings;
|
|
57
|
+
this.flags = {
|
|
58
|
+
searchRemote: config.flags?.searchRemote ?? true,
|
|
59
|
+
};
|
|
55
60
|
|
|
56
61
|
for (const configProp in config) {
|
|
57
62
|
if (self[configProp] == null) {
|
package/test/config.spec.ts
CHANGED
|
@@ -57,11 +57,11 @@ describe('check basic content parsed file', () => {
|
|
|
57
57
|
expect(config.middlewares).toBeDefined();
|
|
58
58
|
expect(config.middlewares.audit).toBeDefined();
|
|
59
59
|
expect(config.middlewares.audit.enabled).toBeTruthy();
|
|
60
|
-
//
|
|
61
|
-
expect(config.
|
|
62
|
-
expect(config.
|
|
63
|
-
expect(config.
|
|
64
|
-
expect(config.
|
|
60
|
+
// log
|
|
61
|
+
expect(config.log).toBeDefined();
|
|
62
|
+
expect(config.log.type).toEqual('stdout');
|
|
63
|
+
expect(config.log.format).toEqual('pretty');
|
|
64
|
+
expect(config.log.level).toEqual('http');
|
|
65
65
|
// must not be enabled by default
|
|
66
66
|
expect(config.notify).toBeUndefined();
|
|
67
67
|
expect(config.store).toBeUndefined();
|
|
@@ -11,5 +11,5 @@ module.exports = {
|
|
|
11
11
|
vue: { access: '$authenticated', publish: '$authenticated', proxy: 'npmjs' },
|
|
12
12
|
'*': { access: '$all', publish: '$all', proxy: 'npmjs' },
|
|
13
13
|
},
|
|
14
|
-
|
|
14
|
+
log: { type: 'stdout', format: 'pretty', level: 'warn' },
|
|
15
15
|
};
|