Git Product home page Git Product logo

fbp-graph's Introduction

FBP Graph library for JavaScript

This library provides a JavaScript implementation of Flow-Based Programming graphs. There are two areas covered:

  • Graph - the actual graph library
  • Journal - journal system for keeping track of graph changes and undo history

Installing

Install fbp-graph with:

npm install fbp-graph --save

Usage

Load a graph definition into an object. Loading graph definitions works with both JSON and FBP formatted graphs.

const fbpGraph = require('fbp-graph');
fbpGraph.graph.loadFile('some/path.json', (err, graph) => {
  // Do something with the graph object
});

Changes

  • 0.7.0 (December 08th 2020)
    • All graph modification methods are now chainable, allowing you to do things like graph.addNode().addEdge().toJSON()
    • Graph I/O methods (like loadFile and save) now return Promises in case no callback is supplied
  • 0.6.3 (December 03rd 2020)
    • Fixed exporting of base Graph and Journal types in index
  • 0.6.2 (November 16th 2020)
    • Graph properties componentLoader and baseDir are not serialized into JSON
  • 0.6.1 (October 26th 2020)
    • Fixed packaging issue
  • 0.6.0 (October 26th 2020)
    • Now shipping with TypeScript definitions
  • 0.5.0 (October 23rd 2020)
    • Converted from CoffeeScript to modern JavaScript
  • 0.4.0 (December 7th 2018)
    • Original JSON loaded via loadJSON no longer gets mutated by the graph instance (thanks @davecarlson)

fbp-graph's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fbp-graph's Issues

Journal issues with Array objects

Some ports can be of type 'object' or 'array' which means it should be possible to send an empty array to them.
When doing so in the noflo-ui you get backtraces of storage problem :

