@verdaccio/config 6.0.0-6-next.17 → 6.0.0-6-next.48

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 CHANGED
@@ -1,5 +1,83 @@
1
1
  # @verdaccio/config
2
2
 
3
+ ## 6.0.0-6-next.48
4
+
5
+ ### Major Changes
6
+
7
+ - 9fc2e796: feat(plugins): improve plugin loader
8
+
9
+ ### Changes
10
+
11
+ - Add scope plugin support to 6.x https://github.com/verdaccio/verdaccio/pull/3227
12
+ - Avoid config collisions https://github.com/verdaccio/verdaccio/issues/928
13
+ - https://github.com/verdaccio/verdaccio/issues/1394
14
+ - `config.plugins` plugin path validations
15
+ - Updated algorithm for plugin loader.
16
+ - improved documentation (included dev)
17
+
18
+ ## Features
19
+
20
+ - Add scope plugin support to 6.x https://github.com/verdaccio/verdaccio/pull/3227
21
+ - Custom prefix:
22
+
23
+ ```
24
+ // config.yaml
25
+ server:
26
+ pluginPrefix: mycompany
27
+ middleware:
28
+ audit:
29
+ foo: 1
30
+ ```
31
+
32
+ This configuration will look up for `mycompany-audit` instead `Verdaccio-audit`.
33
+
34
+ ## Breaking Changes
35
+
36
+ ### sinopia plugins
37
+
38
+ - `sinopia` fallback support is removed, but can be restored using `pluginPrefix`
39
+
40
+ ### plugin filter
41
+
42
+ - method rename `filter_metadata`->`filterMetadata`
43
+
44
+ ### Plugin constructor does not merge configs anymore https://github.com/verdaccio/verdaccio/issues/928
45
+
46
+ The plugin receives as first argument `config`, which represents the config of the plugin. Example:
47
+
48
+ ```
49
+ // config.yaml
50
+ auth:
51
+ plugin:
52
+ foo: 1
53
+ bar: 2
54
+
55
+ export class Plugin<T> {
56
+ public constructor(config: T, options: PluginOptions) {
57
+ console.log(config);
58
+ // {foo:1, bar: 2}
59
+ }
60
+ }
61
+ ```
62
+
63
+ ### Minor Changes
64
+
65
+ - 62c24b63: feat: add passwordValidationRegex property
66
+
67
+ ### Patch Changes
68
+
69
+ - Updated dependencies [43f32687]
70
+ - Updated dependencies [62c24b63]
71
+ - @verdaccio/core@6.0.0-6-next.48
72
+ - @verdaccio/utils@6.0.0-6-next.16
73
+
74
+ ## 6.0.0-6-next.47
75
+
76
+ ### Patch Changes
77
+
78
+ - @verdaccio/core@6.0.0-6-next.47
79
+ - @verdaccio/utils@6.0.0-6-next.15
80
+
3
81
  ## 6.0.0-6-next.17
4
82
 
5
83
  ### Patch Changes
@@ -11,8 +11,9 @@
11
11
 
12
12
  # path to a directory with all packages
13
13
  storage: ./storage
14
- # path to a directory with plugins to include
15
- plugins: ./plugins
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
16
+ # plugins: ./plugins
16
17
 
17
18
  # https://verdaccio.org/docs/webui
18
19
  web:
@@ -99,6 +100,12 @@ packages:
99
100
  # 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.
100
101
  server:
101
102
  keepAliveTimeout: 60
103
+ # The pluginPrefix replaces the default plugins prefix which is `verdaccio`, please don't include `-`. If `something` is provided
104
+ # the resolve package will be `something-xxxx`.
105
+ # pluginPrefix: something
106
+ # A regex for the password validation /.{3}$/ (3 characters min)
107
+ # An example to limit to 10 characters minimum
108
+ # passwordValidationRegex: /.{10}$/
102
109
 
103
110
  # https://verdaccio.org/docs/configuration#offline-publish
104
111
  # publish:
