Coder Social home page Coder Social logo

noflo-nodejs's Introduction

Command-line tool for running NoFlo programs on Node.js

This tool is designed to be used together with the NoFlo UI development environment for running NoFlo networks on Node.js. This tool runs your NoFlo programs, and provides a FBP Protocol interface over either WebSockets or WebRTC to tools like NoFlo UI and fbp-spec.

This enables inspection of the state of the running NoFlo program, as well as live editing of the graph and components of your project.

Prepare a project folder

Start by setting up a local NoFlo Node.js project. For example:

$ mkdir my-project
$ cd my-project
$ npm init
$ npm install noflo --save
$ npm install noflo-nodejs --save

Continue by installing whatever NoFlo component libraries you need, for example:

$ npm install noflo-core --save

If you want, this is a great time to push your project to GitHub.

Starting the runtime

Once you have installed the runtime, it is time to start it:

$ npx noflo-nodejs

This will start a WebSocket-based NoFlo Runtime server. When started, it will output an URL with the connection details needed by NoFlo UI.

Copy paste this URL into the browser. The NoFlo UI IDE will open, and automatically connect to your runtime. To make changes hit 'Edit as Project'. You should be able to see available components and build up your system.

Starting an existing graph

If you want to run an existing graph, you can use the --graph option.

noflo-nodejs --graph graphs/MyMainGraph.json

If you want the process to exit when the network stops, you can pass --batch.

Typical project setup

In most Node.js projects there will be three different setups you might want to have with NoFlo: development, testing, and production. Each of these can be easily expressed via NPM scripts in package.json:

{
  "name": "my-project",
  "scripts": {
    "dev": "noflo-nodejs --host localhost --auto-save --graph ./graphs/MyGraph.json",
    "test": "fbp-spec --secret test --address ws://localhost:3333 --command 'noflo-nodejs --port 3333 --capture-output --secret test --open false' spec/",
    "start": "noflo-nodejs --protocol webrtc --graph ./graphs/MyGraph.json"
  },
  "dependencies": {
    ...
  },
  ...
}

With this setup you get the following:

  • By running npm run dev, noflo-nodejs will start your projects' main graph and open the NoFlo UI IDE in your browser. Any changes you make in NoFlo UI will be persisted on your local hard drive
  • By running npm test, fbp-spec will start a noflo-nodejs instance, connect to it, and run all of your local fbp-spec tests
  • By running npm start, noflo-nodejs starts your program, enabling remote debugging via the WebRTC protocol

Host address autodetection for WebSockets

By default noflo-nodejs will attempt to autodetect the public hostname/IP of your system. If this fails, you can specify --host myhostname manually.

Securing the WebSocket connection

