trilean 1.5.1 → 1.6.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/dist/complex.d.cts +1 -1
- package/dist/complex.d.ts +1 -1
- package/dist/computed-value-CbRF0Izc.d.cts +51 -0
- package/dist/computed-value-CbRF0Izc.d.ts +51 -0
- package/dist/computed-value.cjs +1 -1
- package/dist/computed-value.d.cts +1 -50
- package/dist/computed-value.d.ts +1 -50
- package/dist/computed-value.js +1 -1
- package/dist/evaluator-budget.cjs +24 -0
- package/dist/evaluator-budget.d.cts +21 -0
- package/dist/evaluator-budget.d.ts +21 -0
- package/dist/evaluator-budget.js +20 -0
- package/dist/evaluator-collection.cjs +33 -0
- package/dist/evaluator-collection.d.cts +23 -0
- package/dist/evaluator-collection.d.ts +23 -0
- package/dist/evaluator-collection.js +31 -0
- package/dist/evaluator-factory.cjs +19 -0
- package/dist/evaluator-factory.d.cts +22 -0
- package/dist/evaluator-factory.d.ts +22 -0
- package/dist/evaluator-factory.js +16 -0
- package/dist/evaluator-indeterminacy-helpers.cjs +180 -0
- package/dist/evaluator-indeterminacy-helpers.d.cts +57 -0
- package/dist/evaluator-indeterminacy-helpers.d.ts +57 -0
- package/dist/evaluator-indeterminacy-helpers.js +158 -0
- package/dist/evaluator-operations.cjs +385 -0
- package/dist/evaluator-operations.d.cts +27 -0
- package/dist/evaluator-operations.d.ts +27 -0
- package/dist/evaluator-operations.js +376 -0
- package/dist/evaluator-test-helpers.cjs +40 -0
- package/dist/evaluator-test-helpers.d.cts +13 -0
- package/dist/evaluator-test-helpers.d.ts +13 -0
- package/dist/evaluator-test-helpers.js +35 -0
- package/dist/evaluator.cjs +55 -454
- package/dist/evaluator.d.cts +6 -10
- package/dist/evaluator.d.ts +6 -10
- package/dist/evaluator.js +44 -442
- package/dist/functions.d.cts +2 -2
- package/dist/functions.d.ts +2 -2
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/magic-string.es-BWtG0AyA.js +1017 -0
- package/dist/magic-string.es-BvKy4sJx.cjs +1017 -0
- package/dist/resolvers.d.cts +1 -1
- package/dist/resolvers.d.ts +1 -1
- package/dist/test.DNmyFkvJ-Dasq3mQO.cjs +13578 -0
- package/dist/test.DNmyFkvJ-SCEEf0VK.js +13573 -0
- package/package.json +2 -2
- package/schemas/trilean.schema.json +1 -1
package/dist/evaluator.d.cts
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import { ComputedValue } from "./computed-value.cjs";
|
|
1
|
+
import { t as ComputedValue } from "./computed-value-CbRF0Izc.cjs";
|
|
2
2
|
import { ExpressionNode, PredicateNode } from "./tree.cjs";
|
|
3
3
|
import { Evaluation } from "./evaluation.cjs";
|
|
4
|
+
import { EvaluationBudget } from "./evaluator-budget.cjs";
|
|
4
5
|
import { FunctionRegistry } from "./functions.cjs";
|
|
5
6
|
import { EvaluationContext, Resolvers } from "./resolvers.cjs";
|
|
6
7
|
//#region src/evaluator.d.ts
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* `evaluatePredicateInternal` and `evaluateValueInternal` below are co-located in this one file, rather than split across `predicate-evaluator.ts`/`value-evaluator.ts`, because they are mutually recursive: a predicate leaf (`compare`, `textCompare`, `memberOf`, `exists`) holds `ExpressionNode` operands, and an expression node (`conditional`'s `when`, a fold's `filter`) holds `PredicateNode` operands. Splitting them across modules would make each half import the other, and whichever module finished loading second would see the other's export as `undefined` at its own module-evaluation time -- a genuine circular-import TDZ hazard, not merely a style preference. `resolveParticipatingItems` (in `evaluator-collection.ts`) would share that same hazard if it imported `evaluatePredicateInternal` directly, since it calls back into it to evaluate each candidate's filter -- so it instead takes the evaluator as an injected `EvaluatePredicate` parameter (see that type's own doc comment), which is what lets it live in its own file with no circular dependency on this one. The pure, non-recursive value-combination logic (`combineAnd`/`compareValues`/`applyArithmetic` and their siblings) carries no such constraint either and lives in `evaluator-operations.ts`; the resource-limit infrastructure (`EvaluationBudget` and its constants), likewise self-contained, lives in `evaluator-budget.ts`.
|
|
9
10
|
*/
|
|
10
|
-
declare function
|
|
11
|
-
|
|
12
|
-
}): {
|
|
13
|
-
evaluatePredicate: (node: PredicateNode, context: EvaluationContext, resolvers: Readonly<Resolvers>) => Promise<Evaluation<boolean>>;
|
|
14
|
-
evaluateValue: (node: ExpressionNode, context: EvaluationContext, resolvers: Readonly<Resolvers>) => Promise<Evaluation<ComputedValue>>;
|
|
15
|
-
};
|
|
16
|
-
declare const evaluatePredicate: (node: PredicateNode, context: EvaluationContext, resolvers: Readonly<Resolvers>) => Promise<Evaluation<boolean>>, evaluateValue: (node: ExpressionNode, context: EvaluationContext, resolvers: Readonly<Resolvers>) => Promise<Evaluation<ComputedValue>>;
|
|
11
|
+
declare function evaluatePredicateInternal(node: PredicateNode, context: EvaluationContext, resolvers: Readonly<Resolvers>, accumulator: ComputedValue | undefined, functions: Readonly<FunctionRegistry>, visitedTreeKeys: ReadonlySet<string>, treeReferenceDepth: number, budget: Readonly<EvaluationBudget>, nestingDepth: number): Promise<Evaluation<boolean>>;
|
|
12
|
+
declare function evaluateValueInternal(node: ExpressionNode, context: EvaluationContext, resolvers: Readonly<Resolvers>, accumulator: ComputedValue | undefined, functions: Readonly<FunctionRegistry>, visitedTreeKeys: ReadonlySet<string>, treeReferenceDepth: number, budget: Readonly<EvaluationBudget>, nestingDepth: number): Promise<Evaluation<ComputedValue>>;
|
|
17
13
|
//#endregion
|
|
18
|
-
export {
|
|
14
|
+
export { evaluatePredicateInternal, evaluateValueInternal };
|
package/dist/evaluator.d.ts
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import { ComputedValue } from "./computed-value.js";
|
|
1
|
+
import { t as ComputedValue } from "./computed-value-CbRF0Izc.js";
|
|
2
2
|
import { ExpressionNode, PredicateNode } from "./tree.js";
|
|
3
3
|
import { Evaluation } from "./evaluation.js";
|
|
4
|
+
import { EvaluationBudget } from "./evaluator-budget.js";
|
|
4
5
|
import { FunctionRegistry } from "./functions.js";
|
|
5
6
|
import { EvaluationContext, Resolvers } from "./resolvers.js";
|
|
6
7
|
//#region src/evaluator.d.ts
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* `evaluatePredicateInternal` and `evaluateValueInternal` below are co-located in this one file, rather than split across `predicate-evaluator.ts`/`value-evaluator.ts`, because they are mutually recursive: a predicate leaf (`compare`, `textCompare`, `memberOf`, `exists`) holds `ExpressionNode` operands, and an expression node (`conditional`'s `when`, a fold's `filter`) holds `PredicateNode` operands. Splitting them across modules would make each half import the other, and whichever module finished loading second would see the other's export as `undefined` at its own module-evaluation time -- a genuine circular-import TDZ hazard, not merely a style preference. `resolveParticipatingItems` (in `evaluator-collection.ts`) would share that same hazard if it imported `evaluatePredicateInternal` directly, since it calls back into it to evaluate each candidate's filter -- so it instead takes the evaluator as an injected `EvaluatePredicate` parameter (see that type's own doc comment), which is what lets it live in its own file with no circular dependency on this one. The pure, non-recursive value-combination logic (`combineAnd`/`compareValues`/`applyArithmetic` and their siblings) carries no such constraint either and lives in `evaluator-operations.ts`; the resource-limit infrastructure (`EvaluationBudget` and its constants), likewise self-contained, lives in `evaluator-budget.ts`.
|
|
9
10
|
*/
|
|
10
|
-
declare function
|
|
11
|
-
|
|
12
|
-
}): {
|
|
13
|
-
evaluatePredicate: (node: PredicateNode, context: EvaluationContext, resolvers: Readonly<Resolvers>) => Promise<Evaluation<boolean>>;
|
|
14
|
-
evaluateValue: (node: ExpressionNode, context: EvaluationContext, resolvers: Readonly<Resolvers>) => Promise<Evaluation<ComputedValue>>;
|
|
15
|
-
};
|
|
16
|
-
declare const evaluatePredicate: (node: PredicateNode, context: EvaluationContext, resolvers: Readonly<Resolvers>) => Promise<Evaluation<boolean>>, evaluateValue: (node: ExpressionNode, context: EvaluationContext, resolvers: Readonly<Resolvers>) => Promise<Evaluation<ComputedValue>>;
|
|
11
|
+
declare function evaluatePredicateInternal(node: PredicateNode, context: EvaluationContext, resolvers: Readonly<Resolvers>, accumulator: ComputedValue | undefined, functions: Readonly<FunctionRegistry>, visitedTreeKeys: ReadonlySet<string>, treeReferenceDepth: number, budget: Readonly<EvaluationBudget>, nestingDepth: number): Promise<Evaluation<boolean>>;
|
|
12
|
+
declare function evaluateValueInternal(node: ExpressionNode, context: EvaluationContext, resolvers: Readonly<Resolvers>, accumulator: ComputedValue | undefined, functions: Readonly<FunctionRegistry>, visitedTreeKeys: ReadonlySet<string>, treeReferenceDepth: number, budget: Readonly<EvaluationBudget>, nestingDepth: number): Promise<Evaluation<ComputedValue>>;
|
|
17
13
|
//#endregion
|
|
18
|
-
export {
|
|
14
|
+
export { evaluatePredicateInternal, evaluateValueInternal };
|