roku-report-analyzer
TypeScript icon, indicating that this package has built-in type declarations

0.3.11 • Public • Published

roku-report-analyzer

Leverage sourcemaps to translate pkg paths from Roku crash logs into original file paths

build status coverage status monthly downloads npm version license Slack

Description

The purpose of roku-report-analyzer (rra) is to standardize the roku crash log reports that get emailed to you directly from roku on a regular basis. Those crashlogs normall include the file paths in the format pkg:/source/main.brs(10) or yourcomplib:/components/SomeComponent.xml(12).

Goals

  • translate device locations (pkg:/source/main.brs(10)) into source code locations (C:/projects/YourRokuApp/src/source/main.brs(10)).
  • leverage source maps for transpiled projects (such as those built by BrighterScript)
  • flatten the report folder structure
  • use globs for finding many crashlogs
  • automatically unzip crashlog folders

Installation

Local Install

We recommend installing roku-report-analyzer locally within your project as a devDependency. This way, you can ensure the tool always works with a specific project.

npm install roku-report-analyzer -D

Usage

Basic usage

A simple project

npx rra ./crashlogs/AwesomeRokuApp_A50.zip --projects ./projects/AwesomeRokuApp

Multiple crashlogs

rra supports globs for finding crashlogs, and supports zips as well as unzipped folders. You can specify as many globs as you wish.

npx rra ./app1/crashlogs/**/*.text ../downloads/**/*.text ./crashZips/*.zip --projects ./projects/AwesomeRokuApp

Multiple projects

Perhaps your project is assembled from multiple source projects

npx rra ./crashlogs/AwesomeRokuApp_A50.zip --projects ./projects/AwesomeRokuApp_base ./projects/AwesomeRokuApp_overrides1 ./projects/AwesomeRokuApp_overrides2

Component libraries

If you use component libraries, those file paths will be prefixed by the sg_component_libs_provided value from the manifest. By default, we will look for that value in each project's manifest file. However, you can set it manually by adding it to the front of your project path separated by a colon (i.e. somecomplib:./projects/path/to/complib).

npx rra ./crashlogs/AwesomeRokuApp_A50.zip --projects pkg:./projects/AwesomeRokuApp yourcomplib:./projects/complib

You can also use javascript string-style regular expressions to match multiple sg_component_libs_provided prefixes. For example:

npx rra ./crashlogs/AwesomeRokuApp_A50.zip --projects pkg:./projects/AwesomeRokuApp "(complib1|complib2):./projects/complib"

cwd

You can override the current working directory like this:

npx rra --cwd C:/wherever ./crashlogs/**/*.zip --projects ./projects/CoolApp

Truncation

Be aware, roku crashlogs will truncate some paths to a max of 120 characters. In this situation, we have no way to properly match paths back to their original locations. For this reason, we recommend that you limit all of your final paths to a maximum of 120 characters.

Help

Run the --help command to view all the available options

npx rra --help

Readme

Keywords

none

Package Sidebar

Install

npm i roku-report-analyzer

Weekly Downloads

168

Version

0.3.11

License

MIT

Unpacked Size

80 kB

Total Files

28

Last publish

Collaborators

  • triwav
  • twitchbronbron