trilean 1.13.5 → 1.13.7
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/builtin-functions.cjs +1 -2
- package/dist/builtin-functions.d.cts +1 -3
- package/dist/builtin-functions.d.ts +1 -3
- package/dist/builtin-functions.js +1 -2
- package/dist/complex-division.cjs +1 -2
- package/dist/complex-division.d.cts +1 -3
- package/dist/complex-division.d.ts +1 -3
- package/dist/complex-division.js +1 -2
- package/dist/complex.cjs +1 -2
- package/dist/complex.d.cts +1 -3
- package/dist/complex.d.ts +1 -3
- package/dist/complex.js +1 -2
- package/dist/{computed-value-CbRF0Izc.d.cts → computed-value-CaFJ1YkU.d.ts} +0 -2
- package/dist/computed-value.cjs +1 -2
- package/dist/computed-value.d.cts +48 -2
- package/dist/computed-value.d.ts +1 -1
- package/dist/computed-value.js +1 -2
- package/dist/derived-aggregates.cjs +1 -2
- package/dist/derived-aggregates.d.cts +2 -4
- package/dist/derived-aggregates.d.ts +2 -4
- package/dist/derived-aggregates.js +1 -2
- package/dist/derived-connectives.cjs +1 -2
- package/dist/derived-connectives.d.cts +2 -4
- package/dist/derived-connectives.d.ts +2 -4
- package/dist/derived-connectives.js +1 -2
- package/dist/derived-patterns.cjs +1 -2
- package/dist/derived-patterns.d.cts +1 -3
- package/dist/derived-patterns.d.ts +1 -3
- package/dist/derived-patterns.js +1 -2
- package/dist/derived-values.cjs +1 -2
- package/dist/derived-values.d.cts +1 -3
- package/dist/derived-values.d.ts +1 -3
- package/dist/derived-values.js +1 -2
- package/dist/{dist-Dn-LI_AV.js → dist-ed78Tuwe.js} +2 -4
- package/dist/{dist-DO_3oafK.cjs → dist-ySX7cb5d.cjs} +2 -4
- package/dist/duration-order.cjs +1 -2
- package/dist/duration-order.d.cts +1 -3
- package/dist/duration-order.d.ts +1 -3
- package/dist/duration-order.js +1 -2
- package/dist/evaluate-document.cjs +4 -5
- package/dist/evaluate-document.d.cts +2 -4
- package/dist/evaluate-document.d.ts +2 -4
- package/dist/evaluate-document.js +4 -5
- package/dist/evaluation.cjs +1 -2
- package/dist/evaluation.d.cts +1 -3
- package/dist/evaluation.d.ts +1 -3
- package/dist/evaluation.js +1 -2
- package/dist/evaluator-budget.cjs +1 -2
- package/dist/evaluator-budget.d.cts +1 -3
- package/dist/evaluator-budget.d.ts +1 -3
- package/dist/evaluator-budget.js +1 -2
- package/dist/evaluator-collection.cjs +1 -2
- package/dist/evaluator-collection.d.cts +5 -7
- package/dist/evaluator-collection.d.ts +5 -7
- package/dist/evaluator-collection.js +1 -2
- package/dist/evaluator-compiled.cjs +3 -4
- package/dist/evaluator-compiled.d.cts +3 -5
- package/dist/evaluator-compiled.d.ts +3 -5
- package/dist/evaluator-compiled.js +3 -4
- package/dist/evaluator-effect.cjs +1 -2
- package/dist/evaluator-effect.d.cts +0 -2
- package/dist/evaluator-effect.d.ts +0 -2
- package/dist/evaluator-effect.js +1 -2
- package/dist/evaluator-factory.cjs +2 -3
- package/dist/evaluator-factory.d.cts +5 -7
- package/dist/evaluator-factory.d.ts +5 -7
- package/dist/evaluator-factory.js +2 -3
- package/dist/evaluator-indeterminacy-helpers.cjs +2 -3
- package/dist/evaluator-indeterminacy-helpers.d.cts +2 -4
- package/dist/evaluator-indeterminacy-helpers.d.ts +2 -4
- package/dist/evaluator-indeterminacy-helpers.js +2 -3
- package/dist/evaluator-literals.cjs +1 -2
- package/dist/evaluator-literals.d.cts +2 -4
- package/dist/evaluator-literals.d.ts +2 -4
- package/dist/evaluator-literals.js +1 -2
- package/dist/evaluator-operations.cjs +2 -3
- package/dist/evaluator-operations.d.cts +4 -6
- package/dist/evaluator-operations.d.ts +4 -6
- package/dist/evaluator-operations.js +2 -3
- package/dist/evaluator-test-helpers.cjs +2 -3
- package/dist/evaluator-test-helpers.d.cts +1 -3
- package/dist/evaluator-test-helpers.d.ts +1 -3
- package/dist/evaluator-test-helpers.js +2 -3
- package/dist/evaluator.cjs +2 -3
- package/dist/evaluator.d.cts +4 -6
- package/dist/evaluator.d.ts +4 -6
- package/dist/evaluator.js +2 -3
- package/dist/functions.cjs +1 -2
- package/dist/functions.d.cts +2 -4
- package/dist/functions.d.ts +2 -4
- package/dist/functions.js +1 -2
- package/dist/{index.CZzC1gGg-C3tq-f5f.cjs → index.CZzC1gGg-CQphWYWn.cjs} +23 -40
- package/dist/{index.CZzC1gGg-DVgiC1Nq.js → index.CZzC1gGg-D3-vRdPe.js} +14 -27
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +10 -10
- package/dist/input-resolvers.cjs +1 -2
- package/dist/input-resolvers.d.cts +2 -4
- package/dist/input-resolvers.d.ts +2 -4
- package/dist/input-resolvers.js +1 -2
- package/dist/integer-power.cjs +1 -2
- package/dist/integer-power.d.cts +1 -3
- package/dist/integer-power.d.ts +1 -3
- package/dist/integer-power.js +1 -2
- package/dist/{json-value-B1Hjjjri.d.cts → json-value-ZLMaKP0n.d.ts} +0 -2
- package/dist/json-value.cjs +1 -2
- package/dist/json-value.d.cts +8 -2
- package/dist/json-value.d.ts +1 -1
- package/dist/json-value.js +1 -2
- package/dist/plain-record.cjs +1 -2
- package/dist/plain-record.d.cts +1 -3
- package/dist/plain-record.d.ts +1 -3
- package/dist/plain-record.js +1 -2
- package/dist/resolvers.d.cts +3 -5
- package/dist/resolvers.d.ts +3 -5
- package/dist/tree.cjs +1 -2
- package/dist/tree.d.cts +2 -4
- package/dist/tree.d.ts +2 -4
- package/dist/tree.js +1 -2
- package/dist-cli/trilean.mjs +24 -47
- package/package.json +4 -4
- package/schemas/trilean.schema.json +1 -1
- package/dist/computed-value-CbRF0Izc.d.ts +0 -51
- package/dist/json-value-B1Hjjjri.d.ts +0 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { complexFromPolar } from "./complex.js";
|
|
2
|
-
|
|
2
|
+
// src/evaluator-literals.ts
|
|
3
3
|
/**
|
|
4
4
|
* The `ComputedValue` a literal node denotes, as a new object on every call. Whichever authoring form a `complexLiteral` used (see the "Complex values" section of README.md), it is normalised here to the single rectangular `ComputedValue`, so nothing downstream (arithmetic, compare, memberOf, negate) ever sees a polar-authored value. Shared by the interpreter and the compiled path so a literal means one thing in both.
|
|
5
5
|
*/
|
|
@@ -38,5 +38,4 @@ function literalValue(node) {
|
|
|
38
38
|
default: throw new Error("unreachable literal node kind");
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
//#endregion
|
|
42
41
|
export { literalValue };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_computed_value = require("./computed-value.cjs");
|
|
3
|
+
const require_evaluation = require("./evaluation.cjs");
|
|
3
4
|
const require_complex_division = require("./complex-division.cjs");
|
|
4
5
|
const require_duration_order = require("./duration-order.cjs");
|
|
5
|
-
const require_evaluation = require("./evaluation.cjs");
|
|
6
6
|
const require_integer_power = require("./integer-power.cjs");
|
|
7
7
|
let trilean_regex = require("trilean-regex");
|
|
8
|
-
|
|
8
|
+
// src/evaluator-operations.ts
|
|
9
9
|
/** The indeterminate result for a resolver's report of absence: `not-yet-known` when the resolver said the value has not been supplied yet, `not-found` otherwise. The two share every propagation rule except `exists` (and so `coalesce`), which is why every resolver call site goes through this one function. */
|
|
10
10
|
function absenceEvaluation(absence, notFoundMessage, notYetKnownMessage) {
|
|
11
11
|
return absence.notYetKnown === true ? require_evaluation.indeterminate("not-yet-known", notYetKnownMessage) : require_evaluation.indeterminate("not-found", notFoundMessage);
|
|
@@ -428,7 +428,6 @@ function invokeRegisteredFunction(functions, fnName, args) {
|
|
|
428
428
|
if ("wrongType" in outcome) return require_evaluation.indeterminate("wrong-type", outcome.wrongType);
|
|
429
429
|
return require_evaluation.definite(outcome);
|
|
430
430
|
}
|
|
431
|
-
//#endregion
|
|
432
431
|
exports.absenceEvaluation = absenceEvaluation;
|
|
433
432
|
exports.applyArithmetic = applyArithmetic;
|
|
434
433
|
exports.applyNegate = applyNegate;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FunctionRegistry } from "./functions.cjs";
|
|
3
|
-
import { ArithmeticOperator, ComparisonOperator, TextComparisonOperator } from "./tree.cjs";
|
|
1
|
+
import { ComputedValue, Unit } from "./computed-value.cjs";
|
|
4
2
|
import { Evaluation } from "./evaluation.cjs";
|
|
3
|
+
import { FunctionRegistry } from "./functions.cjs";
|
|
5
4
|
import { Absence } from "./resolvers.cjs";
|
|
6
|
-
|
|
5
|
+
import { ArithmeticOperator, ComparisonOperator, TextComparisonOperator } from "./tree.cjs";
|
|
7
6
|
/** The indeterminate result for a resolver's report of absence: `not-yet-known` when the resolver said the value has not been supplied yet, `not-found` otherwise. The two share every propagation rule except `exists` (and so `coalesce`), which is why every resolver call site goes through this one function. */
|
|
8
7
|
export declare function absenceEvaluation(absence: Readonly<Absence>, notFoundMessage: string, notYetKnownMessage: string): Evaluation<never>;
|
|
9
8
|
/** The three-valued AND table: `false` is absorbing regardless of the other operand's indeterminacy; otherwise both-definite folds to a boolean AND; otherwise indeterminate, with the tie-break rule (declared operand order, left before right) applied via `firstIndeterminate`. */
|
|
@@ -25,5 +24,4 @@ export declare function applyArithmetic(op: ArithmeticOperator, left: ComputedVa
|
|
|
25
24
|
/** `reference`'s optional expected-unit check: when `expectedUnit` is declared (from `node.unit`), the resolved value must be numeric (`number` or `complex`) and its own unit must match. Returns the `wrong-type` `Evaluation` to return immediately if the check fails, or `undefined` if the reference may resolve as-is. */
|
|
26
25
|
export declare function checkReferenceUnit(expectedUnit: Unit | undefined, resolvedValue: ComputedValue): Evaluation<never> | undefined;
|
|
27
26
|
/** `call`'s own function-registry dispatch, given the `fn` name off the tree and its already-evaluated `args`. `node.fn` comes off the serialised tree, which this design treats as data that may have been authored anywhere (see README.md's opening section), while `FunctionRegistry` is an ordinary object with `Object.prototype` on its chain. A bare index lookup would therefore resolve `toString`, `valueOf`, `constructor` and friends as though a consumer had registered them; only the registry's own keys count as registered function names. */
|
|
28
|
-
export declare function invokeRegisteredFunction(functions: Readonly<FunctionRegistry>, fnName: string, args: readonly ComputedValue[]): Evaluation<ComputedValue>;
|
|
29
|
-
//#endregion
|
|
27
|
+
export declare function invokeRegisteredFunction(functions: Readonly<FunctionRegistry>, fnName: string, args: readonly ComputedValue[]): Evaluation<ComputedValue>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { a as Unit, t as ComputedValue } from "./computed-value-
|
|
2
|
-
import { FunctionRegistry } from "./functions.js";
|
|
3
|
-
import { ArithmeticOperator, ComparisonOperator, TextComparisonOperator } from "./tree.js";
|
|
1
|
+
import { a as Unit, t as ComputedValue } from "./computed-value-CaFJ1YkU.js";
|
|
4
2
|
import { Evaluation } from "./evaluation.js";
|
|
3
|
+
import { FunctionRegistry } from "./functions.js";
|
|
5
4
|
import { Absence } from "./resolvers.js";
|
|
6
|
-
|
|
5
|
+
import { ArithmeticOperator, ComparisonOperator, TextComparisonOperator } from "./tree.js";
|
|
7
6
|
/** The indeterminate result for a resolver's report of absence: `not-yet-known` when the resolver said the value has not been supplied yet, `not-found` otherwise. The two share every propagation rule except `exists` (and so `coalesce`), which is why every resolver call site goes through this one function. */
|
|
8
7
|
export declare function absenceEvaluation(absence: Readonly<Absence>, notFoundMessage: string, notYetKnownMessage: string): Evaluation<never>;
|
|
9
8
|
/** The three-valued AND table: `false` is absorbing regardless of the other operand's indeterminacy; otherwise both-definite folds to a boolean AND; otherwise indeterminate, with the tie-break rule (declared operand order, left before right) applied via `firstIndeterminate`. */
|
|
@@ -25,5 +24,4 @@ export declare function applyArithmetic(op: ArithmeticOperator, left: ComputedVa
|
|
|
25
24
|
/** `reference`'s optional expected-unit check: when `expectedUnit` is declared (from `node.unit`), the resolved value must be numeric (`number` or `complex`) and its own unit must match. Returns the `wrong-type` `Evaluation` to return immediately if the check fails, or `undefined` if the reference may resolve as-is. */
|
|
26
25
|
export declare function checkReferenceUnit(expectedUnit: Unit | undefined, resolvedValue: ComputedValue): Evaluation<never> | undefined;
|
|
27
26
|
/** `call`'s own function-registry dispatch, given the `fn` name off the tree and its already-evaluated `args`. `node.fn` comes off the serialised tree, which this design treats as data that may have been authored anywhere (see README.md's opening section), while `FunctionRegistry` is an ordinary object with `Object.prototype` on its chain. A bare index lookup would therefore resolve `toString`, `valueOf`, `constructor` and friends as though a consumer had registered them; only the registry's own keys count as registered function names. */
|
|
28
|
-
export declare function invokeRegisteredFunction(functions: Readonly<FunctionRegistry>, fnName: string, args: readonly ComputedValue[]): Evaluation<ComputedValue>;
|
|
29
|
-
//#endregion
|
|
27
|
+
export declare function invokeRegisteredFunction(functions: Readonly<FunctionRegistry>, fnName: string, args: readonly ComputedValue[]): Evaluation<ComputedValue>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { combineUnitsForDivide, combineUnitsForMultiply, unitsEqual } from "./computed-value.js";
|
|
2
|
+
import { definite, firstIndeterminate, indeterminate } from "./evaluation.js";
|
|
2
3
|
import { divideComplexComponents } from "./complex-division.js";
|
|
3
4
|
import { compareDurations, millisecondsPerDurationUnit } from "./duration-order.js";
|
|
4
|
-
import { definite, firstIndeterminate, indeterminate } from "./evaluation.js";
|
|
5
5
|
import { powerByRepeatedSquaring } from "./integer-power.js";
|
|
6
6
|
import { RegexParseError, compilePattern } from "trilean-regex";
|
|
7
|
-
|
|
7
|
+
// src/evaluator-operations.ts
|
|
8
8
|
/** The indeterminate result for a resolver's report of absence: `not-yet-known` when the resolver said the value has not been supplied yet, `not-found` otherwise. The two share every propagation rule except `exists` (and so `coalesce`), which is why every resolver call site goes through this one function. */
|
|
9
9
|
function absenceEvaluation(absence, notFoundMessage, notYetKnownMessage) {
|
|
10
10
|
return absence.notYetKnown === true ? indeterminate("not-yet-known", notYetKnownMessage) : indeterminate("not-found", notFoundMessage);
|
|
@@ -427,5 +427,4 @@ function invokeRegisteredFunction(functions, fnName, args) {
|
|
|
427
427
|
if ("wrongType" in outcome) return indeterminate("wrong-type", outcome.wrongType);
|
|
428
428
|
return definite(outcome);
|
|
429
429
|
}
|
|
430
|
-
//#endregion
|
|
431
430
|
export { absenceEvaluation, applyArithmetic, applyNegate, checkReferenceUnit, combineAnd, combineOr, compareText, compareValues, computeMembershipMatch, invokeRegisteredFunction };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_index_CZzC1gGg = require("./index.CZzC1gGg-
|
|
3
|
-
|
|
2
|
+
const require_index_CZzC1gGg = require("./index.CZzC1gGg-CQphWYWn.cjs");
|
|
3
|
+
// src/evaluator-test-helpers.ts
|
|
4
4
|
/** A resolver reporting a fixed `{ kind: "number", value: 10, unit: { m: 1 } }` for key `"present"`, and not-found for anything else -- `resolveLookup`/`resolveCollection` are never exercised by expression-level nodes and are stubbed only to satisfy `Resolvers`. Shared across the split `evaluator.*.test.ts` files below; a test needing genuinely different resolver behaviour spreads over it (`{ ...resolvers, resolveValue: ... }`) locally rather than mutating this shared instance. */
|
|
5
5
|
const resolvers = {
|
|
6
6
|
resolveValue: async (key) => Promise.resolve(key === "present" ? {
|
|
@@ -32,7 +32,6 @@ function isPlainRecord(value) {
|
|
|
32
32
|
function isUnknownArray(value) {
|
|
33
33
|
return Array.isArray(value);
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
exports.expectDefinite = expectDefinite;
|
|
37
36
|
exports.expectIndeterminate = expectIndeterminate;
|
|
38
37
|
exports.isPlainRecord = isPlainRecord;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Evaluation } from "./evaluation.cjs";
|
|
2
2
|
import { Resolvers } from "./resolvers.cjs";
|
|
3
|
-
//#region src/evaluator-test-helpers.d.ts
|
|
4
3
|
/** A resolver reporting a fixed `{ kind: "number", value: 10, unit: { m: 1 } }` for key `"present"`, and not-found for anything else -- `resolveLookup`/`resolveCollection` are never exercised by expression-level nodes and are stubbed only to satisfy `Resolvers`. Shared across the split `evaluator.*.test.ts` files below; a test needing genuinely different resolver behaviour spreads over it (`{ ...resolvers, resolveValue: ... }`) locally rather than mutating this shared instance. */
|
|
5
4
|
export declare const resolvers: Resolvers;
|
|
6
5
|
export declare function expectDefinite<T>(evaluation: Evaluation<T>, expected: T): void;
|
|
@@ -8,5 +7,4 @@ export declare function expectIndeterminate<T>(evaluation: Evaluation<T>, code:
|
|
|
8
7
|
/** A narrowing type guard for a resolver context treated as a plain record, following this repo's `object -> Record<string, unknown>` narrowing convention rather than an `as Record<string, unknown>` assertion. */
|
|
9
8
|
export declare function isPlainRecord(value: unknown): value is Record<string, unknown>;
|
|
10
9
|
/** `Array.isArray`'s own lib.es5.d.ts type predicate narrows to `any[]`, not `unknown[]` -- this re-typed wrapper is what lets a `resolveCollection` stub return a properly `unknown[]`-typed result instead of an implicit `any[]`. */
|
|
11
|
-
export declare function isUnknownArray(value: unknown): value is unknown[];
|
|
12
|
-
//#endregion
|
|
10
|
+
export declare function isUnknownArray(value: unknown): value is unknown[];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Evaluation } from "./evaluation.js";
|
|
2
2
|
import { Resolvers } from "./resolvers.js";
|
|
3
|
-
//#region src/evaluator-test-helpers.d.ts
|
|
4
3
|
/** A resolver reporting a fixed `{ kind: "number", value: 10, unit: { m: 1 } }` for key `"present"`, and not-found for anything else -- `resolveLookup`/`resolveCollection` are never exercised by expression-level nodes and are stubbed only to satisfy `Resolvers`. Shared across the split `evaluator.*.test.ts` files below; a test needing genuinely different resolver behaviour spreads over it (`{ ...resolvers, resolveValue: ... }`) locally rather than mutating this shared instance. */
|
|
5
4
|
export declare const resolvers: Resolvers;
|
|
6
5
|
export declare function expectDefinite<T>(evaluation: Evaluation<T>, expected: T): void;
|
|
@@ -8,5 +7,4 @@ export declare function expectIndeterminate<T>(evaluation: Evaluation<T>, code:
|
|
|
8
7
|
/** A narrowing type guard for a resolver context treated as a plain record, following this repo's `object -> Record<string, unknown>` narrowing convention rather than an `as Record<string, unknown>` assertion. */
|
|
9
8
|
export declare function isPlainRecord(value: unknown): value is Record<string, unknown>;
|
|
10
9
|
/** `Array.isArray`'s own lib.es5.d.ts type predicate narrows to `any[]`, not `unknown[]` -- this re-typed wrapper is what lets a `resolveCollection` stub return a properly `unknown[]`-typed result instead of an implicit `any[]`. */
|
|
11
|
-
export declare function isUnknownArray(value: unknown): value is unknown[];
|
|
12
|
-
//#endregion
|
|
10
|
+
export declare function isUnknownArray(value: unknown): value is unknown[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as globalExpect } from "./index.CZzC1gGg-
|
|
2
|
-
|
|
1
|
+
import { t as globalExpect } from "./index.CZzC1gGg-D3-vRdPe.js";
|
|
2
|
+
// src/evaluator-test-helpers.ts
|
|
3
3
|
/** A resolver reporting a fixed `{ kind: "number", value: 10, unit: { m: 1 } }` for key `"present"`, and not-found for anything else -- `resolveLookup`/`resolveCollection` are never exercised by expression-level nodes and are stubbed only to satisfy `Resolvers`. Shared across the split `evaluator.*.test.ts` files below; a test needing genuinely different resolver behaviour spreads over it (`{ ...resolvers, resolveValue: ... }`) locally rather than mutating this shared instance. */
|
|
4
4
|
const resolvers = {
|
|
5
5
|
resolveValue: async (key) => Promise.resolve(key === "present" ? {
|
|
@@ -31,5 +31,4 @@ function isPlainRecord(value) {
|
|
|
31
31
|
function isUnknownArray(value) {
|
|
32
32
|
return Array.isArray(value);
|
|
33
33
|
}
|
|
34
|
-
//#endregion
|
|
35
34
|
export { expectDefinite, expectIndeterminate, isPlainRecord, isUnknownArray, resolvers };
|
package/dist/evaluator.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_evaluation = require("./evaluation.cjs");
|
|
3
3
|
require("./evaluator-budget.cjs");
|
|
4
|
-
const require_evaluator_effect = require("./evaluator-effect.cjs");
|
|
5
4
|
const require_evaluator_collection = require("./evaluator-collection.cjs");
|
|
6
5
|
const require_evaluator_operations = require("./evaluator-operations.cjs");
|
|
7
6
|
const require_evaluator_literals = require("./evaluator-literals.cjs");
|
|
7
|
+
const require_evaluator_effect = require("./evaluator-effect.cjs");
|
|
8
8
|
const require_tree = require("./tree.cjs");
|
|
9
|
-
|
|
9
|
+
// src/evaluator.ts
|
|
10
10
|
/**
|
|
11
11
|
* `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`.
|
|
12
12
|
*/
|
|
@@ -224,6 +224,5 @@ function* evaluateValueInternal(node, context, resolvers, accumulator, functions
|
|
|
224
224
|
default: throw new Error("unreachable expression node kind");
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
//#endregion
|
|
228
227
|
exports.evaluatePredicateInternal = evaluatePredicateInternal;
|
|
229
228
|
exports.evaluateValueInternal = evaluateValueInternal;
|
package/dist/evaluator.d.cts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FunctionRegistry } from "./functions.cjs";
|
|
3
|
-
import { ExpressionNode, PredicateNode } from "./tree.cjs";
|
|
1
|
+
import { ComputedValue } from "./computed-value.cjs";
|
|
4
2
|
import { Evaluation } from "./evaluation.cjs";
|
|
5
3
|
import { EvaluationBudget } from "./evaluator-budget.cjs";
|
|
4
|
+
import { FunctionRegistry } from "./functions.cjs";
|
|
6
5
|
import { Task } from "./evaluator-effect.cjs";
|
|
7
6
|
import { EvaluationContext, EvaluatorResolvers } from "./resolvers.cjs";
|
|
8
|
-
|
|
7
|
+
import { ExpressionNode, PredicateNode } from "./tree.cjs";
|
|
9
8
|
/**
|
|
10
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`.
|
|
11
10
|
*/
|
|
12
11
|
export declare function evaluatePredicateInternal(node: PredicateNode, context: EvaluationContext, resolvers: Readonly<EvaluatorResolvers>, accumulator: ComputedValue | undefined, functions: Readonly<FunctionRegistry>, visitedTreeKeys: ReadonlySet<string>, treeReferenceDepth: number, budget: Readonly<EvaluationBudget>, nestingDepth: number): Task<Evaluation<boolean>>;
|
|
13
|
-
export declare function evaluateValueInternal(node: ExpressionNode, context: EvaluationContext, resolvers: Readonly<EvaluatorResolvers>, accumulator: ComputedValue | undefined, functions: Readonly<FunctionRegistry>, visitedTreeKeys: ReadonlySet<string>, treeReferenceDepth: number, budget: Readonly<EvaluationBudget>, nestingDepth: number): Task<Evaluation<ComputedValue>>;
|
|
14
|
-
//#endregion
|
|
12
|
+
export declare function evaluateValueInternal(node: ExpressionNode, context: EvaluationContext, resolvers: Readonly<EvaluatorResolvers>, accumulator: ComputedValue | undefined, functions: Readonly<FunctionRegistry>, visitedTreeKeys: ReadonlySet<string>, treeReferenceDepth: number, budget: Readonly<EvaluationBudget>, nestingDepth: number): Task<Evaluation<ComputedValue>>;
|
package/dist/evaluator.d.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { t as ComputedValue } from "./computed-value-
|
|
2
|
-
import { FunctionRegistry } from "./functions.js";
|
|
3
|
-
import { ExpressionNode, PredicateNode } from "./tree.js";
|
|
1
|
+
import { t as ComputedValue } from "./computed-value-CaFJ1YkU.js";
|
|
4
2
|
import { Evaluation } from "./evaluation.js";
|
|
5
3
|
import { EvaluationBudget } from "./evaluator-budget.js";
|
|
4
|
+
import { FunctionRegistry } from "./functions.js";
|
|
6
5
|
import { Task } from "./evaluator-effect.js";
|
|
7
6
|
import { EvaluationContext, EvaluatorResolvers } from "./resolvers.js";
|
|
8
|
-
|
|
7
|
+
import { ExpressionNode, PredicateNode } from "./tree.js";
|
|
9
8
|
/**
|
|
10
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`.
|
|
11
10
|
*/
|
|
12
11
|
export declare function evaluatePredicateInternal(node: PredicateNode, context: EvaluationContext, resolvers: Readonly<EvaluatorResolvers>, accumulator: ComputedValue | undefined, functions: Readonly<FunctionRegistry>, visitedTreeKeys: ReadonlySet<string>, treeReferenceDepth: number, budget: Readonly<EvaluationBudget>, nestingDepth: number): Task<Evaluation<boolean>>;
|
|
13
|
-
export declare function evaluateValueInternal(node: ExpressionNode, context: EvaluationContext, resolvers: Readonly<EvaluatorResolvers>, accumulator: ComputedValue | undefined, functions: Readonly<FunctionRegistry>, visitedTreeKeys: ReadonlySet<string>, treeReferenceDepth: number, budget: Readonly<EvaluationBudget>, nestingDepth: number): Task<Evaluation<ComputedValue>>;
|
|
14
|
-
//#endregion
|
|
12
|
+
export declare function evaluateValueInternal(node: ExpressionNode, context: EvaluationContext, resolvers: Readonly<EvaluatorResolvers>, accumulator: ComputedValue | undefined, functions: Readonly<FunctionRegistry>, visitedTreeKeys: ReadonlySet<string>, treeReferenceDepth: number, budget: Readonly<EvaluationBudget>, nestingDepth: number): Task<Evaluation<ComputedValue>>;
|
package/dist/evaluator.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { definite, firstIndeterminate, indeterminate } from "./evaluation.js";
|
|
2
2
|
import "./evaluator-budget.js";
|
|
3
|
-
import { all, wait } from "./evaluator-effect.js";
|
|
4
3
|
import { firstFilterIndeterminate, resolveParticipatingItems } from "./evaluator-collection.js";
|
|
5
4
|
import { absenceEvaluation, applyArithmetic, applyNegate, checkReferenceUnit, combineAnd, combineOr, compareText, compareValues, computeMembershipMatch, invokeRegisteredFunction } from "./evaluator-operations.js";
|
|
6
5
|
import { literalValue } from "./evaluator-literals.js";
|
|
6
|
+
import { all, wait } from "./evaluator-effect.js";
|
|
7
7
|
import { ExpressionNodeSchema, PredicateNodeSchema } from "./tree.js";
|
|
8
|
-
|
|
8
|
+
// src/evaluator.ts
|
|
9
9
|
/**
|
|
10
10
|
* `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`.
|
|
11
11
|
*/
|
|
@@ -223,5 +223,4 @@ function* evaluateValueInternal(node, context, resolvers, accumulator, functions
|
|
|
223
223
|
default: throw new Error("unreachable expression node kind");
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
//#endregion
|
|
227
226
|
export { evaluatePredicateInternal, evaluateValueInternal };
|
package/dist/functions.cjs
CHANGED
package/dist/functions.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/functions.d.ts
|
|
1
|
+
import { ComputedValue } from "./computed-value.cjs";
|
|
3
2
|
/** What a registered function returns instead of a value when it cannot produce one: a `domainError` for an argument of the right kind outside the function's domain (`squareRoot` of a negative number), or a `wrongType` for an argument the function cannot accept at all (the wrong kind, or units that do not match). They surface as `domain-error` and `wrong-type` respectively, the same split every other node kind draws. */
|
|
4
3
|
export type FunctionFailure = {
|
|
5
4
|
domainError: string;
|
|
@@ -10,5 +9,4 @@ export type FunctionFailure = {
|
|
|
10
9
|
* Named functions available to a `call` expression node, supplied once at evaluator construction time (see `createEvaluator` in evaluator-factory.ts) rather than per evaluation call. A function reports a failure by returning a `FunctionFailure` rather than throwing, which keeps `call` inside the same three-outcome model as every other node kind.
|
|
11
10
|
*/
|
|
12
11
|
export type FunctionRegistry = Record<string, (args: readonly ComputedValue[]) => ComputedValue | FunctionFailure>;
|
|
13
|
-
export declare const emptyFunctionRegistry: FunctionRegistry;
|
|
14
|
-
//#endregion
|
|
12
|
+
export declare const emptyFunctionRegistry: FunctionRegistry;
|
package/dist/functions.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as ComputedValue } from "./computed-value-
|
|
2
|
-
//#region src/functions.d.ts
|
|
1
|
+
import { t as ComputedValue } from "./computed-value-CaFJ1YkU.js";
|
|
3
2
|
/** What a registered function returns instead of a value when it cannot produce one: a `domainError` for an argument of the right kind outside the function's domain (`squareRoot` of a negative number), or a `wrongType` for an argument the function cannot accept at all (the wrong kind, or units that do not match). They surface as `domain-error` and `wrong-type` respectively, the same split every other node kind draws. */
|
|
4
3
|
export type FunctionFailure = {
|
|
5
4
|
domainError: string;
|
|
@@ -10,5 +9,4 @@ export type FunctionFailure = {
|
|
|
10
9
|
* Named functions available to a `call` expression node, supplied once at evaluator construction time (see `createEvaluator` in evaluator-factory.ts) rather than per evaluation call. A function reports a failure by returning a `FunctionFailure` rather than throwing, which keeps `call` inside the same three-outcome model as every other node kind.
|
|
11
10
|
*/
|
|
12
11
|
export type FunctionRegistry = Record<string, (args: readonly ComputedValue[]) => ComputedValue | FunctionFailure>;
|
|
13
|
-
export declare const emptyFunctionRegistry: FunctionRegistry;
|
|
14
|
-
//#endregion
|
|
12
|
+
export declare const emptyFunctionRegistry: FunctionRegistry;
|
package/dist/functions.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/tinyrainbow.Do8I1XRG.js
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
|
|
3
|
+
// ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/tinyrainbow.Do8I1XRG.js
|
|
5
4
|
var d$1 = (e) => String(e);
|
|
6
5
|
d$1.open = d$1.close = "";
|
|
7
6
|
var i$1 = () => d$1;
|
|
@@ -85,8 +84,7 @@ function h$1({ force: e } = {}) {
|
|
|
85
84
|
return y$1(e || C$1());
|
|
86
85
|
}
|
|
87
86
|
var $ = h$1();
|
|
88
|
-
|
|
89
|
-
//#region ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/index.D0heQG4v.js
|
|
87
|
+
// ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/index.D0heQG4v.js
|
|
90
88
|
function _mergeNamespaces(n, m) {
|
|
91
89
|
m.forEach(function(e) {
|
|
92
90
|
e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
|
|
@@ -1248,8 +1246,7 @@ const plugins = {
|
|
|
1248
1246
|
ReactTestComponent: plugin$6,
|
|
1249
1247
|
Error: ErrorPlugin
|
|
1250
1248
|
};
|
|
1251
|
-
|
|
1252
|
-
//#region ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/display.BlTmubjj.js
|
|
1249
|
+
// ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/display.BlTmubjj.js
|
|
1253
1250
|
const { AsymmetricMatcher: AsymmetricMatcher$3, DOMCollection: DOMCollection$2, DOMElement: DOMElement$2, Immutable: Immutable$2, ReactElement: ReactElement$2, ReactTestComponent: ReactTestComponent$2 } = plugins;
|
|
1254
1251
|
const PLUGINS$2 = [
|
|
1255
1252
|
ReactTestComponent$2,
|
|
@@ -1711,8 +1708,7 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
1711
1708
|
const isAbsolute = function(p) {
|
|
1712
1709
|
return _IS_ABSOLUTE_RE.test(p);
|
|
1713
1710
|
};
|
|
1714
|
-
|
|
1715
|
-
//#region ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/source-map.DakdQc29.js
|
|
1711
|
+
// ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/source-map.DakdQc29.js
|
|
1716
1712
|
var build = {};
|
|
1717
1713
|
var hasRequiredBuild;
|
|
1718
1714
|
function requireBuild() {
|
|
@@ -2505,8 +2501,7 @@ function getOriginalPosition(map, needle) {
|
|
|
2505
2501
|
if (result.column == null) return null;
|
|
2506
2502
|
return result;
|
|
2507
2503
|
}
|
|
2508
|
-
|
|
2509
|
-
//#region ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/task-utils.js
|
|
2504
|
+
// ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/task-utils.js
|
|
2510
2505
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2511
2506
|
function getNames(task) {
|
|
2512
2507
|
const names = [task.name];
|
|
@@ -2522,8 +2517,7 @@ function getNames(task) {
|
|
|
2522
2517
|
function createTaskName(names, separator = " > ") {
|
|
2523
2518
|
return names.filter((name) => name !== void 0).join(separator);
|
|
2524
2519
|
}
|
|
2525
|
-
|
|
2526
|
-
//#region ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/run.CjdgFZiW.js
|
|
2520
|
+
// ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/run.CjdgFZiW.js
|
|
2527
2521
|
/**
|
|
2528
2522
|
* Diff Match and Patch
|
|
2529
2523
|
* Copyright 2018 The diff-match-patch Authors.
|
|
@@ -5107,8 +5101,7 @@ async function finishSendTasksUpdate(runner) {
|
|
|
5107
5101
|
sendTasksUpdate(runner);
|
|
5108
5102
|
await Promise.all(pendingTasksUpdates);
|
|
5109
5103
|
}
|
|
5110
|
-
|
|
5111
|
-
//#region ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/utils.DYj33du9.js
|
|
5104
|
+
// ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/utils.DYj33du9.js
|
|
5112
5105
|
const NAME_WORKER_STATE = "__vitest_worker__";
|
|
5113
5106
|
function getWorkerState() {
|
|
5114
5107
|
const workerState = globalThis[NAME_WORKER_STATE];
|
|
@@ -5133,8 +5126,7 @@ function resetModules(modules, resetMocks = false) {
|
|
|
5133
5126
|
node.importers.clear();
|
|
5134
5127
|
});
|
|
5135
5128
|
}
|
|
5136
|
-
|
|
5137
|
-
//#region ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/spy.DDMXghXv.js
|
|
5129
|
+
// ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/spy.DDMXghXv.js
|
|
5138
5130
|
function isMockFunction(fn) {
|
|
5139
5131
|
return typeof fn === "function" && "_isMockFunction" in fn && fn._isMockFunction === true;
|
|
5140
5132
|
}
|
|
@@ -5574,8 +5566,7 @@ function resetAllMocks() {
|
|
|
5574
5566
|
function throwConstructorError(shorthand) {
|
|
5575
5567
|
throw new TypeError(`Cannot use \`${shorthand}\` when called with \`new\`. Use \`mockImplementation\` with a \`class\` keyword instead. See https://vitest.dev/api/mock#class-support for more information.`);
|
|
5576
5568
|
}
|
|
5577
|
-
|
|
5578
|
-
//#region ../../node_modules/.pnpm/chai@6.3.0/node_modules/chai/index.js
|
|
5569
|
+
// ../../node_modules/.pnpm/chai@6.3.0/node_modules/chai/index.js
|
|
5579
5570
|
var __defProp = Object.defineProperty;
|
|
5580
5571
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
5581
5572
|
enumerable: true,
|
|
@@ -8588,8 +8579,7 @@ function use(fn) {
|
|
|
8588
8579
|
return exports;
|
|
8589
8580
|
}
|
|
8590
8581
|
__name(use, "use");
|
|
8591
|
-
|
|
8592
|
-
//#region ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/plugins.DPQHVT0p.js
|
|
8582
|
+
// ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/plugins.DPQHVT0p.js
|
|
8593
8583
|
const serialize$1 = (val, config, indentation, depth, refs, printer) => {
|
|
8594
8584
|
const name = val.getMockName();
|
|
8595
8585
|
const nameString = name === "vi.fn()" ? "" : ` ${name}`;
|
|
@@ -8621,8 +8611,7 @@ function addSerializer(plugin) {
|
|
|
8621
8611
|
function getSerializers() {
|
|
8622
8612
|
return PLUGINS;
|
|
8623
8613
|
}
|
|
8624
|
-
|
|
8625
|
-
//#region ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/offset.Dy-5Fdfn.js
|
|
8614
|
+
// ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/offset.Dy-5Fdfn.js
|
|
8626
8615
|
const lineSplitRE = /\r?\n/;
|
|
8627
8616
|
function positionToOffset(source, lineNumber, columnNumber) {
|
|
8628
8617
|
const lines = source.split(lineSplitRE);
|
|
@@ -8645,8 +8634,7 @@ function offsetToLineNumber(source, offset) {
|
|
|
8645
8634
|
}
|
|
8646
8635
|
return line + 1;
|
|
8647
8636
|
}
|
|
8648
|
-
|
|
8649
|
-
//#region ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/rawSnapshot.DqSiqIEx.js
|
|
8637
|
+
// ../../node_modules/.pnpm/vitest@5.1.0_@types+node@26.6.5_@vitest+coverage-v8@5.0.4_vite@8.2.2_@types+node@26.6.5_4fc92309849883ad11a836cad05c50d8/node_modules/vitest/dist/chunks/rawSnapshot.DqSiqIEx.js
|
|
8650
8638
|
var naturalCompare$1 = { exports: {} };
|
|
8651
8639
|
var hasRequiredNaturalCompare;
|
|
8652
8640
|
function requireNaturalCompare() {
|
|
@@ -8813,7 +8801,7 @@ function memo(fn) {
|
|
|
8813
8801
|
};
|
|
8814
8802
|
}
|
|
8815
8803
|
async function saveInlineSnapshots(environment, snapshots) {
|
|
8816
|
-
const MagicString = (await Promise.resolve().then(() => require("./dist-
|
|
8804
|
+
const MagicString = (await Promise.resolve().then(() => require("./dist-ySX7cb5d.cjs"))).default;
|
|
8817
8805
|
const files = new Set(snapshots.map((i) => i.file));
|
|
8818
8806
|
await Promise.all(Array.from(files).map(async (file) => {
|
|
8819
8807
|
const snaps = snapshots.filter((i) => i.file === file);
|
|
@@ -8951,28 +8939,24 @@ const { runtime: h, version: g } = p();
|
|
|
8951
8939
|
globalThis.performance.now.bind(globalThis.performance);
|
|
8952
8940
|
globalThis.process?.hrtime?.bigint.bind(globalThis.process?.hrtime);
|
|
8953
8941
|
globalThis.Bun?.nanoseconds;
|
|
8954
|
-
|
|
8955
|
-
//#region ../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/branding.js
|
|
8942
|
+
// ../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/branding.js
|
|
8956
8943
|
var require_branding = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
8957
8944
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8958
8945
|
}));
|
|
8959
|
-
|
|
8960
|
-
//#region ../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/messages.js
|
|
8946
|
+
// ../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/messages.js
|
|
8961
8947
|
var require_messages = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
8962
8948
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8963
8949
|
}));
|
|
8964
|
-
|
|
8965
|
-
//#region ../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/overloads.js
|
|
8950
|
+
// ../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/overloads.js
|
|
8966
8951
|
var require_overloads = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
8967
8952
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8968
8953
|
}));
|
|
8969
|
-
|
|
8970
|
-
//#region ../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/utils.js
|
|
8954
|
+
// ../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/utils.js
|
|
8971
8955
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
8972
8956
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8973
8957
|
}));
|
|
8974
|
-
(/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
8975
|
-
var __createBinding =
|
|
8958
|
+
(/* @__PURE__ */ __commonJSMin(((exports, module, this$1) => {
|
|
8959
|
+
var __createBinding = this$1 && this$1.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
8976
8960
|
if (k2 === void 0) k2 = k;
|
|
8977
8961
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8978
8962
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
@@ -8986,8 +8970,8 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
8986
8970
|
if (k2 === void 0) k2 = k;
|
|
8987
8971
|
o[k2] = m[k];
|
|
8988
8972
|
}));
|
|
8989
|
-
var __exportStar =
|
|
8990
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports
|
|
8973
|
+
var __exportStar = this$1 && this$1.__exportStar || function(m, exports) {
|
|
8974
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
8991
8975
|
};
|
|
8992
8976
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8993
8977
|
exports.expectTypeOf = void 0;
|
|
@@ -15006,7 +14990,6 @@ Object.defineProperty(globalThis, GLOBAL_EXPECT, {
|
|
|
15006
14990
|
configurable: true
|
|
15007
14991
|
});
|
|
15008
14992
|
globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
|
|
15009
|
-
//#endregion
|
|
15010
14993
|
Object.defineProperty(exports, "globalExpect", {
|
|
15011
14994
|
enumerable: true,
|
|
15012
14995
|
get: function() {
|