DOMException {message: "An object could not be cloned.", name: "DataCloneError", code: 25, stack: "Error: An object could not be cloned.↵    at IDBJo…0/bower_components/platform/platform.js:29:27537)", INDEX_SIZE_ERR: 1…}
 "Error: An object could not be cloned.
    at IDBJournalStore.putTransaction (http://localhost:1080/browser/noflo-ui.js:20154:17)
    at Journal.endTransaction (http://localhost:1080/browser/noflo-ui.js:6793:16)
    at Journal.endTransaction (http://localhost:1080/browser/noflo-ui.js:6401:59)
    at Graph.<anonymous> (http://localhost:1080/browser/noflo-ui.js:6766:22)
    at Graph.Emitter.emit (http://localhost:1080/browser/noflo-ui.js:336:20)
    at Graph.endTransaction (http://localhost:1080/browser/noflo-ui.js:3146:17)
    at Polymer.updateValue (http://localhost:1080/elements/noflo-node-inspector.html/noflo-node-inspector.js:188:22)
    at null.<anonymous> (http://localhost:1080/bower_components/platform/platform.js:34:16969)
    at t (http://localhost:1080/bower_components/platform/platform.js:29:28182)
    at r (http://localhost:1080/bower_components/platform/platform.js:29:27537)" 

Migrated from noflo/noflo#152

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml
  • The new Node.js version is in-range for the engines in 1 of your package.json files, so that was left alone

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Is this project still developed?

I'm very curious if this project still active and supported? Is it any plans to continue development in the future?
We are planning to use FBP engine in our low-code platform.

An in-range update of grunt is breaking the build 🚨


☝️ Important announcement: Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


The devDependency grunt was updated from 1.0.4 to 1.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

grunt is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v1.1.0
  • Update to mkdirp ~1.0.3
  • Only support versions of Node >= 8
Commits

The new version differs by 8 commits.

  • d5cdac0 Merge pull request #1706 from gruntjs/tag-neew
  • 4674c59 v1.1.0
  • 6124409 Merge pull request #1705 from gruntjs/mkdirp-update
  • 0a66968 Fix up Buffer usage
  • 4bfa98e Support versions of node >= 8
  • f1898eb Update to mkdirp ~1.0.3
  • 75da17b HTTPS link to gruntjs.com (#1683)
  • 6795d31 Update js-yaml dependecy to ~3.13.1 (#1680)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of coveralls is breaking the build 🚨


☝️ Important announcement: Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


The devDependency coveralls was updated from 3.0.9 to 3.0.10.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

coveralls is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for CodeFresh support, Maintenance

Added:

  • CodeFresh support (@suda)

Improved:

Updated:

Commits

The new version differs by 6 commits.

  • 2ea7be3 bump version
  • 5e976c5 Only coverage report on test success, fixes #230
  • 3d83b4f Set service_name and/or repo_token from .coveralls.yml regardless of if $COVERALLS_REPO_TOKEN is set (#272)
  • 710c504 Add Codefresh support
  • 8c4ba99 CI: switch to actions/checkout@v2
  • eb1a3c9 278 Upgrades minimist dependency to 1.2.5

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of babel-loader is breaking the build 🚨


☝️ Important announcement: Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


The devDependency babel-loader was updated from 8.0.6 to 8.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

babel-loader is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for 8.1.0
Commits

The new version differs by 18 commits.

  • 3ff9926 8.1.0
  • 0817bb6 Bump deps for audit (#834)
  • ecb2b02 Bump acorn from 6.3.0 to 6.4.1 (#828)
  • 13a8238 feat: expose webpack target via babel caller (#826)
  • b568420 Merge pull request #814 from nicolo-ribaudo/tla
  • 1c35731 Update src/injectCaller.js
  • 5f55638 Add schema validation (#822)
  • 8b47312 Merge pull request #821 from PatNeedham/docs/contributing-typo
  • a967311 docs(contributing): fix typo
  • 758d4b5 docs(readme): fix typo (#818)
  • 8a0a25a Add supportsTopLevelAwait to caller
  • 15df92f chore: Do not run node 6 in appveyor
  • 26d1676 chore: Upgrade more dev dependencies
  • 26aa687 chore: Update some dev dependencies
  • a961168 Bump eslint-utils from 1.3.1 to 1.4.2 (#806)

There are 18 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Webpack compile error

ERROR in ../~/fbp-graph/lib/Journal.js
Module not found: Error: Can't resolve 'fs' in '/Users/kristianmandrup/repos/tecla5/graph-editor/node_modules/fbp-graph/lib'
 @ ../~/fbp-graph/lib/Journal.js 607:13-26
 @ ../~/fbp-graph/index.js
 @ ./index.js

ERROR in ../~/fbp-graph/lib/Graph.js
Module not found: Error: Can't resolve 'fs' in '/Users/kristianmandrup/repos/tecla5/graph-editor/node_modules/fbp-graph/lib'
 @ ../~/fbp-graph/lib/Graph.js 981:13-26 1161:11-24
 @ ../~/fbp-graph/index.js
 @ ./index.js

An in-range update of babel7 is breaking the build 🚨

There have been updates to the babel7 monorepo:

    • The devDependency @babel/core was updated from 7.7.7 to 7.8.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

This monorepo update includes releases of one or more dependencies which all belong to the babel7 group definition.

babel7 is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of grunt-noflo-browser is breaking the build 🚨

Version 1.4.0 of grunt-noflo-browser was just published.

Branch Build failing 🚨
Dependency grunt-noflo-browser
Current Version 1.3.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

grunt-noflo-browser is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 8 commits.

  • 49cbe83 Bump
  • f6ac38e Merge pull request #30 from noflo/noflo_component_loader
  • 9935b00 Try to match also Windows paths with regexp
  • c188098 Bump noflo-component-loader dep
  • 84cec54 Update to legacy-free component versions
  • 821de79 Test on modern Node.js
  • ea16584 Use noflo-component-loader to build the loader
  • f00089b Remove obsolete grunt-noflo-manifest

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of coffeescript is breaking the build 🚨

The devDependency coffeescript was updated from 2.5.0 to 2.5.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

coffeescript is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 5 commits.

  • 26a7ba1 2.5.1 (#5297)
  • 9cef39d Handle implicit object as end of outer implicit object property value (#5296)
  • 92ad04b Allow soaks and prototype shorthands in object splats (#5293)
  • 6fe980e Improve performance of location data compensation (#5294)
  • bb8df1e Fix typos (#5287)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Adding metadata to node in noflo embedding nodejs

Hi. I need to add metadata while adding the node that. For example

const graph = new noflo.Graph('My graph');
graph.addNode("Square", "square")
while doing this I need to add some data also.
like this -> graph.addNode("Square", "square", {metadata: "metadata"}) as referred here https://github.com/flowbased/fbp-graph/blob/master/src/Graph.coffee#L149

If I do like this how to get the metadata in component. Input not not providing these data.

Please help me on this. Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.