The noflo-nodejs runtime can be secured using TLS. Place the key and certificate files somewhere that noflo-nodejs can read, and then start the runtime with the --tls-key and --tls-cert` options.

For example, to use self-signed keys, you could do the following:

$ openssl genrsa -out localhost.key 2048
$ openssl req -new -x509 -key localhost.key -out localhost.cert -days 3650 -subj /CN=localhost
$ noflo-nodejs --tls-key=localhost.key --tls-cert=localhost.cert

Note: browsers may refuse to connect to a WebSocket with a self-signed certificate by default. You can visit the runtime URL with your browser first to accept the certificate before connecting to it in the IDE.

Peer-to-peer WebRTC connections

If you want to use a peer-to-peer WebRTC connection instead of WebSockets, start noflo-nodejs with the argument --protocol webrtc.

While slightly more complex and slower to start, WebRTC has some advantages over WebSockets:

  • Peer-to-peer connections can (sometimes) work through firewalls
  • No need for setting up TLS to secure communications between the runtime and the client

By default noflo-nodejs uses Flowhub's signalling server for negotiating the connection details between runtime and clients. You can supply a different RTC Switchboard instance with the --signaller option.

Debugging

noflo-nodejs supports flowtrace allows to trace & store the execution of the FBP program, so you can debug any issues that would occur. Specify --trace to enable tracing.

$ noflo-nodejs --graph graphs/MyMainGraph.json --trace

If you are running in --batch mode, the file will be dumped to disk when the program terminates. Otherwise you can send the SIGUSR2 to trigger dumping the file to disk.

$ kill -SIGUSR2 $PID_OF_PROCESS
... Wrote flowtrace to: .flowtrace/1151020-12063-ami5vq.json

You can now use various flowtrace tools to introspect the data. For instance, you can get a human readable log using flowtrace-show

$ npx flowtrace-show .flowtrace/1151020-12063-ami5vq.json

-> IN repeat CONN
-> IN repeat DATA hello world
-> IN stdout CONN
-> IN stdout DATA hello world
-> IN repeat DISC
-> IN stdout DISC

Signalling aliveness

noflo-nodejs will ping Flowhub registry periodically to signal aliveness to IDE users. To disable this behavior, set --registry-ping 0.

Persistent runtime configuration

Settings can be loaded from a flowhub.json file. By default the configuration will be read from the current working directory, but you can change this by setting the PROJECT_HOME environment variable.

This file will be automatically saved when you run noflo-nodejs, meaning that settings like runtime ID and secret will be persisted between runs.

Environment variables and command-line options will override settings specified in config file.

Since the values are often machine and/or user specific, you usually don't want to add this file to version control.

Embedding runtime in an existing service

In addition to running noflo-nodejs as a command-line program that starts and runs your NoFlo graphs, you can embed it into an existing Node.js application. Here is a quick example how to do it:

const runtime = require('noflo-nodejs');

// This function returns a Promise that resolves when the NoFlo runtime has started up
startRuntime(graphPath, options = {}) {
  // Configure noflo-nodejs. Options here map roughly to the standard command-line arguments
  const settings = {
    id: '9f1432b1-a259-454a-bb67-e9d91525cc63', // Set an unique UUID for your application instance
    label: 'My cool app',
    baseDir: __dirname,
    host: 'localhost',
    port: 3569,
    ...options,
  };
  return runtime(graphPath, settings);
}

noflo-nodejs's People

Contributors

bergie avatar dependabot[bot] avatar djdeath avatar ensonic avatar greenkeeper[bot] avatar greenkeeperio-bot avatar jonnor avatar

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  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  avatar  avatar  avatar  avatar  avatar  avatar

noflo-nodejs's Issues

multiple users for a runtime

not sure if this belongs here or in flowhub-registry, but I don't think it's possible to have multiple users in flowhub.json (tried to input an array for user, and didn't work)?

We would like to share a runtime between multiple users (for now I simply put one user at a time in flowhub.json, then it becomes visible in the UI of the mentioned user. Afterwards, I change the user so the next user gets to see the runtime. As long as the first user doesn't explicitly sync the runtimes he can still use the runtime).

fbpGraph.graph.loadFile is not a function

From doc https://noflojs.org/documentation

# In the graph we first need to define the nodes and the connections between them
Read(filesystem/ReadFile) OUT -> IN Display(core/Output)

# Start off the graph by sending a filename to the file reader
'package.json' -> IN Read
$ ./node_modules/.bin/noflo-nodejs --graph scripts/ShowContents.fbp --batch

图片

PS E:\repo\TiddlyGit-Desktop> ./node_modules/.bin/noflo-nodejs --graph scripts/ShowContents.fbp --batch
fbpGraph.graph.loadFile is not a function
TypeError: fbpGraph.graph.loadFile is not a function
    at exports.loadGraph (E:\repo\TiddlyGit-Desktop\node_modules\.pnpm\[email protected]\node_modules\noflo-nodejs\src\runtime.js:16:25)
    at exports.startGraph (E:\repo\TiddlyGit-Desktop\node_modules\.pnpm\[email protected]\node_modules\noflo-nodejs\src\runtime.js:20:4)
    at E:\repo\TiddlyGit-Desktop\node_modules\.pnpm\[email protected]\node_modules\noflo-nodejs\src\noflo-nodejs.js:11:29

Try add console.log there

fbpGraph.graph {
  Graph: [class Graph extends EventEmitter],
  createGraph: [Function: createGraph],
  loadJSON: [Function: loadJSON],
  loadFBP: [Function: loadFBP],
  loadFile: undefined,
  equivalent: [Function: equivalent],
  mergeResolveTheirs: [Function: mergeResolveTheirsNaive]        
}

Path to user directory wrong when working from other partition

OS: Windows 8.1 Pro 64-bit
System partition: C
"Working partition" (from where the commands below will be executed): `P``

PS P:\noflo-nodejs\node_modules\.bin> ./noflo-nodejs-init.cmd --user [key] --host [host] --port
 [port] --label "Local NoFlo Test"

fs.js:439
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory 'P:\Users\ComFreek\.flowhub.json'
    at Object.fs.openSync (fs.js:439:18)
    at Object.fs.writeFileSync (fs.js:978:15)
    at Object.exports.saveDefaults (P:\noflo-nodejs\node_modules\noflo-nodejs\index.js:30:6)
    at Object.<anonymous> (P:\noflo-nodejs\node_modules\noflo-nodejs\bin\noflo-nodejs-init:23:7)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)

