@distributed-systems/callsite
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -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'); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
8887
164
0