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

noflo

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

noflo - npm Package Versions

1
10

0.5.5

Diff

Changelog

Source

0.5.5 (June 20th 2014)

  • Fixed an issue with StreamSender affecting WirePattern components dealing with multiple levels of grouping
  • New CustomizeError helper for passing information with Error objects in NoFlo. For example:
err = new Error 'Something went wrong'

# Add metadata to it. Usually this should include groups and other machine-readable information
noflo.helpers.CustomizeError err,
  groups: groups
  foo: 'bar'

# Send it to error port
c.error err
bergie
published 0.5.4 •

Changelog

Source

0.5.4 (June 11th 2014)

  • The new noflo-api-updater tool assists in updating components to the latest NoFlo API
  • GroupedInput helper has been renamed to WirePattern due to a bigger collection of synchronization options.
  • The WirePattern helper has a new ordered option for choosing whether the output should be in same order as the incoming packets
  • Options group and forwardGroups of WirePattern are made independent, so make sure to use forwardGroups: true if you need this feature together with group: true.
  • Added support for multiple outputs and reading/writing substreams as solid objects in WirePattern.
  • Added load outport handing in WirePattern to make it a complete replacement for AsyncComponent.
  • Added helpers for advanced error handling, see #185.
  • Added caching option for OutPorts that makes them re-send their latest value to any newly-added connections, see #151 for example use cases.
bergie
published 0.5.3 •

Changelog

Source

0.5.3 (May 31st 2014)

  • integer is accepted as an alias for the int datatype for ports
  • buffer is now an accepted port datatype
  • The Continuous Integration setup for NoFlo now runs on both Linux and Windows
  • Fixed a bug with ComponentLoader getSource method when invoked early on in execution
  • New component helpers for easier authoring

The MapComponent helper is usable for synchronous components that operate on a single inport-outport combination:

c = new noflo.Component
  inPorts:
    in:
      datatype: 'number'
  outPorts:
    out:
      datatype: 'number'
noflo.helpers.MapComponent c, (data, groups, out) ->
  out.send data * 2

The GroupedInput helper assists in building components that need to synchronize multiple inputs by groups:

c = new noflo.Component
  inPorts:
    x:
      datatype: 'number'
    y:
      datatype: 'number'
  outPorts:
    radius:
      datatype: 'number'

noflo.helpers.GroupedInput c,
  in: ['x', 'y']
  out: 'radius'
, (data, groups, out) ->
  out.send Math.sqrt(data.x**2 + data.y**2)

GroupedInput can also synchronize via specific fields of object-type packets:

helpers.GroupedInput c,
  in: ['user', 'message']
  out: 'signedMessage'
  field: 'request'
, (data, groups, out) ->
  out.send
    request: data.request
    user: data.user.name
    text: data.message.text

user.send {request: 123, id: 42, name: 'John'}
message.send {request: 123, id: 17, text: 'Hello world'}

# Result:
{ request: 123, user: 'John', text: 'Hello world'}
bergie
published 0.5.2 •

Changelog

Source

0.5.2 (May 8th 2014)

  • Fixed a minor packaging issue
bergie
published 0.5.1 •

Changelog

Source

0.5.1 (May 8th 2014)

  • Custom component loaders can be registered programmatically using the registerLoader method of NoFlo's ComponentLoader
  • contains method for buffered inports returns the number of data packets the buffer has
  • Call stack exhaustion on very large graphs has been fixed
  • The error outport of AsyncComponents now sends the group information of the original input together with the error
  • The error method of regular ports can now also handle groups as a second parameter
  • Ports can now list their attached sockets (by array index) via the listAttached method
  • function is now an accepted datatype for ports
  • There is now initial support for making connections to and from addressable ports with a specified index

In the FBP format, these can be specified with the bracket syntax:

SomeNode OUT[2] -> IN OtherNode
'foo' -> OPTS[1] OtherNode

In the JSON file these are defined in connections by adding a integer to the index key of the src or tgt definition.

