@cobol-ts/cel-graph-evaluator 0.0.0-stage → 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/README.md CHANGED
@@ -1,3 +1,7 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # CEL graph evaluator
2
+
3
+ Compile one Buf CEL expression per node, once per graph, then evaluate each node against prepared `EvaluationData`. Pass `input`, `current`, `acc` and `variables` as CEL bindings; protobuf message values are passed directly (not JSON-converted). Use `makeNodeGenerationsEvaluator` from `@cobol-ts/graph-executor` to write each result into a flat protobuf accumulator via `AccumulatorTC.set`.
4
+
5
+ `makeCelNodeEvaluator(graph, allNodes)` prepares the complete node set; it does not discover dependencies. `GraphTC` is sufficient for topological sorting; `EvaluationGraphTC` additionally supplies `name` and `cel`. Compilation errors throw during preparation; evaluation errors return `string[]`.
6
+
7
+ **Limits:** CEL-ES returns CEL runtime values (e.g. CEL integers as `bigint`); the concrete accumulator must validate/convert results to its protobuf field types. The `Value | string[]` contract reserves JS arrays for errors, so node expressions must not return raw JS arrays. The generic package does not infer protobuf field types or perform conversions. Reusing a protobuf `current` object is supported by the API but must be performance-tested.
@@ -0,0 +1 @@
1
+ export * from './src/cel.graph.evaluator';
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./src/cel.graph.evaluator"), exports);
18
+ //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,63 @@
1
1
  {
2
2
  "name": "@cobol-ts/cel-graph-evaluator",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "description": "Buf CEL per-node graph evaluator",
4
+ "version": "0.0.1",
5
+ "main": "dist/index",
6
+ "types": "dist/index",
7
+ "browserslist": {
8
+ "development": [
9
+ "last 1 chrome version",
10
+ "last 1 firefox version",
11
+ "last 1 safari version"
12
+ ],
13
+ "production": [
14
+ ">0.2%",
15
+ "not dead",
16
+ "not op_mini all"
17
+ ]
18
+ },
19
+ "dependencies": {
20
+ "@bufbuild/cel": "^0.6.1",
21
+ "@bufbuild/protobuf": "^2",
22
+ "@cobol-ts/graph": "0.0.1"
23
+ },
24
+ "devDependencies": {
25
+ "@testing-library/jest-dom": "^6.1.4",
26
+ "@types/jest": "^29.0.0",
27
+ "@types/node": "^14.0.0",
28
+ "jest": "^29.0.0",
29
+ "ts-jest": "^29.0.0",
30
+ "typescript": "^5.2.2"
31
+ },
32
+ "eslintConfig": {
33
+ "extends": [
34
+ "react-app",
35
+ "react-app/jest"
36
+ ],
37
+ "overrides": [
38
+ {
39
+ "files": [
40
+ "**/*.stories.*"
41
+ ],
42
+ "rules": {
43
+ "import/no-anonymous-default-export": "off"
44
+ }
45
+ }
46
+ ]
47
+ },
48
+ "files": [
49
+ "dist/index.js",
50
+ "dist/index.d.ts",
51
+ "dist/src/",
52
+ "build/"
53
+ ],
54
+ "keywords": [
55
+ "indexing"
56
+ ],
57
+ "license": "MIT",
58
+ "repository": "git@github.com:intellimaintain/intellimaintain.git",
59
+ "scripts": {
60
+ "test": "jest --config jest.config.json --env node",
61
+ "test:watch": "npm run test -- --watch"
62
+ }
6
63
  }