Socket
Socket
Sign inDemoInstall

@contrast/agent-swc-plugin

Package Overview
Dependencies
Maintainers
17
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrast/agent-swc-plugin

SWC plugin handling rewriting for the new and improved Node agent


Version published
Weekly downloads
24K
decreased by-4.95%
Maintainers
17
Weekly downloads
 
Created
Source

@contrast/agent-swc-plugin

Config

[
  "@contrast/agent-swc-plugin",
  {
    "assess": true, // default: false
    "inject": true // default: false
  }
]

assess

When true, enables all transforms. When false, only eval call expressions and import declarations are rewritten, as these are the only transforms required by Protect.

inject

When true, prepends the script or module with ContrastMethods injections, i.e.

const foo = 'bar';

becomes:

global.Function = global.ContrastMethods.Function || global.Function;
global.Number = global.ContrastMethods.Number || global.Number;
global.Object = global.ContrastMethods.Object || global.Object;
global.String = global.ContrastMethods.String || global.String;
const foo = 'bar';

Keywords

FAQs

Package last updated on 10 Apr 2023

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