New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

henrybuilt-js-library

Package Overview
Dependencies
Maintainers
1
Versions
443
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

henrybuilt-js-library - npm Package Compare versions

Comparing version 1.6.9 to 1.6.10

2

package.json
{
"name": "henrybuilt-js-library",
"version": "1.6.9",
"version": "1.6.10",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -81,3 +81,3 @@ var libString = require('@src/string');

this.cacheResourceProps();
this.cacheResourceProps({forUpdate: true});
}

@@ -115,3 +115,3 @@

if (!this.isCreated && !this.isCreating) {
this.cacheResourceProps();
this.cacheResourceProps({forUpdate: true});

@@ -122,3 +122,4 @@ params = _.merge({props: {...this.props.resourceProps}}, params);

var {id} = await makeApiBatchRequest({resourceKey: this.resourceKey, actionKey: 'create', params});//libApi.create(this.resourceKey, params);
var resource = await makeApiBatchRequest({resourceKey: this.resourceKey, actionKey: 'create', params});
var {id} = resource;

@@ -136,15 +137,14 @@ this.isCreating = false;

var propsChanged = !_.isEqual(this.props.resourceProps, this.cachedResourceProps);
var changedProps = _.pickBy(this.props.resourceProps, (newValue, key) => {
var cachedValue = this.cachedResourcePropsForUpdate[key];
return !_.isEqual(cachedValue, newValue);
});
//TODO make sure update goes through eventually if isCreating
if (this.exists && propsChanged) {
this.cacheResourceProps();
if (this.exists && _.size(changedProps) > 0) {
this.cacheResourceProps({forUpdate: true});
// await lib.api.update(this.resourceKey, {
// props: _.omit(this.props.resourceProps, ['id']),
// where: {id: this.id}
// });
await makeApiBatchRequest({resourceKey: this.resourceKey, actionKey: 'update', params: {
props: _.omit(this.props.resourceProps, ['id']),
props: _.omit(changedProps, ['id']),
where: {id: this.id}

@@ -162,3 +162,2 @@ }});

//TODO make sure update goes through eventually if isCreating
// await lib.api.destroy(this.resourceKey, {where: {id: this.id}});
await makeApiBatchRequest({resourceKey: this.resourceKey, actionKey: 'destroy', params: {where: {id: this.id}}});

@@ -206,4 +205,8 @@

cacheResourceProps() {
cacheResourceProps({forUpdate=false} = {}) {
this.cachedResourceProps = _.cloneDeep(this.resourceProps);
if (forUpdate) {
this.cachedResourcePropsForUpdate = _.cloneDeep(this.resourceProps);
}
}

@@ -210,0 +213,0 @@

Sorry, the diff of this file is too big to display

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