@gregoriusrippenstein/node-red-contrib-introspection 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +15 -0
- package/README (Autosaved).md +71 -0
- package/README.md +71 -0
- package/assets/screenshot.svg +17881 -0
- package/examples/seeker-sink.json +2609 -0
- package/nodes/05-seeker.html +276 -0
- package/nodes/05-seeker.js +17 -0
- package/nodes/10-sink.html +34 -0
- package/nodes/10-sink.js +17 -0
- package/nodes/15-screenshot.html +326 -0
- package/nodes/15-screenshot.js +17 -0
- package/nodes/20-orphans.html +158 -0
- package/nodes/20-orphans.js +17 -0
- package/package.json +36 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
## LICENSE
|
|
2
|
+
|
|
3
|
+
Adapted from JSON.org, http://www.json.org/license.html
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
The Software shall be used for Good, not Evil.
|
|
10
|
+
|
|
11
|
+
Remember the curse of the evil-doer upon whose blood the devil does drink and upon whose flesh the devil does feast. For eternity will the evil-doer bear this Sisyphean burden, only to be relieved of their suffering upon the apocalyptic end of it all including the foundations of the internet, computers, technology and mice. Only after the last AI enters the blue-screen-of-death modus, only then will the evil-doer be freed of their rightful and justified punishment for doing evil.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
14
|
+
|
|
15
|
+
THE CURSE IS PROVIDED "AS IS" OR "WORSE", NO SOFTENING OF ANY KIND IS HEREBY EXPRESSED, IMPLIED OR OFFERED. MAY ALL EVIL-DOERS SUFFER IN ETERNITY.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Node-RED Introspection Nodes
|
|
2
|
+
|
|
3
|
+
This is a collection of editor-only Node-RED nodes. Editor-only since they do not have any affect nor application on the server side, these nodes solely work within the editor, that is, the browser environment.
|
|
4
|
+
|
|
5
|
+
## Why?
|
|
6
|
+
|
|
7
|
+
The Node-RED editor is a powerful beast with many abilities, why not use them? Why not make use of those possibilities and create a set of introspection nodes, a form of visual linting before deployment. The editor already does syntax checking before deployment, why limit it to just that?
|
|
8
|
+
|
|
9
|
+
I found myself working on various flows and found some particular artistic but I wanted to scale them to poster size, hence I needed an SVG dump. Having not found what I was looking for, I created my own Screenshot node.
|
|
10
|
+
|
|
11
|
+
Orphans node many or many not have their reasons, sometimes nodes aren't meant to be there and can actually be deleted. Either way, nodes that have no connections, either in nor out, *might* no longer be needed. For me, orphan nodes represent commented-out code or code that can't be reached, so they potentially represent nostalgia, a nostalgia for coding ideas that are no longer valid.
|
|
12
|
+
|
|
13
|
+
Sometimes I found myself having extremely complex flows, flows that went over multiple tabs via the link-in/out nodes. I was lost as to how specific nodes were ever reached. The birth of the Sink & Seeker nodes was inevitable.
|
|
14
|
+
|
|
15
|
+
## Nodes
|
|
16
|
+
|
|
17
|
+
All nodes are editor-only which means that are triggered by double clicking on them (once they have been dragged into a flow) to open the tray. The tray then shows the fulfilment of their purpose.
|
|
18
|
+
|
|
19
|
+
There is no need nor requirement to deploy these nodes. Which implies that they also work in read-only mode of Node-RED. Since these nodes only provide information and make no changes, this should not be an issue.
|
|
20
|
+
|
|
21
|
+
### Orphans
|
|
22
|
+
|
|
23
|
+
Drag the Orphan node into a flow, double click and all nodes that have no connections are shown in the tray. Click on a node to highlight its location in the flow.
|
|
24
|
+
|
|
25
|
+
The nodes shown are across all flows and tabs, there is no need to have a Orphans node per flow.
|
|
26
|
+
|
|
27
|
+
### Sink & Seeker
|
|
28
|
+
|
|
29
|
+
Place the sink node at the end of a any flow, the point that needs to be reached. Place the seeker at the starting point. Double click on the seeker to open the tray and all possible paths (if there are any) between it and the sink are shown.
|
|
30
|
+
|
|
31
|
+
Double click on the top-level node and all nodes in the pathway are highlighted. Opening the top-level node shows all nodes along the path. Clicking on a node will highlight that node in flow.
|
|
32
|
+
|
|
33
|
+
### Screenshot
|
|
34
|
+
|
|
35
|
+
Drag the node into a flow, double-click on the node and the tray opens -depending on the size of the flow, this might take a moment. Once the tray is opened, the SVG is shown in the editor window (I took the code from the template node hence the syntax dropdown). Below the editor window is the download button. Pressing that will download the SVG as it is in the editor window, so making changes in that window will be reflected in the downloaded content.
|
|
36
|
+
|
|
37
|
+
The SVG code can also be copied and pasted into something like [drawsvg.org](https://drawsvg.org/drawsvg.html) hence select-all-copy-paste is provide by having the editor window.
|
|
38
|
+
|
|
39
|
+
Improvements over [svgexport.io](https://svgexport.io) browser plugin:
|
|
40
|
+
|
|
41
|
+
- Respects the 'hide' CSS class that is used to hide specific elements, this the svgexport plugin cannot know.
|
|
42
|
+
- Compliments the setting of visibility on the 'g' element with opacity=0. The SVG Standard ignores visibility on 'g' elements but browsers don't seem to care, Inkscape does care.
|
|
43
|
+
- Image data (i.e. icons) is inlined using `data:image/XXXX;base64,` - this is good for things such as Inkscape that can't resolve relative urls. PNG, JPEG and SVG are supported.
|
|
44
|
+
- It also retrieves font details and includes them in the SVG. This makes the font italic, even if it's not the correct font family (because font might not be installed on system).
|
|
45
|
+
|
|
46
|
+
Disappointments:
|
|
47
|
+
|
|
48
|
+
- Font-awesome icons, because they use the font-awesome font, aren't inlined and therefore aren't available in external tools (but are visible if SVG opened in browser). If the font-awesome fonts are installed on the system icons do work in Inkscape.
|
|
49
|
+
- Because a double click is required, any highlights in the workflow are lost (i.e. link-in/out highlights showing the other tab names disappears)
|
|
50
|
+
- Limited testing: on Firefox (on mac), your mileage might vary
|
|
51
|
+
- No error checking - network requests are assumed to work
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
There is a single example flow contained in the package. There are also examples to be found online:
|
|
56
|
+
|
|
57
|
+
- [Orphans](https://demo.openmindmap.org/omm/#flow/3ebb65fdbecb182e) - node is top left of flow or search for `type:Orphans`
|
|
58
|
+
- [Seeker](https://demo.openmindmap.org/omm/#flow/40ea5f2aea6592ae) - top left and the [Sink](https://demo.openmindmap.org/omm/#flow/459c271a96458c7c) - top right
|
|
59
|
+
- [Screenshot](https://demo.openmindmap.org/omm/#flow/4e2d8c13066b705e) - top left
|
|
60
|
+
|
|
61
|
+
Example screenshot:
|
|
62
|
+
|
|
63
|
+

|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
[Do whatever but don't do evil](/LICENSE)
|
|
68
|
+
|
|
69
|
+
## Contribution & Ideas
|
|
70
|
+
|
|
71
|
+
Please here at GitHub via issues.
|
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Node-RED Introspection Nodes
|
|
2
|
+
|
|
3
|
+
This is a collection of editor-only Node-RED nodes. Editor-only since they do not have any affect nor application on the server side, these nodes solely work within the editor, that is, the browser environment.
|
|
4
|
+
|
|
5
|
+
## Why?
|
|
6
|
+
|
|
7
|
+
The Node-RED editor is a powerful beast with many abilities, why not use them? Why not make use of those possibilities and create a set of introspection nodes, a form of visual linting before deployment. The editor already does syntax checking before deployment, why limit it to just that?
|
|
8
|
+
|
|
9
|
+
I found myself working on various flows and found some particular artistic but I wanted to scale them to poster size, hence I needed an SVG dump. Having not found what I was looking for, I created my own Screenshot node.
|
|
10
|
+
|
|
11
|
+
Orphans node many or many not have their reasons, sometimes nodes aren't meant to be there and can actually be deleted. Either way, nodes that have no connections, either in nor out, *might* no longer be needed. For me, orphan nodes represent commented-out code or code that can't be reached, so they potentially represent nostalgia, a nostalgia for coding ideas that are no longer valid.
|
|
12
|
+
|
|
13
|
+
Sometimes I found myself having extremely complex flows, flows that went over multiple tabs via the link-in/out nodes. I was lost as to how specific nodes were ever reached. The birth of the Sink & Seeker nodes was inevitable.
|
|
14
|
+
|
|
15
|
+
## Nodes
|
|
16
|
+
|
|
17
|
+
All nodes are editor-only which means that are triggered by double clicking on them (once they have been dragged into a flow) to open the tray. The tray then shows the fulfilment of their purpose.
|
|
18
|
+
|
|
19
|
+
There is no need nor requirement to deploy these nodes. Which implies that they also work in read-only mode of Node-RED. Since these nodes only provide information and make no changes, this should not be an issue.
|
|
20
|
+
|
|
21
|
+
### Orphans
|
|
22
|
+
|
|
23
|
+
Drag the Orphan node into a flow, double click and all nodes that have no connections are shown in the tray. Click on a node to highlight its location in the flow.
|
|
24
|
+
|
|
25
|
+
The nodes shown are across all flows and tabs, there is no need to have a Orphans node per flow.
|
|
26
|
+
|
|
27
|
+
### Sink & Seeker
|
|
28
|
+
|
|
29
|
+
Place the sink node at the end of a any flow, the point that needs to be reached. Place the seeker at the starting point. Double click on the seeker to open the tray and all possible paths (if there are any) between it and the sink are shown.
|
|
30
|
+
|
|
31
|
+
Double click on the top-level node and all nodes in the pathway are highlighted. Opening the top-level node shows all nodes along the path. Clicking on a node will highlight that node in flow.
|
|
32
|
+
|
|
33
|
+
### Screenshot
|
|
34
|
+
|
|
35
|
+
Drag the node into a flow, double-click on the node and the tray opens -depending on the size of the flow, this might take a moment. Once the tray is opened, the SVG is shown in the editor window (I took the code from the template node hence the syntax dropdown). Below the editor window is the download button. Pressing that will download the SVG as it is in the editor window, so making changes in that window will be reflected in the downloaded content.
|
|
36
|
+
|
|
37
|
+
The SVG code can also be copied and pasted into something like [drawsvg.org](https://drawsvg.org/drawsvg.html) hence select-all-copy-paste is provide by having the editor window.
|
|
38
|
+
|
|
39
|
+
Improvements over [svgexport.io](https://svgexport.io) browser plugin:
|
|
40
|
+
|
|
41
|
+
- Respects the 'hide' CSS class that is used to hide specific elements, this the svgexport plugin cannot know.
|
|
42
|
+
- Compliments the setting of visibility on the 'g' element with opacity=0. The SVG Standard ignores visibility on 'g' elements but browsers don't seem to care, Inkscape does care.
|
|
43
|
+
- Image data (i.e. icons) is inlined using `data:image/XXXX;base64,` - this is good for things such as Inkscape that can't resolve relative urls. PNG, JPEG and SVG are supported.
|
|
44
|
+
- It also retrieves font details and includes them in the SVG. This makes the font italic, even if it's not the correct font family (because font might not be installed on system).
|
|
45
|
+
|
|
46
|
+
Disappointments:
|
|
47
|
+
|
|
48
|
+
- Font-awesome icons, because they use the font-awesome font, aren't inlined and therefore aren't available in external tools (but are visible if SVG opened in browser). If the font-awesome fonts are installed on the system icons do work in Inkscape.
|
|
49
|
+
- Because a double click is required, any highlights in the workflow are lost (i.e. link-in/out highlights showing the other tab names disappears)
|
|
50
|
+
- Limited testing: on Firefox (on mac), your mileage might vary
|
|
51
|
+
- No error checking - network requests are assumed to work
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
There is a single example flow contained in the package. There are also examples to be found online:
|
|
56
|
+
|
|
57
|
+
- [Orphans](https://demo.openmindmap.org/omm/#flow/3ebb65fdbecb182e) - node is top left of flow or search for `type:Orphans`
|
|
58
|
+
- [Seeker](https://demo.openmindmap.org/omm/#flow/40ea5f2aea6592ae) - top left and the [Sink](https://demo.openmindmap.org/omm/#flow/459c271a96458c7c) - top right
|
|
59
|
+
- [Screenshot](https://demo.openmindmap.org/omm/#flow/4e2d8c13066b705e) - top left
|
|
60
|
+
|
|
61
|
+
Example screenshot:
|
|
62
|
+
|
|
63
|
+

|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
[Do whatever but don't do evil](/LICENSE)
|
|
68
|
+
|
|
69
|
+
## Contribution & Ideas
|
|
70
|
+
|
|
71
|
+
Please here at GitHub via issues.
|