Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@contrast/config

Package Overview
Dependencies
Maintainers
0
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrast/config

An API for discovering Contrast agent configuration data

  • 1.31.0
  • npm
  • Socket score

Version published
Weekly downloads
7.7K
decreased by-55.66%
Maintainers
0
Weekly downloads
 
Created
Source

@contrast/config


Note: This package needs help.

  • Needlessly dependent on commander, lodash, and json-stable-stringify
  • Can be simplified
  • Could benefit from schema-based approach for defaults

Overview

This is legacy code ported from node-agent repo.

To discover and log configuration data, try

node -e "console.log(new (require('.').Config)())"

Usage

An agent should use a single instance of a config. On instantiation, the config will detect both yaml file and environment variable sources and build out full config object. The object will have defaults set for values not having been set by file or env vars.

const { AgentConfig } = require('@contrast/config');
const config = new AgentConfig();

// do stuff with config
if (config.protect.enable) {

}

New V5 Options

  • agent.stack_trace_filters

    This allows agent stackframes to be filtered via configuration Default: agent-,@contrast,node-agent

FAQs

Package last updated on 01 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc