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

nodereport

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodereport - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

12

CHANGES.md

@@ -0,1 +1,13 @@

2016-11-18, Version 1.0.6
=========================
* Fix test-exception.js for PPC (Richard Lau)
* Improve README.md (Jeremiah Senkpiel)
* Improvement to Windows version reporting (Richard Lau)
* Convert testcases to use tap (Richard Lau)
2016-11-10, Version 1.0.5

@@ -2,0 +14,0 @@ =========================

7

package.json
{
"name": "nodereport",
"main": "nodereport.node",
"version": "1.0.5",
"version": "1.0.6",
"description": "Diagnostic NodeReport",

@@ -22,7 +22,10 @@ "homepage": "https://github.com/nodejs/nodereport#readme",

"scripts": {
"test": "node test/autorun.js"
"test": "tap test/test*.js"
},
"bugs": {
"url": "https://github.com/nodejs/nodereport/issues"
},
"devDependencies": {
"tap": "^8.0.0"
}
}
# nodereport
nodereport is an add-on for Node.js, delivered as an npm native module,
which provides a human-readable diagnostic summary report, written
to file. The report is intended for development, test and production
Delivers a human-readable diagnostic summary, written to file.
The report is intended for development, test and production
use, to capture and preserve information for problem determination.

@@ -10,14 +10,19 @@ It includes JavaScript and native stack traces, heap statistics,

reports can be triggered on unhandled exceptions, fatal errors, signals
and calls to a JavaScript API. The module supports Node.js v4, v6 and v7
on Linux, MacOS, Windows and AIX.
and calls to a JavaScript API.
Usage:
Supports Node.js v4, v6 and v7 on Linux, MacOS, Windows and AIX.
npm install nodereport
## Usage
By default, this will allow a NodeReport to be triggered via an API
```bash
npm install nodereport
```
This will allow a NodeReport to be triggered via an API
call from a JavaScript application.
var nodereport = require('nodereport');
nodereport.triggerReport();
```js
var nodereport = require('nodereport');
nodereport.triggerReport();
```

@@ -31,8 +36,10 @@ Content of the NodeReport consists of a header section containing the event

C:\test>node
> nodereport = require('nodereport')
> nodereport.triggerReport()
Writing Node.js report to file: NodeReport.20161020.091102.8480.001.txt
Node.js report completed
>
```
$ node
> nodereport = require('nodereport')
> nodereport.triggerReport()
Writing Node.js report to file: NodeReport.20161020.091102.8480.001.txt
Node.js report completed
>
```

@@ -42,5 +49,7 @@ When a NodeReport is triggered, start and end messages are issued to stderr

includes the date, time, PID and a sequence number. Alternatively, a filename
can be specified as a parameter on the triggerReport() call.
can be specified as a parameter on the `triggerReport()` call.
nodereport.triggerReport("myReportName");
```js
nodereport.triggerReport("myReportName");
```

@@ -51,21 +60,31 @@ A NodeReport can also be triggered automatically on unhandled exceptions, fatal

nodereport.setEvents("exception+fatalerror+signal+apicall");
```js
nodereport.setEvents("exception+fatalerror+signal+apicall");
```
## Configuration
Additional configuration is available using the following APIs:
nodereport.setSignal("SIGUSR2|SIGQUIT");
nodereport.setFileName("stdout|stderr|<filename>");
nodereport.setDirectory("<full path>");
nodereport.setCoreDump("yes|no");
nodereport.setVerbose("yes|no");
```js
nodereport.setSignal("SIGUSR2|SIGQUIT");
nodereport.setFileName("stdout|stderr|<filename>");
nodereport.setDirectory("<full path>");
nodereport.setCoreDump("yes|no");
nodereport.setVerbose("yes|no");
```
Configuration on module initialisation is also available via environment variables:
Configuration on module Initialization is also available via environment variables:
export NODEREPORT_EVENTS=exception+fatalerror+signal+apicall
export NODEREPORT_SIGNAL=SIGUSR2|SIGQUIT
export NODEREPORT_FILENAME=stdout|stderr|<filename>
export NODEREPORT_DIRECTORY=<full path>
export NODEREPORT_COREDUMP=yes|no
export NODEREPORT_VERBOSE=yes|no
```bash
export NODEREPORT_EVENTS=exception+fatalerror+signal+apicall
export NODEREPORT_SIGNAL=SIGUSR2|SIGQUIT
export NODEREPORT_FILENAME=stdout|stderr|<filename>
export NODEREPORT_DIRECTORY=<full path>
export NODEREPORT_COREDUMP=yes|no
export NODEREPORT_VERBOSE=yes|no
```
## Examples
To see examples of NodeReports generated from these events you can run the

@@ -75,5 +94,9 @@ demonstration applications provided in the nodereport github repository. These are

1. api.js - NodeReport triggered by JavaScript API call
2. exception.js - NodeReport triggered by unhandled exception
3. fatalerror.js - NodeReport triggered by fatal error on JavaScript heap out of memory
4. loop.js - looping application, NodeReport triggered using kill -USR2 <pid>
1. `api.js` - NodeReport triggered by JavaScript API call.
2. `exception.js` - NodeReport triggered by unhandled exception.
3. `fatalerror.js` - NodeReport triggered by fatal error on JavaScript heap out of memory.
4. `loop.js` - looping application, NodeReport triggered using kill `-USR2 <pid>`.
## License
[Licensed under the MIT License.](LICENSE.md)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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