@winkjs/composer 0.4.1 → 0.4.2
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/README.md +14 -6
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
## Composable Streaming Intelligence
|
|
7
7
|
[<img align="right" src="https://decisively.github.io/wink-logos/logo-title.png" width="100px" >](https://winkjs.org/)
|
|
8
8
|
|
|
9
|
-
winkComposer is a JavaScript framework
|
|
9
|
+
winkComposer is a JavaScript framework that turns streaming data into real-time insights and decisions. The streams can come from anywhere: IoT and IIoT sensors, vehicle telematics, server metrics. There is no batch job to wait for. In real-time operations like a plant floor, a delayed insight is a lost opportunity. It is open source, purpose-built for SMBs and MSMEs.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
## See It in Action
|
|
@@ -38,13 +38,17 @@ The Quick Start below builds one such pipeline end to end.
|
|
|
38
38
|
|
|
39
39
|
## Quick Start
|
|
40
40
|
|
|
41
|
+
Requires Node.js 22 or newer.
|
|
42
|
+
|
|
43
|
+
The Quick Start flow replays a CSV feed of pump motor temperatures. It cleans each reading, flags a hot motor, confirms the heat is not a blip, and prints an alert. One command scaffolds it as a runnable project:
|
|
44
|
+
|
|
41
45
|
```bash
|
|
42
|
-
npm
|
|
46
|
+
npm create @winkjs/composer
|
|
43
47
|
```
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
Accept the directory prompt, then run the three printed steps. A run takes about eight seconds. Watch for the `overheat` alert. Prefer zero install? [Build this flow interactively](https://composer.winkjs.org/docs/playground/hello-flow) in the browser playground. The same project also lives in the repository, in [`examples/hello-flow`](examples/hello-flow).
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
Here is the whole program, [`hello-flow.js`](examples/hello-flow/hello-flow.js):
|
|
48
52
|
|
|
49
53
|
```javascript
|
|
50
54
|
import { flow, csv, terminal } from '@winkjs/composer';
|
|
@@ -87,9 +91,13 @@ const handle = await flow( 'hello-flow' )
|
|
|
87
91
|
.run();
|
|
88
92
|
```
|
|
89
93
|
|
|
90
|
-
|
|
94
|
+
To use winkComposer in your own project:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npm install @winkjs/composer
|
|
98
|
+
```
|
|
91
99
|
|
|
92
|
-
|
|
100
|
+
Your project needs `"type": "module"` in its `package.json`. Then copy the flow above and point `path` at your own data. The replayed file has two columns: a pump id and a motor temperature (`id`, `motor_t`).
|
|
93
101
|
|
|
94
102
|
The example above replays a CSV file. A live deployment reads from an MQTT broker instead — or runs [headless](docs/handbook/headless-flow.md), where your own code feeds the flow. Headless takes any source you already run: an OPC-UA client, a Kafka consumer.
|
|
95
103
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@winkjs/composer",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Composable Streaming Intelligence — turn streaming data into actionable insights, from edge to cloud",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"streaming",
|
|
@@ -75,5 +75,9 @@
|
|
|
75
75
|
"mqtt": "^5.15.1",
|
|
76
76
|
"msgpackr": "^1.11.10",
|
|
77
77
|
"pg": "^8.20.0"
|
|
78
|
+
},
|
|
79
|
+
"overrides": {
|
|
80
|
+
"serialize-javascript": "^7.1.0",
|
|
81
|
+
"diff": "^8.0.3"
|
|
78
82
|
}
|
|
79
83
|
}
|