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

@distributed-systems/callsite

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@distributed-systems/callsite - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

2

npm/src/Callsite.js

@@ -20,3 +20,3 @@ import StackTrace from '@distributed-systems/stack-trace/StackTrace.js';

/**
* eturn structured stack frames
* returns structured stack frames
*

@@ -23,0 +23,0 @@ * @returns {array} stack

{
"name": "@distributed-systems/callsite",
"version": "3.0.0",
"version": "3.0.1",
"description": "get structured callsite information",

@@ -5,0 +5,0 @@ "main": "npm/src/Callsite.js",

@@ -1,2 +0,2 @@

import StackTrace from '../es-modules/distributed-systems/stack-trace/2.0.0+/StackTrace.js';
import StackTrace from '../es-modules/distributed-systems/stack-trace/x/StackTrace.js';

@@ -20,3 +20,3 @@

/**
* eturn structured stack frames
* returns structured stack frames
*

@@ -23,0 +23,0 @@ * @returns {array} stack

@@ -98,2 +98,27 @@ import section from '../es-modules/distributed-systems/section-tests/3.0.0+/index.js';

});
section.test('getStack using a custom built error object', async () => {
const callsite = new Callsite();
const err = {
name: 'Error',
message: "Failed to resolve vraiable 'SERVICE_REGISTRY_DB_PASSWORD' on the config key 'database.hosts.0.password'!",
stack: `Error: Failed to resolve vraiable 'SERVICE_REGISTRY_DB_PASSWORD' on the config key 'database.hosts.0.password
at RainbowConfig.replaceSecrets (/node_modules/@rainbow-industries/rainbow-config/npm/src/RainbowConfig.js:133:23)
at RainbowConfig.replaceSecrets (/node_modules/@rainbow-industries/rainbow-config/npm/src/RainbowConfig.js:97:22)
at RainbowConfig.replaceSecrets (/node_modules/@rainbow-industries/rainbow-config/npm/src/RainbowConfig.js:97:22)
at RainbowConfig.replaceSecrets (/node_modules/@rainbow-industries/rainbow-config/npm/src/RainbowConfig.js:97:22)
at RainbowConfig.replaceSecrets (/node_modules/@rainbow-industries/rainbow-config/npm/src/RainbowConfig.js:97:22)
at RainbowConfig.load (/node_modules/@rainbow-industries/rainbow-config/npm/src/RainbowConfig.js:87:14)
at async ServiceRegistry.loadConfig (/node_modules/@infect/rda-service/src/Service.js:317:9)
at async ServiceRegistry.initialize (/node_modules/@infect/rda-service/src/Service.js:117:13)
at async ServiceRegistry.load (/node_modules/@infect/rda-service-registry/src/Service.js:33:9)
at async ChildProcess.startService (/src/ChildProcess.js:56:9)`,
};
const frames = callsite.getStack({ err });
assert.equal(frames.length, 10);
assert.equal(frames[0].name, 'RainbowConfig.replaceSecrets');
});
});
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