Extend export functionality

The export functionality should be extended:

x include non standard nodes without external dependencies
x include non standard nodes with external dependencies (the dependency should be included in the export)
x include credentials

Hi @moebius, can you explain a bit more about what the first two mean?

The export is the json flow definition. Do you mean it should include information about what npm modules provided the nodes in the exported flow?

It has always been a specific design decision that the editor is not able to export credentials. This means we do not expose an api in the runtime that can be used to get the credentials remotely - thus avoiding a huge potential security risk.

That said, we have kicked around a few ideas on how that might be relaxed. For example, only exposing that api if adminAuth has been enabled and only for authenticated users. Some more careful thought needed on how best to avoid a CVE further down the line.

Maybe this should be more at the project level ? export project ? so it can include other artefacts other than just the flow.

Yes, the export now does not include any metainfo like exact node name, version nr, etc...

An ideal solution would allow one to include all nodes (and npm's) in the export optionally. This would also handle the potential problem, that a node or dependency changes and breaks the import.

@dceejay sure possible, but only if you allow multiple projects at once and that each tab could be a project.

So if you have a flow that specifies a certain level of node and then import a new one which needs the same node but at a different level then you are into dependency merging etc... sounds much more like an overall project level capability - not multiple projects.

I'm not sure if it should do merging - i guess it would sufficient to allow the user to decide if he wants to import and use the new node or not...

With multiple projects i mean that the editor should be able to handle more than one project at a time. So if you have 5 tabs, 4 can be one project and 1 another.