@gorules/zen-engine 2.0.0 → 2.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/README.md +75 -269
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -1,321 +1,127 @@
|
|
|
1
|
+
# Node.js Rules Engine
|
|
2
|
+
|
|
3
|
+
**Business logic humans can read and machines can run.** One copy of your rules: the owner reads it, every system runs it.
|
|
4
|
+
|
|
1
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://www.npmjs.com/package/@gorules/zen-engine)
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
<img width="1280" alt="GoRules ZEN Engine" src="https://raw.githubusercontent.com/gorules/zen/master/.github/images/hero.png">
|
|
4
9
|
|
|
5
|
-
ZEN Engine is a cross-platform,
|
|
10
|
+
ZEN Engine is a cross-platform, open-source [Business Rules Engine (BRE)](https://gorules.io) written in **Rust** with native **Node.js** bindings, alongside Python, Go, Java, Kotlin and .NET. Decisions evaluate in microseconds, run identically on every platform, and are stored as portable JSON. Loading the JSON is up to you: file system, database or service call.
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
Try it in the free [Online Editor](https://editor.gorules.io) with a built-in simulator, or embed the open-source React [JDM Editor](https://github.com/gorules/jdm-editor) in your own product. Learn more about the [Node.js rules engine](https://gorules.io/open-source/javascript-rules-engine) on the GoRules website.
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
## Rules that read like sentences
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
Conditions are written the way the business says them, in the ZEN Expression Language. The developer view is one toggle away, and the two can never drift apart: there is only one source of truth, and this engine runs it.
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
It parses JDM from JSON content. It is up to you to obtain the JSON content, e.g. from file system, database or service call.
|
|
18
|
+
<img width="1280" alt="Readable rules" src="https://raw.githubusercontent.com/gorules/zen/master/.github/images/tables.png">
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
## Rules as graphs, or as documents
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
Model a decision on a visual canvas of decision tables, switches, expressions, functions and reusable sub-decisions. Or write it as a policy document with prose, typed data models and tables. Both compile to the same engine and return the same answers.
|
|
23
|
+
|
|
24
|
+
<img width="1280" alt="Graphs and documents" src="https://raw.githubusercontent.com/gorules/zen/master/.github/images/graphs-docs.png">
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
To go deeper, see the [Node.js SDK documentation](https://docs.gorules.io/developers/sdks/nodejs), the [decision graph guide](https://docs.gorules.io/learn/authoring/decision-graphs) and the [ZEN Expression Language](https://docs.gorules.io/learn/zen-language/syntax) reference.
|
|
27
|
+
|
|
28
|
+
## What's new in 2.0
|
|
29
|
+
|
|
30
|
+
Version 2.0 is the first stable release of the new engine line:
|
|
31
|
+
|
|
32
|
+
- **Policy documents**: model decisions as readable documents with typed data models, expressions, decision tables, match blocks and assertions. Policies compile to the same engine as graphs and return the same answers.
|
|
33
|
+
- **Workspace analysis**: static type checking across policies and graphs. Type flow, exhaustiveness checking, write-conflict detection and precise diagnostics, all available before anything runs.
|
|
34
|
+
- **Per-column collect**: decision table output columns can collect across all matching rows (`tags[]`) while the rest of the table stays first-match.
|
|
35
|
+
- **Pre-compiled engine**: decisions are parsed and compiled once at load; evaluation is allocation-light and repeat-safe.
|
|
36
|
+
- **Hardened runtime**: out-of-range numbers, arithmetic overflow and malformed inputs return errors or nulls instead of crashing the process.
|
|
37
|
+
- **Unified bindings**: configurable loaders, batch evaluation and consistent error envelopes across Node.js, Python, Go and FFI consumers.
|
|
38
|
+
|
|
39
|
+
## Installation
|
|
23
40
|
|
|
24
41
|
```bash
|
|
25
|
-
|
|
42
|
+
npm i @gorules/zen-engine
|
|
26
43
|
```
|
|
27
44
|
|
|
28
|
-
|
|
45
|
+
Prebuilt binaries ship for Linux (gnu and musl), macOS, Windows and WASM (WASI); no Rust toolchain required.
|
|
29
46
|
|
|
30
|
-
|
|
47
|
+
## Quickstart
|
|
31
48
|
|
|
32
49
|
```typescript
|
|
33
50
|
import { ZenEngine } from '@gorules/zen-engine';
|
|
34
51
|
import fs from 'fs/promises';
|
|
35
52
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const content = await fs.readFile('./jdm_graph.json');
|
|
39
|
-
const engine = new ZenEngine();
|
|
53
|
+
const content = await fs.readFile('./jdm_graph.json');
|
|
54
|
+
const engine = new ZenEngine();
|
|
40
55
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
})();
|
|
56
|
+
const decision = engine.createDecision(content);
|
|
57
|
+
const result = await decision.evaluate({ input: 15 });
|
|
44
58
|
```
|
|
45
59
|
|
|
46
60
|
### Loaders
|
|
47
61
|
|
|
48
|
-
For more advanced use cases where you want to load multiple decisions and
|
|
62
|
+
For more advanced use cases where you want to load multiple decisions and reuse them across evaluations you can build loaders. When `engine.evaluate` is invoked it calls the loader with a key, expecting the content of the JDM decision graph in return.
|
|
49
63
|
|
|
50
64
|
```typescript
|
|
51
|
-
import { ZenEngine } from '
|
|
65
|
+
import { ZenEngine } from '@gorules/zen-engine';
|
|
52
66
|
import fs from 'fs/promises';
|
|
53
67
|
import path from 'path';
|
|
54
68
|
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
const loader = async (key: string) => fs.readFile(path.join(testDataRoot, key))(async () => {
|
|
58
|
-
const engine = new ZenEngine({ loader });
|
|
59
|
-
|
|
60
|
-
const result = await engine.evaluate('jdm_graph1.json', { input: 5 });
|
|
61
|
-
})();
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
When engine.evaluate is invoked it will call loader and pass a key expecting a content of the JDM decision graph.
|
|
65
|
-
In the case above we will assume file `jdm_directory/jdm_graph1.json` exists.
|
|
66
|
-
|
|
67
|
-
Similar to this example you can also utilise loader to load from different places, for example from REST API, from S3, Database, etc.
|
|
68
|
-
|
|
69
|
-
### Supported Platforms
|
|
70
|
-
|
|
71
|
-
List of platforms where Zen Engine is natively available:
|
|
72
|
-
|
|
73
|
-
* **NodeJS** - [GitHub](https://github.com/gorules/zen/blob/master/bindings/nodejs/README.md) | [Documentation](https://gorules.io/docs/developers/bre/engines/nodejs) | [npmjs](https://www.npmjs.com/package/@gorules/zen-engine)
|
|
74
|
-
* **Python** - [GitHub](https://github.com/gorules/zen/blob/master/bindings/python/README.md) | [Documentation](https://gorules.io/docs/developers/bre/engines/python) | [pypi](https://pypi.org/project/zen-engine/)
|
|
75
|
-
* **Go** - [GitHub](https://github.com/gorules/zen-go) | [Documentation](https://gorules.io/docs/developers/bre/engines/go)
|
|
76
|
-
* **Rust (Core)** - [GitHub](https://github.com/gorules/zen) | [Documentation](https://gorules.io/docs/developers/bre/engines/rust) | [crates.io](https://crates.io/crates/zen-engine)
|
|
77
|
-
|
|
78
|
-
For a complete **Business Rules Management Systems (BRMS)** solution:
|
|
79
|
-
|
|
80
|
-
* [Self-hosted BRMS](https://gorules.io)
|
|
81
|
-
* [GoRules Cloud BRMS](https://gorules.io/signin/verify-email)
|
|
82
|
-
|
|
83
|
-
## JSON Decision Model (JDM)
|
|
84
|
-
|
|
85
|
-
GoRules JDM (JSON Decision Model) is a modeling framework designed to streamline the representation and implementation of decision models.
|
|
86
|
-
|
|
87
|
-
#### Understanding GoRules JDM
|
|
88
|
-
At its core, GoRules JDM revolves around the concept of decision models as interconnected graphs stored in JSON format.
|
|
89
|
-
These graphs capture the intricate relationships between various decision points, conditions, and outcomes in a GoRules Zen-Engine.
|
|
90
|
-
|
|
91
|
-
Graphs are made by linking nodes with edges, which act like pathways for moving information from one node to another, usually from the left to the right.
|
|
92
|
-
|
|
93
|
-
The Input node serves as an entry for all data relevant to the context, while the Output nodes produce the result of decision-making process. The progression of data follows a path from the Input Node to the Output Node, traversing all interconnected nodes in between. As the data flows through this network, it undergoes evaluation at each node, and connections determine where the data is passed along the graph.
|
|
94
|
-
|
|
95
|
-
To see JDM Graph in action you can use [Free Online Editor](https://editor.gorules.io) with built in Simulator.
|
|
96
|
-
|
|
97
|
-
There are 5 main node types in addition to a graph Input Node (Request) and Output Node (Response):
|
|
98
|
-
* Decision Table Node
|
|
99
|
-
* Switch Node
|
|
100
|
-
* Function Node
|
|
101
|
-
* Expression Node
|
|
102
|
-
* Decision Node
|
|
103
|
-
|
|
104
|
-
### Decision Table Node
|
|
105
|
-
|
|
106
|
-
#### Overview
|
|
107
|
-
|
|
108
|
-
Tables provide a structured representation of decision-making processes, allowing developers and business users to express complex rules in a clear and concise manner.
|
|
109
|
-
|
|
110
|
-
<img width="960" alt="Decision Table" src="https://gorules.io/images/decision-table.png">
|
|
111
|
-
|
|
112
|
-
#### Structure
|
|
113
|
-
|
|
114
|
-
At the core of the Decision Table is its schema, defining the structure with inputs and outputs. Inputs encompass business-friendly expressions using the ZEN Expression Language, accommodating a range of conditions such as equality, numeric comparisons, boolean values, date time functions, array functions and more. The schema's outputs dictate the form of results generated by the Decision Table.
|
|
115
|
-
Inputs and outputs are expressed through a user-friendly interface, often resembling a spreadsheet. This facilitates easy modification and addition of rules, enabling business users to contribute to decision logic without delving into intricate code.
|
|
116
|
-
|
|
117
|
-
#### Evaluation Process
|
|
118
|
-
|
|
119
|
-
Decision Tables are evaluated row by row, from top to bottom, adhering to a specified hit policy.
|
|
120
|
-
Single row is evaluated via Inputs columns, from left to right. Each input column represents `AND` operator. If cell is empty that column is evaluated **truthfully**, independently of the value.
|
|
121
|
-
|
|
122
|
-
If a single cell within a row fails (due to error, or otherwise), the row is skipped.
|
|
123
|
-
|
|
124
|
-
**HitPolicy**
|
|
125
|
-
|
|
126
|
-
The hit policy determines the outcome calculation based on matching rules.
|
|
127
|
-
|
|
128
|
-
The result of the evaluation is:
|
|
129
|
-
|
|
130
|
-
* **an object** if the hit policy of the decision table is `first` and a rule matched. The structure is defined by the output fields. Qualified field names with a dot (.) inside lead to nested objects.
|
|
131
|
-
* **`null`/`undefined`** if no rule matched in `first` hit policy
|
|
132
|
-
* **an array of objects** if the hit policy of the decision table is `collect` (one array item for each matching rule) or empty array if no rules match
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
#### Inputs
|
|
136
|
-
|
|
137
|
-
In the assessment of rules or rows, input columns embody the `AND` operator. The values typically consist of (qualified) names, such as `customer.country` or `customer.age`.
|
|
69
|
+
const loader = async (key: string) => fs.readFile(path.join(__dirname, 'jdm_directory', key));
|
|
138
70
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
**Unary Evaluation**
|
|
143
|
-
|
|
144
|
-
Unary evaluation is usually used when we would like to compare single fields from incoming context separately, for example `customer.country` and `cart.total` . It is activated when a column has `field` defined in its schema.
|
|
145
|
-
|
|
146
|
-
***Example***
|
|
147
|
-
|
|
148
|
-
For the input:
|
|
149
|
-
|
|
150
|
-
```json
|
|
151
|
-
{
|
|
152
|
-
"customer": {
|
|
153
|
-
"country": "US"
|
|
154
|
-
},
|
|
155
|
-
"cart": {
|
|
156
|
-
"total": 1500
|
|
157
|
-
}
|
|
158
|
-
}
|
|
71
|
+
const engine = new ZenEngine({ loader });
|
|
72
|
+
const result = await engine.evaluate('jdm_graph1.json', { input: 5 });
|
|
159
73
|
```
|
|
160
74
|
|
|
161
|
-
|
|
75
|
+
The same pattern works for loading from a REST API, S3, a database, or anywhere else. Full guides, including multi-decision graphs and batch evaluation, are in the [Node.js SDK documentation](https://docs.gorules.io/developers/sdks/nodejs).
|
|
162
76
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
```
|
|
166
|
-
IF customer.country == 'US' AND cart.total > 1000 THEN {"fees": {"percent": 2}}
|
|
167
|
-
ELSE IF customer.country == 'US' THEN {"fees": {"flat": 30}}
|
|
168
|
-
ELSE IF customer.country == 'CA' OR customer.country == 'MX' THEN {"fees": {"flat": 50}}
|
|
169
|
-
ELSE {"fees": {"flat": 150}}
|
|
170
|
-
```
|
|
77
|
+
## Other platforms
|
|
171
78
|
|
|
79
|
+
* **Node.js** - [GitHub](https://github.com/gorules/zen/tree/master/bindings/nodejs) | [Documentation](https://docs.gorules.io/developers/sdks/nodejs) | [npm](https://www.npmjs.com/package/@gorules/zen-engine)
|
|
80
|
+
* **Python** - [GitHub](https://github.com/gorules/zen/tree/master/bindings/python) | [Documentation](https://docs.gorules.io/developers/sdks/python) | [PyPI](https://pypi.org/project/zen-engine/)
|
|
81
|
+
* **Go** - [GitHub](https://github.com/gorules/zen-go) | [Documentation](https://docs.gorules.io/developers/sdks/go)
|
|
82
|
+
* **Java / Kotlin** - [GitHub](https://github.com/gorules/zen/tree/master/bindings/uniffi) | [Documentation](https://docs.gorules.io/developers/sdks/java) | [Maven Central](https://mvnrepository.com/artifact/io.gorules/zen-engine)
|
|
83
|
+
* **.NET** - [GitHub](https://github.com/gorules/zen/tree/master/bindings/uniffi) | [Documentation](https://docs.gorules.io/developers/sdks/csharp) | [NuGet](https://www.nuget.org/packages/GoRules.ZenEngine)
|
|
84
|
+
* **Rust (Core)** - [GitHub](https://github.com/gorules/zen) | [Documentation](https://docs.gorules.io/developers/sdks/rust) | [crates.io](https://crates.io/crates/zen-engine)
|
|
172
85
|
|
|
173
|
-
|
|
86
|
+
## The GoRules platform
|
|
174
87
|
|
|
175
|
-
|
|
176
|
-
| ----------- | ---------------------------------------------- |
|
|
177
|
-
| "A" | the field equals "A" |
|
|
178
|
-
| "A", "B" | the field is either "A" or "B" |
|
|
179
|
-
| 36 | the numeric value equals 36 |
|
|
180
|
-
| < 36 | a value less than 36 |
|
|
181
|
-
| > 36 | a value greater than 36 |
|
|
182
|
-
| [20..39] | a value between 20 and 39 (inclusive) |
|
|
183
|
-
| 20,39 | a value either 20 or 39 |
|
|
184
|
-
| <20, >39 | a value either less than 20 or greater than 39 |
|
|
185
|
-
| true | the boolean value true |
|
|
186
|
-
| false | the boolean value false |
|
|
187
|
-
| | any value, even null/undefined |
|
|
188
|
-
| null | the value null or undefined |
|
|
88
|
+
The engine is open at the core; [GoRules](https://gorules.io) is the platform around it. Managed cloud, self-hosted, or embedded with no network hop. SOC 2 Type II.
|
|
189
89
|
|
|
190
|
-
|
|
90
|
+
### AI that builds rules, and stays reviewable
|
|
191
91
|
|
|
192
|
-
|
|
92
|
+
An AI copilot and MCP server that edits rules, runs tests and explains decisions. It never deploys. Releases stay with your reviewers.
|
|
193
93
|
|
|
194
|
-
|
|
94
|
+
<img width="800" alt="GoRules AI" src="https://raw.githubusercontent.com/gorules/zen/master/.github/images/ai.png">
|
|
195
95
|
|
|
196
|
-
|
|
96
|
+
### Promote like a release, run like a binary
|
|
197
97
|
|
|
198
|
-
|
|
98
|
+
A release moves from testing to staging to production untouched. Approvals, instant rollback, and a paper trail for every change.
|
|
199
99
|
|
|
200
|
-
|
|
100
|
+
<img width="800" alt="Governance" src="https://raw.githubusercontent.com/gorules/zen/master/.github/images/governance.png">
|
|
201
101
|
|
|
202
|
-
|
|
203
|
-
{
|
|
204
|
-
"transaction": {
|
|
205
|
-
"country": "US",
|
|
206
|
-
"createdAt": "2023-11-20T19:00:25Z",
|
|
207
|
-
"amount": 10000
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
<img width="960" alt="Decision Table Expression" src="https://gorules.io/images/decision-table-expression.png">
|
|
102
|
+
### Prove it before it ships
|
|
213
103
|
|
|
214
|
-
|
|
215
|
-
IF time(transaction.createdAt) > time("17:00:00") AND transaction.amount > 1000 THEN {"status": "reject"}
|
|
216
|
-
ELSE {"status": "approve"}
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
Note: For the full list please visit [ZEN Expression Language](https://gorules.io/docs/rules-engine/expression-language/).
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
**Outputs**
|
|
223
|
-
|
|
224
|
-
Output columns serve as the blueprint for the data that the decision table will generate when the conditions are met during evaluation.
|
|
225
|
-
|
|
226
|
-
When a row in the decision table satisfies its specified conditions, the output columns determine the nature and structure of the information that will be returned. Each output column represents a distinct field, and the collective set of these fields forms the output or result associated with the validated row. This mechanism allows decision tables to precisely define and control the data output.
|
|
227
|
-
|
|
228
|
-
***Example***
|
|
229
|
-
|
|
230
|
-
<img width="860" alt="Decision Table Output" src="https://gorules.io/images/decision-table-output.png">
|
|
231
|
-
|
|
232
|
-
And the result would be:
|
|
233
|
-
|
|
234
|
-
```json
|
|
235
|
-
{
|
|
236
|
-
"flatProperty": "A",
|
|
237
|
-
"output": {
|
|
238
|
-
"nested": {
|
|
239
|
-
"property": "B"
|
|
240
|
-
},
|
|
241
|
-
"property": 36
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
```
|
|
245
|
-
### Switch Node (NEW)
|
|
104
|
+
Scenario suites run on every change, coverage is measured against decision paths, and every answer comes with a replayable trace.
|
|
246
105
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
Conditions are written in a Zen Expression Language.
|
|
250
|
-
|
|
251
|
-
By incorporating the Switch node, decision models become more flexible and context-aware. This capability is particularly valuable in scenarios where diverse decision logic is required based on varying inputs. The Switch node efficiently manages branching within the graph, enhancing the overall complexity and realism of decision models in GoRules JDM, making it a pivotal component for crafting intelligent and adaptive systems.
|
|
252
|
-
|
|
253
|
-
The Switch node preserves the incoming data without modification; it forwards the entire context to the output branch(es).
|
|
254
|
-
|
|
255
|
-
<img width="960" alt="Switch / Branching" src="https://gorules.io/images/decision-graph.png">
|
|
256
|
-
|
|
257
|
-
#### HitPolicy
|
|
258
|
-
There are two HitPolicy options for the switch node, `first` and `collect`.
|
|
259
|
-
|
|
260
|
-
In the context of a first hit policy, the graph branches to the initial matching condition, analogous to the behavior observed in a table. Conversely, under a collect hit policy, the graph extends to all branches where conditions hold true, allowing branching to multiple paths.
|
|
261
|
-
|
|
262
|
-
Note: If there are multiple edges from the same condition, there is no guaranteed order of execution.
|
|
263
|
-
|
|
264
|
-
*Available from:*
|
|
265
|
-
* Python 0.16.0
|
|
266
|
-
* NodeJS 0.13.0
|
|
267
|
-
* Rust 0.16.0
|
|
268
|
-
* Go 0.1.0
|
|
269
|
-
|
|
270
|
-
### Functions Node
|
|
271
|
-
|
|
272
|
-
Function nodes are JavaScript snippets that allow for quick and easy parsing, re-mapping or otherwise modifying the data using JavaScript. Inputs of the node are provided as function's arguments. Functions are executed on top of QuickJS Engine that is bundled into the ZEN Engine.
|
|
273
|
-
|
|
274
|
-
Function timeout is set to a 50ms.
|
|
275
|
-
|
|
276
|
-
```js
|
|
277
|
-
const handler = (input, {dayjs, Big}) => {
|
|
278
|
-
return {
|
|
279
|
-
...input,
|
|
280
|
-
someField: 'hello'
|
|
281
|
-
};
|
|
282
|
-
};
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
There are two built in libraries:
|
|
286
|
-
* [dayjs](https://www.npmjs.com/package/dayjs) - for Date Manipulation
|
|
287
|
-
* [big.js](https://www.npmjs.com/package/big.js) - for arbitrary-precision decimal arithmetic.
|
|
288
|
-
|
|
289
|
-
### Expression Node
|
|
290
|
-
The Expression node serves as a tool for transforming input objects into alternative objects using the Zen Expression Language. When specifying the output properties, each property requires a separate row. These rows are defined by two fields:
|
|
291
|
-
- Key - qualified name of the output property
|
|
292
|
-
- Value - value expressed through the Zen Expression Language
|
|
293
|
-
|
|
294
|
-
Note: Any errors within the Expression node will bring the graph to a halt.
|
|
295
|
-
|
|
296
|
-
<img width="960" alt="Decision Table" src="https://gorules.io/images/expression.png">
|
|
297
|
-
|
|
298
|
-
### Decision Node
|
|
299
|
-
|
|
300
|
-
The "Decision" node is designed to extend the capabilities of decision models. Its function is to invoke and reuse other decision models during execution.
|
|
301
|
-
|
|
302
|
-
By incorporating the "Decision" node, developers can modularize decision logic, promoting reusability and maintainability in complex systems.
|
|
106
|
+
<img width="800" alt="Testing" src="https://raw.githubusercontent.com/gorules/zen/master/.github/images/tests.png">
|
|
303
107
|
|
|
304
108
|
## Support matrix
|
|
305
109
|
|
|
306
|
-
| Arch
|
|
307
|
-
|
|
308
|
-
| linux-x64-gnu
|
|
309
|
-
| linux-arm64-gnu
|
|
310
|
-
| darwin-x64
|
|
311
|
-
| darwin-arm64
|
|
312
|
-
| win32-x64-msvc
|
|
313
|
-
| linux-x64-musl
|
|
314
|
-
| linux-arm64-musl
|
|
110
|
+
| Arch | Node.js |
|
|
111
|
+
|:-----------------|:-------------------|
|
|
112
|
+
| linux-x64-gnu | :heavy_check_mark: |
|
|
113
|
+
| linux-arm64-gnu | :heavy_check_mark: |
|
|
114
|
+
| darwin-x64 | :heavy_check_mark: |
|
|
115
|
+
| darwin-arm64 | :heavy_check_mark: |
|
|
116
|
+
| win32-x64-msvc | :heavy_check_mark: |
|
|
117
|
+
| linux-x64-musl | :heavy_check_mark: |
|
|
118
|
+
| linux-arm64-musl | :heavy_check_mark: |
|
|
119
|
+
| wasm32 (WASI) | :heavy_check_mark: |
|
|
315
120
|
|
|
316
121
|
## Contribution
|
|
317
122
|
|
|
318
|
-
JDM standard is growing and we need to keep tight control over its development and roadmap as
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
123
|
+
The JDM standard is growing and we need to keep tight control over its development and roadmap, as a number of companies use GoRules ZEN Engine and GoRules BRMS. For this reason we can't accept code contributions at this moment, apart from help with documentation and additional tests.
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
[MIT License](https://opensource.org/licenses/MIT)
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gorules/zen-engine",
|
|
3
|
-
"
|
|
3
|
+
"description": "Open-source Business Rules Engine for Node.js, powered by Rust",
|
|
4
|
+
"version": "2.0.1",
|
|
4
5
|
"main": "index.js",
|
|
5
6
|
"browser": "browser.js",
|
|
6
7
|
"types": "./index.d.ts",
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
"node-rs"
|
|
57
58
|
],
|
|
58
59
|
"author": "GoRules <hi@gorules.io> (https://gorules.io)",
|
|
59
|
-
"homepage": "https://
|
|
60
|
+
"homepage": "https://gorules.io",
|
|
60
61
|
"engines": {
|
|
61
62
|
"node": ">= 14"
|
|
62
63
|
},
|
|
@@ -94,22 +95,22 @@
|
|
|
94
95
|
"watch": "cargo watch --ignore '{index.js,index.d.ts}' -- npm run build:debug",
|
|
95
96
|
"test": "cross-env __ZEN_MOCK_UTC_TIME=2025-08-19T16:55:02.078Z jest",
|
|
96
97
|
"artifacts": "napi artifacts -d ../../artifacts",
|
|
97
|
-
"createNpmDirs": "napi create-npm-dirs",
|
|
98
|
+
"createNpmDirs": "napi create-npm-dirs && node enrich-npm-dirs.mjs",
|
|
98
99
|
"prepublishOnly": "napi prepublish --no-gh-release",
|
|
99
100
|
"version": "napi version"
|
|
100
101
|
},
|
|
101
102
|
"resolutions": {
|
|
102
103
|
"form-data@^4.0.0": "4.0.4"
|
|
103
104
|
},
|
|
104
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "6c0fbabba1266afffc2ac3cb24f20f2be7790e38",
|
|
105
106
|
"optionalDependencies": {
|
|
106
|
-
"@gorules/zen-engine-darwin-x64": "2.0.
|
|
107
|
-
"@gorules/zen-engine-linux-x64-gnu": "2.0.
|
|
108
|
-
"@gorules/zen-engine-linux-x64-musl": "2.0.
|
|
109
|
-
"@gorules/zen-engine-win32-x64-msvc": "2.0.
|
|
110
|
-
"@gorules/zen-engine-linux-arm64-gnu": "2.0.
|
|
111
|
-
"@gorules/zen-engine-linux-arm64-musl": "2.0.
|
|
112
|
-
"@gorules/zen-engine-darwin-arm64": "2.0.
|
|
113
|
-
"@gorules/zen-engine-wasm32-wasi": "2.0.
|
|
107
|
+
"@gorules/zen-engine-darwin-x64": "2.0.1",
|
|
108
|
+
"@gorules/zen-engine-linux-x64-gnu": "2.0.1",
|
|
109
|
+
"@gorules/zen-engine-linux-x64-musl": "2.0.1",
|
|
110
|
+
"@gorules/zen-engine-win32-x64-msvc": "2.0.1",
|
|
111
|
+
"@gorules/zen-engine-linux-arm64-gnu": "2.0.1",
|
|
112
|
+
"@gorules/zen-engine-linux-arm64-musl": "2.0.1",
|
|
113
|
+
"@gorules/zen-engine-darwin-arm64": "2.0.1",
|
|
114
|
+
"@gorules/zen-engine-wasm32-wasi": "2.0.1"
|
|
114
115
|
}
|
|
115
116
|
}
|