The NoFlo Graph class provides these with the following methods:

addEdgeIndex(str outNode, str outPort, int outIndex, str inNode, str inPort, int inIndex, obj metadata)
addInitiaIndex(mixed data, str inNode, str inPort, int inIndex, obj metadata)

If indexes are not specified, the fall-back behavior is to automatically index the connections based on next available slot in the port.

bergie
published 0.5.0 •

Changelog

Source

0.5.0 (March 28th 2014)

  • Support for setting the default baseDir of Node.js NoFlo environment with NOFLO_PROJECT_ROOT env var (defaults to current working directory)
  • Support for loading graph definitions via AJAX on browser-based NoFlo
  • Support for delayed initialization of Subgraph components via ComponentLoader
  • Component instances now get the node's metadata passed to the getComponent function
  • New methods for manipulating Graph metadata:
    • setProperties
    • setInportMetadata
    • setOutportMetadata
    • setGroupMetadata
    • setNodeMetadata
    • setEdgeMetadata
  • Graph exports can now be renamed, and emit addExport, removeExport, and renameExport events
  • New Graph transaction API for grouping graph changes. Transactions can be observed
    • startTransaction
    • endTransaction
  • New Journal class, for following Graph changes and restoring earlier revisions. Currently supports undo and redo
  • New port API allowing better addressability and metadata
  • Graph's published ports are now declared in two separate inports and outports arrays to reduce ambiguity

With the new API component ports can be declared with:

@inPorts = new noflo.InPorts
@inPorts.add 'in', new noflo.InPort
  datatype: 'object'
  type: 'http://schema.org/Person'
  description: 'Persons to be processed'
  required: true
  buffered: true

The noflo.Ports objects emit add and remove events when ports change. They also support passing port information as options:

@outPorts = new noflo.OutPorts
  out: new noflo.OutPort
    datatype: 'object'
    type: 'http://schema.org/Person'
    description: 'Processed person objects'
    required: true
    addressable: true

The input ports also allow passing in an optional processing function that gets called on information packets events.

  • New component API allowing simpler component definition in both CoffeeScript and JavaScript:
var noflo = require('noflo');

exports.getComponent = function() {
  var c = new noflo.Component();

  c.inPorts.add('in', function(event, payload) {
    if (packet.event !== 'data')
      return;
    // Do something with the packet, then
    c.outPorts.out.send(packet.data);
  });

  c.outPorts.add('out');

  return c;
};
  • Support for dealing with component source code via ComponentLoader setSource and getSource methods
bergie
published 0.4.5 •

bergie
published 0.4.4 •

Changelog

Source

0.4.4 (February 4th 2014)

  • Support for CoffeeScript 1.7.x on Node.js
bergie
published 0.4.3 •

Changelog

Source

0.4.3 (December 6th 2013)

  • ArrayPorts with attached sockets now return true for isAttached checks. There is a separate canAttach method for checking whether more can be added
  • Icon support was added for both libraries and components using the set from Font Awesome
    • For libraries, register via the noflo.icon key in your package.json (Node.js libraries) or component.json (browser libraries)
    • For components, provide via the icon attribute
  • Subgraphs now support closing their internal NoFlo network via the shutdown method
  • Component Loader is able to load arbitrary graphs outside of the normal package manifest registration via the loadGraph method
  • Component Loader of the main NoFlo network is now carried across subgraphs instead of instantiating locally
  • Libraries can provide a custom loader for their components by registering a noflo.loader key in the manifest pointing to a CommonJS module
  • Exported ports can now contain metadata
  • It is possible to create named groups of nodes in a NoFlo graph, which can be useful for visual editors
  • Components have an error helper method for sending errors to the error outport, or throwing them if that isn't attached
bergie
published 0.4.2 •

Changelog

Source

0.4.2 (September 28th 2013)

  • Easier debugging: port errors now contain the name of the NoFlo graph node and the port
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