New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

burp-brightscript

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

burp-brightscript

lightweight processor for roku brightscript projects

  • 0.3.0
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-69.57%
Maintainers
1
Weekly downloads
 
Created
Source

Burp - Lightweight script processing for Roku brightscript projects

codecov Build Status GitHub

Development

Burp is an independent open-source project, maintained exclusively by volunteers.

You might want to help! Get in touch via the slack group, or raise issues.

What is Burp?

It's a simple tool for executing regex replacements on source code files, a bit like awk. The killer feature is that it understands brightscript syntax, so it knows what line and function it's in. It can be used from command line, or from a js environment (such as when using gulp for building)

Usage

From command line

  • Install burp globally with npm install -g burp-brightscript
  • Create a config file for your source, such as burpConfig.json containing:
{
  sourcePath: "relative/or/absolute/path/of/your/source",
  globPattern: "**/*.brs",
  replacements: [
    {
      regex: "(^.*\?\s*\")",
      replacement: '$1#FileName#.#FunctionName#(#LineNumber#) '
      }
  ]
      
}
  • Execute Burp burp burpConfig.json

From a node enviroment

  • Create a BurpProcessor with the required json config
  • call processor.processFiles(), which returns true if no errors were encountered. processor.warnings, and processor.errors contain any processing errors and warnings.
  • Example:
	import BurpProcessor from 'burp-brightscript';
	
    config = {
      sourcePath: targetPath,
      globPattern: '**/*.brs',
      replacements: [{
        regex: '(^.*\\?\\s*\\")',
        replacement: '$1#FileName#.#FunctionName#(#LineNumber#) '
      }];
      let result = processor.processFiles();

Replacement values

You can use the following constants in your regex replacements:

  • #FullPath# - full path of file
  • #LineNumber# - line number of replacement
  • #FileName# - filename of replacement
  • #FunctionName# - function name of replacement
  • #CommentLine# - will result in the line being commented out

Why call it Burp?

I like the name. It doesn't mean anything.

Why did you make this?

I also made rLog and needed a tool that could process source files to insert the line number and function name. I figured this is a more generally useful way of doing it, which other's might leverage in their own tool-chains and build processes.

Keywords

FAQs

Package last updated on 03 Apr 2019

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