Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@spotlightjs/sidecar

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spotlightjs/sidecar - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

1

dist/logger.d.ts

@@ -8,2 +8,3 @@ export type SidecarLogger = {

export declare function activateLogger(logger: SidecarLogger): void;
export declare function enableDebugLogging(debug: boolean): void;
export declare const logger: {

@@ -10,0 +11,0 @@ info: (message: string) => void;

@@ -19,4 +19,8 @@ import { SidecarLogger } from './logger.js';

basePath?: string;
/**
* More verbose logging.
*/
debug?: boolean;
};
export declare function setupSidecar({ port, logger: customLogger, basePath }?: SideCarOptions): void;
export declare function setupSidecar({ port, logger: customLogger, basePath, debug }?: SideCarOptions): void;
export {};

@@ -15,8 +15,12 @@ var __defProp = Object.defineProperty;

error: (message) => console.error("🔎 [Spotlight]", message),
debug: (message) => console.debug("🔎 [Spotlight]", message)
debug: (message) => debugEnabled && console.debug("🔎 [Spotlight]", message)
};
let injectedLogger = void 0;
let debugEnabled = false;
function activateLogger(logger2) {
injectedLogger = logger2;
}
function enableDebugLogging(debug) {
debugEnabled = debug;
}
const logger = {

@@ -240,3 +244,3 @@ info: (message) => (injectedLogger || defaultLogger).info(message),

};
function setupSidecar({ port, logger: customLogger, basePath } = {}) {
function setupSidecar({ port, logger: customLogger, basePath, debug } = {}) {
let sidecarPort = DEFAULT_PORT;

@@ -246,2 +250,5 @@ if (customLogger) {

}
if (debug || process.env.SPOTLIGHT_DEBUG) {
enableDebugLogging(true);
}
if (port && !isValidPort(port)) {

@@ -248,0 +255,0 @@ logger.info("Please provide a valid port.");

2

package.json
{
"name": "@spotlightjs/sidecar",
"description": "A small proxy server to capture and forward data from backend services to Spotlight.",
"version": "1.3.0",
"version": "1.3.1",
"license": "Apache-2.0",

@@ -6,0 +6,0 @@ "type": "module",

@@ -12,6 +12,7 @@ export type SidecarLogger = {

error: (message: string) => console.error('🔎 [Spotlight]', message),
debug: (message: string) => console.debug('🔎 [Spotlight]', message),
debug: (message: string) => debugEnabled && console.debug('🔎 [Spotlight]', message),
};
let injectedLogger: SidecarLogger | undefined = undefined;
let debugEnabled = false;

@@ -22,2 +23,6 @@ export function activateLogger(logger: SidecarLogger): void {

export function enableDebugLogging(debug: boolean): void {
debugEnabled = debug;
}
export const logger = {

@@ -24,0 +29,0 @@ info: (message: string) => (injectedLogger || defaultLogger).info(message),

@@ -5,3 +5,3 @@ import { createWriteStream, readFile } from 'fs';

import { createGunzip, createInflate } from 'zlib';
import { SidecarLogger, activateLogger, logger } from './logger.js';
import { SidecarLogger, activateLogger, enableDebugLogging, logger } from './logger.js';
import { MessageBuffer } from './messageBuffer.js';

@@ -32,2 +32,7 @@

basePath?: string;
/**
* More verbose logging.
*/
debug?: boolean;
};

@@ -207,3 +212,3 @@

export function setupSidecar({ port, logger: customLogger, basePath }: SideCarOptions = {}): void {
export function setupSidecar({ port, logger: customLogger, basePath, debug }: SideCarOptions = {}): void {
let sidecarPort = DEFAULT_PORT;

@@ -215,2 +220,6 @@

if (debug || process.env.SPOTLIGHT_DEBUG) {
enableDebugLogging(true);
}
if (port && !isValidPort(port)) {

@@ -217,0 +226,0 @@ logger.info('Please provide a valid port.');

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