@winkjs/composer 0.0.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.
@@ -0,0 +1,46 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at ContactUs@graype.in. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
+
45
+ [homepage]: http://contributor-covenant.org
46
+ [version]: http://contributor-covenant.org/version/1/4/
@@ -0,0 +1,132 @@
1
+ # Contributing to Wink Composer
2
+
3
+ Thank you for taking time to contribute. We are delighted to receive contributions from the community. For `wink-composer` every contribution matters — whether you are reporting a **bug**, posting a **question** or **suggestion**, submitting a **pull request** or updating the **documentation**.
4
+
5
+ This document will guide you through the contribution process and guidelines.
6
+
7
+ ## Getting Started
8
+ If you spot a bug/issue and the same has not yet been reported, [raise a new issue](https://github.com/winkjs/wink-composer/issues) or consider fixing it and sending a PR. If you have questions and/or suggestions, post them at our [discussions](https://github.com/winkjs/wink-composer/discussions). New features may also be discussed there; eventually you may consider developing the same and sending a PR.
9
+
10
+ ### How to send a PR?
11
+
12
+ 1. Fork the repository from github
13
+ 2. Develop your code changes
14
+ 4. Capture the logic in comments
15
+ 3. Ensure that the API is properly documented
16
+ 4. Ensure proper linting
17
+ 2. Write test cases to cover each and every change and/or new feature
18
+ 2. Review security and performance
19
+ 5. Run the entire test suite
20
+ 6. Make sure coverage either stays at the current levels or improves; note minimum acceptable level is ≥99.5%
21
+ 7. Commit your changes in compliance with commit guidelines
22
+ 8. Push to your fork
23
+ 9. [Sign the CLA](https://cla-assistant.io/winkjs/wink-composer) if you are contributing for the first time
24
+
25
+ After completing the above steps, you are ready to submit the pull request.
26
+
27
+
28
+ ## Code of Conduct
29
+ By contributing, you are expected to uphold [wink’s code of conduct](CODE_OF_CONDUCT.md). In essence, each one of us should:
30
+
31
+ 1. respect fellow contributors, irrespective of their level of experience, race, religion, gender, sexual orientation, and age;
32
+ 2. collaborate constructively;
33
+ 3. never engage in any form of offense, harassment, insult, personal attack, provocation and/or use of inappropriate language;
34
+
35
+
36
+
37
+ ## Development Guidelines
38
+ Wink-composer is an open-source JavaScript library that aims to simplify the creation of LLM-driven applications.
39
+
40
+ Do take out some time in understanding the structure of APIs, before attempting any enhancements.
41
+
42
+ In wink composer, we prefer **functions** and **closures** over objects/classes.
43
+
44
+ Like artisans, we too need a toolset and process to create beautiful software. The process is orchestrated by Github Actions in accordance with the configuration files present in the repository. The details are outlined below:
45
+
46
+
47
+ ### Linting
48
+ Well defined linting rules or **coding standards** help us in making code more consistent and avoid bugs. [ESLint](https://eslint.org) enforces these rules automatically. These rules are defined in a configuration file named `.eslintrc.json`, which is located at the root of the repository. These rules cover basic formatting, naming conventions, limits of code complexity, and many more; please refer to the configuration file for further details.
49
+
50
+ We recommend using a suitable ESLint plugin/add-on for the code editor. Use script **`npm run pretest`** at command line to run linting on the entire code.
51
+
52
+
53
+ ### Documenting
54
+ We believe that the documentation must not only explain the API but also narrate the story of logic, algorithms and references used. Wink Composer uses the [JSDoc](https://jsdoc.app) standard for API documentation. It is inspired by [Literate-Programming Standards](https://en.wikipedia.org/wiki/Literate_programming) for documenting the logic using [docker](http://jbt.github.io/docker/src/docker.js.html); the **`npm run sourcedocs`** script generates a well formatted code documentation in HTML.
55
+
56
+ ### Testing
57
+ Test cases should cover each and every feature and/or change; use of standard test heuristics such as equivalence partition, boundary values, empty/null value, and decision tree is recommended to write effective test cases.
58
+
59
+ Wink Composer requires a test coverage of **at least ≥99.5%** and aims for 100%. Any new contribution must maintain the existing test coverage level. We use [Chai](http://chaijs.com/), [Mocha](https://mochajs.org/) and [nyc](https://github.com/istanbuljs/nyc), [Coveralls](https://coveralls.io/) to run tests and determine coverage.
60
+
61
+ Use script **`npm run test`** at command line to run the entire test suite and obtain test coverage report.
62
+
63
+ #### Performance Considerations
64
+ It is important to maintain the performance of wink composer, whenever a change is made and/or a new feature is added. We use the [benchmark](https://benchmarkjs.com) package to measure performance.
65
+
66
+ #### Security Considerations
67
+ Our security review/testing is inspired from the recommendations in [OWASP's NodeJS Security Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Nodejs_Security_Cheat_Sheet.html) that are applicable to wink-composer — since it is a library used by developers to create LLM web/mobile/CLI apps/tools, only Platform Security specific recommendations apply. We follow the guidelines outlined below:
68
+
69
+ 1. Minimize external dependencies.
70
+ 2. Use ESLint as a Static Analysis Security Testing (SAST) tool.
71
+ 3. Never use `eval()` function.
72
+ 4. Avoid prototype pollution by using objects created via **`Object.create( null )`**.
73
+ 5. Perform input validation with defined default behavior.
74
+ 6. Use tools like [regexploit](https://github.com/doyensec/regexploit) to detect potential ReDoS apart from reviewing regexes using [regex 101](https://regex101.com) on Chrome browser (Latest stable version), Node.js (LTS version).
75
+
76
+ ### Committing
77
+ We follow [commit guidelines](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits) from Google's [Angular Project](https://angular.io/), whose documentation is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). See important excerpts for quick reference below:
78
+
79
+ #### Commit Message Format
80
+ Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**:
81
+
82
+ <type>(<scope>): <subject>
83
+ <BLANK LINE>
84
+ <body>
85
+ <BLANK LINE>
86
+ <footer>
87
+
88
+ The header is **mandatory** and the scope of the header is optional. Any line of the commit message should not be longer than 100 characters!
89
+
90
+ **Type** should be one of the following:
91
+
92
+ - `build`: Changes that affect the build system or external dependencies
93
+ - `ci`: Changes to our CI configuration files and scripts
94
+ - `docs`: Documentation only changes
95
+ - `feat`: A new feature
96
+ - `fix`: A bug fix
97
+ - `perf`: A code change that improves performance
98
+ - `refactor`: A code change that neither fixes a bug nor adds a feature
99
+ - `test`: Adding missing tests or correcting existing tests
100
+ - `revert:` When you have to revert to an older commit. Ths subject should be the header of the old commit and the body should contain `This reverts commit <hash>.` Use the `git revert` command to accomplish this.
101
+
102
+ **Scope** specifies the place of the commit change. You can use `*` when the change affects more than a single scope.
103
+
104
+ **Subject** must contain a crisp description of the change and it must (a) use the imperative, present tense: "change" not "changed" nor "changes", (b) not capitalize the first letter, and (c) not use period (.) at the end.
105
+
106
+ **Body** just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change.
107
+
108
+ **Footer** should contain any information about **Breaking Changes** and is also the place to reference [GitHub issues that this commit closes](https://help.github.com/articles/closing-issues-via-commit-messages/). Breaking Changes should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
109
+
110
+ ## Versioning
111
+ Wink Composer follows [semantic versioning](https://semver.org/) for every release.
112
+
113
+ ## Governance
114
+ This section outlines wink-composer’s governance guidelines:
115
+ 1. This is a project of [Graype Systems Private Limited (Graype)](http://graype.in), which is a micro-size company incorporated in India.
116
+ 1. The project team consists of 3-core members, including a technical lead.
117
+ 1. The project welcomes contributions from the community. For wink-composer every contribution matters — whether it is [reporting a bug/issue](https://github.com/winkjs/wink-composer/issues), [posting a question/suggestion](https://github.com/winkjs/wink-composer/discussions), submitting a pull request or updating the documentation.
118
+ 1. Everyone is entitled to state their opinion and may present their arguments. There is an effort to achieve consensus but in absence of obvious consensus, the technical lead has the final say in decision making. It roughly matches a standard BDFL (Benevolent Dictator For Life) style project.
119
+ 1. Wink Composer is licensed under the terms of the MIT license; therefore there are no limitations on forking and developing it further separately.
120
+ 1. The technical lead has commit and administrative rights on the project's [organization](https://github.com/winkjs) and [repository](https://github.com/winkjs/wink-composer) at Github. Therefore the technical lead can make changes and accept changes — typically pull requests submitted by others. These changes may include changes to the process and contribution requirements.
121
+ 1. [Graype](http://graype.in) offers commercial support and/or services around the project.
122
+ 1. The key roles are (a) User — who uses or has used the package; (b) Contributor — who has reported one or more issues, participated in one or more discussions OR sent one or more PRs; (c) Core Team Member as stated above and (d) Technical Lead.
123
+ 1. Core team members are Prateek Saxena, Rachna Chakraborty and Sanjaya Kumar Saxena (Technical Lead).
124
+ 1. Current opportunities to participate are outlined in the [roadmap](ROADMAP.md).
125
+ 1. Every PR must comply with our [development guidelines](CONTRIBUTING.md#development-guidelines) before they can be accepted/merged.
126
+ 1. Participation requires adherence to our [code of conduct](CODE_OF_CONDUCT.md).
127
+
128
+
129
+
130
+ ## Contributor License Agreement (CLA)
131
+
132
+ The [CLA](https://gist.github.com/sanjayaksaxena/8b96d3d4f2be6cdc0f28a5839d5a5b2a) is for your protection as well as the protection of [Graype](http://graype.in) and it’s licensees; it does not change your rights to use your own Contributions for any other purpose. Our CLA is a short and easy to understand agreement and can be signed using a simple click-through form. Please [sign our Contributor License Agreement (CLA)](https://cla-assistant.io/winkjs/wink-composer) before sending pull requests. It's a quick process, we promise!
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2024-25 GRAYPE Systems Private Limited
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
+ of the Software, and to permit persons to whom the Software is furnished to do
10
+ so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,132 @@
1
+ # wink-composer ♫
2
+
3
+ ### [![Stability](https://img.shields.io/badge/stability-1--experimental-orange.svg)](https://nodejs.org/api/documentation.html#documentation_stability_index)
4
+
5
+ ## ✨ Real-time analytics that sparks joy
6
+
7
+ [<img align="right" src="https://decisively.github.io/wink-logos/logo-title.png" width="100px" >](http://winkjs.org/)
8
+
9
+ WinkComposer is an upcoming open-source framework that makes building streaming intelligence playfully simple. Connect intuitive nodes, experiment freely, perfect it in an iteration or two. From edge-ready AI algorithms to built-in resilience, everything you need for production comes standard. No complexity, no black boxes - just the joy of creating exactly what you need.
10
+
11
+ ## Why Composability Matters
12
+
13
+ **🎯 Create What You Need** — With composability, you're the inventor: Correlate vibration with weather? Done. Detect micro-trends before they become macro? Built.
14
+
15
+ **💫 Countless Possibilities** — Dozens of nodes → Endless pipelines. Like few music notes creating captivating symphonies.
16
+
17
+ **🌱 Evolve Naturally** — Start: `sensor → threshold → alert`. Grow: Add intelligence: `sensor → normalize → smooth → detect → confirm → alert`. Unconstrained by vendor feature lists.
18
+
19
+ **🔍 Total Transparency** — See which node triggered, what threshold crossed, why it alerted. Every decision is explainable.
20
+
21
+ ## Build Exactly What You Need
22
+
23
+ Build precise analytics for your unique patterns:
24
+
25
+ ```javascript
26
+ // Detect bearing failure in rotating equipment
27
+ vibration → isolateSignal → extractPeaks → measureIntensity →
28
+ trackChanges → triggerAlert
29
+
30
+ // Monitor chemical process quality
31
+ temperature → removeNoise → smoothFast → smoothSlow → findDivergence →
32
+ detectChange → waitForPersistence
33
+
34
+ // Find correlated sensor behaviors
35
+ [sensor1, sensor2] → trackCorrelation → compareToNormal → raiseFlag
36
+
37
+ // Calculate real-time OEE
38
+ machine → trackState → sumTime → countOutput →
39
+ checkQuality → calculateScore
40
+ ```
41
+
42
+ Each node is simple:
43
+ - `removeNoise`: Median of last few values (removes sensor spikes).
44
+ - `smoothFast`: Average of last 10 values (recent trend).
45
+ - `smoothSlow`: Average of last 100 values (baseline trend).
46
+ - `findDivergence`: Fast trend - slow trend (unusual behavior?).
47
+ - `trackCorrelation`: Smart correlation (learns relationships between sensors)
48
+
49
+ _Node names and details are illustrative - actual implementations may vary._
50
+
51
+ Every arrow is a conscious choice. Every node has a purpose. No magic, just simple intuitive math.
52
+
53
+
54
+ ## Your Analytics Journey
55
+
56
+ **Start Simple**
57
+ `sensor → threshold → alert`
58
+
59
+ **Evolve Naturally**
60
+ `sensor → validate → normalize → threshold → debounce → alert`
61
+
62
+ **Scale Intelligently**
63
+ `sensor → [parallel: statistics | patterns | anomalies] → correlate → decide → act`
64
+
65
+ Your analytics grow with your understanding, and are never limited by any tool's feature list.
66
+
67
+ ## Designed for the Real World
68
+
69
+ ### Industrial IoT
70
+ From simple threshold monitoring to complex predictive maintenance - compose what fits your equipment, your patterns, your physics. **Move intelligence to the edge** with analytics that run on industrial Raspberry Pis. Works alongside your existing systems to handle your unique requirements.
71
+
72
+ ### Financial Services
73
+ Build fraud detection you can explain to auditors. Every decision traceable, every threshold justified.
74
+
75
+ ### Smart Infrastructure
76
+ Energy optimization with transparent logic. See why the system made each decision.
77
+
78
+ ## Production-Grade Resilience
79
+ Real streams have noise. Sensors fail. Networks hiccup. WinkComposer handles it all:
80
+
81
+ - **Node-level fault isolation** - One bad reading doesn't crash your pipeline
82
+ - **Automatic state recovery** - Snapshot and restore without missing a beat
83
+ - **Built-in observability** - Know what's happening in every node, every partition
84
+ - **Adaptive execution** - Maintains responsiveness under varying load
85
+
86
+
87
+ ## Core Principles
88
+
89
+ | Principle | What it means |
90
+ |-----------|---------------|
91
+ | **Atomic Operations** | Each node does one thing perfectly |
92
+ | **Pure Functions** | Predictable, testable, composable |
93
+ | **Transparent Logic** | Understand every decision |
94
+ | **Production Ready** | Built for high-throughput streaming with microsecond-scale latency |
95
+ | **AI-Native Intelligence** | From statistical learning nodes to LLM reasoning - intelligence at every level |
96
+ | **Built for Reality** | Node-level fault isolation, automatic recovery, and comprehensive observability |
97
+
98
+ ## What's Coming
99
+
100
+ ### 🎉 **Opening Our Doors in 2025**
101
+ WinkComposer is transitioning to open source development in 2025. Join the [early conversation](https://github.com/winkjs/composer/discussions) and help shape the future of composable streaming analytics. You can even reach out directly at wink@graype.in.
102
+
103
+ **Together, we're building:**
104
+
105
+ - **Rich Node Library**: Statistical, filtering, detection, transformation, and control nodes
106
+ - **Edge-Ready Intelligence**: Advanced algorithms like smart correlation, change point detection, and regression inference - AI-like capabilities without heavyweight frameworks
107
+ - **Pipeline Builder**: Define your analytics flows declaratively (visual tools planned)
108
+ - **Edge-Ready Performance**: Process data efficiently, even on resource-constrained devices (**tested on Raspberry Pi**)
109
+ - **Knowledge Graph Integration**: Build digital twins with Neo4j/ArangoDB for contextual intelligence
110
+ - **AI-Native Reasoning**: When patterns emerge, LLMs explain why. When anomalies occur, get actionable recommendations. Open-source models keep intelligence at the edge.
111
+
112
+
113
+ ## The Vision
114
+
115
+ Finally, build solutions that fit your exact problems, not the other way around.
116
+
117
+ Every industry has unique patterns. Every process has specific physics. Every business has particular rules. WinkComposer gives you the building blocks to create exactly what you need.
118
+
119
+ Domain-specific platforms excel at standard use cases. WinkComposer shines when you need something unique, beyond standard use cases. Standard use cases always included - they're just the beginning of what's possible!
120
+
121
+
122
+
123
+ ## About winkJS
124
+
125
+ WinkComposer joins the winkJS family - production-grade open-source packages for Natural Language Processing, Machine Learning, and Statistical Analysis in JavaScript. Built for reliability with ~100% test coverage.
126
+
127
+
128
+ ## Copyright & License
129
+
130
+ **Wink Composer** is copyright 2017-25 [GRAYPE Systems Private Limited](https://graype.in/).
131
+
132
+ It is licensed under the terms of the MIT License.
package/docs/.nojekyll ADDED
File without changes
@@ -0,0 +1,134 @@
1
+ # Contributing to Wink Composer
2
+
3
+ Thank you for taking time to contribute. We are delighted to receive contributions from the community. For `wink-composer` every contribution matters — whether you are reporting a **bug**, posting a **question** or **suggestion**, submitting a **pull request** or updating the **documentation**.
4
+
5
+ This document will guide you through the contribution process and guidelines.
6
+
7
+ ## Getting Started
8
+ If you spot a bug/issue and the same has not yet been reported, [raise a new issue](https://github.com/winkjs/wink-composer/issues) or consider fixing it and sending a PR. If you have questions and/or suggestions, post them at our [discussions](https://github.com/winkjs/wink-composer/discussions). New features may also be discussed there; eventually you may consider developing the same and sending a PR.
9
+
10
+ ### How to send a PR?
11
+
12
+ 1. Fork the repository from github
13
+ 2. Develop your code changes
14
+ 4. Capture the logic in comments
15
+ 3. Ensure that the API is properly documented
16
+ 4. Ensure proper linting
17
+ 2. Write test cases to cover each and every change and/or new feature
18
+ 2. Review security and performance
19
+ 5. Run the entire test suite
20
+ 6. Make sure coverage either stays at the current levels or improves; note minimum acceptable level is ≥99.5%
21
+ * [Home](/)
22
+ * [Guide](guide.md)
23
+ 7. Commit your changes in compliance with commit guidelines
24
+ 8. Push to your fork
25
+ 9. [Sign the CLA](https://cla-assistant.io/winkjs/wink-composer) if you are contributing for the first time
26
+
27
+ After completing the above steps, you are ready to submit the pull request.
28
+
29
+
30
+ ## Code of Conduct
31
+ By contributing, you are expected to uphold [wink’s code of conduct](CODE_OF_CONDUCT.md). In essence, each one of us should:
32
+
33
+ 1. respect fellow contributors, irrespective of their level of experience, race, religion, gender, sexual orientation, and age;
34
+ 2. collaborate constructively;
35
+ 3. never engage in any form of offense, harassment, insult, personal attack, provocation and/or use of inappropriate language;
36
+
37
+
38
+
39
+ ## Development Guidelines
40
+ Wink-composer is an open-source JavaScript library that aims to simplify the creation of LLM-driven applications.
41
+
42
+ Do take out some time in understanding the structure of APIs, before attempting any enhancements.
43
+
44
+ In wink composer, we prefer **functions** and **closures** over objects/classes.
45
+
46
+ Like artisans, we too need a toolset and process to create beautiful software. The process is orchestrated by Github Actions in accordance with the configuration files present in the repository. The details are outlined below:
47
+
48
+
49
+ ### Linting
50
+ Well defined linting rules or **coding standards** help us in making code more consistent and avoid bugs. [ESLint](https://eslint.org) enforces these rules automatically. These rules are defined in a configuration file named `.eslintrc.json`, which is located at the root of the repository. These rules cover basic formatting, naming conventions, limits of code complexity, and many more; please refer to the configuration file for further details.
51
+
52
+ We recommend using a suitable ESLint plugin/add-on for the code editor. Use script **`npm run pretest`** at command line to run linting on the entire code.
53
+
54
+
55
+ ### Documenting
56
+ We believe that the documentation must not only explain the API but also narrate the story of logic, algorithms and references used. Wink Composer uses the [JSDoc](https://jsdoc.app) standard for API documentation. It is inspired by [Literate-Programming Standards](https://en.wikipedia.org/wiki/Literate_programming) for documenting the logic using [docker](http://jbt.github.io/docker/src/docker.js.html); the **`npm run sourcedocs`** script generates a well formatted code documentation in HTML.
57
+
58
+ ### Testing
59
+ Test cases should cover each and every feature and/or change; use of standard test heuristics such as equivalence partition, boundary values, empty/null value, and decision tree is recommended to write effective test cases.
60
+
61
+ Wink Composer requires a test coverage of **at least ≥99.5%** and aims for 100%. Any new contribution must maintain the existing test coverage level. We use [Chai](http://chaijs.com/), [Mocha](https://mochajs.org/) and [nyc](https://github.com/istanbuljs/nyc), [Coveralls](https://coveralls.io/) to run tests and determine coverage.
62
+
63
+ Use script **`npm run test`** at command line to run the entire test suite and obtain test coverage report.
64
+
65
+ #### Performance Considerations
66
+ It is important to maintain the performance of wink composer, whenever a change is made and/or a new feature is added. We use the [benchmark](https://benchmarkjs.com) package to measure performance.
67
+
68
+ #### Security Considerations
69
+ Our security review/testing is inspired from the recommendations in [OWASP's NodeJS Security Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Nodejs_Security_Cheat_Sheet.html) that are applicable to wink-composer — since it is a library used by developers to create LLM web/mobile/CLI apps/tools, only Platform Security specific recommendations apply. We follow the guidelines outlined below:
70
+
71
+ 1. Minimize external dependencies.
72
+ 2. Use ESLint as a Static Analysis Security Testing (SAST) tool.
73
+ 3. Never use `eval()` function.
74
+ 4. Avoid prototype pollution by using objects created via **`Object.create( null )`**.
75
+ 5. Perform input validation with defined default behavior.
76
+ 6. Use tools like [regexploit](https://github.com/doyensec/regexploit) to detect potential ReDoS apart from reviewing regexes using [regex 101](https://regex101.com) on Chrome browser (Latest stable version), Node.js (LTS version).
77
+
78
+ ### Committing
79
+ We follow [commit guidelines](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits) from Google's [Angular Project](https://angular.io/), whose documentation is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). See important excerpts for quick reference below:
80
+
81
+ #### Commit Message Format
82
+ Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**:
83
+
84
+ <type>(<scope>): <subject>
85
+ <BLANK LINE>
86
+ <body>
87
+ <BLANK LINE>
88
+ <footer>
89
+
90
+ The header is **mandatory** and the scope of the header is optional. Any line of the commit message should not be longer than 100 characters!
91
+
92
+ **Type** should be one of the following:
93
+
94
+ - `build`: Changes that affect the build system or external dependencies
95
+ - `ci`: Changes to our CI configuration files and scripts
96
+ - `docs`: Documentation only changes
97
+ - `feat`: A new feature
98
+ - `fix`: A bug fix
99
+ - `perf`: A code change that improves performance
100
+ - `refactor`: A code change that neither fixes a bug nor adds a feature
101
+ - `test`: Adding missing tests or correcting existing tests
102
+ - `revert:` When you have to revert to an older commit. Ths subject should be the header of the old commit and the body should contain `This reverts commit <hash>.` Use the `git revert` command to accomplish this.
103
+
104
+ **Scope** specifies the place of the commit change. You can use `*` when the change affects more than a single scope.
105
+
106
+ **Subject** must contain a crisp description of the change and it must (a) use the imperative, present tense: "change" not "changed" nor "changes", (b) not capitalize the first letter, and (c) not use period (.) at the end.
107
+
108
+ **Body** just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change.
109
+
110
+ **Footer** should contain any information about **Breaking Changes** and is also the place to reference [GitHub issues that this commit closes](https://help.github.com/articles/closing-issues-via-commit-messages/). Breaking Changes should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
111
+
112
+ ## Versioning
113
+ Wink Composer follows [semantic versioning](https://semver.org/) for every release.
114
+
115
+ ## Governance
116
+ This section outlines wink-composer’s governance guidelines:
117
+ 1. This is a project of [Graype Systems Private Limited (Graype)](http://graype.in), which is a micro-size company incorporated in India.
118
+ 1. The project team consists of 3-core members, including a technical lead.
119
+ 1. The project welcomes contributions from the community. For wink-composer every contribution matters — whether it is [reporting a bug/issue](https://github.com/winkjs/wink-composer/issues), [posting a question/suggestion](https://github.com/winkjs/wink-composer/discussions), submitting a pull request or updating the documentation.
120
+ 1. Everyone is entitled to state their opinion and may present their arguments. There is an effort to achieve consensus but in absence of obvious consensus, the technical lead has the final say in decision making. It roughly matches a standard BDFL (Benevolent Dictator For Life) style project.
121
+ 1. Wink Composer is licensed under the terms of the MIT license; therefore there are no limitations on forking and developing it further separately.
122
+ 1. The technical lead has commit and administrative rights on the project's [organization](https://github.com/winkjs) and [repository](https://github.com/winkjs/wink-composer) at Github. Therefore the technical lead can make changes and accept changes — typically pull requests submitted by others. These changes may include changes to the process and contribution requirements.
123
+ 1. [Graype](http://graype.in) offers commercial support and/or services around the project.
124
+ 1. The key roles are (a) User — who uses or has used the package; (b) Contributor — who has reported one or more issues, participated in one or more discussions OR sent one or more PRs; (c) Core Team Member as stated above and (d) Technical Lead.
125
+ 1. Core team members are Prateek Saxena, Rachna Chakraborty and Sanjaya Kumar Saxena (Technical Lead).
126
+ 1. Current opportunities to participate are outlined in the [roadmap](ROADMAP.md).
127
+ 1. Every PR must comply with our [development guidelines](CONTRIBUTING.md#development-guidelines) before they can be accepted/merged.
128
+ 1. Participation requires adherence to our [code of conduct](CODE_OF_CONDUCT.md).
129
+
130
+
131
+
132
+ ## Contributor License Agreement (CLA)
133
+
134
+ The [CLA](https://gist.github.com/sanjayaksaxena/8b96d3d4f2be6cdc0f28a5839d5a5b2a) is for your protection as well as the protection of [Graype](http://graype.in) and it’s licensees; it does not change your rights to use your own Contributions for any other purpose. Our CLA is a short and easy to understand agreement and can be signed using a simple click-through form. Please [sign our Contributor License Agreement (CLA)](https://cla-assistant.io/winkjs/wink-composer) before sending pull requests. It's a quick process, we promise!
package/docs/README.md ADDED
@@ -0,0 +1,132 @@
1
+ # wink-composer ♫
2
+
3
+ ### [![Stability](https://img.shields.io/badge/stability-1--experimental-orange.svg)](https://nodejs.org/api/documentation.html#documentation_stability_index)
4
+
5
+ ## ✨ Real-time analytics that sparks joy
6
+
7
+ [<img align="right" src="https://decisively.github.io/wink-logos/logo-title.png" width="100px" >](http://winkjs.org/)
8
+
9
+ WinkComposer is an upcoming open-source framework that makes building streaming intelligence playfully simple. Connect intuitive nodes, experiment freely, perfect it in an iteration or two. From edge-ready AI algorithms to built-in resilience, everything you need for production comes standard. No complexity, no black boxes - just the joy of creating exactly what you need.
10
+
11
+ ## Why Composability Matters
12
+
13
+ **🎯 Create What You Need** — With composability, you're the inventor: Correlate vibration with weather? Done. Detect micro-trends before they become macro? Built.
14
+
15
+ **💫 Countless Possibilities** — Dozens of nodes → Endless pipelines. Like few music notes creating captivating symphonies.
16
+
17
+ **🌱 Evolve Naturally** — Start: `sensor → threshold → alert`. Grow: Add intelligence: `sensor → normalize → smooth → detect → confirm → alert`. Unconstrained by vendor feature lists.
18
+
19
+ **🔍 Total Transparency** — See which node triggered, what threshold crossed, why it alerted. Every decision is explainable.
20
+
21
+ ## Build Exactly What You Need
22
+
23
+ Build precise analytics for your unique patterns:
24
+
25
+ ```javascript
26
+ // Detect bearing failure in rotating equipment
27
+ vibration → isolateSignal → extractPeaks → measureIntensity →
28
+ trackChanges → triggerAlert
29
+
30
+ // Monitor chemical process quality
31
+ temperature → removeNoise → smoothFast → smoothSlow → findDivergence →
32
+ detectChange → waitForPersistence
33
+
34
+ // Find correlated sensor behaviors
35
+ [sensor1, sensor2] → trackCorrelation → compareToNormal → raiseFlag
36
+
37
+ // Calculate real-time OEE
38
+ machine → trackState → sumTime → countOutput →
39
+ checkQuality → calculateScore
40
+ ```
41
+
42
+ Each node is simple:
43
+ - `removeNoise`: Median of last few values (removes sensor spikes).
44
+ - `smoothFast`: Average of last 10 values (recent trend).
45
+ - `smoothSlow`: Average of last 100 values (baseline trend).
46
+ - `findDivergence`: Fast trend - slow trend (unusual behavior?).
47
+ - `trackCorrelation`: Smart correlation (learns relationships between sensors)
48
+
49
+ _Node names and details are illustrative - actual implementations may vary._
50
+
51
+ Every arrow is a conscious choice. Every node has a purpose. No magic, just simple intuitive math.
52
+
53
+
54
+ ## Your Analytics Journey
55
+
56
+ **Start Simple**
57
+ `sensor → threshold → alert`
58
+
59
+ **Evolve Naturally**
60
+ `sensor → validate → normalize → threshold → debounce → alert`
61
+
62
+ **Scale Intelligently**
63
+ `sensor → [parallel: statistics | patterns | anomalies] → correlate → decide → act`
64
+
65
+ Your analytics grow with your understanding, and are never limited by any tool's feature list.
66
+
67
+ ## Designed for the Real World
68
+
69
+ ### Industrial IoT
70
+ From simple threshold monitoring to complex predictive maintenance - compose what fits your equipment, your patterns, your physics. **Move intelligence to the edge** with analytics that run on industrial Raspberry Pis. Works alongside your existing systems to handle your unique requirements.
71
+
72
+ ### Financial Services
73
+ Build fraud detection you can explain to auditors. Every decision traceable, every threshold justified.
74
+
75
+ ### Smart Infrastructure
76
+ Energy optimization with transparent logic. See why the system made each decision.
77
+
78
+ ## Production-Grade Resilience
79
+ Real streams have noise. Sensors fail. Networks hiccup. WinkComposer handles it all:
80
+
81
+ - **Node-level fault isolation** - One bad reading doesn't crash your pipeline
82
+ - **Automatic state recovery** - Snapshot and restore without missing a beat
83
+ - **Built-in observability** - Know what's happening in every node, every partition
84
+ - **Adaptive execution** - Maintains responsiveness under varying load
85
+
86
+
87
+ ## Core Principles
88
+
89
+ | Principle | What it means |
90
+ |-----------|---------------|
91
+ | **Atomic Operations** | Each node does one thing perfectly |
92
+ | **Pure Functions** | Predictable, testable, composable |
93
+ | **Transparent Logic** | Understand every decision |
94
+ | **Production Ready** | Built for high-throughput streaming with microsecond-scale latency |
95
+ | **AI-Native Intelligence** | From statistical learning nodes to LLM reasoning - intelligence at every level |
96
+ | **Built for Reality** | Node-level fault isolation, automatic recovery, and comprehensive observability |
97
+
98
+ ## What's Coming
99
+
100
+ ### 🎉 **Opening Our Doors in 2025**
101
+ WinkComposer is transitioning to open source development in 2025. Join the [early conversation](https://github.com/winkjs/wink-composer/discussions) and help shape the future of composable streaming analytics. You can even reach out directly at wink@graype.in.
102
+
103
+ **Together, we're building:**
104
+
105
+ - **Rich Node Library**: Statistical, filtering, detection, transformation, and control nodes
106
+ - **Edge-Ready Intelligence**: Advanced algorithms like smart correlation, change point detection, and regression inference - AI-like capabilities without heavyweight frameworks
107
+ - **Pipeline Builder**: Define your analytics flows declaratively (visual tools planned)
108
+ - **Edge-Ready Performance**: Process data efficiently, even on resource-constrained devices (**tested on Raspberry Pi**)
109
+ - **Knowledge Graph Integration**: Build digital twins with Neo4j/ArangoDB for contextual intelligence
110
+ - **AI-Native Reasoning**: When patterns emerge, LLMs explain why. When anomalies occur, get actionable recommendations. Open-source models keep intelligence at the edge.
111
+
112
+
113
+ ## The Vision
114
+
115
+ Finally, build solutions that fit your exact problems, not the other way around.
116
+
117
+ Every industry has unique patterns. Every process has specific physics. Every business has particular rules. WinkComposer gives you the building blocks to create exactly what you need.
118
+
119
+ Domain-specific platforms excel at standard use cases. WinkComposer shines when you need something unique, beyond standard use cases. Standard use cases always included - they're just the beginning of what's possible!
120
+
121
+
122
+
123
+ ## About winkJS
124
+
125
+ WinkComposer joins the winkJS family - production-grade open-source packages for Natural Language Processing, Machine Learning, and Statistical Analysis in JavaScript. Built for reliability with ~100% test coverage.
126
+
127
+
128
+ ## Copyright & License
129
+
130
+ **Wink Composer** is copyright 2017-25 [GRAYPE Systems Private Limited](https://graype.in/).
131
+
132
+ It is licensed under the terms of the MIT License.
@@ -0,0 +1,26 @@
1
+
2
+ ![logo](_media/wink-logo.png)
3
+
4
+ # wink-composer <small>♫</small>
5
+
6
+ **Composable Streaming Intelligence**
7
+
8
+ <br>
9
+
10
+ > **🎯 Build exactly what you need, playfully simple**
11
+
12
+ - ✨ **Real-time Analytics** that Sparks Joy
13
+ - 💫 **Compose from Simple Nodes** — Countless Possibilities
14
+ - 🔍 **Total Transparency** — Every Decision Explainable
15
+ - ⚡ **Edge-Ready Performance** — Runs on Raspberry Pi!
16
+ - 🧠 **Intelligent by Design** — Statistical Learning to LLMs
17
+ - 🚀 **Production Resilient** — Fault isolation, recovery, & observability
18
+
19
+ <br>
20
+
21
+ > 🎉 **Transitioning to Open Source in 2025**
22
+
23
+
24
+
25
+ [**Explore on GitHub** →](https://github.com/winkjs/wink-composer)
26
+ [**Read the Docs** →](#docsify)
Binary file
Binary file
@@ -0,0 +1,14 @@
1
+
2
+ * Getting started
3
+
4
+ * [Quick start](quickstart.md)
5
+ * [Writing more pages](more-pages.md)
6
+ * [Custom navbar](custom-navbar.md)
7
+ * [Cover page](cover.md)
8
+
9
+ * Configuration
10
+ * [Configuration](configuration.md)
11
+ * [Themes](themes.md)
12
+ * [Using plugins](plugins.md)
13
+ * [Markdown configuration](markdown.md)
14
+ * [Language highlight](language-highlight.md)
@@ -0,0 +1,2 @@
1
+ * [Home](/)
2
+ * [Contributing](CONTRIBUTING.md)
@@ -0,0 +1,44 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>Document</title>
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
7
+ <meta name="description" content="Composable Streaming Intelligence">
8
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
9
+ <!-- <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css"> -->
10
+ <!-- Theme: Simple (light + dark) -->
11
+ <link rel="stylesheet" media="(prefers-color-scheme: light)" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css">
12
+ <link rel="stylesheet" media="(prefers-color-scheme: dark)" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple-dark.css">
13
+
14
+ <style>
15
+ :root {
16
+ --theme-color: #886496;
17
+ --cover-background-color: #262626;
18
+ --cover-background-mask-opacity: 0.2;
19
+ --cover-background-image: none;
20
+ --cover-blockquote-color: #886496;
21
+ }
22
+ </style>
23
+
24
+ </head>
25
+ <body>
26
+ <div id="app"></div>
27
+ <script>
28
+ window.$docsify = {
29
+ name: 'wink-composer',
30
+ repo: 'https://github.com/winkjs/wink-composer',
31
+ loadSidebar: true,
32
+ coverpage: true,
33
+ search: 'auto',
34
+ loadNavbar: true
35
+ }
36
+ </script>
37
+ <!-- Docsify v4 -->
38
+ <script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
39
+ <!-- docsify-themeable -->
40
+ <script src="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/js/docsify-themeable.min.js"></script>
41
+ <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
42
+
43
+ </body>
44
+ </html>
@@ -0,0 +1,283 @@
1
+ import globals from 'globals';
2
+ import pluginJs from '@eslint/js';
3
+
4
+
5
+ export default [
6
+ { languageOptions: { globals: { ...globals.browser, ...globals.node } } },
7
+ pluginJs.configs.recommended,
8
+ {
9
+ 'rules': {
10
+ 'accessor-pairs': 'error',
11
+ 'array-bracket-spacing': [
12
+ 'error',
13
+ 'always'
14
+ ],
15
+ 'array-callback-return': 'error',
16
+ 'arrow-body-style': 'error',
17
+ 'arrow-parens': 'error',
18
+ 'arrow-spacing': 'error',
19
+ 'block-scoped-var': 'error',
20
+ 'block-spacing': 'error',
21
+ 'brace-style': 'error',
22
+ 'callback-return': 'error',
23
+ 'camelcase': 'error',
24
+ 'capitalized-comments': 'off',
25
+ 'class-methods-use-this': 'error',
26
+ 'comma-dangle': 'off',
27
+ 'comma-spacing': 'off',
28
+ 'comma-style': [
29
+ 'error',
30
+ 'last'
31
+ ],
32
+ 'complexity': 'error',
33
+ 'computed-property-spacing': 'off',
34
+ 'consistent-return': 'error',
35
+ 'consistent-this': 'error',
36
+ 'curly': 'off',
37
+ 'default-case': 'error',
38
+ 'dot-location': [
39
+ 'error',
40
+ 'property'
41
+ ],
42
+ 'dot-notation': 'error',
43
+ 'eol-last': 'error',
44
+ 'eqeqeq': 'off',
45
+ 'func-call-spacing': 'error',
46
+ 'func-name-matching': 'error',
47
+ 'func-names': [
48
+ 'error',
49
+ 'never'
50
+ ],
51
+ 'func-style': 'error',
52
+ 'generator-star-spacing': 'error',
53
+ 'global-require': 'error',
54
+ 'guard-for-in': 'error',
55
+ 'handle-callback-err': 'error',
56
+ 'id-blacklist': 'error',
57
+ 'id-length': 'off',
58
+ 'id-match': 'error',
59
+ 'indent': 'off',
60
+ 'init-declarations': 'off',
61
+ 'jsx-quotes': 'error',
62
+ 'key-spacing': 'error',
63
+ 'keyword-spacing': [
64
+ 'error',
65
+ {
66
+ 'after': true,
67
+ 'before': true
68
+ }
69
+ ],
70
+ 'line-comment-position': 'off',
71
+ 'linebreak-style': [
72
+ 'error',
73
+ 'unix'
74
+ ],
75
+ 'lines-around-comment': 'error',
76
+ 'lines-around-directive': 'error',
77
+ 'max-depth': 'error',
78
+ 'max-len': 'off',
79
+ 'max-lines': [
80
+ 'error',
81
+ {
82
+ 'max': 900,
83
+ 'skipBlankLines': true,
84
+ 'skipComments': true
85
+ }
86
+ ],
87
+ 'max-nested-callbacks': 'error',
88
+ 'max-params': 'off',
89
+ 'max-statements': 'off',
90
+ 'max-statements-per-line': 'error',
91
+ 'multiline-ternary': 'off',
92
+ 'new-cap': 'error',
93
+ 'new-parens': 'error',
94
+ 'newline-after-var': 'off',
95
+ 'newline-before-return': 'off',
96
+ 'newline-per-chained-call': 'off',
97
+ 'no-alert': 'error',
98
+ 'no-array-constructor': 'error',
99
+ 'no-await-in-loop': 'error',
100
+ 'no-bitwise': 'error',
101
+ 'no-caller': 'error',
102
+ 'no-catch-shadow': 'error',
103
+ 'no-confusing-arrow': 'error',
104
+ 'no-continue': 'error',
105
+ 'no-div-regex': 'error',
106
+ 'no-duplicate-imports': 'error',
107
+ 'no-else-return': 'error',
108
+ 'no-empty-function': 'error',
109
+ 'no-eq-null': 'error',
110
+ 'no-eval': 'error',
111
+ 'no-extend-native': 'error',
112
+ 'no-extra-bind': 'error',
113
+ 'no-extra-label': 'error',
114
+ 'no-extra-parens': 'off',
115
+ 'no-floating-decimal': 'error',
116
+ 'no-implicit-globals': 'off',
117
+ 'no-implied-eval': 'error',
118
+ 'no-inline-comments': 'off',
119
+ 'no-inner-declarations': [
120
+ 'error',
121
+ 'functions'
122
+ ],
123
+ 'no-invalid-this': 'error',
124
+ 'no-iterator': 'error',
125
+ 'no-label-var': 'error',
126
+ 'no-labels': 'error',
127
+ 'no-lone-blocks': 'error',
128
+ 'no-lonely-if': 'error',
129
+ 'no-loop-func': 'error',
130
+ 'no-magic-numbers': 'off',
131
+ 'no-mixed-operators': 'error',
132
+ 'no-mixed-requires': 'error',
133
+ 'no-multi-spaces': 'off',
134
+ 'no-multi-str': 'error',
135
+ 'no-multiple-empty-lines': 'error',
136
+ 'no-native-reassign': 'error',
137
+ 'no-negated-condition': 'error',
138
+ 'no-negated-in-lhs': 'error',
139
+ 'no-nested-ternary': 'off',
140
+ 'no-new': 'error',
141
+ 'no-new-func': 'error',
142
+ 'no-new-object': 'error',
143
+ 'no-new-require': 'error',
144
+ 'no-new-wrappers': 'error',
145
+ 'no-octal-escape': 'error',
146
+ 'no-param-reassign': [
147
+ 'error',
148
+ {
149
+ 'props': false
150
+ }
151
+ ],
152
+ 'no-path-concat': 'error',
153
+ 'no-plusplus': 'error',
154
+ 'no-process-env': 'error',
155
+ 'no-process-exit': 'error',
156
+ 'no-proto': 'error',
157
+ 'no-prototype-builtins': 'error',
158
+ 'no-restricted-globals': 'error',
159
+ 'no-restricted-imports': 'error',
160
+ 'no-restricted-modules': 'error',
161
+ 'no-restricted-properties': 'error',
162
+ 'no-restricted-syntax': 'error',
163
+ 'no-return-assign': 'error',
164
+ 'no-return-await': 'error',
165
+ 'no-script-url': 'error',
166
+ 'no-self-compare': 'error',
167
+ 'no-sequences': 'error',
168
+ 'no-shadow': 'error',
169
+ 'no-shadow-restricted-names': 'error',
170
+ 'no-spaced-func': 'error',
171
+ 'no-sync': 'error',
172
+ 'no-tabs': 'error',
173
+ 'no-template-curly-in-string': 'error',
174
+ 'no-ternary': 'off',
175
+ 'no-throw-literal': 'error',
176
+ 'no-trailing-spaces': 'error',
177
+ 'no-undef-init': 'error',
178
+ 'no-undefined': 'off',
179
+ 'no-underscore-dangle': 'error',
180
+ 'no-unmodified-loop-condition': 'error',
181
+ 'no-unneeded-ternary': 'error',
182
+ 'no-unused-expressions': 'error',
183
+ 'no-use-before-define': 'error',
184
+ 'no-useless-call': 'error',
185
+ 'no-useless-computed-key': 'error',
186
+ 'no-useless-concat': 'error',
187
+ 'no-useless-constructor': 'error',
188
+ 'no-useless-escape': 'off',
189
+ 'no-useless-rename': 'error',
190
+ 'no-useless-return': 'error',
191
+ 'no-var': 'off',
192
+ 'no-void': 'error',
193
+ 'no-warning-comments': [
194
+ 'error',
195
+ {
196
+ 'location': 'start'
197
+ }
198
+ ],
199
+ 'no-whitespace-before-property': 'error',
200
+ 'no-with': 'error',
201
+ 'object-curly-newline': 'error',
202
+ 'object-curly-spacing': [
203
+ 'error',
204
+ 'always'
205
+ ],
206
+ 'object-property-newline': [
207
+ 'error',
208
+ {
209
+ 'allowMultiplePropertiesPerLine': true
210
+ }
211
+ ],
212
+ 'object-shorthand': 'off',
213
+ 'one-var': 'off',
214
+ 'one-var-declaration-per-line': 'error',
215
+ 'operator-assignment': [
216
+ 'error',
217
+ 'always'
218
+ ],
219
+ 'operator-linebreak': [
220
+ 'error',
221
+ 'after'
222
+ ],
223
+ 'padded-blocks': 'off',
224
+ 'prefer-arrow-callback': 'off',
225
+ 'prefer-const': 'error',
226
+ 'prefer-destructuring': 'off',
227
+ 'prefer-numeric-literals': 'error',
228
+ 'prefer-reflect': 'off',
229
+ 'prefer-rest-params': 'error',
230
+ 'prefer-spread': 'error',
231
+ 'prefer-template': 'off',
232
+ 'quote-props': 'off',
233
+ 'quotes': [
234
+ 'error',
235
+ 'single'
236
+ ],
237
+ 'radix': [
238
+ 'error',
239
+ 'always'
240
+ ],
241
+ 'require-await': 'error',
242
+ 'rest-spread-spacing': 'error',
243
+ 'semi': 'error',
244
+ 'semi-spacing': [
245
+ 'error',
246
+ {
247
+ 'after': true,
248
+ 'before': false
249
+ }
250
+ ],
251
+ 'sort-imports': 'error',
252
+ 'sort-keys': 'off',
253
+ 'sort-vars': 'error',
254
+ 'space-before-blocks': 'error',
255
+ 'space-before-function-paren': 'error',
256
+ 'space-in-parens': 'off',
257
+ 'space-infix-ops': 'error',
258
+ 'space-unary-ops': 'error',
259
+ 'spaced-comment': [
260
+ 'error',
261
+ 'always'
262
+ ],
263
+ 'strict': [
264
+ 'error',
265
+ 'never'
266
+ ],
267
+ 'symbol-description': 'error',
268
+ 'template-curly-spacing': 'error',
269
+ 'unicode-bom': [
270
+ 'error',
271
+ 'never'
272
+ ],
273
+ 'vars-on-top': 'off',
274
+ 'wrap-iife': 'error',
275
+ 'wrap-regex': 'error',
276
+ 'yield-star-spacing': 'error',
277
+ 'yoda': [
278
+ 'error',
279
+ 'never'
280
+ ]
281
+ }
282
+ }
283
+ ];
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@winkjs/composer",
3
+ "version": "0.0.2",
4
+ "description": "Composable Streaming Intelligence.",
5
+ "keywords": [
6
+ "iot",
7
+ "statistical-learning",
8
+ "stream-processing",
9
+ "statistical-analysis",
10
+ "event-driven",
11
+ "composable",
12
+ "real-time-analytics",
13
+ "anomaly-detection",
14
+ "edge-computing",
15
+ "edgi-ai",
16
+ "streaming-analytics",
17
+ "industrial-iot"
18
+ ],
19
+ "main": "src/composer.js",
20
+ "scripts": {
21
+ "pretest": "npm run lint",
22
+ "test": "nyc --reporter=html --reporter=lcov --reporter=text mocha ./test/",
23
+ "coverage": "nyc report --reporter=text-lcov | coveralls",
24
+ "sourcedocs": "docker -i src -o ./sourcedocs --sidebar yes",
25
+ "lint": "eslint ./src/*.js ./test/*.js",
26
+ "perf": "node benchmark/run.js",
27
+ "dtslint": "dtslint types",
28
+ "docs-serve": "docsify serve ./docs"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/winkjs/composer.git"
33
+ },
34
+ "author": "Sanjaya Kumar Saxena",
35
+ "license": "MIT",
36
+ "bugs": {
37
+ "url": "https://github.com/winkjs/composer/issues"
38
+ },
39
+ "homepage": "http://winkjs.org/composer/#/",
40
+ "devDependencies": {
41
+ "benchmark": "^2.1.4",
42
+ "chai": "^4.3.7",
43
+ "coveralls": "^3.1.1",
44
+ "docker": "^1.0.0",
45
+ "docsify-cli": "^4.4.4",
46
+ "dtslint": "^4.2.1",
47
+ "eslint": "^8.36.0",
48
+ "mocha": "^10.2.0",
49
+ "nyc": "^15.1.0"
50
+ }
51
+ }