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

backtrace-service

Package Overview
Dependencies
Maintainers
5
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backtrace-service - npm Package Compare versions

Comparing version 1.3.0-beta.1 to 1.3.0-beta.2

12

lib/service/backtraceService.d.ts

@@ -9,3 +9,3 @@ import express from 'express';

private readonly port;
private readonly _opts;
private readonly _opts?;
/**

@@ -15,8 +15,10 @@ * Create and startup express application with basic options.

* Backtrace service rules
* @param opts application options
* @param app (optional) express app.
* @param name service name (required by service layer)
* @param port service port (required by service layer)
* @param opts optional application options
* @param app optional express app instance
* By using this parameter you can create express app in different
* framework and still be able to use Backtrace integrations
*/
static bootstrap<T extends {}>(name: string, port: number, opts: IAppOptions, app?: express.Express): BacktraceService<T>;
static bootstrap<T extends {}>(name: string, port: number, opts?: IAppOptions, app?: express.Express): BacktraceService<T>;
static readConfiguration<T = {}>(name: string, port: number, path?: string): IConfiguration<T>;

@@ -46,5 +48,5 @@ /**

private _descriptor;
constructor(name: string, port: number, _opts: IAppOptions, app?: express.Express);
constructor(name: string, port: number, _opts?: IAppOptions | undefined, app?: express.Express);
start(): void;
private prepareServiceLayer;
}

@@ -22,7 +22,10 @@ "use strict";

this.app = app ? app : express_1.default();
this.configuration = BacktraceService.readConfiguration(this.name, this.port, this._opts.confPath);
this.configuration = BacktraceService.readConfiguration(this.name, this.port, this._opts && this._opts.confPath ? this._opts.confPath : undefined);
var logLevel = this.configuration.logger && this.configuration.logger.logLevel
? this.configuration.logger.logLevel
: undefined;
this._logger = _opts.logger ? _opts.logger : new logger_1.Logger(logLevel);
this._logger =
this._opts && this._opts.logger
? this._opts.logger
: new logger_1.Logger(logLevel);
if (this.configuration.backtrace &&

@@ -40,4 +43,6 @@ this.configuration.backtrace.remoteLog === true) {

* Backtrace service rules
* @param opts application options
* @param app (optional) express app.
* @param name service name (required by service layer)
* @param port service port (required by service layer)
* @param opts optional application options
* @param app optional express app instance
* By using this parameter you can create express app in different

@@ -44,0 +49,0 @@ * framework and still be able to use Backtrace integrations

{
"name": "backtrace-service",
"version": "1.3.0-beta.1",
"version": "1.3.0-beta.2",
"description": "Common tools for Backtrace Node services",

@@ -5,0 +5,0 @@ "author": "Backtrace",

@@ -24,4 +24,6 @@ import { json, urlencoded } from 'body-parser';

* Backtrace service rules
* @param opts application options
* @param app (optional) express app.
* @param name service name (required by service layer)
* @param port service port (required by service layer)
* @param opts optional application options
* @param app optional express app instance
* By using this parameter you can create express app in different

@@ -33,3 +35,3 @@ * framework and still be able to use Backtrace integrations

port: number,
opts: IAppOptions,
opts?: IAppOptions,
app?: express.Express,

@@ -156,3 +158,3 @@ ): BacktraceService<T> {

private readonly port: number,
private readonly _opts: IAppOptions,
private readonly _opts?: IAppOptions,
app?: express.Express,

@@ -164,3 +166,3 @@ ) {

this.port,
this._opts.confPath,
this._opts && this._opts.confPath ? this._opts.confPath : undefined,
);

@@ -172,4 +174,8 @@

: undefined;
this._logger = _opts.logger ? _opts.logger : new Logger(logLevel);
this._logger =
this._opts && this._opts.logger
? this._opts.logger
: new Logger(logLevel);
if (

@@ -176,0 +182,0 @@ this.configuration.backtrace &&

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