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

flowbject

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flowbject - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

5

dist/generators/AbstractGenerator.d.ts

@@ -0,4 +1,6 @@

/// <reference types="node" />
import * as fields from '../fields';
import * as states from '../states';
import { StateMachine } from '../StateMachine';
import { EventEmitter } from 'events';
/**

@@ -8,2 +10,5 @@ * @todo: Implement abstract missing generator methods: Parallel etc.

export declare abstract class AbstractGenerator {
protected emitter: EventEmitter;
constructor();
on(eventName: string, listener: (target: (fields.Field<any> | states.State)) => void): void;
abstract generateStateMachine(stateMachine: StateMachine): Object;

@@ -10,0 +15,0 @@ abstract generateNextField(field: fields.NextField<any>): Object;

10

dist/generators/AbstractGenerator.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var events_1 = require("events");
/**

@@ -8,3 +9,7 @@ * @todo: Implement abstract missing generator methods: Parallel etc.

function AbstractGenerator() {
this.emitter = new events_1.EventEmitter();
}
AbstractGenerator.prototype.on = function (eventName, listener) {
this.emitter.on(eventName, listener);
};
AbstractGenerator.prototype.getMethodTarget = function (target) {

@@ -21,3 +26,6 @@ var methodTarget = "generate" + target.constructor.name;

AbstractGenerator.prototype.generateField = function (field) {
return this.getMethodTarget(field).call(this, field);
this.emitter.emit("before::generate::field::" + field.constructor.name, field);
var res = this.getMethodTarget(field).call(this, field);
this.emitter.emit("after::generate::field::" + field.constructor.name, field);
return res;
};

@@ -24,0 +32,0 @@ return AbstractGenerator;

5

dist/generators/StepFunctionsGenerator.js

@@ -224,2 +224,3 @@ "use strict";

var _this = this;
this.emitter.emit("before::generate::state::" + state.constructor.name, state);
var data = this.getMethodTarget(state).call(this, state);

@@ -230,3 +231,3 @@ var validationErrors = state.validate();

}
return state.getFields()
var res = state.getFields()
.filter(function (field) { return field.isConfigured(); })

@@ -236,2 +237,4 @@ .reduce(function (result, field) {

}, data);
this.emitter.emit("after::generate::state::" + state.constructor.name, state);
return res;
};

@@ -238,0 +241,0 @@ return StepFunctionsGenerator;

{
"name": "flowbject",
"version": "1.1.4",
"version": "1.1.5",
"description": "Flowbject is a library that allows you to describe state machines with objects.",

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

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