@@ -14,7 +14,8 @@
14
14
 
15
15
  # path to a directory with all packages
16
16
  storage: /verdaccio/storage/data
17
- # path to a directory with plugins to include
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
18
19
  plugins: /verdaccio/plugins
19
20
 
20
21
  # https://verdaccio.org/docs/webui
@@ -105,6 +106,12 @@ packages:
105
106
  # https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
106
107
  server:
107
108
  keepAliveTimeout: 60
109
+ # The pluginPrefix replaces the default plugins prefix which is `verdaccio`, please don't include `-`. If `something` is provided
110
+ # the resolve package will be `something-xxxx`.
111
+ # pluginPrefix: something
112
+ # A regex for the password validation /.{3}$/ (3 characters min)
113
+ # An example to limit to 10 characters minimum
114
+ # passwordValidationRegex: /.{10}$/
108
115
 
109
116
  # https://verdaccio.org/docs/configuration#offline-publish
110
117
  # publish:
package/build/config.d.ts CHANGED
@@ -13,7 +13,7 @@ declare class Config implements AppConfig {
13
13
  config_path: string;
14
14
  configPath: string;
15
15
  storage: string | void;
16
- plugins: string | void;
16
+ plugins: string | void | null;
17
17
  security: Security;
18
18
  serverSettings: ServerSettingsConf;
19
19
  secret: string;
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","names":["strategicConfigProps","allowedEnvConfig","debug","buildDebug","WEB_TITLE","Config","constructor","config","self","storage","process","env","VERDACCIO_STORAGE_PATH","configPath","Error","config_path","plugins","security","_","merge","defaultSecurity","serverSettings","flags","searchRemote","configProp","isNil","user_agent","getUserAgent","assert","isObject","APP_ERROR","CONFIG_NOT_VALID","forEach","x","uplinks","sanityCheckUplinksProps","uplinkSanityCheck","packages","normalisePackageAccess","envConf","toUpperCase","server_id","generateRandomHexString","getMatchedPackagesSpec","pkgName","checkSecretKey","secret","isString","isEmpty","generateRandomSecretKey"],"sources":["../src/config.ts"],"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 ConfigYaml,\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 // @deprecated use configPath instead\n public config_path: string;\n public configPath: string;\n public storage: string | void;\n\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: ConfigYaml & { config_path: string }) {\n const self = this;\n this.storage = process.env.VERDACCIO_STORAGE_PATH || config.storage;\n if (!config.configPath) {\n throw new Error('config_path is required');\n }\n this.config_path = config.config_path ?? (config.configPath as string);\n this.configPath = config.configPath;\n debug('config path: %s', this.configPath);\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"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAWA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,oBAAoB,GAAG,CAAC,SAAD,EAAY,UAAZ,CAA7B;AACA,MAAMC,gBAAgB,GAAG,CAAC,YAAD,EAAe,aAAf,EAA8B,UAA9B,CAAzB;AACA,MAAMC,KAAK,GAAG,IAAAC,cAAA,EAAW,kBAAX,CAAd;AAEO,MAAMC,SAAS,GAAG,WAAlB;AAEP;AACA;AACA;;;;AACA,MAAMC,MAAN,CAAkC;EAOhC;EAQA;EAIOC,WAAW,CAACC,MAAD,EAA+C;IAAA;;IAC/D,MAAMC,IAAI,GAAG,IAAb;IACA,KAAKC,OAAL,GAAeC,OAAO,CAACC,GAAR,CAAYC,sBAAZ,IAAsCL,MAAM,CAACE,OAA5D;;IACA,IAAI,CAACF,MAAM,CAACM,UAAZ,EAAwB;MACtB,MAAM,IAAIC,KAAJ,CAAU,yBAAV,CAAN;IACD;;IACD,KAAKC,WAAL,GAAmBR,MAAM,CAACQ,WAAP,IAAuBR,MAAM,CAACM,UAAjD;IACA,KAAKA,UAAL,GAAkBN,MAAM,CAACM,UAAzB;IACAX,KAAK,CAAC,iBAAD,EAAoB,KAAKW,UAAzB,CAAL;IACA,KAAKG,OAAL,GAAeT,MAAM,CAACS,OAA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;MAC1C,IAAI,EAAEA,OAAO,IAAI/B,IAAb,CAAJ,EAAwB;QACtBA,IAAI,CAAC+B,OAAD,CAAJ,GAAgB7B,OAAO,CAACC,GAAR,CAAY4B,OAAZ,KAAwB7B,OAAO,CAACC,GAAR,CAAY4B,OAAO,CAACC,WAAR,EAAZ,CAAxC;MACD;IACF,CAJD,EA3C+D,CAiD/D;IACA;;IACA,IAAI,CAAC,KAAKC,SAAV,EAAqB;MACnB,KAAKA,SAAL,GAAiB,IAAAC,8BAAA,EAAwB,CAAxB,CAAjB;IACD;EACF;EAED;AACF;AACA;;;EACSC,sBAAsB,CAACC,OAAD,EAAwC;IACnE;IACA,OAAO,IAAAD,6BAAA,EAAuBC,OAAvB,EAAgC,KAAKP,QAArC,CAAP;EACD;EAED;AACF;AACA;;;EACSQ,cAAc,CAACC,MAAD,EAA0B;IAC7C5C,KAAK,CAAC,kBAAD,CAAL;;IACA,IAAIgB,eAAA,CAAE6B,QAAF,CAAWD,MAAX,KAAsB5B,eAAA,CAAE8B,OAAF,CAAUF,MAAV,MAAsB,KAAhD,EAAuD;MACrD,KAAKA,MAAL,GAAcA,MAAd;MACA5C,KAAK,CAAC,sBAAD,CAAL;MACA,OAAO4C,MAAP;IACD,CAN4C,CAO7C;IACA;;;IACA5C,KAAK,CAAC,oBAAD,CAAL;IACA,KAAK4C,MAAL,GAAc,IAAAG,8BAAA,GAAd;IACA,OAAO,KAAKH,MAAZ;EACD;;AAlG+B"}
1
+ {"version":3,"file":"config.js","names":["strategicConfigProps","allowedEnvConfig","debug","buildDebug","WEB_TITLE","Config","constructor","config","self","storage","process","env","VERDACCIO_STORAGE_PATH","configPath","Error","config_path","plugins","security","_","merge","defaultSecurity","serverSettings","flags","searchRemote","configProp","isNil","user_agent","getUserAgent","assert","isObject","APP_ERROR","CONFIG_NOT_VALID","forEach","x","uplinks","sanityCheckUplinksProps","uplinkSanityCheck","packages","normalisePackageAccess","envConf","toUpperCase","server_id","generateRandomHexString","getMatchedPackagesSpec","pkgName","checkSecretKey","secret","isString","isEmpty","generateRandomSecretKey"],"sources":["../src/config.ts"],"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 ConfigYaml,\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 // @deprecated use configPath instead\n public config_path: string;\n public configPath: string;\n public storage: string | void;\n\n public plugins: string | void | null;\n public security: Security;\n public serverSettings: ServerSettingsConf;\n // @ts-ignore\n public secret: string;\n public flags: FlagsConfig;\n\n public constructor(config: ConfigYaml & { config_path: string }) {\n const self = this;\n this.storage = process.env.VERDACCIO_STORAGE_PATH || config.storage;\n if (!config.configPath) {\n throw new Error('config_path is required');\n }\n this.config_path = config.config_path ?? (config.configPath as string);\n this.configPath = config.configPath;\n debug('config path: %s', this.configPath);\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"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAWA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,oBAAoB,GAAG,CAAC,SAAD,EAAY,UAAZ,CAA7B;AACA,MAAMC,gBAAgB,GAAG,CAAC,YAAD,EAAe,aAAf,EAA8B,UAA9B,CAAzB;AACA,MAAMC,KAAK,GAAG,IAAAC,cAAA,EAAW,kBAAX,CAAd;AAEO,MAAMC,SAAS,GAAG,WAAlB;AAEP;AACA;AACA;;;;AACA,MAAMC,MAAN,CAAkC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AO4C,MAAP;IACD,CAN4C,CAO7C;IACA;;;IACA5C,KAAK,CAAC,oBAAD,CAAL;IACA,KAAK4C,MAAL,GAAc,IAAAG,8BAAA,GAAd;IACA,OAAO,KAAKH,MAAZ;EACD;;AAlG+B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/config",
3
- "version": "6.0.0-6-next.17",
3
+ "version": "6.0.0-6-next.48",
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.8",
34
- "@verdaccio/utils": "6.0.0-6-next.14",
33
+ "@verdaccio/core": "6.0.0-6-next.48",
34
+ "@verdaccio/utils": "6.0.0-6-next.16",
35
35
  "debug": "4.3.4",
36
36
  "yaml": "2.1.1",
37
37
  "lodash": "4.17.21",
@@ -11,8 +11,9 @@
11
11
 
12
12
  # path to a directory with all packages
13
13
  storage: ./storage
14
- # path to a directory with plugins to include
15
- plugins: ./plugins
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
16
+ # plugins: ./plugins
16
17
 
17
18
  # https://verdaccio.org/docs/webui
18
19
  web:
@@ -99,6 +100,12 @@ packages:
99
100
  # 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.
100
101
  server:
101
102
  keepAliveTimeout: 60
103
+ # The pluginPrefix replaces the default plugins prefix which is `verdaccio`, please don't include `-`. If `something` is provided
104
+ # the resolve package will be `something-xxxx`.
105
+ # pluginPrefix: something
106
+ # A regex for the password validation /.{3}$/ (3 characters min)
107
+ # An example to limit to 10 characters minimum
108
+ # passwordValidationRegex: /.{10}$/
102
109
 
103
110
  # https://verdaccio.org/docs/configuration#offline-publish
104
111
  # publish:
@@ -14,7 +14,8 @@
14
14
 
15
15
  # path to a directory with all packages
16
16
  storage: /verdaccio/storage/data
17
- # path to a directory with plugins to include
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
18
19
  plugins: /verdaccio/plugins
19
20
 
20
21
  # https://verdaccio.org/docs/webui
@@ -105,6 +106,12 @@ packages:
105
106
  # https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
106
107
  server:
107
108
  keepAliveTimeout: 60
109
+ # The pluginPrefix replaces the default plugins prefix which is `verdaccio`, please don't include `-`. If `something` is provided
110
+ # the resolve package will be `something-xxxx`.
111
+ # pluginPrefix: something
112
+ # A regex for the password validation /.{3}$/ (3 characters min)
113
+ # An example to limit to 10 characters minimum
114
+ # passwordValidationRegex: /.{10}$/
108
115
 
109
116
  # https://verdaccio.org/docs/configuration#offline-publish
110
117
  # publish:
package/src/config.ts CHANGED
@@ -43,7 +43,7 @@ class Config implements AppConfig {
43
43
  public configPath: string;
44
44
  public storage: string | void;
45
45
 
46
- public plugins: string | void;
46
+ public plugins: string | void | null;
47
47
  public security: Security;
48
48
  public serverSettings: ServerSettingsConf;
49
49
  // @ts-ignore
@@ -6,7 +6,7 @@ uplinks:
6
6
  npmjs:
7
7
  url: http://localhost:4873/
8
8
  packages:
9
- \\"@*/*\\":
9
+ "@*/*":
10
10
  access: $all
11
11
  publish: $all
12
12
  proxy: npmjs
@@ -32,7 +32,7 @@ packages:
32
32
  access: $authenticated
33
33
  publish: $authenticated
34
34
  proxy: npmjs
35
- \\"*\\":
35
+ "*":
36
36
  access: $all
37
37
  publish: $all
38
38
  proxy: npmjs