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

pino-devtools

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pino-devtools - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

3

index.js
#!/usr/bin/env node
require('./src/server')();
require('./src/server')();
{
"name": "pino-devtools",
"version": "1.0.1",
"version": "1.0.2",
"description": "A transport for viewing the logs in your favorite browser devtools",

@@ -10,3 +10,3 @@ "main": "index.js",

"scripts": {
"build": "rimraf dist/ && babel -d dist/src/ -D --ignore src/client.js src/ && cp src/client.js dist/src/client.js && cp -r index.js LICENSE.txt README.md package.json docs/ dist/",
"build": "rimraf dist/ && babel src/ --env server -d dist/src/ --ignore src/client.js --copy-files && babel index.js --env server -d dist/ && babel --env client src/client.js -d dist/ && cp -r LICENSE.txt README.md package.json docs/ dist/",
"prettier": "prettier --write '**'",

@@ -13,0 +13,0 @@ "test": "jest"

@@ -0,1 +1,3 @@

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
const PinoDevTools = (console, WebSocket, window) => {

@@ -13,3 +15,3 @@ const { hostname, port } = window.location;

50: console.error,
60: console.error,
60: console.error
};

@@ -19,3 +21,4 @@

try {
const {
const _JSON$parse = JSON.parse(data),
{
hostname,

@@ -27,5 +30,5 @@ level,

time,
v,
...otherFields
} = JSON.parse(data);
v
} = _JSON$parse,
otherFields = _objectWithoutProperties(_JSON$parse, ['hostname', 'level', 'msg', 'name', 'pid', 'time', 'v']);

@@ -49,2 +52,2 @@ const message = `[${name}] ${msg || '<no message>'}`;

PinoDevTools(console, WebSocket, window);
}
}

@@ -1,12 +0,6 @@

'use strict';
const fs = require('fs');
const http = require('http');
const path = require('path');
const { parse: parseURL } = require('url');
var _require = require('url');
const parseURL = _require.parse;
const WebSocket = require('ws');

@@ -18,6 +12,3 @@ const opn = require('opn');

var _require2 = require('./utils');
const parseOptions = _require2.parseOptions;
const { parseOptions } = require('./utils');
const indexHTML = fs.readFileSync(path.join(__dirname, 'index.html'));

@@ -41,7 +32,4 @@ const clientJS = fs.readFileSync(path.join(__dirname, 'client.js'));

const options = parseOptions(process.argv.slice(2), DEFAULT_OPTIONS);
const host = options.host,
port = options.port,
open = options.open;
const { host, port, open } = options;
const httpPort = parseInt(port, 10) || parseInt(DEFAULT_OPTIONS.port, 10);

@@ -48,0 +36,0 @@ const wsPort = httpPort + 1;

@@ -1,3 +0,1 @@

'use strict';
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

@@ -9,4 +7,3 @@

const keys = Object.keys(defaultOptions);
var _minimist = minimist(argv, {
const _minimist = minimist(argv, {
boolean: keys.filter(k => typeof defaultOptions[k] === 'boolean'),

@@ -16,5 +13,4 @@ default: defaultOptions,

unknown: () => false
});
const _ = _minimist._,
}),
{ _ } = _minimist,
options = _objectWithoutProperties(_minimist, ['_']);

@@ -21,0 +17,0 @@

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