@contrast/config 1.18.0 → 1.18.1

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/lib/config.js CHANGED
@@ -38,6 +38,7 @@ const OS_CONFIG_DIR = os.platform() === 'win32'
38
38
  ? path.resolve(process.env.ProgramData || '', 'contrast')
39
39
  : '/etc/contrast';
40
40
  const REDACTED_KEYS = ['api.api_key', 'api.service_key'];
41
+ const OVERRIDABLE_SOURCES = [DEFAULT_VALUE, CONTRAST_UI];
41
42
 
42
43
  module.exports = class Config {
43
44
  constructor(core) {
@@ -72,7 +73,7 @@ module.exports = class Config {
72
73
  if (!this._status) this._status = 'Success';
73
74
 
74
75
  for (const [name, mapper] of Object.entries(mappings)) {
75
- if (this.getEffectiveSource(name) === DEFAULT_VALUE) {
76
+ if (OVERRIDABLE_SOURCES.includes(this.getEffectiveSource(name))) {
76
77
  const remoteValue = mapper(msg);
77
78
  if (remoteValue != null) {
78
79
  this._effectiveMap.set(name, {
package/lib/options.js CHANGED
@@ -527,7 +527,13 @@ Example - \`label1, label2, label3\``,
527
527
  name: 'server.name',
528
528
  arg: '<name>',
529
529
  default: os.hostname(),
530
- desc: 'Override the reported server name. Defauls to the operating system hostname.',
530
+ desc: 'Override the reported server name. Defaults to the operating system hostname.',
531
+ },
532
+ {
533
+ name: 'server.type',
534
+ arg: '<type>',
535
+ default: `Node.js ${process.version}`,
536
+ desc: 'Override the reported server type.',
531
537
  },
532
538
  {
533
539
  name: 'server.environment',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/config",
3
- "version": "1.18.0",
3
+ "version": "1.18.1",
4
4
  "description": "An API for discovering Contrast agent configuration data",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
@@ -17,7 +17,7 @@
17
17
  "test": "../scripts/test.sh"
18
18
  },
19
19
  "dependencies": {
20
- "@contrast/common": "1.15.0",
20
+ "@contrast/common": "1.15.1",
21
21
  "yaml": "^2.2.2"
22
22
  }
23
23
  }