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.2.14 to 1.2.15

0

examples/simple.js

@@ -0,0 +0,0 @@ #!/usr/bin/env node

@@ -0,0 +0,0 @@ /// <reference types="node" />

2

lib/config/config.js

@@ -124,3 +124,3 @@ "use strict";

desc = getDefaultDescriptor(serviceName, defaultPort, opts);
mkdirp_1.default(path_1.default.basename(varPath), function (err) {
mkdirp_1.default(path_1.default.dirname(varPath), function (err) {
if (err) {

@@ -127,0 +127,0 @@ throw err;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=coronerDescriptor.js.map

@@ -0,0 +0,0 @@ export interface IDescriptorOpts {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=descriptorOptions.js.map

@@ -10,3 +10,5 @@ import { NextFunction, Request, Response } from 'express';

private descr;
authenticated: any;
authenticated: {
[index: string]: object;
};
private developmentMode;

@@ -13,0 +15,0 @@ private logger;

@@ -51,5 +51,9 @@ "use strict";

this.descr = descr;
/*
* Stores opaque objects per authenticated remote coronerd.
* Available for consumers to use as they see fit.
*/
this.authenticated = {};
this.developmentMode = false;
this.logger = undefined;
this.authenticated = {};
}

@@ -130,13 +134,5 @@ IdentityManager.prototype.setDevelopmentMode = function () {

_this.log('error', request.ip + ": missing internal params token: " + token + " || url: " + url);
responseResult_1.ResponseResult.badRequest(response, 'missing parameters');
responseResult_1.ResponseResult.badRequest(response, "Missing parameters: token: " + token + " || url: " + url);
return;
}
/*
* require URLs to have been registered via serviceRequest, to
* prevent spoofing or accidental misuse.
*/
if (!_this.authenticated[url]) {
responseResult_1.ResponseResult.badRequest(response, 'unknown url');
return;
}
var prefix = url.endsWith('/') ? '' : '/';

@@ -165,4 +161,4 @@ axios_1.default

}
responseResult_1.ResponseResult.badRequest(response, 'missing parameters');
next(new Error('missing response parameters'));
responseResult_1.ResponseResult.badRequest(response, 'Missing parameters');
next(new Error('Missing response parameters'));
return;

@@ -169,0 +165,0 @@ }

@@ -0,0 +0,0 @@ export interface ICoronerRequestOption {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=authRequestOptions.js.map

@@ -0,0 +0,0 @@ export interface IConfig {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=serverConfiguration.js.map

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ "use strict";

export declare function info(log: string): void;
export declare function warning(log: string): void;
export declare function error(log: string): void;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { Response } from 'express';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ export interface IServiceDescriptor {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=serviceDescriptor.js.map

@@ -0,0 +0,0 @@ "use strict";

{
"name": "backtrace-service",
"version": "1.2.14",
"version": "1.2.15",
"description": "Common tools for Backtrace Node services",

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

@@ -0,0 +0,0 @@ # Backtrace Service Layer nodejs library

@@ -136,3 +136,3 @@ import { randomBytes } from 'crypto';

desc = getDefaultDescriptor(serviceName, defaultPort, opts);
mkdirp(path.basename(varPath), (err: Error) => {
mkdirp(path.dirname(varPath), (err: Error) => {
if (err) {

@@ -139,0 +139,0 @@ throw err;

@@ -0,0 +0,0 @@ export interface IDescriptorOpts {

@@ -21,3 +21,3 @@ import axios from 'axios';

*/
public authenticated: any;
public authenticated: { [index: string]: object } = {};

@@ -30,5 +30,3 @@ private developmentMode: boolean = false;

constructor(private descr: IServiceDescriptor) {
this.authenticated = {};
}
constructor(private descr: IServiceDescriptor) {}

@@ -127,3 +125,6 @@ public setDevelopmentMode() {

);
ResponseResult.badRequest(response, 'missing parameters');
ResponseResult.badRequest(
response,
`Missing parameters: token: ${token} || url: ${url}`,
);
return;

@@ -158,4 +159,4 @@ }

}
ResponseResult.badRequest(response, 'missing parameters');
next(new Error('missing response parameters'));
ResponseResult.badRequest(response, 'Missing parameters');
next(new Error('Missing response parameters'));
return;

@@ -162,0 +163,0 @@ }

@@ -0,0 +0,0 @@ export interface ICoronerRequestOption {

@@ -0,0 +0,0 @@ export interface IConfig {

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ import chalk from 'chalk';

@@ -0,0 +0,0 @@ /* A service descriptor, for service use. */

@@ -0,0 +0,0 @@ import * as url from 'url';

Sorry, the diff of this file is not supported yet

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