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

fiftyone.pipeline.core

Package Overview
Dependencies
Maintainers
1
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fiftyone.pipeline.core - npm Package Compare versions

Comparing version 4.3.3 to 4.3.4

11

flowData.js

@@ -143,9 +143,12 @@ /* *********************************************************************

if (!this.errors[errorKey]) {
this.errors[errorKey] = [];
this.errors[errorKey] = error;
let logMessage = "Error occurred during processing";
if (errorKey !== undefined) {
logMessage = logMessage + " of " + errorKey + ". '" + error + "'";
}
this.pipeline.log('error', { message: error, source: errorKey });
this.pipeline.log('error', logMessage);
this.errors[errorKey].push(error);
}

@@ -152,0 +155,0 @@

{
"name": "fiftyone.pipeline.core",
"version": "4.3.3",
"version": "4.3.4",
"description": "Core library for the 51Degrees Pipeline API",

@@ -5,0 +5,0 @@ "directories": {

@@ -41,4 +41,6 @@ /* *********************************************************************

* add to the Pipeline
* @param {Boolean} suppressProcessExceptions If true then pipeline
* will suppress exceptions added to FlowData.
*/
constructor (flowElements = []) {
constructor (flowElements = [], suppressProcessExceptions = false) {
const pipeline = this;

@@ -49,2 +51,5 @@

// If true then pipeline will suppress exceptions added to FlowData.
this.suppressProcessExceptions = suppressProcessExceptions;
// A logger for emitting messages

@@ -131,3 +136,7 @@ this.eventEmitter = new EventEmitter();

.catch(setError);
});
if (flowData.errors !== undefined && Object.entries(flowData.errors).length !== 0 && !pipeline.suppressProcessExceptions) {
throw Object.values(flowData.errors)[0];
}
});
};

@@ -134,0 +143,0 @@ };

@@ -38,4 +38,5 @@ /* *********************************************************************

test('error data is populated', done => {
syncPipeline.suppressProcessExceptions = true;
syncFlowData.process().then(function () {
expect(syncFlowData.errors.error[0]).toBe('Something went wrong');
expect(syncFlowData.errors.error).toBe('Something went wrong');

@@ -49,8 +50,10 @@ done();

syncPipeline.on('error', function (error) {
log = error.message;
console.log(error);
log = error;
});
test('logging', done => {
syncPipeline.suppressProcessExceptions = true;
syncFlowData.process().then(function () {
expect(log).toBe('Something went wrong');
expect(log).toBe("Error occurred during processing of error. 'Something went wrong'");

@@ -61,2 +64,11 @@ done();

test("Don't Suppress Exception", done => {
syncFlowData.process().then(function () {
done();
}).catch((e) => {
// When an error occurs, check that the expected values are populated.
expect(e.indexOf('Something went wrong') !== -1).toBe(true);
});
});
test('stop flag works', done => {

@@ -63,0 +75,0 @@ syncFlowData.process().then(function () {

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