Socket
Socket
Sign inDemoInstall

@contrast/agent-swc-plugin

Package Overview
Dependencies
11
Maintainers
14
Versions
14
Alerts
File Explorer

Advanced tools

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
Maintainers
14
Install size
744 kB
Created

Readme

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

Last updated on 16 Aug 2023

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc