Socket
Socket
Sign inDemoInstall

@contrast/agent-swc-plugin

Package Overview
Dependencies
11
Maintainers
9
Versions
13
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
9
Install size
747 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 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 13 Feb 2024

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc