@contrast/config 1.16.0 → 1.17.0

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/options.js CHANGED
@@ -270,7 +270,7 @@ Example - \`/opt/Contrast/contrast.log\` creates a log in the \`/opt/Contrast\`
270
270
  name: 'agent.logger.level',
271
271
  arg: '<level>',
272
272
  enum: ['error', 'warn', 'info', 'debug', 'trace'],
273
- // default: 'info', this has no default at the config level but is instead handled by `logger-factory`.
273
+ // default: 'info', // this has no default at the config level but is instead handled by `@contrast/logger` to account for TS settings.
274
274
  fn: lowercase,
275
275
  desc: 'Set the the log output level. Valid options are `ERROR`, `WARN`, `INFO`, `DEBUG`, and `TRACE`.',
276
276
  },
package/lib/util.js CHANGED
@@ -134,7 +134,7 @@ function readConfig() {
134
134
 
135
135
  if (configPath) {
136
136
  try {
137
- fileContents = fs.readFileSync(configPath, 'utf-8');
137
+ fileContents = fs.readFileSync(configPath).toString('utf-8');
138
138
  } catch (e) {
139
139
  console.error(
140
140
  'Unable to read config file at %s: %s',
@@ -285,4 +285,4 @@ util.setup = function setup() {
285
285
  return mergedOptions;
286
286
  };
287
287
  // We want to use the set method used here for creating a correct mock object for tests
288
- util.setValue = set;
288
+ util.setConfig = setConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/config",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
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)",