@clipboard-health/rules-engine 0.1.2 → 0.1.3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.1.3](https://github.com/ClipboardHealth/cbh-core/compare/rules-engine-0.1.2...rules-engine-0.1.3) (2024-07-11)
6
+
7
+ ## [0.1.3](https://github.com/ClipboardHealth/cbh-core/compare/rules-engine-0.1.2...rules-engine-0.1.3) (2024-07-11)
8
+
5
9
  ## [0.1.2](https://github.com/ClipboardHealth/cbh-core/compare/rules-engine-0.1.1...rules-engine-0.1.2) (2024-02-27)
6
10
 
7
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipboard-health/rules-engine",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "main": "./src/index.js",
5
5
  "scripts": {
6
6
  "build": "nx build rules-engine",
package/src/lib/rule.d.ts CHANGED
@@ -16,11 +16,12 @@ export interface Rule<TInput, TOutput, TContext extends RuleContext<TInput, TOut
16
16
  * Returns whether the rule should run or not.
17
17
  *
18
18
  * Only the `input` and not the full `context` is passed to `runIf`. This prevents rules from
19
- * relying on `output`, which may be modified by previous rules by the time `run` is called.
19
+ * relying on `output`, which may be appended to by previous rules by the time `run` is called.
20
20
  */
21
21
  runIf: (input: ReadonlyDeep<TInput>) => boolean;
22
22
  /**
23
- * Runs the actual rule and returns a new context by appending to the output array.
23
+ * A pure function that runs rule logic and returns a new context by appending to the output
24
+ * array.
24
25
  *
25
26
  * @see {@link appendOutput}
26
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../../../../packages/rules-engine/src/lib/rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,M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