Everything works fine after running mkdir P:\Users\ComFreek.

Add an "auto-save" feature

Just like with the MsgFlo runtime, it would be great to have an "auto-save" option that would persist component or graph changes coming from clients to disk.

Allow to build a single-file .js

Start-up performance of NoFlo on node.js is highly dependent on I/O usage. In some environments it can take over 1 minute to start 10 NoFlo instances.

Right now we can have caching of CoffeeScript and caching of component lookups,
but the best performance would be if we only required a single .js file. This is similar to how noflo-browser things are usualy deployed.

Default permissions broken, cannot open in Flowhub

noflo-nodejs --register=false cannot be connected to, as the permission set is empty. This is opposite of what --help suggests.

The permissions on commandline and supposedly the default are not passed in at all.

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

Version 1.0.3 of grunt was just published.

Branch Build failing 🚨
Dependency grunt
Current Version 1.0.2
Type devDependency

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

Commits

The new version differs by 10 commits.

  • 9ba3a99 1.0.3
  • eee4c33 Changelog v1.0.3
  • 46da7f2 Merge pull request #1636 from gruntjs/upt
  • 00f4d8a Drop support for Node 0.10 and 0.12
  • e852727 util update
  • 56d702e Update deps
  • 0105524 Fix race condition with file.mkdir and make it operate more similarily to mkdir -p (#1627) r=@vladikoff
  • 303d445 https links (#1629)
  • d969132 Merge pull request #1624 from gruntjs/rm-bump-deps
  • 289ff91 Remove old bump task and deps

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 noflo is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 1.1.2 of noflo was just published.

Branch Build failing 🚨
Dependency noflo
Current Version 1.1.1
Type dependency

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

noflo is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

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

Commits

The new version differs by 7 commits.

  • 12e19b5 Release 1.1.2
  • 7a69552 Merge pull request #595 from noflo/prevent_early_stopped
  • bf6efe9 Catch component loading errors under Node.js
  • 412c0c7 Always check list of active processes
  • 12a9550 Make process activation abort any pending debounced finishes
  • 160b519 Ignore package-lock.json
  • 685c619 Go back to gear as default icon

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 commander is breaking the build 🚨

The dependency commander was updated from 2.18.0 to 2.19.0.

🚨 View failing branch.

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

commander is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

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

Release Notes for v2.19.0
  • Removed newline after Options and Commands headers (#864)
  • Bugfix - Error output (#862)
  • Fix to change default value to string (#856)
Commits

The new version differs by 6 commits.

  • 78b7dbd version bump 2.19.0
  • 6aafa20 prefixed error messages with "error:"
  • 6c0c1f6 removed newline above and below errors
  • b6549f2 removed indentation from errors
  • 2c20e91 removed newline after options and commands headers
  • 4c294c1 Fix to change default value to string

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 🌴

insufficient error handling for missing fields in flowhub.json

Lets assue you missed the "user" field in your flowhub.json. When starting the runtime it prints

 npm start

> [email protected] start /home/ensonic/projects/noflo/noflo-local-rt
> node node_modules/.bin/noflo-nodejs

NoFlo runtime listening at ws://192.168.0.47:3569
Using /home/ensonic/projects/noflo/noflo-local-rt for component loading

So the errors thrown in https://github.com/the-grid/flowhub-registry/blob/master/index.js#L28-39 are lost. I see two options:
1.) we don't touch flowhub-registry and only add a try/catch around https://github.com/noflo/noflo-nodejs/blob/master/bin/noflo-nodejs#L55 . Down side is that we have two places we handle the error.

2.) we change flowhub-registry to not throw, but invoke the callback:

 if (!this.runtime.user) {
-  throw new Error('Runtime registration requires a user UUID')
+  callback (new Error('Runtime registration requires a user UUID'));
   return;
 }

Finally I wonder if
https://github.com/noflo/noflo-nodejs/blob/master/bin/noflo-nodejs#L58
should call process.exit(1) instead of return? How useful is the runtime when its cannot announce itself?

Requested graph not found

So I've installed this in my app and have the runtime visible in my locally running version of noflo-ui. When I click on the runtime in there or if I copy/paste the live IDE URL (to use app.flowhub.io), I simply get a desktop notification saying "Error: Requested graph not found". I cannot see any components in the search box, nor can I create new graphs or components from the left-hand slide-out menu.

I assume there is some additional requirements I'm not meeting but the docs/README for this project as well as for noflo-ui are not giving me any clues as to what I'm doing wrong, or even what I should be expecting.

Are all noflo components installed in my nodejs app supposed to be exposed to the UI (e.g. noflo-core and noflo-filesystem)?

Am I missing some conventional folder structure or base graph with a known name that's being looked for? I simply followed the steps in the README.

noflo version: 0.5.11
noflo-nodejs version: 0.0.6

package.json:

{
  "name": "noflo-sandbox",
  "version": "0.0.0",
  "description": "noflo sandbox",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Ryan Gahl",
  "license": "ISC",
  "dependencies": {
    "noflo": "^0.5.11",
    "noflo-core": "^0.1.11",
    "noflo-filesystem": "^1.0.6",
    "noflo-nodejs": "0.0.6"
  },
  "noflo": {
    "graphs": {
      "ShowContents": "./graphs/ShowContents.fbp"
    }
  }
}

graphs/ShowContents.fbp (from one of your examples on the main noflo website):

# In the graph we first need to define the nodes and the connections between them
Read(filesystem/ReadFile) OUT -> IN Display(core/Output)

# Start off the graph by sending a filename to the file reader
'package.json' -> IN Read

Fixed External Access Port and Random Internal Listen Port (i.e. Heroku)

Hi, I wanted to get the nodejs runtime working with Heroku (which has port 80 as the externally presented port and a random internal listen port), so added a property to flowhub.json and added the following code to noflo-nodejs:

stored.port = process.env.PORT || stored.port;
var externalPort = stored.externalPort || stored.port;

and then changed the address property registered in flowhubRuntime:

address: 'ws://' + stored.host + ':' + externalPort, // was stored.port

This works for Heroku, but I realise its probably not generic enough for other deployment targets...

Just a suggestion - I'm sure there is a more elegant way to do this.

./node_modules/.bin/noflo-nodejs error after initial setup

I followed README.md but I get the error below after running ./node_modules/.bin/noflo-nodejs

Cannot read property '0' of undefined
    at /Users/justingaba/Development/noflo/node_modules/fbp-manifest/src/runtimes/noflo.js:185:22
    at tryCatcher (/Users/justingaba/Development/noflo/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/justingaba/Development/noflo/node_modules/bluebird/js/release/promise.js:517:31)
    at Promise._settlePromise (/Users/justingaba/Development/noflo/node_modules/bluebird/js/release/promise.js:574:18)
    at Promise._settlePromise0 (/Users/justingaba/Development/noflo/node_modules/bluebird/js/release/promise.js:619:10)
    at Promise._settlePromises (/Users/justingaba/Development/noflo/node_modules/bluebird/js/release/promise.js:699:18)
    at Promise._fulfill (/Users/justingaba/Development/noflo/node_modules/bluebird/js/release/promise.js:643:18)
    at Promise._resolveCallback (/Users/justingaba/Development/noflo/node_modules/bluebird/js/release/promise.js:459:14)
    ...
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ noflo: `noflo-nodejs .`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ noflo script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/justingaba/.npm/_logs/2019-08-25T05_54_56_290Z-debug.log

No error / exist on missing components

I had a graph with subgraphs which used some component I did not have installed yet.

Expected: noflo-nodejs fails with an error explaining which components are missing

Actual: noflo-nodejs outputs the live URL as if everything was going OK, but graph network has not been started

This happened even with --catch-exceptions=false

An in-range update of eslint-plugin-import is breaking the build 🚨

Version 2.12.0 of eslint-plugin-import was just published.

Branch Build failing 🚨
Dependency eslint-plugin-import
Current Version 2.11.0
Type devDependency

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

eslint-plugin-import 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 33 commits.

  • 8f668c7 changelog/package bumps
  • cd9d249 exclude tests from coverage + bump TS parser (#1095)
  • f0d0c4f webpack resolver: cache instance(s) of resolve function (#1091)
  • 8c9c3b8 Merge pull request #1085 from benmosher/packageDir-array
  • 5111c79 revert has removal per @ljharb's note
  • 412ee2e [Refactor] use "has" instead of ".hasOwnProperty"
  • e2fdc5f Fix typo: 'runtime'
  • d8ca5e2 fix typo
  • 04d1c29 Merge branch 'master' into packageDir-array
  • 72bb2cb merge import/paths setting into existing packageDir option
  • 4e37dbf changelog links
  • 2e41a70 Merge pull request #1081 from benmosher/release
  • 2e0ed83 Merge branch 'master' into release
  • ec87b64 Ignore type imports for named rule. (#1057)
  • d5d8b35 memo-parser cautionary note

There are 33 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 🌴

No compatible version found: commander@'^2.1.0'

npm ERR! Error: No compatible version found: commander@'^2.1.0'
npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.0.3","0.0.4","0.0.5","0.1.0","0.2.0","0.2.1","0.3.0","0.3.1","0.3.2","0.3.3","0.4.0","0.4.1","0.4.2","0.4.3","0.5.0","0.5.1","0.6.0","0.6.1","0.5.2","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.1.0","1.1.1","1.2.0","1.3.0","1.3.1","1.3.2","2.0.0","2.1.0"]

Autodetection returns internal IP when running in Docker container

I am in the process of building a Docker container for the noflo-nodejs-runtime (First version is for the raspberry pi. Other versions will be added if I succeed). I will hone this container and the documentation so that it will be easily usable. The Dockerfile can be found under https://github.com/sejnub/docker-noflo-runtime-js/blob/master/Dockerfile

Here comes the problem(s): After node is configured with

node node_modules/.bin/noflo-nodejs-init --user <id> --host <public runtime ip> --port 3569 --label "noflo-nodejs on Raspi"

it shows the following:

Stored the following configuration to /flowhub.json

id: "<36 digit id>"
user: "<another 36 digit id>"
host: "<public ip of the runtime host>"
port: 3569
label: "Local NoFlo Test"
secret: "<secret>"
permissions: {
  "<same secret again>": [
    "protocol:component",
    "protocol:runtime",
    "protocol:graph",
    "protocol:network",
    "component:getsource",
    "component:setsource"
  ]
}

When I then start the runtime with

node node_modules/.bin/noflo-nodejs --capture-output=false

the runtime is registered and visible in the browser on the app.flowhub.io after logging in.
But the runtime is shown with "ws://172.17.0.4:3569" which is the local ip address of the container the runtime is hosted in.
So when I click the runtime it of cause can not connect.

I found out that I have to set the host again when I start the runtime with

node node_modules/.bin/noflo-nodejs --host

Why is this?
I did set the host with "noflo-nodejs-init --host" so why set it again with "noflo-nodejs --host "?
If I don't set it again here the runtime does register at app.flowhub.io but it is registered
with the local ip of the container 172.17,... and so the flowhub-app can't reach the runtime.

First question: Why do I have to set the host two times? Is this intended behaviuor

But even if I set it here again I can't find a way to use this runtime in a github synced project. The registered runtime is not shown when I try to use the "Select runtime" button.

Second question: How can I use my registered runtime inside a github project? (Or is this question noflo-ui related and I should post it there?)

When I register the runtime manually via "new runtime register / add manually" it works, but only one time. When I go back to "home" (app.flowhub.io) the manually registered runtime is shown for only half a second, then it's gone.

Third question: Why is the manually registered runtime only usable a single time? (Or is this question noflo-ui related and I should post it there?)

I am sorry, if this is the wrong place to ask this questions. I could not find a better one.

Noflo-nodejs server doesn't serve graphs as components

With a clean install of noflo-nodejs with a component library such as noflo-adapters you can't use the graphs as components.

See this stack overflow question:

http://stackoverflow.com/questions/23205857/how-can-graphs-be-exposed-as-components-and-used-in-noflo-ui

The setup I used to test and run this was almost line for line identical to the example setup in readme.md:

npm init
npm install noflo
npm install noflo-nodejs
npm install noflo-core
npm install noflo-adapters
npm install noflo-yaml
(create and edit flowhub.json so I can access this server from app.flowhub.io)
node_modules/noflo-nodejs/bin/noflo-nodejs

When I attach my noflo-ui to the runtime I can see the adapter components, but not the adapter graphs.

SSL support

Needed when connecting WebSocket from a website served over HTTPs, and is generally preferred when the process is accessible over untrusted network or the internet.

There was a PR here, which unfortunately got invalidated by a refactor: #11

Allow to set IIPs for exported ports on commandline

I think exported ports on top-level graph should be instantly accessible as command-line options, including generated --help docs

Embedding api should exist for this also, so once could have a "myexec" js/coffee file which just specifies graph and rest is handled by this "mounter".
This would make it very easy to make standard commandline tools using NoFlo

Exceptions should not be silently caught

Right now, if one does not pass --catch-exceptions=false all exceptions will be silently caught.

It may be sane that we don't terminate when these happen - but they should at least be printed to stdout so we can know what is going on...

The issue is critical, because even issues with loading the initial --graph is swallowed. Those should probably be fatal.

An in-range update of noflo-runtime-base is breaking the build 🚨

The dependency noflo-runtime-base was updated from 0.10.2 to 0.10.3.

🚨 View failing branch.

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

noflo-runtime-base is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

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

Commits

The new version differs by 9 commits.

  • 54ba2fb Release 0.10.3
  • 24bb01e Merge pull request #118 from noflo/default_graph_naming
  • 4f4bf33 Set the graph as main regardless of name
  • 5d57c5b Observe namespace setting when registering the main graph
  • ff16918 Merge pull request #117 from noflo/greenkeeper/debug-4.0.0
  • 1c276b7 fix(package): update debug to version 4.0.0
  • 07a4954 Merge pull request #113 from noflo/greenkeeper/nyc-12.0.1
  • 062f30b Test with latest Node.js LTS, fixes #112
  • ea6e6ac chore(package): update nyc to version 12.0.1

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 eslint-plugin-import is breaking the build 🚨

The devDependency eslint-plugin-import was updated from 2.18.1 to 2.18.2.

🚨 View failing branch.

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

eslint-plugin-import 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 4 commits.

  • 1a90a20 Bump to v2.18.2
  • b3e5311 bump utils to v2.4.1
  • 984fa3b Remove duplicate no-duplicates changelog entry
  • 582236b [bugfix] Skip warning on type interfaces

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 🌴

Nodejs v0.12.4 server requires reset to catch graph changes

I notice this behavior in nodejs v0.12.4 with the webserver/writeresponse component. Changes to the IIP string value for writeresponse are not reflected until I restart the service.

Once I realized this was not intended behavior, I tried using nodejs v0.10.2 and so far I have had no issues.

host and port defaults

Without defining a host or autodetect, it says

NoFlo runtime listening at ws://undefined:undefined

Maybe defaults with noflo-nodejs-init should be

"host": "autodetect",
"port": 3569,

(and prompt for user)

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

Version 1.16.1 of coffeelint just got published.

Branch Build failing 🚨
Dependency coffeelint
Current Version 1.16.0
Type devDependency

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

As coffeelint is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

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

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Support for autostarting using systemd socket activation

One generally has several projects made with NoFlo. And when switching between them in Flowhub, one needs to set up the corresponding runtime (usually node-nodejs) in the right directory, before one can connect to it.
However, with systemd socket activation a service can be started (and then stopped after a time) when traffic comes in on a port, for instance from Flowhub.
http://0pointer.de/blog/projects/socket-activation.html

systemd provides some C APIs for this, accessible for instance via https://github.com/rubenv/node-systemd
However, it sounds like that may not be neccesary, as systemd also sets LISTEN_FDS envvar, and then file descriptor 3 is the one to use. rubenv/node-systemd#12 (comment)

Kill need to use noflo-nodejs-init, especially for stateless environments

It should not be neccesary to create some stupid .json file on disk in current directory, with a bunch of parameters one often does not care about, just to run a graph. (#45 will make it slightly less problematic)

It is also not a very good place to persist information for several execution environments. For instance on Heroku/OpenStack or similar stateless PaaS it would make more sense to look up user/runtime uuid in a database like Redis. Runtime UUID might be most interesting to auto-generate on launch, since instances often come and go quickly (transient).

But then another 'project' / 'app' or 'deployment' information would be interesting to send over to Flowhub, to allow finding runtimes.

An in-range update of noflo-runtime-base is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 0.10.2 of noflo-runtime-base was just published.

Branch Build failing 🚨
Dependency noflo-runtime-base
Current Version 0.10.1
Type dependency

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

noflo-runtime-base is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

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

Commits

The new version differs by 2 commits.

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 🌴

v0.8.3 not on NPM

The 0.8.3 tag dates to May, but that version does not seem to have been released to NPM. Is there a particular reason for that, or was it just an oversight?

noflo-nodejs runtime and noflo-ui

I'm trying to run noflo development environment from my local computer by running it like "npx noflo-nodejs --host localhost --ide http://localhost:8000 --permissions ["protocol:component","protocol:runtime","protocol:graph","protocol:network","component:getsource","component:setsource","component:list"]" but I get an error like "Not permitted to send component:list messages".

My question is about how should I configure the environment? I have installed the latest versions of noflo-nodejs, noflo-ui and I'm using them from a computer with Windows.

image

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.