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

@elastic.io/oih-standard-library

Package Overview
Dependencies
Maintainers
16
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elastic.io/oih-standard-library - npm Package Compare versions

Comparing version 1.1.0-pre2 to 1.1.0-pre3

1

CHANGELOG.md
# 1.1.0 (May 22, 2020)
Improve lookup objects. Allow overriding fields and order enums
Add Lookup Set of Objects Pattern.
Improve delete object by unique criteria.
# 1.0.3 (April 17, 2020)

@@ -5,0 +6,0 @@ Improve lookup objects. Allow overriding conditions and order enums

8

lib/actions/delete.js

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

this.logger.trace('Incoming snapshot: %j', snapshot);
const criteria = this.getCriteria(msg, cfg);
const criteria = await this.getCriteria(msg, cfg);
const type = this.getType(cfg, msg);

@@ -82,4 +82,4 @@ this.logger.trace('Start deleting object with criteria: %j and type: %j', criteria, type);

this.logger.trace('Start deleting object: %j', object);
const deletedId = await this.deleteObject(object, cfg, msg);
if (deletedId === null) {
const result = await this.deleteObject(object, cfg, msg);
if (result === null) {
this.logger.trace('Object with unique criteria: %j and type: %j was not deleted or not found. Returning empty object', criteria, type);

@@ -91,3 +91,3 @@ this.logger.info('Finished processing deleteByUniqueCriteria action');

this.logger.info('Finished processing deleteByUniqueCriteria action');
return messages.newMessageWithBody({ id: deletedId });
return messages.newMessageWithBody({ result });
}

@@ -94,0 +94,0 @@ catch (e) {

@@ -88,3 +88,3 @@ import { ID, OBJECT_TYPE, UNIQUE_CRITERIA } from '../constants';

this.logger.trace('Incoming snapshot: %j', snapshot);
const criteria = this.getCriteria(msg, cfg);
const criteria = await this.getCriteria(msg, cfg);
const type = this.getType(cfg, msg);

@@ -103,4 +103,4 @@ this.logger.trace('Start deleting object with criteria: %j and type: %j', criteria, type);

this.logger.trace('Start deleting object: %j', object);
const deletedId = await this.deleteObject(object, cfg, msg);
if (deletedId === null) {
const result = await this.deleteObject(object, cfg, msg);
if (result === null) {
this.logger.trace('Object with unique criteria: %j and type: %j was not deleted or not found. Returning empty object', criteria, type);

@@ -112,3 +112,3 @@ this.logger.info('Finished processing deleteByUniqueCriteria action');

this.logger.info('Finished processing deleteByUniqueCriteria action');
return messages.newMessageWithBody({ id: deletedId });
return messages.newMessageWithBody({ result });
} catch (e) {

@@ -115,0 +115,0 @@ this.logger.error('Unexpected error while processing delete call for message: %j', msg, e);

{
"name": "@elastic.io/oih-standard-library",
"version": "1.1.0-pre2",
"version": "1.1.0-pre3",
"description": "Library for OIH standards implementation",

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

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