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

@warp-works/warpjs-change-logs

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@warp-works/warpjs-change-logs - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

7

lib/change-log.js

@@ -28,2 +28,6 @@ const cloneDeep = require('lodash/cloneDeep');

static get ACTION_LABEL() {
throw new ChangeLogsError(`Not implemented 'static get ${this.name}.ACTION_LABEL()'.`);
}
static fromDocument(document) {

@@ -40,2 +44,3 @@ // debug(`${this.name}.fromDocument(): document=`, document);

return {
action: this.constructor.ACTION_LABEL,
user,

@@ -49,3 +54,5 @@ timestamp: this.timestamp

action: this.constructor.ACTION,
actionLabel: this.constructor.ACTION_LABEL,
key: this.key,
helpText: this.key,
data: cloneDeep(this.data),

@@ -52,0 +59,0 @@ timestamp: this.timestamp,

14

lib/implementations/aggregation-added.js

@@ -11,2 +11,6 @@ const extend = require('lodash/extend');

static get ACTION_LABEL() {
return "Created child";
}
async toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity) {

@@ -16,3 +20,2 @@ const resource = await super.toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity);

return extend({}, resource, {
action: "Created child",
element: {

@@ -28,4 +31,13 @@ label: this.key,

}
async toNotificationJson(persistence, domain) {
const json = await super.toNotificationJson(persistence, domain);
json.value = {
label: "NEW",
href: this.href('entity', domain, this.data.type, this.data.id) // FIXME
};
return json;
}
}
module.exports = AggregationAdded;

@@ -11,6 +11,9 @@ const extend = require('lodash/extend');

static get ACTION_LABEL() {
return "Removed child";
}
async toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity) {
const resource = await super.toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity);
return extend({}, resource, {
action: "Removed child",
element: {

@@ -25,3 +28,11 @@ label: this.key,

}
async toNotificationJson(persistence, domain) {
const json = await super.toNotificationJson(persistence, domain);
json.value = {
label: this.data.label
};
return json;
}
}
module.exports = AggregationRemoved;

@@ -11,6 +11,9 @@ const extend = require('lodash/extend');

static get ACTION_LABEL() {
return "Added association";
}
async toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity) {
const resource = await super.toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity);
return extend({}, resource, {
action: "Added association",
element: {

@@ -26,4 +29,13 @@ label: this.key,

}
async toNotificationJson(persistence, domain) {
const json = await super.toNotificationJson(persistence, domain);
json.value = {
label: this.data.label,
href: this.href('entity', domain, this.data.type, this.data.id) // FIXME
};
return json;
}
}
module.exports = AssociationAdded;

@@ -11,6 +11,9 @@ const extend = require('lodash/extend');

static get ACTION_LABEL() {
return "Removed association";
}
async toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity) {
const resource = await super.toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity);
return extend({}, resource, {
action: "Removed association",
element: {

@@ -26,4 +29,13 @@ label: this.key,

}
async toNotificationJson(persistence, domain) {
const json = await super.toNotificationJson(persistence, domain);
json.value = {
label: this.data.label,
href: this.href('entity', domain, this.data.type, this.data.id) // FIXME
};
return json;
}
}
module.exports = AssociationRemoved;

@@ -12,6 +12,9 @@ const extend = require('lodash/extend');

static get ACTION_LABEL() {
return "Added new embedded";
}
async toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity) {
const resource = await super.toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity);
return extend({}, resource, {
action: "Added new embedded",
element: {

@@ -23,4 +26,9 @@ label: shorten(this.key, undefined, true), // TODO: Get the Entity name.

}
async toNotificationJson(persistence, domain) {
const json = await super.toNotificationJson(persistence, domain);
return json;
};
}
module.exports = EmbeddedAdded;

@@ -12,6 +12,9 @@ const extend = require('lodash/extend');

static get ACTION_LABEL() {
return "Removed embedded";
}
async toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity) {
const resource = await super.toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity);
return extend({}, resource, {
action: "Removed embedded",
element: {

@@ -23,4 +26,9 @@ label: shorten(this.key, undefined, true), // TODO: Get the Entity name.

}
async toNotificationJson(persistence, domain) {
const json = await super.toNotificationJson(persistence, domain);
return json;
}
}
module.exports = EmbeddedRemoved;

@@ -11,6 +11,9 @@ const extend = require('lodash/extend');

static get ACTION_LABEL() {
return "Created";
}
async toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity) {
const resource = await super.toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity);
return extend({}, resource, {
action: "Created",
from: {

@@ -22,4 +25,13 @@ label: this.data.label,

}
async toNotificationJson(persistence, domain) {
const json = await super.toNotificationJson(persistence, domain);
json.from = {
label: this.data.label,
href: this.href('entity', domain, this.data.type, this.data.id) // FIXME
};
return json;
}
}
module.exports = EntityCreated;

@@ -12,6 +12,9 @@ const extend = require('lodash/extend');

static get ACTION_LABEL() {
return "Changed property";
}
async toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity) {
const resource = await super.toFormResource(domain, persistence, routeName, cacheOfUsers, userEntity);
return extend({}, resource, {
action: "Changed property",
element: {

@@ -32,4 +35,12 @@ label: shorten(this.key, undefined, true), // TODO: Get the Entity name.

}
async toNotificationJson(persistence, domain) {
const json = await super.toNotificationJson(persistence, domain);
json.key = shorten(this.key, undefined, true);
json.data.newClass = (this.key === 'Enum:Status') ? `warpjs-document-status warpjs-document-status-${this.data.newValue}` : '';
json.data.fromClass = (this.key === 'Enum:Status') ? `warpjs-document-status warpjs-document-status-${this.data.oldValue}` : '';
return json;
}
}
module.exports = UpdateValue;

2

package.json
{
"name": "@warp-works/warpjs-change-logs",
"version": "1.0.6",
"version": "1.0.7",
"description": "Change logs library for WarpJS.",

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

# WarpJS ChangeLogs RELEASE NOTES
## 1.0.7 - 2019-05-08
- Getting implementation specific `toNotificationJson()`.
## 1.0.6 - 2019-05-07

@@ -4,0 +8,0 @@

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